aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/CONTRIBUTING.md (renamed from CONTRIBUTING.md)2
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md10
-rw-r--r--.jshintrc3
-rw-r--r--.travis.yml4
-rw-r--r--README.md12
-rw-r--r--build/build.xml58
-rw-r--r--build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php93
-rw-r--r--build/sami-all.conf.php1
-rwxr-xr-xcomposer.pharbin1075150 -> 1585196 bytes
-rw-r--r--phpBB/.htaccess10
-rw-r--r--phpBB/adm/style/acp_attachments.html4
-rw-r--r--phpBB/adm/style/acp_avatar_options_gravatar.html4
-rw-r--r--phpBB/adm/style/acp_avatar_options_local.html2
-rw-r--r--phpBB/adm/style/acp_avatar_options_remote.html4
-rw-r--r--phpBB/adm/style/acp_ban.html2
-rw-r--r--phpBB/adm/style/acp_captcha.html11
-rw-r--r--phpBB/adm/style/acp_database.html2
-rw-r--r--phpBB/adm/style/acp_email.html4
-rw-r--r--phpBB/adm/style/acp_ext_list.html12
-rw-r--r--phpBB/adm/style/acp_forums.html14
-rw-r--r--phpBB/adm/style/acp_groups.html8
-rw-r--r--phpBB/adm/style/acp_groups_position.html4
-rw-r--r--phpBB/adm/style/acp_icons.html8
-rw-r--r--phpBB/adm/style/acp_inactive.html4
-rw-r--r--phpBB/adm/style/acp_jabber.html4
-rw-r--r--phpBB/adm/style/acp_logs.html2
-rw-r--r--phpBB/adm/style/acp_main.html15
-rw-r--r--phpBB/adm/style/acp_permissions.html12
-rw-r--r--phpBB/adm/style/acp_posting_buttons.html1
-rw-r--r--phpBB/adm/style/acp_profile.html2
-rw-r--r--phpBB/adm/style/acp_prune_forums.html2
-rw-r--r--phpBB/adm/style/acp_prune_users.html2
-rw-r--r--phpBB/adm/style/acp_ranks.html2
-rw-r--r--phpBB/adm/style/acp_search.html10
-rw-r--r--phpBB/adm/style/acp_styles.html3
-rw-r--r--phpBB/adm/style/acp_update.html23
-rw-r--r--phpBB/adm/style/acp_users.html2
-rw-r--r--phpBB/adm/style/acp_users_prefs.html2
-rw-r--r--phpBB/adm/style/acp_users_profile.html2
-rw-r--r--phpBB/adm/style/admin.css2
-rw-r--r--phpBB/adm/style/install_footer.html2
-rw-r--r--phpBB/adm/style/install_header.html1
-rw-r--r--phpBB/adm/style/install_update_diff.html1
-rw-r--r--phpBB/adm/style/overall_footer.html2
-rw-r--r--phpBB/adm/style/overall_header.html1
-rw-r--r--phpBB/adm/style/permission_forum_copy.html4
-rw-r--r--phpBB/adm/style/simple_footer.html2
-rw-r--r--phpBB/adm/style/simple_header.html1
-rw-r--r--phpBB/assets/javascript/core.js15
-rw-r--r--phpBB/assets/javascript/editor.js6
-rwxr-xr-xphpBB/bin/phpbbcli.php2
-rw-r--r--phpBB/common.php8
-rw-r--r--phpBB/composer.json9
-rw-r--r--phpBB/composer.lock947
-rw-r--r--phpBB/config/auth.yml1
-rw-r--r--phpBB/config/event.yml7
-rw-r--r--phpBB/config/feed.yml7
-rw-r--r--phpBB/cron.php12
-rw-r--r--phpBB/docs/CHANGELOG.html394
-rw-r--r--phpBB/docs/CREDITS.txt11
-rw-r--r--phpBB/docs/FAQ.html1
-rw-r--r--phpBB/docs/INSTALL.html15
-rw-r--r--phpBB/docs/README.html3
-rw-r--r--phpBB/docs/auth_api.html1
-rw-r--r--phpBB/docs/coding-guidelines.html1
-rw-r--r--phpBB/docs/events.md661
-rw-r--r--phpBB/docs/lighttpd.sample.conf13
-rw-r--r--phpBB/docs/nginx.sample.conf17
-rw-r--r--phpBB/download/file.php5
-rw-r--r--phpBB/feed.php14
-rw-r--r--phpBB/includes/acp/acp_attachments.php25
-rw-r--r--phpBB/includes/acp/acp_ban.php5
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php8
-rw-r--r--phpBB/includes/acp/acp_board.php8
-rw-r--r--phpBB/includes/acp/acp_bots.php6
-rw-r--r--phpBB/includes/acp/acp_captcha.php65
-rw-r--r--phpBB/includes/acp/acp_database.php8
-rw-r--r--phpBB/includes/acp/acp_disallow.php4
-rw-r--r--phpBB/includes/acp/acp_email.php11
-rw-r--r--phpBB/includes/acp/acp_extensions.php25
-rw-r--r--phpBB/includes/acp/acp_forums.php26
-rw-r--r--phpBB/includes/acp/acp_groups.php25
-rw-r--r--phpBB/includes/acp/acp_icons.php30
-rw-r--r--phpBB/includes/acp/acp_inactive.php18
-rw-r--r--phpBB/includes/acp/acp_jabber.php5
-rw-r--r--phpBB/includes/acp/acp_language.php12
-rw-r--r--phpBB/includes/acp/acp_main.php35
-rw-r--r--phpBB/includes/acp/acp_modules.php32
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php20
-rw-r--r--phpBB/includes/acp/acp_permissions.php11
-rw-r--r--phpBB/includes/acp/acp_profile.php55
-rw-r--r--phpBB/includes/acp/acp_prune.php6
-rw-r--r--phpBB/includes/acp/acp_reasons.php9
-rw-r--r--phpBB/includes/acp/acp_search.php27
-rw-r--r--phpBB/includes/acp/acp_send_statistics.php5
-rw-r--r--phpBB/includes/acp/acp_styles.php18
-rw-r--r--phpBB/includes/acp/acp_update.php12
-rw-r--r--phpBB/includes/acp/acp_users.php135
-rw-r--r--phpBB/includes/acp/auth.php10
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php131
-rw-r--r--phpBB/includes/functions_acp.php35
-rw-r--r--phpBB/includes/functions_admin.php285
-rw-r--r--phpBB/includes/functions_content.php147
-rw-r--r--phpBB/includes/functions_convert.php16
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_download.php7
-rw-r--r--phpBB/includes/functions_mcp.php4
-rw-r--r--phpBB/includes/functions_messenger.php60
-rw-r--r--phpBB/includes/functions_posting.php70
-rw-r--r--phpBB/includes/functions_privmsgs.php2
-rw-r--r--phpBB/includes/functions_upload.php15
-rw-r--r--phpBB/includes/functions_user.php106
-rw-r--r--phpBB/includes/mcp/info/mcp_pm_reports.php6
-rw-r--r--phpBB/includes/mcp/mcp_forum.php47
-rw-r--r--phpBB/includes/mcp/mcp_front.php12
-rw-r--r--phpBB/includes/mcp/mcp_main.php36
-rw-r--r--phpBB/includes/mcp/mcp_post.php21
-rw-r--r--phpBB/includes/mcp/mcp_queue.php19
-rw-r--r--phpBB/includes/mcp/mcp_reports.php6
-rw-r--r--phpBB/includes/mcp/mcp_topic.php24
-rw-r--r--phpBB/includes/mcp/mcp_warn.php24
-rw-r--r--phpBB/includes/message_parser.php2
-rw-r--r--phpBB/includes/ucp/ucp_groups.php12
-rw-r--r--phpBB/includes/ucp/ucp_main.php129
-rw-r--r--phpBB/includes/ucp/ucp_pm.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php30
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php45
-rw-r--r--phpBB/includes/ucp/ucp_profile.php80
-rw-r--r--phpBB/index.php63
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rw-r--r--phpBB/install/database_update.php10
-rw-r--r--phpBB/install/index.php1
-rw-r--r--phpBB/install/install_convert.php2
-rw-r--r--phpBB/install/install_install.php6
-rw-r--r--phpBB/install/install_update.php4
-rw-r--r--phpBB/install/schemas/schema_data.sql5
-rw-r--r--phpBB/language/en/acp/attachments.php4
-rw-r--r--phpBB/language/en/acp/board.php1
-rw-r--r--phpBB/language/en/acp/common.php1
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php7
-rw-r--r--phpBB/language/en/acp/search.php2
-rw-r--r--phpBB/language/en/app.php2
-rw-r--r--phpBB/language/en/captcha_qa.php2
-rw-r--r--phpBB/language/en/cli.php9
-rw-r--r--phpBB/language/en/common.php7
-rw-r--r--phpBB/language/en/email/forum_notify.txt2
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt2
-rw-r--r--phpBB/language/en/email/short/newtopic_notify.txt2
-rw-r--r--phpBB/language/en/email/short/topic_notify.txt2
-rw-r--r--phpBB/language/en/email/topic_notify.txt2
-rw-r--r--phpBB/language/en/help_bbcode.php6
-rw-r--r--phpBB/language/en/install.php17
-rw-r--r--phpBB/language/en/memberlist.php1
-rw-r--r--phpBB/language/en/migrator.php4
-rw-r--r--phpBB/language/en/posting.php10
-rw-r--r--phpBB/language/en/search_ignore_words.php271
-rw-r--r--phpBB/language/en/search_synonyms.php191
-rw-r--r--phpBB/language/en/ucp.php4
-rw-r--r--phpBB/memberlist.php135
-rw-r--r--phpBB/phpbb/auth/auth.php19
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php43
-rw-r--r--phpBB/phpbb/avatar/driver/driver.php16
-rw-r--r--phpBB/phpbb/avatar/driver/driver_interface.php14
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php17
-rw-r--r--phpBB/phpbb/avatar/driver/local.php6
-rw-r--r--phpBB/phpbb/avatar/driver/remote.php4
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php16
-rw-r--r--phpBB/phpbb/avatar/manager.php16
-rw-r--r--phpBB/phpbb/cache/driver/base.php5
-rw-r--r--phpBB/phpbb/cache/driver/file.php5
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php44
-rw-r--r--phpBB/phpbb/composer.json7
-rw-r--r--phpBB/phpbb/console/command/cron/run.php1
-rw-r--r--phpBB/phpbb/content_visibility.php122
-rw-r--r--phpBB/phpbb/controller/helper.php25
-rw-r--r--phpBB/phpbb/cron/manager.php2
-rw-r--r--phpBB/phpbb/db/driver/driver.php1
-rw-r--r--phpBB/phpbb/db/driver/sqlite3.php1
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta4.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/gold.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php13
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc3.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc4.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc5.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc6.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/add_log_time_index.php46
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php35
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/m_pm_report.php64
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php77
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v311.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v3110.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v3110rc1.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v312.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v312rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v313rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v314rc2.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v315.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v315rc1.php5
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v316.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v316rc1.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317pl1.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v317rc1.php37
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v318.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v318rc1.php37
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v319.php36
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v319rc1.php36
-rw-r--r--phpBB/phpbb/db/migration/helper.php32
-rw-r--r--phpBB/phpbb/db/migration/tool/config.php5
-rw-r--r--phpBB/phpbb/db/migration/tool/config_text.php5
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php201
-rw-r--r--phpBB/phpbb/db/migration/tool/permission.php5
-rw-r--r--phpBB/phpbb/db/migrator.php205
-rw-r--r--phpBB/phpbb/db/migrator_output_handler_interface.php10
-rw-r--r--phpBB/phpbb/db/tools.php7
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php8
-rw-r--r--phpBB/phpbb/feed/base.php37
-rw-r--r--phpBB/phpbb/feed/helper.php6
-rw-r--r--phpBB/phpbb/file_downloader.php2
-rw-r--r--phpBB/phpbb/log/log.php6
-rw-r--r--phpBB/phpbb/notification/manager.php40
-rw-r--r--phpBB/phpbb/notification/method/messenger_base.php4
-rw-r--r--phpBB/phpbb/notification/type/approve_post.php2
-rw-r--r--phpBB/phpbb/notification/type/approve_topic.php2
-rw-r--r--phpBB/phpbb/notification/type/bookmark.php2
-rw-r--r--phpBB/phpbb/notification/type/post.php2
-rw-r--r--phpBB/phpbb/notification/type/post_in_queue.php2
-rw-r--r--phpBB/phpbb/notification/type/quote.php6
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php4
-rw-r--r--phpBB/phpbb/notification/type/topic_in_queue.php2
-rw-r--r--phpBB/phpbb/passwords/driver/salted_md5.php2
-rw-r--r--phpBB/phpbb/permissions.php27
-rw-r--r--phpBB/phpbb/plupload/plupload.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_int.php6
-rw-r--r--phpBB/phpbb/profilefields/type/type_string.php6
-rw-r--r--phpBB/phpbb/profilefields/type/type_text.php6
-rw-r--r--phpBB/phpbb/profilefields/type/type_url.php6
-rw-r--r--phpBB/phpbb/recursive_dot_prefix_filter_iterator.php2
-rw-r--r--phpBB/phpbb/request/request.php4
-rw-r--r--phpBB/phpbb/search/base.php46
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php76
-rw-r--r--phpBB/phpbb/search/fulltext_native.php88
-rw-r--r--phpBB/phpbb/search/fulltext_postgres.php76
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php56
-rw-r--r--phpBB/phpbb/session.php100
-rw-r--r--phpBB/phpbb/template/asset.php19
-rw-r--r--phpBB/phpbb/template/twig/twig.php2
-rw-r--r--phpBB/phpbb/user.php2
-rw-r--r--phpBB/phpbb/user_loader.php7
-rw-r--r--phpBB/phpbb/version_helper.php13
-rw-r--r--phpBB/posting.php14
-rw-r--r--phpBB/search.php160
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/ajax.js13
-rw-r--r--phpBB/styles/prosilver/template/confirm_delete_body.html4
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js5
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html4
-rw-r--r--phpBB/styles/prosilver/template/mcp_move.html4
-rw-r--r--phpBB/styles/prosilver/template/mcp_post.html4
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html7
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html8
-rw-r--r--phpBB/styles/prosilver/template/memberlist_email.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_im.html8
-rw-r--r--phpBB/styles/prosilver/template/memberlist_team.html6
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html6
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html16
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html6
-rw-r--r--phpBB/styles/prosilver/template/pagination.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html10
-rw-r--r--phpBB/styles/prosilver/template/posting_layout.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_poll_body.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_preview.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html7
-rw-r--r--phpBB/styles/prosilver/template/quickreply_editor.html1
-rw-r--r--phpBB/styles/prosilver/template/search_body.html13
-rw-r--r--phpBB/styles/prosilver/template/search_results.html2
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html3
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_local.html3
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_remote.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html6
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html8
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html12
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html1
-rw-r--r--phpBB/styles/prosilver/theme/colours.css5
-rw-r--r--phpBB/styles/prosilver/theme/common.css26
-rw-r--r--phpBB/styles/prosilver/theme/content.css6
-rw-r--r--phpBB/styles/prosilver/theme/plupload.css5
-rw-r--r--phpBB/styles/subsilver2/style.cfg4
-rw-r--r--phpBB/styles/subsilver2/template/mcp_forum.html3
-rw-r--r--phpBB/styles/subsilver2/template/mcp_move.html8
-rw-r--r--phpBB/styles/subsilver2/template/mcp_topic.html6
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_email.html8
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_group.html2
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_im.html11
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_team.html2
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_view.html6
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html1
-rw-r--r--phpBB/styles/subsilver2/template/posting_attach_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html12
-rw-r--r--phpBB/styles/subsilver2/template/posting_poll_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/posting_preview.html1
-rw-r--r--phpBB/styles/subsilver2/template/posting_topic_review.html2
-rw-r--r--phpBB/styles/subsilver2/template/quickreply_editor.html1
-rw-r--r--phpBB/styles/subsilver2/template/search_body.html20
-rw-r--r--phpBB/styles/subsilver2/template/search_results.html1
-rw-r--r--phpBB/styles/subsilver2/template/simple_header.html1
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html4
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_local.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html1
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html7
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html6
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_print.html1
-rw-r--r--phpBB/styles/subsilver2/theme/stylesheet.css6
-rw-r--r--phpBB/viewforum.php89
-rw-r--r--phpBB/viewonline.php4
-rw-r--r--phpBB/viewtopic.php41
-rw-r--r--tests/avatar/manager_test.php5
-rw-r--r--tests/composer.json2
-rw-r--r--tests/composer.lock55
-rw-r--r--tests/controller/common_helper_route.php78
-rw-r--r--tests/dbal/fixtures/migrator_module.xml93
-rw-r--r--tests/dbal/migration/if.php4
-rw-r--r--tests/dbal/migrator_test.php8
-rw-r--r--tests/dbal/migrator_tool_module_test.php158
-rw-r--r--tests/functional/extension_acp_test.php2
-rw-r--r--tests/functional/extension_global_lang_test.php7
-rw-r--r--tests/functional/feed_test.php8
-rw-r--r--tests/functional/metadata_manager_test.php7
-rw-r--r--tests/functional/notification_test.php2
-rw-r--r--tests/functional/plupload_test.php1
-rw-r--r--tests/functional/posting_test.php16
-rw-r--r--tests/functional/search/base.php20
-rw-r--r--tests/functional/user_password_reset_test.php43
-rw-r--r--tests/functions/user_delete_test.php1
-rw-r--r--tests/functions_acp/build_cfg_template_test.php8
-rw-r--r--tests/log/add_test.php9
-rw-r--r--tests/migrator/reverse_update_data_test.php56
-rw-r--r--tests/request/request_test.php106
-rw-r--r--tests/template/template_includecss_test.php11
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php15
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php3
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php377
-rwxr-xr-xtravis/setup-php-extensions.sh3
-rwxr-xr-xtravis/setup-phpbb.sh7
366 files changed, 7313 insertions, 2063 deletions
diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 6996ca22d3..3fceabda10 100644
--- a/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -2,5 +2,5 @@
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
-3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
4. Send us a pull request
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000..39eb83e454
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,10 @@
+Checklist:
+
+- [ ] Correct branch: master for new features; 3.2.x, 3.1.x for fixes
+- [ ] Tests pass
+- [ ] Code follows coding guidelines: [master / 3.2.x](https://area51.phpbb.com/docs/master/coding-guidelines.html), [3.1.x](https://area51.phpbb.com/docs/31x/coding-guidelines.html)
+- [ ] Commit follows commit message [format](https://wiki.phpbb.com/Git#Commit_Messages)
+
+Tracker ticket (set the ticket ID to **your ticket ID**):
+
+https://tracker.phpbb.com/browse/PHPBB3-12345
diff --git a/.jshintrc b/.jshintrc
index 90d3bb613e..c1efecd573 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -19,6 +19,7 @@
"jquery": true,
"globals": {
- "JSON": true
+ "JSON": true,
+ "phpbb": true
}
}
diff --git a/.travis.yml b/.travis.yml
index 2542898324..a46d825612 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,12 +22,9 @@ matrix:
env: DB=mysqli
- php: 5.6
env: DB=mysqli
- - php: 7.0
- env: DB=mysqli
- php: hhvm
env: DB=mysqli
allow_failures:
- - php: 7.0
- php: hhvm
fast_finish: true
@@ -50,4 +47,3 @@ script:
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
-
diff --git a/README.md b/README.md
index 1770a0b7c8..f465d7496e 100644
--- a/README.md
+++ b/README.md
@@ -2,34 +2,34 @@
## ABOUT
-phpBB is a free bulletin board written in PHP.
+phpBB is a free open-source bulletin board written in PHP.
## COMMUNITY
-Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
+Get your copy of phpBB, 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
+ php ../composer.phar install
## CONTRIBUTE
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
-3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
4. Send us a pull request
## AUTOMATED TESTING
-We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
+We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis builds below:
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=master)](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
+* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.2.x)](http://travis-ci.org/phpbb/phpbb) **3.2.x** - Development of version 3.2.x
* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
-* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.0.x)](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x
## LICENSE
diff --git a/build/build.xml b/build/build.xml
index 408eee3335..cc29aec654 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.1.6-dev" />
- <property name="prevversion" value="3.1.5" />
- <property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4" />
+ <property name="newversion" value="3.1.10" />
+ <property name="prevversion" value="3.1.9" />
+ <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -49,7 +49,7 @@
-->
<target name="composer">
<exec dir="phpBB"
- command="php ../composer.phar install --dev"
+ command="php ../composer.phar install --ignore-platform-reqs"
checkreturn="true"
passthru="true" />
</target>
@@ -143,6 +143,7 @@
<phingcall target="export">
<property name="revision" value="release-${version}" />
<property name="dir" value="build/old_versions/release-${version}" />
+ <property name="skip-composer" value="true" />
</phingcall>
<phingcall target="clean-diff-dir">
@@ -251,26 +252,35 @@
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
<then>
<!-- We have non-dev composer dependencies -->
- <exec dir="."
- command="git ls-tree ${revision} composer.phar"
- checkreturn="true"
- outputProperty='composer-ls-tree-output' />
<if>
- <equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
+ <not><isset property="skip-composer" /></not>
<then>
- <fail message="There are composer dependencies, but composer.phar is missing." />
- </then>
- <else>
- <!-- Export the phar, install dependencies, delete phar. -->
<exec dir="."
- command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
- checkreturn="true" />
- <exec dir="${dir}"
- command="php composer.phar install --no-dev --optimize-autoloader"
+ command="git ls-tree ${revision} composer.phar"
checkreturn="true"
- passthru="true" />
- <delete file="${dir}/composer.phar" />
- </else>
+ outputProperty='composer-ls-tree-output' />
+ <if>
+ <equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
+ <then>
+ <fail message="There are composer dependencies, but composer.phar is missing." />
+ </then>
+ <else>
+ <!-- Export the phar, install dependencies, delete phar. -->
+ <exec dir="."
+ command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
+ checkreturn="true" />
+ <exec dir="${dir}"
+ command="php composer.phar install --no-dev --optimize-autoloader --ignore-platform-reqs"
+ checkreturn="true"
+ passthru="true" />
+ <delete file="${dir}/composer.phar" />
+
+ <phingcall target="clean-vendor-dir">
+ <property name="dir" value="${dir}" />
+ </phingcall>
+ </else>
+ </if>
+ </then>
</if>
</then>
<else>
@@ -287,10 +297,6 @@
<delete dir="${dir}/develop" />
<delete dir="${dir}/install/data" />
- <phingcall target="clean-vendor-dir">
- <property name="dir" value="${dir}" />
- </phingcall>
-
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
<!-- set permissions of all files to 644, directories to 755 -->
<exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
@@ -307,6 +313,7 @@
<delete dir="${dir}/vendor/lusitanian/oauth/examples" />
<delete dir="${dir}/vendor/lusitanian/oauth/tests" />
<delete file="${dir}/vendor/lusitanian/oauth/.gitignore" />
+ <delete file="${dir}/vendor/lusitanian/oauth/.scrutinizer.yml" />
<delete file="${dir}/vendor/lusitanian/oauth/.travis.yml" />
<delete file="${dir}/vendor/lusitanian/oauth/phpunit.xml.dist" />
<delete file="${dir}/vendor/lusitanian/oauth/README.md" />
@@ -381,10 +388,9 @@
<delete file="${dir}/vendor/twig/twig/.editorconfig" />
<delete file="${dir}/vendor/twig/twig/.gitignore" />
<delete file="${dir}/vendor/twig/twig/.travis.yml" />
- <delete file="${dir}/vendor/twig/twig/AUTHORS" />
<delete file="${dir}/vendor/twig/twig/CHANGELOG" />
<delete file="${dir}/vendor/twig/twig/phpunit.xml.dist" />
- <delete file="${dir}/vendor/twig/twig/README.markdown" />
+ <delete file="${dir}/vendor/twig/twig/README.rst" />
</target>
<target name="clean-diff-dir">
diff --git a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php
index 7ffd1aadd6..3125e4f05f 100644
--- a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php
+++ b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php
@@ -129,53 +129,19 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
}
}
+ $old_docblock = $stackPtr;
+ while (($docblock = $phpcsFile->findNext(T_DOC_COMMENT_CLOSE_TAG, ($old_docblock + 1))) !== false)
+ {
+ $old_docblock = $docblock;
+ $ok = $this->checkDocblock($phpcsFile, $docblock, $tokens, $class_name_full, $class_name_short) ? true : $ok;
+ }
+
// Checks in type hinting
$old_function_declaration = $stackPtr;
while (($function_declaration = $phpcsFile->findNext(T_FUNCTION, ($old_function_declaration + 1))) !== false)
{
$old_function_declaration = $function_declaration;
- // Check docblocks
- $find = array(
- T_COMMENT,
- T_DOC_COMMENT_CLOSE_TAG,
- T_DOC_COMMENT,
- T_CLASS,
- T_FUNCTION,
- T_OPEN_TAG,
- );
-
- $comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
- if ($comment_end !== false)
- {
- if ($tokens[$comment_end]['code'] === T_DOC_COMMENT_CLOSE_TAG)
- {
- $comment_start = $tokens[$comment_end]['comment_opener'];
- foreach ($tokens[$comment_start]['comment_tags'] as $tag) {
- if ($tokens[$tag]['content'] !== '@param' && $tokens[$tag]['content'] !== '@return' && $tokens[$tag]['content'] !== '@throws') {
- continue;
- }
-
- $classes = $tokens[($tag + 2)]['content'];
- $space = strpos($classes, ' ');
- if ($space !== false) {
- $classes = substr($classes, 0, $space);
- }
-
- $tab = strpos($classes, "\t");
- if ($tab !== false) {
- $classes = substr($classes, 0, $tab);
- }
-
- $classes = explode('|', str_replace('[]', '', $classes));
- foreach ($classes as $class)
- {
- $ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
- }
- }
- }
- }
-
// Check type hint
$params = $phpcsFile->getMethodParameters($function_declaration);
foreach ($params as $param)
@@ -234,4 +200,49 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
return false;
}
+
+ /**
+ * @param PHP_CodeSniffer_File $phpcsFile
+ * @param int $field
+ * @param array $tokens
+ * @param string $class_name_full
+ * @param string $class_name_short
+ * @param bool $ok
+ *
+ * @return bool
+ */
+ private function checkDocblock(PHP_CodeSniffer_File $phpcsFile, $comment_end, $tokens, $class_name_full, $class_name_short)
+ {
+ $ok = false;
+
+ $comment_start = $tokens[$comment_end]['comment_opener'];
+ foreach ($tokens[$comment_start]['comment_tags'] as $tag)
+ {
+ if (!in_array($tokens[$tag]['content'], array('@param', '@var', '@return', '@throws'), true))
+ {
+ continue;
+ }
+
+ $classes = $tokens[($tag + 2)]['content'];
+ $space = strpos($classes, ' ');
+ if ($space !== false)
+ {
+ $classes = substr($classes, 0, $space);
+ }
+
+ $tab = strpos($classes, "\t");
+ if ($tab !== false)
+ {
+ $classes = substr($classes, 0, $tab);
+ }
+
+ $classes = explode('|', str_replace('[]', '', $classes));
+ foreach ($classes as $class)
+ {
+ $ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
+ }
+ }
+
+ return $ok;
+ }
}
diff --git a/build/sami-all.conf.php b/build/sami-all.conf.php
index 9c10209e8b..4bf812eb02 100644
--- a/build/sami-all.conf.php
+++ b/build/sami-all.conf.php
@@ -25,6 +25,7 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
*/
->add('3.0.x')
->add('3.1.x')
+ ->add('3.2.x')
->add('master')
;
diff --git a/composer.phar b/composer.phar
index 3481b599b7..fca2a8d72d 100755
--- a/composer.phar
+++ b/composer.phar
Binary files differ
diff --git a/phpBB/.htaccess b/phpBB/.htaccess
index 1ae74ed825..53bce762ea 100644
--- a/phpBB/.htaccess
+++ b/phpBB/.htaccess
@@ -2,6 +2,16 @@
RewriteEngine on
#
+# Uncomment the statement below if URL rewriting doesn't
+# work properly. If you installed phpBB in a subdirectory
+# of your site, properly set the argument for the statement.
+# e.g.: if your domain is test.com and you installed phpBB
+# in http://www.test.com/phpBB/index.php you have to set
+# the statement RewriteBase /phpBB/
+#
+#RewriteBase /
+
+#
# 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.
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index da8a0096ea..e1f7f140c9 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -196,7 +196,7 @@
</dl>
<dl>
<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>
+ <dd><input type="number" id="extgroup_filesize" min="0" max="999999999999999" step="any" 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}{L_COLON}</label></dt>
@@ -346,7 +346,7 @@
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
<td>{orphan.FILETIME}</td>
<td>{orphan.FILESIZE}</td>
- <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" maxlength="10" value="{orphan.POST_ID}" style="width: 75%;" /></td>
+ <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" min="0" max="9999999999" name="post_id[{orphan.ATTACH_ID}]" value="{orphan.POST_ID}" style="width: 75%;" /></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>
diff --git a/phpBB/adm/style/acp_avatar_options_gravatar.html b/phpBB/adm/style/acp_avatar_options_gravatar.html
index 0c2e8cc984..d5906ba87d 100644
--- a/phpBB/adm/style/acp_avatar_options_gravatar.html
+++ b/phpBB/adm/style/acp_avatar_options_gravatar.html
@@ -5,7 +5,7 @@
<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}
+ <input type="number" name="avatar_gravatar_width" id="avatar_gravatar_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="number" name="avatar_gravatar_height" id="avatar_gravatar_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" 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
index 8adafa1d99..bee3c57ea0 100644
--- a/phpBB/adm/style/acp_avatar_options_local.html
+++ b/phpBB/adm/style/acp_avatar_options_local.html
@@ -12,7 +12,7 @@
<!-- 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>
+ <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}"<!-- IF avatar_local_row.avatar_local_col.CHECKED -->checked="checked"<!-- ENDIF --> /></label>
</li>
<!-- END avatar_local_col -->
<!-- END avatar_local_row -->
diff --git a/phpBB/adm/style/acp_avatar_options_remote.html b/phpBB/adm/style/acp_avatar_options_remote.html
index 1c0e3db599..e64d13686c 100644
--- a/phpBB/adm/style/acp_avatar_options_remote.html
+++ b/phpBB/adm/style/acp_avatar_options_remote.html
@@ -5,7 +5,7 @@
<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}
+ <input type="number" name="avatar_remote_width" id="avatar_remote_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="number" name="avatar_remote_height" id="avatar_remote_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
</dd>
</dl>
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index 9e9f05120a..f2249941a5 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -52,7 +52,7 @@
<legend>{L_TITLE}</legend>
<dl>
<dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt>
- <dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
+ <dd><!-- EVENT acp_ban_cell_prepend --><textarea name="ban" cols="40" rows="3" id="ban"></textarea><!-- EVENT acp_ban_cell_append --></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>
diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
index f4866653c3..4353becd2f 100644
--- a/phpBB/adm/style/acp_captcha.html
+++ b/phpBB/adm/style/acp_captcha.html
@@ -8,6 +8,13 @@
<p>{L_ACP_VC_EXT_GET_MORE}</p>
+<!-- IF ERROR_MSG -->
+<div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{ERROR_MSG}</p>
+</div>
+<!-- ENDIF -->
+
<form id="acp_captcha" method="post" action="{U_ACTION}">
<fieldset>
@@ -20,11 +27,11 @@
</dl>
<dl>
<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>
+ <dd><input id="max_reg_attempts" type="number" min="0" max="9999" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
</dl>
<dl>
<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>
+ <dd><input id="max_login_attempts" type="number" 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}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index bf0c80bcd9..39f06319f9 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -14,7 +14,7 @@
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
<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>
+ <dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_FIRST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>
<p class="submit-buttons">
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html
index 63acd7fcc1..e14c56ab47 100644
--- a/phpBB/adm/style/acp_email.html
+++ b/phpBB/adm/style/acp_email.html
@@ -19,12 +19,14 @@
<legend>{L_COMPOSE}</legend>
<dl>
<dt><label for="group">{L_SEND_TO_GROUP}{L_COLON}</label></dt>
+ <!-- EVENT acp_email_group_options_prepend -->
<dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
+ <!-- EVENT acp_email_group_options_append -->
</dl>
<dl>
<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>
+ <dd><!-- EVENT acp_email_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_email_find_username_append --></dd>
</dl>
<dl>
<dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index f61be27c9b..ccc39ea76d 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -44,11 +44,11 @@
<tbody>
<!-- IF .enabled -->
<tr>
- <td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
+ <td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong><!-- EVENT acp_ext_list_enabled_title_after --></td>
</tr>
<!-- BEGIN enabled -->
- <tr class="ext_enabled">
- <td><strong>{enabled.META_DISPLAY_NAME}</strong></td>
+ <tr class="ext_enabled row-highlight">
+ <td><strong title="{enabled.NAME}">{enabled.META_DISPLAY_NAME}</strong></td>
<td style="text-align: center;">
<!-- IF enabled.S_VERSIONCHECK -->
<strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.META_VERSION}</strong>
@@ -69,11 +69,11 @@
<!-- IF .disabled -->
<tr>
- <td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
+ <td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong><!-- EVENT acp_ext_list_disabled_title_after --></td>
</tr>
<!-- BEGIN disabled -->
- <tr class="ext_disabled">
- <td><strong>{disabled.META_DISPLAY_NAME}</strong></td>
+ <tr class="ext_disabled row-highlight">
+ <td><strong title="{disabled.NAME}">{disabled.META_DISPLAY_NAME}</strong></td>
<td style="text-align: center;">
<!-- IF disabled.S_VERSIONCHECK -->
<strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.META_VERSION}</strong>
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 0d8b8ad583..965438ff67 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -242,7 +242,7 @@
</dl>
<dl>
<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>
+ <dd><input type="number" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" min="0" max="9999" /></dd>
</dl>
<!-- EVENT acp_forums_normal_settings_append -->
</fieldset>
@@ -257,15 +257,15 @@
</dl>
<dl>
<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>
+ <dd><input type="number" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
<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>
+ <dd><input type="number" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
<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>
+ <dd><input type="number" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}{L_COLON}</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
@@ -289,11 +289,11 @@
</dl>
<dl>
<dt><label for="prune_shadow_freq">{L_AUTO_PRUNE_SHADOW_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_FREQ_EXPLAIN}</span></dt>
- <dd><input type="number" id="prune_shadow_freq" name="prune_shadow_freq" value="{PRUNE_SHADOW_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
+ <dd><input type="number" id="prune_shadow_freq" name="prune_shadow_freq" value="{PRUNE_SHADOW_FREQ}" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_shadow_days">{L_AUTO_PRUNE_SHADOW_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_DAYS_EXPLAIN}</span></dt>
- <dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
+ <dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<!-- EVENT acp_forums_prune_settings_append -->
</fieldset>
@@ -498,7 +498,7 @@
<fieldset class="quick">
{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}" />
+ <!-- EVENT acp_forums_quick_select_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_forums_quick_select_button_append -->
{S_FORM_TOKEN}
</fieldset>
</form>
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index d24d62497d..1412744cc9 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -86,11 +86,11 @@
<legend>{L_GROUP_SETTINGS_SAVE}</legend>
<dl>
<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>
+ <dd><input name="group_message_limit" type="number" id="group_message_limit" min="0" max="9999" value="{GROUP_MESSAGE_LIMIT}" /></dd>
</dl>
<dl>
<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>
+ <dd><input name="group_max_recipients" type="number" id="group_max_recipients" min="0" max="9999" value="{GROUP_MAX_RECIPIENTS}" /></dd>
</dl>
<dl>
<dt><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
@@ -236,7 +236,7 @@
<dl>
<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>
+ <dd><!-- EVENT acp_groups_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_groups_find_username_append --></dd>
</dl>
<p class="quick">
@@ -265,6 +265,7 @@
<form id="acp_groups" method="post" action="{U_ACTION}">
+ <!-- EVENT acp_groups_manage_before -->
<table class="table1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
@@ -285,6 +286,7 @@
<!-- ENDIF -->
</tbody>
</table>
+ <!-- EVENT acp_groups_manage_after -->
<fieldset class="quick">
<!-- IF S_GROUP_ADD -->
diff --git a/phpBB/adm/style/acp_groups_position.html b/phpBB/adm/style/acp_groups_position.html
index c01f7aeb03..20ed9521f0 100644
--- a/phpBB/adm/style/acp_groups_position.html
+++ b/phpBB/adm/style/acp_groups_position.html
@@ -65,8 +65,10 @@
<option<!-- IF add_legend.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_legend.GROUP_ID}">{add_legend.GROUP_NAME}</option>
<!-- END add_legend -->
</select>
+ <!-- EVENT acp_groups_position_legend_add_button_before -->
<input class="button2" type="submit" name="submit" value="{L_ADD}" />
<input type="hidden" name="action" value="add" />
+ <!-- EVENT acp_groups_position_legend_add_button_after -->
{S_FORM_TOKEN}
</fieldset>
</form>
@@ -162,8 +164,10 @@
<option<!-- IF add_teampage.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_teampage.GROUP_ID}">{add_teampage.GROUP_NAME}</option>
<!-- END add_teampage -->
</select>
+ <!-- EVENT acp_groups_position_teampage_add_button_before -->
<input class="button2" type="submit" name="submit" value="{L_ADD}" />
<input type="hidden" name="action" value="add" />
+ <!-- EVENT acp_groups_position_teampage_add_button_after -->
{S_FORM_TOKEN}
</fieldset>
</form>
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index f18dad0ef6..e0d2840bb5 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -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="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 class="text post" type="number" min="0" max="999" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
+ <td><input class="text post" type="number" min="0" max="999" 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="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 class="text post" type="number" min="0" max="999" name="add_width" id="add_width" value="{WIDTH}" /></td>
+ <td><input class="text post" type="number" min="0" max="999" 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>
diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html
index 409ea46de5..2e17bea47d 100644
--- a/phpBB/adm/style/acp_inactive.html
+++ b/phpBB/adm/style/acp_inactive.html
@@ -18,6 +18,7 @@
<thead>
<tr>
<th>{L_USERNAME}</th>
+ <th>{L_EMAIL}</th>
<th>{L_JOINED}</th>
<th>{L_INACTIVE_DATE}</th>
<th>{L_LAST_VISIT}</th>
@@ -32,6 +33,7 @@
{inactive.USERNAME_FULL}
<!-- 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.USER_EMAIL}</td>
<td style="vertical-align: top;">{inactive.JOINED}</td>
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
<td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
@@ -50,7 +52,7 @@
</table>
<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}<!-- 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 -->
+ {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" min="0" max="999" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html
index 9246987f1f..3c3b895624 100644
--- a/phpBB/adm/style/acp_jabber.html
+++ b/phpBB/adm/style/acp_jabber.html
@@ -31,7 +31,7 @@
</dl>
<dl>
<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>
+ <dd><input type="number" id="jab_port" name="jab_port" value="{JAB_PORT}" min="0" max="99999" /></dd>
</dl>
<dl>
<dt><label for="jab_username">{L_JAB_USERNAME}{L_COLON}</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
@@ -50,7 +50,7 @@
<!-- ENDIF -->
<dl>
<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>
+ <dd><input type="number" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" min="0" max="99999" /></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index 76ea801de0..cb15a8f51d 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -73,7 +73,7 @@
<!-- IF S_SHOW_FORUMS -->
<fieldset class="quick">
{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}" />
+ <!-- EVENT acp_logs_quick_select_forum_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_logs_quick_select_forum_button_append -->
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index 065dd7ac4f..efcb25cb68 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -14,7 +14,11 @@
<p>{L_ADMIN_INTRO}</p>
- <!-- IF S_VERSIONCHECK_FAIL -->
+ <!-- IF S_UPDATE_INCOMPLETE -->
+ <div class="errorbox">
+ <p>{L_UPDATE_INCOMPLETE} <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
+ </div>
+ <!-- ELSEIF S_VERSIONCHECK_FAIL -->
<div class="errorbox notice">
<p>{L_VERSIONCHECK_FAIL}</p>
<p>{VERSIONCHECK_FAIL_REASON}</p>
@@ -141,19 +145,24 @@
<td>{L_GZIP_COMPRESSION}{L_COLON} </td>
<td><strong>{GZIP_COMPRESSION}</strong></td>
</tr>
+ <!-- IF S_TOTAL_ORPHAN or S_VERSIONCHECK -->
<tr>
+ <!-- IF S_VERSIONCHECK -->
<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;]
+ <strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;" <!-- ELSEIF not S_VERSIONCHECK_FAIL -->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>
+ <!-- ENDIF -->
<!-- IF S_TOTAL_ORPHAN -->
<td>{L_NUMBER_ORPHAN}{L_COLON} </td>
<td><strong>{TOTAL_ORPHAN}</strong></td>
- <!-- ELSE -->
+ <!-- ENDIF -->
+ <!-- IF not S_TOTAL_ORPHAN or not S_VERSIONCHECK -->
<td>&nbsp;</td>
<td>&nbsp;</td>
<!-- ENDIF -->
</tr>
+ <!-- ENDIF -->
</tbody>
</table>
diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html
index 6dc9dca2e7..a4d33ed78b 100644
--- a/phpBB/adm/style/acp_permissions.html
+++ b/phpBB/adm/style/acp_permissions.html
@@ -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}{L_COLON}</label></dt>
+ <dt><!-- EVENT acp_permissions_select_multiple_forum_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_multiple_forum_append --></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}{L_COLON}</label></dt>
+ <dt><!-- EVENT acp_permissions_select_forum_prepend --><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_forum_append --></dt>
<dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd>
</dl>
@@ -95,7 +95,7 @@
<fieldset>
<legend>{L_LOOK_UP_GROUP}</legend>
<dl>
- <dt><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
+ <dt><!-- EVENT acp_permissions_select_group_prepend --><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label><!-- EVENT acp_permissions_select_group_append --></dt>
<dd><select name="group_id[]" id="group">{S_GROUP_OPTIONS}</select></dd>
</dl>
@@ -140,7 +140,7 @@
<p>{L_USERNAMES_EXPLAIN}</p>
<dl>
<dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd>
- <dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
+ <dd class="full" style="text-align: left;"><!-- EVENT acp_permissions_find_username_prepend --><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><!-- EVENT acp_permissions_find_username_append --><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
</dl>
</fieldset>
@@ -183,7 +183,7 @@
<fieldset>
<legend>{L_ADD_GROUPS}</legend>
<dl>
- <dd class="full"><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select></dd>
+ <dd class="full"><!-- EVENT acp_permissions_add_group_options_prepend --><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select><!-- EVENT acp_permissions_add_group_options_append --></dd>
</dl>
</fieldset>
@@ -267,7 +267,9 @@
<legend>{L_LOOK_UP_GROUP}</legend>
<dl>
<dt><label for="group_select">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
+ <!-- EVENT acp_permissions_select_group_before -->
<dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd>
+ <!-- EVENT acp_permissions_select_group_after -->
<dd>&nbsp;</dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_posting_buttons.html b/phpBB/adm/style/acp_posting_buttons.html
index 70b6259689..c3c42f8e82 100644
--- a/phpBB/adm/style/acp_posting_buttons.html
+++ b/phpBB/adm/style/acp_posting_buttons.html
@@ -63,6 +63,7 @@
<!-- ENDIF -->
<!-- ENDIF -->
</select>
+ <!-- EVENT acp_posting_buttons_custom_tags_before -->
<!-- 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}" />
<!-- END custom_tags -->
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
index 3ce2d9471d..07718846cc 100644
--- a/phpBB/adm/style/acp_profile.html
+++ b/phpBB/adm/style/acp_profile.html
@@ -17,7 +17,7 @@
</div>
<!-- ENDIF -->
- <form id="add_profile_field" method="post" action="{U_ACTION}">
+ <form id="add_profile_field" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
<!-- IF S_STEP_ONE -->
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
index 4d748f1cce..b8c681ea00 100644
--- a/phpBB/adm/style/acp_prune_forums.html
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -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}{L_COLON}</label></dt>
+ <dt><!-- EVENT acp_prune_forums_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_prune_forums_append --></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>
diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html
index b8c271355b..6e8b2e4214 100644
--- a/phpBB/adm/style/acp_prune_users.html
+++ b/phpBB/adm/style/acp_prune_users.html
@@ -50,7 +50,7 @@
<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>
+ <dd><!-- EVENT acp_prune_users_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_prune_users_find_username_append --></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index fa06513b98..e67c9acd80 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -44,7 +44,7 @@
<div id="posts"<!-- IF S_SPECIAL_RANK --> style="display: none;"<!-- ENDIF -->>
<dl>
<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>
+ <dd><input name="min_posts" type="number" id="min_posts" min="0" max="9999999999" value="{MIN_POSTS}" /></dd>
</dl>
</div>
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index 1cde52acf3..f7ad3c5e89 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -18,11 +18,11 @@
</dl>
<dl>
<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>
+ <dd><input id="search_interval" type="number" 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}{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>
+ <dd><input id="search_anonymous_interval" type="number" 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}{L_COLON}</label><br /><span>{L_LIMIT_SEARCH_LOAD_EXPLAIN}</span></dt>
@@ -30,15 +30,15 @@
</dl>
<dl>
<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>
+ <dd><input id="min_search_author_chars" type="number" 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}{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>
+ <dd><input id="max_num_search_keywords" type="number" 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}{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>
+ <dd><input id="search_store_results" type="number" min="0" max="999999" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 92ceaebc08..a36d15fe73 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -87,6 +87,7 @@
<!-- ENDIF -->
<!-- IF .styles_list -->
+ <!-- EVENT acp_styles_list_before -->
<table class="table1 styles">
<thead>
<tr>
@@ -99,7 +100,7 @@
</thead>
<!-- 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 -->>
+ <tr class="row-highlight<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> row-inactive<!-- ENDIF -->">
<!-- IF styles_list.LEVEL is odd -->
<!-- IF $ROW_CLASS == 'row1a' --><!-- DEFINE $ROW_CLASS = 'row1b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row1a' --><!-- ENDIF -->
<!-- ELSE -->
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html
index 0cc995959b..351a3ba26c 100644
--- a/phpBB/adm/style/acp_update.html
+++ b/phpBB/adm/style/acp_update.html
@@ -6,11 +6,16 @@
<p>{L_VERSION_CHECK_EXPLAIN}</p>
+<!-- IF S_UPDATE_INCOMPLETE -->
+ <div class="errorbox">
+ <p>{L_UPDATE_INCOMPLETE} {L_UPDATE_INCOMPLETE_MORE}</p>
+ </div>
+<!-- ENDIF -->
<!-- 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 -->
+<!-- ELSEIF not S_UPDATE_INCOMPLETE -->
<div class="errorbox">
<p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
</div>
@@ -18,10 +23,21 @@
<fieldset>
<legend></legend>
+ <!-- IF not S_UPDATE_INCOMPLETE -->
<dl>
<dt><label>{L_CURRENT_VERSION}</label></dt>
<dd><strong>{CURRENT_VERSION}</strong></dd>
</dl>
+ <!-- ELSE -->
+ <dl>
+ <dt><label>{L_FILES_VERSION}</label></dt>
+ <dd><strong>{FILES_VERSION}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_DATABASE_VERSION}</label></dt>
+ <dd><strong>{CURRENT_VERSION}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
</fieldset>
<!-- BEGIN updates_available -->
@@ -38,6 +54,11 @@
</fieldset>
<!-- END updates_available -->
+<!-- IF S_UPDATE_INCOMPLETE -->
+ {INCOMPLETE_INSTRUCTIONS}
+ <br>
+<!-- ENDIF -->
+
<!-- IF not S_UP_TO_DATE -->
{UPDATE_INSTRUCTIONS}
<br /><br />
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index 25064c6f3a..18c3d84f96 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -146,7 +146,9 @@
<!-- IF S_GROUP_OPTIONS -->
<fieldset class="quick">
+ <!-- EVENT acp_users_select_group_before -->
{L_USER_GROUP_ADD}{L_COLON} <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ <!-- EVENT acp_users_select_group_after -->
{S_FORM_TOKEN}
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 14715f59e4..61904adc23 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -52,7 +52,7 @@
<dl>
<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'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('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>
+ <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="64" /></div></dd>
</dl>
<!-- EVENT acp_users_prefs_personal_append -->
</fieldset>
diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html
index 573534fc95..9296638ff6 100644
--- a/phpBB/adm/style/acp_users_profile.html
+++ b/phpBB/adm/style/acp_users_profile.html
@@ -1,4 +1,4 @@
- <form id="user_profile" method="post" action="{U_ACTION}">
+ <form id="user_profile" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
<fieldset>
<legend>{L_USER_PROFILE}</legend>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 396b21e3eb..0c00e5339e 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -859,6 +859,8 @@ table.zebra-table tbody tr:nth-child(even) {
.row2a { background-color: #E7EEF4; }
.row2b { background-color: #E3EBF2; }
+tr.row-highlight:hover td { background-color: #DBDFE2; }
+
.spacer {
background-color: #DBDFE2;
height: 1px;
diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html
index a29fce6c5a..8e7599dc3f 100644
--- a/phpBB/adm/style/install_footer.html
+++ b/phpBB/adm/style/install_footer.html
@@ -12,7 +12,7 @@
</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.min.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
index 6f7f129d39..cfafe7917f 100644
--- a/phpBB/adm/style/install_header.html
+++ b/phpBB/adm/style/install_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html
index 5f80084705..324dc50d05 100644
--- a/phpBB/adm/style/install_update_diff.html
+++ b/phpBB/adm/style/install_update_diff.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index deb38c8691..8745286d64 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -34,7 +34,7 @@
</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.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</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 -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index ada88edff2..d399c680ee 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/permission_forum_copy.html b/phpBB/adm/style/permission_forum_copy.html
index 1e012a9347..b1539aff12 100644
--- a/phpBB/adm/style/permission_forum_copy.html
+++ b/phpBB/adm/style/permission_forum_copy.html
@@ -12,7 +12,7 @@
<legend>{L_LOOK_UP_FORUM}</legend>
<dl>
- <dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
+ <dt><!-- EVENT acp_permission_forum_copy_src_forum_prepend --><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_src_forum_append --></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}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
+ <dt><!-- EVENT acp_permission_forum_copy_dest_forum_prepend --><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_dest_forum_append --></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/simple_footer.html b/phpBB/adm/style/simple_footer.html
index c08fd931a0..08ee0a739f 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -17,7 +17,7 @@
</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.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- EVENT acp_simple_footer_after -->
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index f62a7a900e..9f47b2052b 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 36e881f5fd..f7ace80705 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -303,6 +303,10 @@ phpbb.ajaxify = function(options) {
alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
} else {
$dark.fadeOut(phpbb.alertTime);
+
+ if ($loadingIndicator) {
+ $loadingIndicator.fadeOut(phpbb.alertTime);
+ }
}
if (typeof phpbb.ajaxCallbacks[callback] === 'function') {
@@ -1025,7 +1029,7 @@ phpbb.resizeTextArea = function($items, options) {
function autoResize(item) {
function setHeight(height) {
- height += parseInt($item.css('height'), 10) - $item.height();
+ height += parseInt($item.css('height'), 10) - $item.innerHeight();
$item
.css({ height: height + 'px', resize: 'none' })
.addClass('auto-resized');
@@ -1044,7 +1048,7 @@ phpbb.resizeTextArea = function($items, options) {
configuration.maxHeight
),
$item = $(item),
- height = parseInt($item.height(), 10),
+ height = parseInt($item.innerHeight(), 10),
scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
if (height < 0) {
@@ -1534,6 +1538,13 @@ phpbb.toggleSelectSettings = function(el) {
var $this = $(this),
$setting = $($this.data('toggle-setting'));
$setting.toggle($this.is(':selected'));
+
+ // Disable any input elements that are not visible right now
+ if ($this.is(':selected')) {
+ $($this.data('toggle-setting') + ' input').prop('disabled', false);
+ } else {
+ $($this.data('toggle-setting') + ' input').prop('disabled', true);
+ }
});
};
diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js
index 298526ab1f..3abf5c84f4 100644
--- a/phpBB/assets/javascript/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -358,6 +358,12 @@ function getCaretPosition(txtarea) {
if ($('#attach-panel').length) {
phpbb.showDragNDrop(textarea);
}
+
+ $('textarea').on('keydown', function (e) {
+ if (e.which === 13 && (e.metaKey || e.ctrlKey)) {
+ $(this).closest('form').submit();
+ }
+ });
});
})(jQuery);
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
index ca425ad0c4..239dd3932b 100755
--- a/phpBB/bin/phpbbcli.php
+++ b/phpBB/bin/phpbbcli.php
@@ -59,6 +59,8 @@ $phpbb_container->get('request')->enable_super_globals();
require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
$user = $phpbb_container->get('user');
+$user->data['user_id'] = ANONYMOUS;
+$user->ip = '127.0.0.1';
$user->add_lang('acp/common');
$user->add_lang('cli');
diff --git a/phpBB/common.php b/phpBB/common.php
index 0782bd7321..71d501e926 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -38,7 +38,13 @@ if (!defined('PHPBB_INSTALLED'))
// available as used by the redirect function
$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;
+ $secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 1 : 0;
+
+ if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
+ {
+ $secure = 1;
+ $server_port = 443;
+ }
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
if (!$script_name)
diff --git a/phpBB/composer.json b/phpBB/composer.json
index f2564de0f5..6b3a2c9918 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -25,7 +25,7 @@
"phpbb/phpbb-core": "self.version"
},
"require": {
- "php": ">=5.3.3",
+ "php": ">=5.3.3,<7.0",
"lusitanian/oauth": "0.2.*",
"symfony/config": "2.3.*",
"symfony/console": "2.3.*",
@@ -34,7 +34,7 @@
"symfony/http-kernel": "2.3.*",
"symfony/routing": "2.3.*",
"symfony/yaml": "2.3.*",
- "twig/twig": "1.13.*"
+ "twig/twig": "1.*"
},
"require-dev": {
"fabpot/goutte": "1.0.*",
@@ -51,5 +51,10 @@
"symfony/finder": "2.3.*",
"symfony/http-foundation": "2.3.*",
"symfony/process": "2.3.*"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev"
+ }
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 4a034bbdf8..5d6b1ba7a7 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -1,23 +1,24 @@
{
"_readme": [
"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",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "17b51553237b78392baf2ec78bfdfbc0",
+ "hash": "33fa9de480a8a9c8f7e3f2926cd4c034",
+ "content-hash": "2d9c1857e65554ceb4cfa435495df188",
"packages": [
{
"name": "lusitanian/oauth",
- "version": "v0.2.1",
+ "version": "v0.2.5",
"source": {
"type": "git",
"url": "https://github.com/Lusitanian/PHPoAuthLib.git",
- "reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043"
+ "reference": "27e375e13e1badcd6dca7fb47b154b3c48fdec0c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
- "reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
+ "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/27e375e13e1badcd6dca7fb47b154b3c48fdec0c",
+ "reference": "27e375e13e1badcd6dca7fb47b154b3c48fdec0c",
"shasum": ""
},
"require": {
@@ -67,7 +68,7 @@
"oauth",
"security"
],
- "time": "2013-08-29 21:40:04"
+ "time": "2013-12-25 20:05:42"
},
{
"name": "psr/log",
@@ -109,17 +110,17 @@
},
{
"name": "symfony/config",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Config",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Config.git",
- "reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d"
+ "url": "https://github.com/symfony/config.git",
+ "reference": "16a645cef1c09ebfc907d3c9b3e9f5836a7d4d3b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Config/zipball/f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
- "reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
+ "url": "https://api.github.com/repos/symfony/config/zipball/16a645cef1c09ebfc907d3c9b3e9f5836a7d4d3b",
+ "reference": "16a645cef1c09ebfc907d3c9b3e9f5836a7d4d3b",
"shasum": ""
},
"require": {
@@ -135,7 +136,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Config\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -143,31 +147,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Config Component",
- "homepage": "http://symfony.com",
- "time": "2014-09-23 05:15:05"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-30 08:14:41"
},
{
"name": "symfony/console",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Console.git",
- "reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1"
+ "url": "https://github.com/symfony/console.git",
+ "reference": "20c12c6d6c5a087a66d4e77999451713a92a3507"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Console/zipball/aa12ac573c583a74c2cb26ad9be478e119f04ad1",
- "reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1",
+ "url": "https://api.github.com/repos/symfony/console/zipball/20c12c6d6c5a087a66d4e77999451713a92a3507",
+ "reference": "20c12c6d6c5a087a66d4e77999451713a92a3507",
"shasum": ""
},
"require": {
@@ -188,7 +192,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Console\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -196,39 +203,42 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-05 13:45:10"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-26 08:04:58"
},
{
"name": "symfony/debug",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Debug",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Debug.git",
- "reference": "883f847ad179e92549a8cea372b08e5ef47ffe40"
+ "url": "https://github.com/symfony/debug.git",
+ "reference": "863d29c31a1ddfcf1faedf5f8362f392e3261632"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Debug/zipball/883f847ad179e92549a8cea372b08e5ef47ffe40",
- "reference": "883f847ad179e92549a8cea372b08e5ef47ffe40",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/863d29c31a1ddfcf1faedf5f8362f392e3261632",
+ "reference": "863d29c31a1ddfcf1faedf5f8362f392e3261632",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
+ "conflict": {
+ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
+ },
"require-dev": {
"symfony/http-foundation": "~2.1",
- "symfony/http-kernel": "~2.1"
+ "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2"
},
"suggest": {
"symfony/class-loader": "",
@@ -244,7 +254,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Debug\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -252,31 +265,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Debug Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-09 16:42:17"
+ "homepage": "https://symfony.com",
+ "time": "2016-03-30 09:02:35"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/DependencyInjection",
"source": {
"type": "git",
- "url": "https://github.com/symfony/DependencyInjection.git",
- "reference": "e2324e1c8c39faa5f27e6170b278d7f631574141"
+ "url": "https://github.com/symfony/dependency-injection.git",
+ "reference": "06265ee128644eb70356bd72ab28c9ded6618d19"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/e2324e1c8c39faa5f27e6170b278d7f631574141",
- "reference": "e2324e1c8c39faa5f27e6170b278d7f631574141",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/06265ee128644eb70356bd72ab28c9ded6618d19",
+ "reference": "06265ee128644eb70356bd72ab28c9ded6618d19",
"shasum": ""
},
"require": {
@@ -284,7 +297,7 @@
},
"require-dev": {
"symfony/config": "~2.2",
- "symfony/yaml": "~2.0"
+ "symfony/yaml": "~2.1"
},
"suggest": {
"symfony/config": "",
@@ -300,7 +313,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\DependencyInjection\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -308,38 +324,38 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony DependencyInjection Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:38:33"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-30 08:31:06"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
- "url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "3e0b837811fadd73c833c7c06a92201d953df59d"
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "fd6d162d97bf3e6060622e5c015af39ca72e33bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/3e0b837811fadd73c833c7c06a92201d953df59d",
- "reference": "3e0b837811fadd73c833c7c06a92201d953df59d",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fd6d162d97bf3e6060622e5c015af39ca72e33bc",
+ "reference": "fd6d162d97bf3e6060622e5c015af39ca72e33bc",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
- "symfony/dependency-injection": "~2.0"
+ "symfony/dependency-injection": "~2.0,>=2.0.5"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -354,7 +370,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\EventDispatcher\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -362,31 +381,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony EventDispatcher Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:39:06"
+ "homepage": "https://symfony.com",
+ "time": "2016-04-04 09:22:54"
},
{
"name": "symfony/filesystem",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Filesystem",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Filesystem.git",
- "reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942"
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "8fd9cd1da0afe63f0d9d4f27875782a2b7d590d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Filesystem/zipball/1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
- "reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/8fd9cd1da0afe63f0d9d4f27875782a2b7d590d3",
+ "reference": "8fd9cd1da0afe63f0d9d4f27875782a2b7d590d3",
"shasum": ""
},
"require": {
@@ -401,7 +420,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Filesystem\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -409,35 +431,36 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
- "homepage": "http://symfony.com",
- "time": "2014-09-22 08:32:35"
+ "homepage": "https://symfony.com",
+ "time": "2016-04-12 15:20:10"
},
{
"name": "symfony/http-foundation",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
- "url": "https://github.com/symfony/HttpFoundation.git",
- "reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d"
+ "url": "https://github.com/symfony/http-foundation.git",
+ "reference": "9f4dbb1f3e3cad22d9462e0306c9c71212458f61"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/30c90f08f948dd43e7310beae7a85c02ad2b655d",
- "reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f4dbb1f3e3cad22d9462e0306c9c71212458f61",
+ "reference": "9f4dbb1f3e3cad22d9462e0306c9c71212458f61",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.3",
+ "symfony/polyfill-mbstring": "~1.1"
},
"type": "library",
"extra": {
@@ -451,6 +474,9 @@
},
"classmap": [
"Symfony/Component/HttpFoundation/Resources/stubs"
+ ],
+ "exclude-from-classmap": [
+ "/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -459,50 +485,52 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony HttpFoundation Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-23 13:11:04"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-13 15:22:39"
},
{
"name": "symfony/http-kernel",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
- "url": "https://github.com/symfony/HttpKernel.git",
- "reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5"
+ "url": "https://github.com/symfony/http-kernel.git",
+ "reference": "57e0329236e8edf2b0e683043c604f7c9aba9398"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/0154ff659004d4148e8da0f2bdb672efe55e6ee5",
- "reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/57e0329236e8edf2b0e683043c604f7c9aba9398",
+ "reference": "57e0329236e8edf2b0e683043c604f7c9aba9398",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/log": "~1.0",
- "symfony/debug": "~2.3",
+ "symfony/debug": "~2.3.24|~2.5.9|~2.6,>=2.6.2",
"symfony/event-dispatcher": "~2.1",
- "symfony/http-foundation": "~2.2"
+ "symfony/http-foundation": "~2.3,>=2.3.4"
},
"require-dev": {
- "symfony/browser-kit": "~2.2",
+ "symfony/browser-kit": "~2.3",
"symfony/class-loader": "~2.1",
- "symfony/config": "~2.0",
+ "symfony/config": "~2.0,>=2.0.5",
"symfony/console": "~2.2",
- "symfony/dependency-injection": "~2.0",
- "symfony/finder": "~2.0",
- "symfony/process": "~2.0",
+ "symfony/css-selector": "~2.0,>=2.0.5",
+ "symfony/dependency-injection": "~2.2",
+ "symfony/dom-crawler": "~2.0,>=2.0.5",
+ "symfony/finder": "~2.0,>=2.0.5",
+ "symfony/process": "~2.0,>=2.0.5",
"symfony/routing": "~2.2",
- "symfony/stopwatch": "~2.2",
+ "symfony/stopwatch": "~2.3",
"symfony/templating": "~2.2"
},
"suggest": {
@@ -522,7 +550,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\HttpKernel\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -530,31 +561,90 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony HttpKernel Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-24 05:54:08"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-30 08:41:10"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2016-05-18 14:26:46"
},
{
"name": "symfony/routing",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Routing.git",
- "reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f"
+ "url": "https://github.com/symfony/routing.git",
+ "reference": "5b8a2bb7569df81401171829498809e90d6e446c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Routing/zipball/f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
- "reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/5b8a2bb7569df81401171829498809e90d6e446c",
+ "reference": "5b8a2bb7569df81401171829498809e90d6e446c",
"shasum": ""
},
"require": {
@@ -565,7 +655,7 @@
"psr/log": "~1.0",
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.3",
- "symfony/yaml": "~2.0"
+ "symfony/yaml": "~2.0,>=2.0.5"
},
"suggest": {
"doctrine/common": "",
@@ -581,7 +671,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Routing\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -589,31 +682,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Routing Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-13 12:38:27"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-29 10:13:06"
},
{
"name": "symfony/yaml",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f"
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "2cb5f366f9e0df014fc93de46cc416ba0a3055f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/34687c6236f1dfcebc874fbebd8da74d90f9f64f",
- "reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/2cb5f366f9e0df014fc93de46cc416ba0a3055f8",
+ "reference": "2cb5f366f9e0df014fc93de46cc416ba0a3055f8",
"shasum": ""
},
"require": {
@@ -628,7 +721,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Yaml\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -636,39 +732,43 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:38:33"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-30 08:10:17"
},
{
"name": "twig/twig",
- "version": "v1.13.2",
+ "version": "v1.24.1",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
+ "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
- "reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512",
+ "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512",
"shasum": ""
},
"require": {
- "php": ">=5.2.4"
+ "php": ">=5.2.7"
+ },
+ "require-dev": {
+ "symfony/debug": "~2.7",
+ "symfony/phpunit-bridge": "~2.7"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.13-dev"
+ "dev-master": "1.24-dev"
}
},
"autoload": {
@@ -683,11 +783,19 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
},
{
"name": "Armin Ronacher",
- "email": "armin.ronacher@active-4.com"
+ "email": "armin.ronacher@active-4.com",
+ "role": "Project Founder"
+ },
+ {
+ "name": "Twig Team",
+ "homepage": "http://twig.sensiolabs.org/contributors",
+ "role": "Contributors"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
@@ -695,7 +803,7 @@
"keywords": [
"templating"
],
- "time": "2013-08-03 15:35:31"
+ "time": "2016-05-30 09:11:59"
}
],
"packages-dev": [
@@ -757,17 +865,17 @@
},
{
"name": "guzzle/common",
- "version": "v3.7.3",
+ "version": "v3.9.2",
"target-dir": "Guzzle/Common",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/common.git",
- "reference": "bf73c87375f60861f8c7ccc7b95878023ade5306"
+ "url": "https://github.com/Guzzle3/common.git",
+ "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/common/zipball/bf73c87375f60861f8c7ccc7b95878023ade5306",
- "reference": "bf73c87375f60861f8c7ccc7b95878023ade5306",
+ "url": "https://api.github.com/repos/Guzzle3/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc",
+ "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc",
"shasum": ""
},
"require": {
@@ -797,21 +905,22 @@
"event",
"exception"
],
- "time": "2013-09-08 21:09:18"
+ "abandoned": "guzzle/guzzle",
+ "time": "2014-08-11 04:32:36"
},
{
"name": "guzzle/http",
- "version": "v3.7.3",
+ "version": "v3.9.2",
"target-dir": "Guzzle/Http",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/http.git",
- "reference": "1034125dfd906b73119e535f03153a62fccb1989"
+ "url": "https://github.com/Guzzle3/http.git",
+ "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/http/zipball/1034125dfd906b73119e535f03153a62fccb1989",
- "reference": "1034125dfd906b73119e535f03153a62fccb1989",
+ "url": "https://api.github.com/repos/Guzzle3/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5",
+ "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5",
"shasum": ""
},
"require": {
@@ -854,21 +963,22 @@
"http",
"http client"
],
- "time": "2013-09-06 11:34:26"
+ "abandoned": "guzzle/guzzle",
+ "time": "2014-08-11 04:32:36"
},
{
"name": "guzzle/parser",
- "version": "v3.7.3",
+ "version": "v3.9.2",
"target-dir": "Guzzle/Parser",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/parser.git",
- "reference": "a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2"
+ "url": "https://github.com/Guzzle3/parser.git",
+ "reference": "6874d171318a8e93eb6d224cf85e4678490b625c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/parser/zipball/a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2",
- "reference": "a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2",
+ "url": "https://api.github.com/repos/Guzzle3/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c",
+ "reference": "6874d171318a8e93eb6d224cf85e4678490b625c",
"shasum": ""
},
"require": {
@@ -898,21 +1008,22 @@
"message",
"url"
],
- "time": "2013-07-11 22:46:03"
+ "abandoned": "guzzle/guzzle",
+ "time": "2014-02-05 18:29:46"
},
{
"name": "guzzle/stream",
- "version": "v3.7.3",
+ "version": "v3.9.2",
"target-dir": "Guzzle/Stream",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/stream.git",
- "reference": "a86111d9ac7db31d65a053c825869409fe8fc83f"
+ "url": "https://github.com/Guzzle3/stream.git",
+ "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/stream/zipball/a86111d9ac7db31d65a053c825869409fe8fc83f",
- "reference": "a86111d9ac7db31d65a053c825869409fe8fc83f",
+ "url": "https://api.github.com/repos/Guzzle3/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0",
+ "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0",
"shasum": ""
},
"require": {
@@ -951,20 +1062,21 @@
"component",
"stream"
],
- "time": "2013-07-30 22:07:23"
+ "abandoned": "guzzle/guzzle",
+ "time": "2014-05-01 21:36:02"
},
{
"name": "michelf/php-markdown",
- "version": "1.4.1",
+ "version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
- "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6"
+ "reference": "156e56ee036505ec637d761ee62dc425d807183c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
- "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6",
+ "url": "https://api.github.com/repos/michelf/php-markdown/zipball/156e56ee036505ec637d761ee62dc425d807183c",
+ "reference": "156e56ee036505ec637d761ee62dc425d807183c",
"shasum": ""
},
"require": {
@@ -989,36 +1101,37 @@
{
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
- "homepage": "http://michelf.ca/",
+ "homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
- "homepage": "http://daringfireball.net/"
+ "homepage": "https://daringfireball.net/"
}
],
"description": "PHP Markdown",
- "homepage": "http://michelf.ca/projects/php-markdown/",
+ "homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"markdown"
],
- "time": "2014-05-05 02:43:50"
+ "time": "2015-12-24 01:37:31"
},
{
"name": "nikic/php-parser",
- "version": "v0.9.4",
+ "version": "v0.9.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f"
+ "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1e5e280ae88a27effa2ae4aa2bd088494ed8594f",
- "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb",
+ "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb",
"shasum": ""
},
"require": {
+ "ext-tokenizer": "*",
"php": ">=5.2"
},
"type": "library",
@@ -1046,7 +1159,7 @@
"parser",
"php"
],
- "time": "2013-08-25 17:11:40"
+ "time": "2014-07-23 18:24:17"
},
{
"name": "phing/phing",
@@ -1102,24 +1215,24 @@
},
{
"name": "phpunit/dbunit",
- "version": "1.3.1",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/dbunit.git",
- "reference": "a5891b7a9c4f21587a51f9bc4e8f7042b741b480"
+ "reference": "1507040c2541bdffd7fbd71fc792cecdea6a7c61"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/a5891b7a9c4f21587a51f9bc4e8f7042b741b480",
- "reference": "a5891b7a9c4f21587a51f9bc4e8f7042b741b480",
+ "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/1507040c2541bdffd7fbd71fc792cecdea6a7c61",
+ "reference": "1507040c2541bdffd7fbd71fc792cecdea6a7c61",
"shasum": ""
},
"require": {
"ext-pdo": "*",
"ext-simplexml": "*",
"php": ">=5.3.3",
- "phpunit/phpunit": ">=3.7.0@stable",
- "symfony/yaml": ">=2.1.0"
+ "phpunit/phpunit": "~3.7|~4.0",
+ "symfony/yaml": "~2.1"
},
"bin": [
"composer/bin/dbunit"
@@ -1157,33 +1270,33 @@
"testing",
"xunit"
],
- "time": "2014-03-26 11:25:06"
+ "time": "2015-03-29 14:23:04"
},
{
"name": "phpunit/php-code-coverage",
- "version": "2.0.6",
+ "version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "bccecf50645068b44f49a84009e2a0499a500b99"
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bccecf50645068b44f49a84009e2a0499a500b99",
- "reference": "bccecf50645068b44f49a84009e2a0499a500b99",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
- "phpunit/php-file-iterator": "~1.3.1",
- "phpunit/php-text-template": "~1.2.0",
- "phpunit/php-token-stream": "~1.2.2",
- "sebastian/environment": "~1.0.0",
- "sebastian/version": "~1.0.3"
+ "phpunit/php-file-iterator": "~1.3",
+ "phpunit/php-text-template": "~1.2",
+ "phpunit/php-token-stream": "~1.3",
+ "sebastian/environment": "^1.3.2",
+ "sebastian/version": "~1.0"
},
"require-dev": {
"ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "~4.0.14"
+ "phpunit/phpunit": "~4"
},
"suggest": {
"ext-dom": "*",
@@ -1193,7 +1306,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.2.x-dev"
}
},
"autoload": {
@@ -1202,9 +1315,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -1222,7 +1332,7 @@
"testing",
"xunit"
],
- "time": "2014-04-30 09:01:21"
+ "time": "2015-10-06 15:47:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1271,16 +1381,16 @@
},
{
"name": "phpunit/php-text-template",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
"shasum": ""
},
"require": {
@@ -1289,20 +1399,17 @@
"type": "library",
"autoload": {
"classmap": [
- "Text/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1311,35 +1418,35 @@
"keywords": [
"template"
],
- "time": "2014-01-30 17:20:04"
+ "time": "2015-06-21 13:50:34"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.5",
+ "version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
+ "require-dev": {
+ "phpunit/phpunit": "~4|~5"
+ },
"type": "library",
"autoload": {
"classmap": [
- "PHP/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -1355,49 +1462,48 @@
"keywords": [
"timer"
],
- "time": "2013-08-02 07:42:54"
+ "time": "2016-05-12 18:03:57"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.2.2",
+ "version": "1.4.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
- "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
},
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
"classmap": [
- "PHP/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
+ "email": "sebastian@phpunit.de"
}
],
"description": "Wrapper around PHP's tokenizer extension.",
@@ -1405,20 +1511,20 @@
"keywords": [
"tokenizer"
],
- "time": "2014-03-03 05:10:30"
+ "time": "2015-09-15 10:49:45"
},
{
"name": "phpunit/phpunit",
- "version": "4.1.0",
+ "version": "4.1.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "efb1b1334605594417a3bd466477772d06d460a8"
+ "reference": "241116219bb7e3b8111a36ffd8f37546888738d6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/efb1b1334605594417a3bd466477772d06d460a8",
- "reference": "efb1b1334605594417a3bd466477772d06d460a8",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/241116219bb7e3b8111a36ffd8f37546888738d6",
+ "reference": "241116219bb7e3b8111a36ffd8f37546888738d6",
"shasum": ""
},
"require": {
@@ -1432,7 +1538,7 @@
"phpunit/php-file-iterator": "~1.3.1",
"phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "~1.0.2",
- "phpunit/phpunit-mock-objects": "~2.1",
+ "phpunit/phpunit-mock-objects": "2.1.5",
"sebastian/comparator": "~1.0",
"sebastian/diff": "~1.1",
"sebastian/environment": "~1.0",
@@ -1479,20 +1585,20 @@
"testing",
"xunit"
],
- "time": "2014-05-02 07:13:40"
+ "time": "2014-08-17 08:07:02"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "2.1.0",
+ "version": "2.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "da0eb04d8ee95ec2898187e407e519c118d3d27c"
+ "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/da0eb04d8ee95ec2898187e407e519c118d3d27c",
- "reference": "da0eb04d8ee95ec2898187e407e519c118d3d27c",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a",
+ "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a",
"shasum": ""
},
"require": {
@@ -1536,19 +1642,19 @@
"mock",
"xunit"
],
- "time": "2014-05-02 07:04:11"
+ "time": "2014-06-12 07:22:15"
},
{
"name": "pimple/pimple",
"version": "v1.0.2",
"source": {
"type": "git",
- "url": "https://github.com/fabpot/Pimple.git",
+ "url": "https://github.com/silexphp/Pimple.git",
"reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fabpot/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
"reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
"shasum": ""
},
@@ -1588,16 +1694,16 @@
},
{
"name": "sami/sami",
- "version": "v1.4",
+ "version": "v1.4.1",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/Sami.git",
- "reference": "70f29c781f7bef30181c814b9471b2ceac694454"
+ "reference": "160018bfefffa730dc35a2c606691a45acbf41a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfPHP/Sami/zipball/70f29c781f7bef30181c814b9471b2ceac694454",
- "reference": "70f29c781f7bef30181c814b9471b2ceac694454",
+ "url": "https://api.github.com/repos/FriendsOfPHP/Sami/zipball/160018bfefffa730dc35a2c606691a45acbf41a1",
+ "reference": "160018bfefffa730dc35a2c606691a45acbf41a1",
"shasum": ""
},
"require": {
@@ -1641,34 +1747,34 @@
"keywords": [
"phpdoc"
],
- "time": "2014-06-25 11:24:03"
+ "time": "2015-06-05 03:36:34"
},
{
"name": "sebastian/comparator",
- "version": "1.0.0",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2"
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
- "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
- "sebastian/diff": "~1.1",
- "sebastian/exporter": "~1.0"
+ "sebastian/diff": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -1682,11 +1788,6 @@
],
"authors": [
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
@@ -1697,6 +1798,10 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality",
@@ -1706,29 +1811,32 @@
"compare",
"equality"
],
- "time": "2014-05-02 07:05:58"
+ "time": "2015-07-26 15:48:44"
},
{
"name": "sebastian/diff",
- "version": "1.1.0",
+ "version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d"
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
- "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
@@ -1742,46 +1850,45 @@
],
"authors": [
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
+ "homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
- "time": "2013-08-03 16:46:33"
+ "time": "2015-12-08 07:14:41"
},
{
"name": "sebastian/environment",
- "version": "1.0.0",
+ "version": "1.3.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a"
+ "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a",
- "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716",
+ "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -1796,8 +1903,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "email": "sebastian@phpunit.de"
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
@@ -1807,32 +1913,34 @@
"environment",
"hhvm"
],
- "time": "2014-02-18 16:17:19"
+ "time": "2016-05-17 03:18:57"
},
{
"name": "sebastian/exporter",
- "version": "1.0.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529"
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
- "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.3",
+ "sebastian/recursion-context": "~1.0"
},
"require-dev": {
- "phpunit/phpunit": "4.0.*@dev"
+ "ext-mbstring": "*",
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -1846,11 +1954,6 @@
],
"authors": [
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- },
- {
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
@@ -1859,12 +1962,16 @@
"email": "github@wallbash.com"
},
{
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- },
- {
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@@ -1873,20 +1980,73 @@
"export",
"exporter"
],
- "time": "2014-02-16 08:26:31"
+ "time": "2016-06-17 09:04:28"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "time": "2015-11-11 19:50:13"
},
{
"name": "sebastian/version",
- "version": "1.0.3",
+ "version": "1.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43"
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
"shasum": ""
},
"type": "library",
@@ -1908,27 +2068,31 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2014-03-07 15:35:33"
+ "time": "2015-06-21 13:59:46"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "2.3.2",
+ "version": "2.6.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404"
+ "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
- "reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4edb770cb853def6e60c93abb088ad5ac2010c83",
+ "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83",
"shasum": ""
},
"require": {
+ "ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.1.2"
},
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
"bin": [
"scripts/phpcs",
"scripts/phpcbf"
@@ -1936,7 +2100,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
@@ -1982,30 +2146,30 @@
"phpcs",
"standards"
],
- "time": "2015-04-28 23:28:20"
+ "time": "2016-07-13 23:29:13"
},
{
"name": "symfony/browser-kit",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/BrowserKit",
"source": {
"type": "git",
- "url": "https://github.com/symfony/BrowserKit.git",
- "reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc"
+ "url": "https://github.com/symfony/browser-kit.git",
+ "reference": "0fca8e3490f003262258dcf67c329691913642e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
- "reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/0fca8e3490f003262258dcf67c329691913642e5",
+ "reference": "0fca8e3490f003262258dcf67c329691913642e5",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
- "symfony/dom-crawler": "~2.0"
+ "symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
- "symfony/css-selector": "~2.0",
- "symfony/process": "~2.0"
+ "symfony/css-selector": "~2.0,>=2.0.5",
+ "symfony/process": "~2.3.34|~2.7,>=2.7.6"
},
"suggest": {
"symfony/process": ""
@@ -2019,7 +2183,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\BrowserKit\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2027,31 +2194,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony BrowserKit Component",
- "homepage": "http://symfony.com",
- "time": "2014-09-22 08:32:35"
+ "homepage": "https://symfony.com",
+ "time": "2016-03-04 07:12:06"
},
{
"name": "symfony/css-selector",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/CssSelector",
"source": {
"type": "git",
- "url": "https://github.com/symfony/CssSelector.git",
- "reference": "d9943386b648d21746bed25cc24f61fab1387943"
+ "url": "https://github.com/symfony/css-selector.git",
+ "reference": "e750fff4bd738e54414fbfdd48ede6b0e99ab808"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/CssSelector/zipball/d9943386b648d21746bed25cc24f61fab1387943",
- "reference": "d9943386b648d21746bed25cc24f61fab1387943",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e750fff4bd738e54414fbfdd48ede6b0e99ab808",
+ "reference": "e750fff4bd738e54414fbfdd48ede6b0e99ab808",
"shasum": ""
},
"require": {
@@ -2066,7 +2233,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\CssSelector\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2074,42 +2244,42 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony CssSelector Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-09 12:30:02"
+ "homepage": "https://symfony.com",
+ "time": "2016-03-04 07:12:06"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/DomCrawler",
"source": {
"type": "git",
- "url": "https://github.com/symfony/DomCrawler.git",
- "reference": "64b90870ee3a4e88c9a7a12861683864de029d31"
+ "url": "https://github.com/symfony/dom-crawler.git",
+ "reference": "b1a52aeafe4dd31914c75e72fc9b9ca3a3e5981d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/64b90870ee3a4e88c9a7a12861683864de029d31",
- "reference": "64b90870ee3a4e88c9a7a12861683864de029d31",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b1a52aeafe4dd31914c75e72fc9b9ca3a3e5981d",
+ "reference": "b1a52aeafe4dd31914c75e72fc9b9ca3a3e5981d",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
- "symfony/css-selector": "~2.0"
+ "symfony/css-selector": "~2.0,>=2.0.5"
},
"suggest": {
"symfony/css-selector": ""
@@ -2123,7 +2293,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\DomCrawler\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2131,31 +2304,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony DomCrawler Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:38:33"
+ "homepage": "https://symfony.com",
+ "time": "2016-04-06 13:13:46"
},
{
"name": "symfony/finder",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Finder",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Finder.git",
- "reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d"
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "dce4b58434fc1cbd66e3006e539bb53074dfea82"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Finder/zipball/fc25dab213d14468c39f12d47e5b79a72b898d4d",
- "reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/dce4b58434fc1cbd66e3006e539bb53074dfea82",
+ "reference": "dce4b58434fc1cbd66e3006e539bb53074dfea82",
"shasum": ""
},
"require": {
@@ -2170,7 +2343,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Finder\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2178,31 +2354,31 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Finder Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:39:06"
+ "homepage": "https://symfony.com",
+ "time": "2016-05-13 14:58:35"
},
{
"name": "symfony/process",
- "version": "v2.3.21",
+ "version": "v2.3.42",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Process.git",
- "reference": "0434822691030547f2439d30ff68758c5576a0ce"
+ "url": "https://github.com/symfony/process.git",
+ "reference": "89aced1438655ad81fc828c2e2e555e9b88fef3b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Process/zipball/0434822691030547f2439d30ff68758c5576a0ce",
- "reference": "0434822691030547f2439d30ff68758c5576a0ce",
+ "url": "https://api.github.com/repos/symfony/process/zipball/89aced1438655ad81fc828c2e2e555e9b88fef3b",
+ "reference": "89aced1438655ad81fc828c2e2e555e9b88fef3b",
"shasum": ""
},
"require": {
@@ -2217,7 +2393,10 @@
"autoload": {
"psr-0": {
"Symfony\\Component\\Process\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2225,17 +2404,17 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Process Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:38:33"
+ "homepage": "https://symfony.com",
+ "time": "2016-03-31 08:39:43"
}
],
"aliases": [],
@@ -2244,7 +2423,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": ">=5.3.3"
+ "php": ">=5.3.3,<7.0"
},
"platform-dev": []
}
diff --git a/phpBB/config/auth.yml b/phpBB/config/auth.yml
index 88a90ca2d6..ef06080d38 100644
--- a/phpBB/config/auth.yml
+++ b/phpBB/config/auth.yml
@@ -62,6 +62,7 @@ services:
- @auth.provider.oauth.service_collection
- %tables.users%
- @service_container
+ - @dispatcher
- %core.root_path%
- %core.php_ext%
tags:
diff --git a/phpBB/config/event.yml b/phpBB/config/event.yml
index 599b3cbb40..7bc4cb0042 100644
--- a/phpBB/config/event.yml
+++ b/phpBB/config/event.yml
@@ -32,3 +32,10 @@ services:
class: phpbb\event\kernel_terminate_subscriber
tags:
- { name: kernel.event_subscriber }
+
+ symfony_response_listener:
+ class: Symfony\Component\HttpKernel\EventListener\ResponseListener
+ arguments:
+ - UTF-8
+ tags:
+ - { name: kernel.event_subscriber }
diff --git a/phpBB/config/feed.yml b/phpBB/config/feed.yml
index 48bd9fe76f..b69f80b2c5 100644
--- a/phpBB/config/feed.yml
+++ b/phpBB/config/feed.yml
@@ -25,6 +25,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.forums:
@@ -38,6 +39,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.news:
@@ -51,6 +53,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.overall:
@@ -64,6 +67,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.topic:
@@ -77,6 +81,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.topics:
@@ -90,6 +95,7 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
feed.topics_active:
@@ -103,4 +109,5 @@ services:
- @user
- @auth
- @content.visibility
+ - @dispatcher
- %core.php_ext%
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 3f022b1db8..aed68f6aeb 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -55,6 +55,18 @@ if ($cron_lock->acquire())
$task = $cron->find_task($cron_type);
if ($task)
{
+ /**
+ * This event enables you to catch the task before it runs
+ *
+ * @event core.cron_run_before
+ * @var \phpbb\cron\task\wrapper task Current Cron task
+ * @since 3.1.8-RC1
+ */
+ $vars = array(
+ 'task',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.cron_run_before', compact($vars)));
+
if ($task->is_parametrized())
{
$task->parse_parameters($request);
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 8bd7ac47e0..394d9536e8 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Changelog" />
<title>phpBB &bull; Changelog</title>
@@ -49,6 +50,12 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
+ <li><a href="#v319">Changes since 3.1.9</a></li>
+ <li><a href="#v318">Changes since 3.1.8</a></li>
+ <li><a href="#v317pl1">Changes since 3.1.7-PL1</a></li>
+ <li><a href="#v317">Changes since 3.1.7</a></li>
+ <li><a href="#v316">Changes since 3.1.6</a></li>
+ <li><a href="#v315">Changes since 3.1.5</a></li>
<li><a href="#v314">Changes since 3.1.4</a></li>
<li><a href="#v313">Changes since 3.1.3</a></li>
<li><a href="#v313rc1">Changes since 3.1.3-RC1</a></li>
@@ -110,7 +117,392 @@
<div class="paragraph">
<div class="inner">
- <div class="content">
+<div class="content">
+
+ <a name="v319"></a><h3>Changes since 3.1.9</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11446">PHPBB3-11446</a>] - Use sql_in_set as designed and consistent with the rest of phpBB code in phpbb_notification_manager</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12230">PHPBB3-12230</a>] - Do not auto remove user group when Newly Registered Users group was disabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12925">PHPBB3-12925</a>] - Use plural for permanent delete posts/topics confirmation</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14109">PHPBB3-14109</a>] - MySQL InnoDB does not support multiple index definitions on the same query.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14291">PHPBB3-14291</a>] - Function send_file_to_browser() endlessly overwrites 'filesize' in ATTACHMENTS_TABLE</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14610">PHPBB3-14610</a>] - Q&amp;A CAPTCHA logs error when it has been solved</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14615">PHPBB3-14615</a>] - delete avatar triggers the new min max value in the HTML5 inputs</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14616">PHPBB3-14616</a>] - Auto-prune fails on large forums</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14631">PHPBB3-14631</a>] - 3.1.9 DB cli update crashes with PHP Fatal error: Call to undefined function phpbb\truncate_string()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14654">PHPBB3-14654</a>] - Imagemagick &gt; ImageMagick</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14661">PHPBB3-14661</a>] - Fix a typo in twig.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14673">PHPBB3-14673</a>] - Missing Language Variable</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14683">PHPBB3-14683</a>] - Typos in operators in some email templates</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14703">PHPBB3-14703</a>] - module.add adds a module to the wrong parent</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14704">PHPBB3-14704</a>] - Remove unused language files and corresponding functions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14721">PHPBB3-14721</a>] - New registrants choosing old deleted usernames get linked to old accounts with namechange</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14742">PHPBB3-14742</a>] - Improvements to migrator</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14745">PHPBB3-14745</a>] - &quot;U_NOTIFICATION_SETTINGS&quot; contains an HTML entity but is printed in a plaintext email</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14755">PHPBB3-14755</a>] - Error in MCP Move posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14782">PHPBB3-14782</a>] - Quick Links &gt; Your Posts gives mysql error</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14788">PHPBB3-14788</a>] - Update developer list to reflect team changes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14796">PHPBB3-14796</a>] - Log table is using constant in log delete method</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13709">PHPBB3-13709</a>] - Fallback to english in email templates by extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13716">PHPBB3-13716</a>] - Check phpBB version constant against config version</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13865">PHPBB3-13865</a>] - Complement core event search_modify_param</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14184">PHPBB3-14184</a>] - Missing info on SMTP mail function option</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14429">PHPBB3-14429</a>] - core.obtain_users_online_string_modify</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14466">PHPBB3-14466</a>] - Add an event to cron.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14469">PHPBB3-14469</a>] - [Template] - &lt;!-- EVENT viewforum_topicrow_before --&gt;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14516">PHPBB3-14516</a>] - [Template] - memberlist_email_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14581">PHPBB3-14581</a>] - Add core events relating to soft delete</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14592">PHPBB3-14592</a>] - [PHP] - core.search_backend_search_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14596">PHPBB3-14596</a>] - Prevent installs of 3.1 on PHP 7</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14624">PHPBB3-14624</a>] - Add event to ucp_profile in signature section</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14630">PHPBB3-14630</a>] - Add event to ucp_pm_compose</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14638">PHPBB3-14638</a>] - [PHP] - multiple UCP subscription events for form data and template variables</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14643">PHPBB3-14643</a>] - Select newest file in restore list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14652">PHPBB3-14652</a>] - Typo birthdays</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14664">PHPBB3-14664</a>] - Fix PHPDoc comment in cron manager</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14672">PHPBB3-14672</a>] - Add template event to viewforum</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14685">PHPBB3-14685</a>] - PHP event for altering announcements sql</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14687">PHPBB3-14687</a>] - Modify viewforum_modify_topicrow</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14688">PHPBB3-14688</a>] - Add core events to the feeds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14689">PHPBB3-14689</a>] - Build 3.2.x API docs</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14695">PHPBB3-14695</a>] - Add posting_editor_subject_prepend/append template events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14712">PHPBB3-14712</a>] - Add search.php core event to allow modifying the forum select list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14713">PHPBB3-14713</a>] - Add core event to the admin function get_forum_list()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14715">PHPBB3-14715</a>] - Add template events in posting_topic_review &amp; mcp_topic</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14720">PHPBB3-14720</a>] - Add global javascript variable 'phpbb' to jshint settings</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14727">PHPBB3-14727</a>] - Event core.search_modify_submit_parameters</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14738">PHPBB3-14738</a>] - Add core events to improve modifying forum lists</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14747">PHPBB3-14747</a>] - Add topic_last_poster_id and topic_last_post_time to Event core.modify_posting_auth</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14762">PHPBB3-14762</a>] - Add core event to session.php to alter IP address</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14781">PHPBB3-14781</a>] - Add core event to the function group_user_attributes()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14783">PHPBB3-14783</a>] - Event - ACP Posting Buttons Before Custom BBCodes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14784">PHPBB3-14784</a>] - missing rewrite for lighttpd</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14785">PHPBB3-14785</a>] - [Template event] - overall_header_headerbar_append</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14787">PHPBB3-14787</a>] - Add more parameters to the core.search_modify_url_parameters event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14789">PHPBB3-14789</a>] - Add missing link hash and form token checks to ACP</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13978">PHPBB3-13978</a>] - [PHP] - User control panel - on signature change</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14484">PHPBB3-14484</a>] - Support extensions in UI tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14506">PHPBB3-14506</a>] - [Template] - mcp_move_before</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12133">PHPBB3-12133</a>] - Update list of browsers supporting filename* in Content-Disposition</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14538">PHPBB3-14538</a>] - Update composer dependencies</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14598">PHPBB3-14598</a>] - Phing Sniffer Testing Use Statements in DocBlocks</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14743">PHPBB3-14743</a>] - Remove PHP7 from test matrix in 3.1.x</li>
+ </ul>
+
+ <a name="v318"></a><h3>Changes since 3.1.8</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8058">PHPBB3-8058</a>] - Default style in ACP-&gt;Board Settings not observing offset</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13028">PHPBB3-13028</a>] - &quot;View unanswered posts&quot; link should be called instead &quot;View unanswered topics&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13264">PHPBB3-13264</a>] - Editing an unapproved post as a moderator/admin approves it</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13521">PHPBB3-13521</a>] - Q&amp;A Captcha ACP, required fields error corrupts inputted data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13630">PHPBB3-13630</a>] - NULL value parsed into $select_single can cause 403 Forbidden on certain restrictive hosting environments for &quot;Find a Member&quot; function within Private Message composition</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13681">PHPBB3-13681</a>] - Email queue shouldn't be cached by opcache</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13683">PHPBB3-13683</a>] - Controller generates urls with absolute path of phpbb's root</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13842">PHPBB3-13842</a>] - Missing rewrite module on IIS7 leads to an error</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13977">PHPBB3-13977</a>] - Fatal error entering UCP if bookmarked topic was deleted</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14132">PHPBB3-14132</a>] - SQL Error when creating a new subject on fresh installation</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14136">PHPBB3-14136</a>] - IE compatibility meta is missing in overall_header.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14241">PHPBB3-14241</a>] - Security bug into Spambot control Questions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14272">PHPBB3-14272</a>] - Use valid html5 input elements in forms</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14290">PHPBB3-14290</a>] - Function set_modified_headers() never sends 304 'Not Modified' header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14408">PHPBB3-14408</a>] - Remove span corners</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14422">PHPBB3-14422</a>] - Support cmd+enter &amp; ctrl+enter for submitting message</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14437">PHPBB3-14437</a>] - Place Inline Images on Post get scrambled up -- not follow the order you place them in.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14443">PHPBB3-14443</a>] - jabber notification-template prefix &quot;short&quot; breaks resolution of paths in extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14475">PHPBB3-14475</a>] - Do not log upon automatically removing users form newly registered users group</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14481">PHPBB3-14481</a>] - phpBB does not obey HTTP_X_FORWARDED_PORT header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14483">PHPBB3-14483</a>] - call to header(arg, arg) function sendHeaders() in Response.php causes Error 500 in app.php generated links</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14496">PHPBB3-14496</a>] - Automatic update relies on cache creating files in cache folder</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14500">PHPBB3-14500</a>] - Duplicate newversion in build.xml</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14514">PHPBB3-14514</a>] - Users get skipped in passwords_convert_p1 migration</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14519">PHPBB3-14519</a>] - Do not query database for unread notifications if all are retrieved</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14532">PHPBB3-14532</a>] - Database column default incorrectly escaped on MSSQL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14533">PHPBB3-14533</a>] - &quot;U_NOTIFICATION_SETTINGS&quot; doesn't return the correct URL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14536">PHPBB3-14536</a>] - Force timestamp to be integer in user::format_date()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14559">PHPBB3-14559</a>] - Attachments' behaviour in quotes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14562">PHPBB3-14562</a>] - Extension's permissions don't have language fallback</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14570">PHPBB3-14570</a>] - Board versions for 3.2.x can be accidentally downgraded to 3.1.x</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14577">PHPBB3-14577</a>] - Stop using sizeof() inside for() loop</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10356">PHPBB3-10356</a>] - Username search should find all users for administrators instead of NORMALs and FOUNDERs only</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12305">PHPBB3-12305</a>] - Add new event core.viewforum_get_topic_id_sql to control forum topic listing</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14134">PHPBB3-14134</a>] - Send warning notification PM in user's language.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14316">PHPBB3-14316</a>] - Add memberlist_view.html template events before/after the custom fields and zebra links</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14365">PHPBB3-14365</a>] - Add core event to the function topic_review() </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14366">PHPBB3-14366</a>] - Add core events to the function decode_message()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14395">PHPBB3-14395</a>] - Add event core.viewtopic_add_quickmod_option_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14471">PHPBB3-14471</a>] - Add filedata var to the core.avatar_driver_upload_move_file_before event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14486">PHPBB3-14486</a>] - Add an event and fix an event in login_box()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14508">PHPBB3-14508</a>] - Change language notice on account activation</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14540">PHPBB3-14540</a>] - Adjust class recursive_dot_prefix_filter_iterator to increase performance</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12684">PHPBB3-12684</a>] - Add a command to add a user from the CLI</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14189">PHPBB3-14189</a>] - [PHP] - core.gen_sort_selects_after</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14538">PHPBB3-14538</a>] - Update composer dependencies</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14565">PHPBB3-14565</a>] - Updates composer to 1.0.0-b2</li>
+ </ul>
+
+ <a name="v317pl1"></a><h3>Changes since 3.1.7-PL1</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12441">PHPBB3-12441</a>] - Database-size in ACP missing after update MariaDB from 5.5 to 10.0</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12618">PHPBB3-12618</a>] - Extension Version Check does not support https</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13180">PHPBB3-13180</a>] - Increase the field size of date format to allow more syntax for other calendars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13908">PHPBB3-13908</a>] - After clause in migration add_column schema tool not honored</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14046">PHPBB3-14046</a>] - Instant message (jabber) dialog says message sent on the creation screen</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14303">PHPBB3-14303</a>] - Some changes for UTF-8 variant on language pack?</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14374">PHPBB3-14374</a>] - Update dynamically generated jquery CDN script tag</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14386">PHPBB3-14386</a>] - open_basedir restriction in effect with remote upload avatar</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14387">PHPBB3-14387</a>] - Extend avatar-driver by extension in ACP not possible</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14394">PHPBB3-14394</a>] - Only purge cache in functional tests if necessary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14396">PHPBB3-14396</a>] - Use VCHAR_UNI instead of VCHAR for user_dateformat</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14397">PHPBB3-14397</a>] - Fix @since tag in event 'core.ucp_prefs_view_after'</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14403">PHPBB3-14403</a>] - phpbb\log should still work even when no user data is given</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14407">PHPBB3-14407</a>] - Users not being removed from Newly Registered Users group</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14409">PHPBB3-14409</a>] - Update session page info before displaying online list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14411">PHPBB3-14411</a>] - Delete permanently is not working as it should be</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14423">PHPBB3-14423</a>] - Display database size for Aria storage engine</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14425">PHPBB3-14425</a>] - Database tests do not allow using socket</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14427">PHPBB3-14427</a>] - Memberlist Display Wrong</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14433">PHPBB3-14433</a>] - Functional tests fail for extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14439">PHPBB3-14439</a>] - Error page shown in Manage users -&gt; Anonymous -&gt; Select Form -&gt; Avatar when board wide all avatar settings are disabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14467">PHPBB3-14467</a>] - Automatic resize of textarea calculates wrong height</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14475">PHPBB3-14475</a>] - Do not log removal of users from newly registered group</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14289">PHPBB3-14289</a>] - Add events in navbar header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14356">PHPBB3-14356</a>] - Add template events to viewtopic around back2top link</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14412">PHPBB3-14412</a>] - Comment fixes for PHPDoc in the events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14458">PHPBB3-14458</a>] - Explicitly state RewriteBase into .htaccess root file</li>
+ </ul>
+
+ <a name="v317"></a><h3>Changes since 3.1.7</h3>
+
+ <h4>Security Issue</h4>
+ <ul>
+ <li>[SECURITY-188] - Check form key in acp_bbcodes</li>
+ </ul>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-14343">PHPBB3-14343</a>] - Undefined variable $phpbb_dispatcher when (un-)locking a topic or post</li>
+ </ul>
+
+ <a name="v316"></a><h3>Changes since 3.1.6</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8839">PHPBB3-8839</a>] - Wrong new status of subforumlink on index</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8920">PHPBB3-8920</a>] - PM-Report for every moderator</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9153">PHPBB3-9153</a>] - New member can delete pm just in one way</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9252">PHPBB3-9252</a>] - Conflict when (dis)approving a post by two moderators at the same time</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11468">PHPBB3-11468</a>] - Controllers can not set additional parameters of page_header()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11971">PHPBB3-11971</a>] - Validating not correctly in Spambot countermeasures</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12616">PHPBB3-12616</a>] - Report notification is not removed when post is disapproved or deleted</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13202">PHPBB3-13202</a>] - dead code in sessions.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13423">PHPBB3-13423</a>] - Driver sqlite3 failed periodically</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13636">PHPBB3-13636</a>] - Unexpect return to previous page behaviour</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13656">PHPBB3-13656</a>] - database_upgrade.php fails when database password contains a % character</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13748">PHPBB3-13748</a>] - Wrong tooltip after poll vote change</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13759">PHPBB3-13759</a>] - submit_post doesn't take $data['post_time'] - into account</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13799">PHPBB3-13799</a>] - Avatar gallery subfolders paths are handled incorrectly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13831">PHPBB3-13831</a>] - Post deletion reason is not appearing on moderation logs</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13835">PHPBB3-13835</a>] - File upload of large files where filename contains umlauts fails</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13846">PHPBB3-13846</a>] - Permissions around soft deleting are inconsistently handled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13851">PHPBB3-13851</a>] - &quot;Can ignore flood limit&quot; permission not taking effect</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13892">PHPBB3-13892</a>] - &quot;Someone reports a post&quot; notification setting has no effect</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13945">PHPBB3-13945</a>] - Account re-activation does not create a notification</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13950">PHPBB3-13950</a>] - If disabled extension - no hidden permission set</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13960">PHPBB3-13960</a>] - Profile field validation may break</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13976">PHPBB3-13976</a>] - Fix comment typo in salted_md5 driver</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13988">PHPBB3-13988</a>] - Atom feeds use relative links for image attachments</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13992">PHPBB3-13992</a>] - Fix html5 error from output on w3.org its new validator</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14058">PHPBB3-14058</a>] - subsilver2 Contact us form doesn't have an email subject field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14070">PHPBB3-14070</a>] - Disabled avatar types is still displayed on the forum</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14106">PHPBB3-14106</a>] - Sorting is unworkable while moderating forum (merge topics)</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14114">PHPBB3-14114</a>] - Inconsistency in install.html in 3.1.x Automatic uopdate package</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14127">PHPBB3-14127</a>] - Error in the BBCode FAQ in 'Linking to another site'</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14142">PHPBB3-14142</a>] - Remove unused ignore_configs from avatar drivers</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14143">PHPBB3-14143</a>] - Flush the in-memory mail queue when writing it to the disk</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14153">PHPBB3-14153</a>] - Notifications dropdown header doesn't clear floats</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14159">PHPBB3-14159</a>] - Not accessible link on main ACP page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14161">PHPBB3-14161</a>] - The core.download_file_send_to_browser_before - $vars - 'extension' it does not exist</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14163">PHPBB3-14163</a>] - Select All in code bug in Edge</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14181">PHPBB3-14181</a>] - Custom report/denial reason not shown in user notifications</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14186">PHPBB3-14186</a>] - Incorrect string concatenation in phpbb_mcp_sorting()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14200">PHPBB3-14200</a>] - Allow hidden users to see theself on viewonline</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14215">PHPBB3-14215</a>] - [ticket/14212] - Adding event after users have been removed to a group</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14217">PHPBB3-14217</a>] - [ticket/13591] - Change SQL query into array to allow</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14224">PHPBB3-14224</a>] - Fix trailing whitespaces</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14228">PHPBB3-14228</a>] - Vertical align of numbers in polls</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14236">PHPBB3-14236</a>] - Race condition in the functional tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14242">PHPBB3-14242</a>] - Fix on memberlist the sort method.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14249">PHPBB3-14249</a>] - Online list isn't sorted anymore</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14258">PHPBB3-14258</a>] - Add event in auth::Login</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14271">PHPBB3-14271</a>] - Update nginx sample config</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14276">PHPBB3-14276</a>] - Function get_folder_status not setup for use of plurals</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14287">PHPBB3-14287</a>] - Loading indicator not removed after confirming action that does not produce a message</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14297">PHPBB3-14297</a>] - Uppercase and lowercase when sorting topics</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14334">PHPBB3-14334</a>] - Do not use deprecated function get_user_avatar() in user_loader</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14339">PHPBB3-14339</a>] - State support for PHP 7.0 in docs</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14346">PHPBB3-14346</a>] - Improve version check output when phpbb.com is unreachable</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7362">PHPBB3-7362</a>] - Title/Post Icons Need Attribute Text</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8800">PHPBB3-8800</a>] - Add &quot;mark topics read&quot; link to &quot;View unread posts&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10343">PHPBB3-10343</a>] - ACP: searching for users does not show inactive accounts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13684">PHPBB3-13684</a>] - Only resize attached file comments vertically</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13934">PHPBB3-13934</a>] - Enctype clause for forms may be needed for profile fields</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14066">PHPBB3-14066</a>] - Add template events to search_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14073">PHPBB3-14073</a>] - Add core events to the several places in includes/functions_admin.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14075">PHPBB3-14075</a>] - Event in posting preview</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14080">PHPBB3-14080</a>] - Add template events to viewforum_body.html before/after/append/prepend the topic row</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14088">PHPBB3-14088</a>] - Add core events to the search.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14089">PHPBB3-14089</a>] - [Template] - posting_topic_title_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14098">PHPBB3-14098</a>] - Add core events to the search backends (fulltext_*.php)</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14102">PHPBB3-14102</a>] - Add core event to the mcp_topic.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14113">PHPBB3-14113</a>] - Add core events to the memberlist.php for customizing members search</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14117">PHPBB3-14117</a>] - Add core events to index.php to allow modifying birthdays list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14123">PHPBB3-14123</a>] - Add more descriptive help to the CLI commands</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14126">PHPBB3-14126</a>] - Add viewtopic_topic_title_after template event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14133">PHPBB3-14133</a>] - Comment fix for phpbb_get_user_rank()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14154">PHPBB3-14154</a>] - Include &quot;Clean Name&quot; for disabled Extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14155">PHPBB3-14155</a>] - Add row highlighting to extensions and style management</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14156">PHPBB3-14156</a>] - Add the Symfony ResponseListener</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14164">PHPBB3-14164</a>] - Helpful instructions for database updates</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14170">PHPBB3-14170</a>] - Fix mcp_change_poster_after event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14201">PHPBB3-14201</a>] - Add ACP template events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14213">PHPBB3-14213</a>] - [PHP] - core.group_add_user_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14219">PHPBB3-14219</a>] - Add email address into inactive user display in ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14261">PHPBB3-14261</a>] - Pages served from app.php can't disable the update of session_page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14283">PHPBB3-14283</a>] - Add a &quot;Manage Group&quot; link on a group page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14313">PHPBB3-14313</a>] - Don't display quote button on unapproved posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14343">PHPBB3-14343</a>] - Add event when locking/unlocking posts/topics</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14144">PHPBB3-14144</a>] - [Template] - quickreply_editor_subject_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14146">PHPBB3-14146</a>] - [Template] - viewtopic_body_post_subject_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14187">PHPBB3-14187</a>] - [ACP Template] - acp_styles_before_table</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14188">PHPBB3-14188</a>] - [PHP] - core.acp_styles_action_before</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14191">PHPBB3-14191</a>] - [PHP] - core.get_gravatar_url_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14192">PHPBB3-14192</a>] - [PHP] - core.memberlist_memberrow_before</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14140">PHPBB3-14140</a>] - Update Symfony to benefit from improvement to the console component</li>
+ </ul>
+
+
+ <a name="v315"></a><h3>Changes since 3.1.5</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10711">PHPBB3-10711</a>] - SQL error DUPLICATE for KEY in FORUMS_TRACK_TABLE </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13711">PHPBB3-13711</a>] - disabled accounts receive mails</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13815">PHPBB3-13815</a>] - Event parameters in posting do not affect behavior as expected</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13903">PHPBB3-13903</a>] - Container naming doesn't allow Windows' semicolon</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13930">PHPBB3-13930</a>] - Check for correct spacing between keyword &amp; parenthesis in codesniffer</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13941">PHPBB3-13941</a>] - One test is blocked in an inifinite loop on php 5.5+ and with sqlite3</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13948">PHPBB3-13948</a>] - Only reports top level WHOIS IP for a user in ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13949">PHPBB3-13949</a>] - Replace colon with colon lang key in memberlist search page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13951">PHPBB3-13951</a>] - Jump to page function does not work since 3.1.5 upgrade</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13952">PHPBB3-13952</a>] - Fulltext Native errors from tidy_search cron task</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13955">PHPBB3-13955</a>] - 3.1.5 not loading CDN resources</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13962">PHPBB3-13962</a>] - Forum dropdown in MCP queue could expand beyond screen size</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13966">PHPBB3-13966</a>] - Change post's author --&gt; error message</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13967">PHPBB3-13967</a>] - BBCode guide - loading phpBB logo image breaks https</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13980">PHPBB3-13980</a>] - Current avatar not removed when uploading with different extension</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13984">PHPBB3-13984</a>] - AJAX Loading Indicator broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14037">PHPBB3-14037</a>] - Memberlist profile fields headlines not computed from same way as data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14049">PHPBB3-14049</a>] - Plupload delete request should use config headers</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14069">PHPBB3-14069</a>] - Incorrect sql_fetchfield call in style_update_p1 migration</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14077">PHPBB3-14077</a>] - Select all code not work in Microsoft Edge</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14082">PHPBB3-14082</a>] - Fix wrong variables in fulltext native search for keyworded results</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14083">PHPBB3-14083</a>] - Fix wrong variables in fulltext mysql search for author search</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14093">PHPBB3-14093</a>] - Hardcoded language in ucp_pm_viewfolder.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14103">PHPBB3-14103</a>] - Underline in abbreviations in Firefox 40</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14104">PHPBB3-14104</a>] - Fix missing variable in fulltext native search query for total results for author</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14115">PHPBB3-14115</a>] - Microdata is not valid in prosilver</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11530">PHPBB3-11530</a>] - Remove quotes that are too deep automatically</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12952">PHPBB3-12952</a>] - Display HTTP Output along with Status code in case assertion fails in functional tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13598">PHPBB3-13598</a>] - Add an option to post a locked topic</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13786">PHPBB3-13786</a>] - Add core events to add MCP post options</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13818">PHPBB3-13818</a>] - Browse Extensions Database link in Extension Manager</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13843">PHPBB3-13843</a>] - Add templates events to insert custom panel-tab into posting editor</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13863">PHPBB3-13863</a>] - [Template] - topiclist_row_append/topiclist_row_prepend in mcp_forum.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13879">PHPBB3-13879</a>] - We're using px most places but ems in others</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13882">PHPBB3-13882</a>] - Avatars in notifications should be lazy loaded</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13899">PHPBB3-13899</a>] - Add items to core.search_results_modify_search_title</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13911">PHPBB3-13911</a>] - Add configuration options to profile fields</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13931">PHPBB3-13931</a>] - Wrong order in docs/events.md</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13968">PHPBB3-13968</a>] - [PHP] - core.user_setup_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13971">PHPBB3-13971</a>] - Add draft_id variable to event core.posting_modify_template_vars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13981">PHPBB3-13981</a>] - Events to intercept uploaded avatar deletion</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13995">PHPBB3-13995</a>] - Invalid HTML using Projection Media Type</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14002">PHPBB3-14002</a>] - Add template events before/after user details in ucp_main_front.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14005">PHPBB3-14005</a>] - Allow extensions control post buttons displaying</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14014">PHPBB3-14014</a>] - [PHP] - mcp_forum_view_actions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14064">PHPBB3-14064</a>] - Add template events to ucp_pm_history.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14065">PHPBB3-14065</a>] - Add template events to attachment.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14067">PHPBB3-14067</a>] - Add template events to overall_header.html around feeds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14068">PHPBB3-14068</a>] - New events around poll panel in viewtopic</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14072">PHPBB3-14072</a>] - Add core event to the function format_display()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14085">PHPBB3-14085</a>] - [Template] - posting_topic_title_prepend</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14086">PHPBB3-14086</a>] - [Template] - Add mcp_forum_topic_title_*</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14090">PHPBB3-14090</a>] - [Template] - mcp_topic_topic_title_*</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14091">PHPBB3-14091</a>] - [Template] - mcp_topic_subject_*</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14101">PHPBB3-14101</a>] - Add core event to the download/file.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14116">PHPBB3-14116</a>] - sql_affectedrows has no arguments</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12692">PHPBB3-12692</a>] - Add a console command to manage the thumbnail</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13311">PHPBB3-13311</a>] - Add php event to acp manage_forums when deleting content</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13974">PHPBB3-13974</a>] - Add php event for altering data when changing a post's poster</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13997">PHPBB3-13997</a>] - [Template] - posting_editor_submit_buttons</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14006">PHPBB3-14006</a>] - [PHP] - core.ucp_register_agreement</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14041">PHPBB3-14041</a>] - [Template] - viewtopic_dropdown_top_custom</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14042">PHPBB3-14042</a>] - [Template] - viewtopic_dropdown_bottom_custom</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14043">PHPBB3-14043</a>] - [PHP] - core.get_avatar_after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14087">PHPBB3-14087</a>] - Add an event to ucp_activate.php.</li>
+ </ul>
+ <h4>Sub-task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13694">PHPBB3-13694</a>] - Allow modifying the Postgres author search query for results</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13947">PHPBB3-13947</a>] - Add CHItA to developer list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14010">PHPBB3-14010</a>] - Update Plupload to 2.1.8</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14099">PHPBB3-14099</a>] - Update Twig to 1.20</li>
+ </ul>
+
<a name="v314"></a><h3>Changes since 3.1.4</h3>
diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt
index deb36339b0..26ff8fcc80 100644
--- a/phpBB/docs/CREDITS.txt
+++ b/phpBB/docs/CREDITS.txt
@@ -1,6 +1,6 @@
/**
*
-* phpBB © Copyright phpBB Limited 2003-2014
+* phpBB © Copyright phpBB Limited 2003-2016
* http://www.phpbb.com
*
* phpBB is free software. You can redistribute it and/or modify it
@@ -20,14 +20,13 @@
phpBB Project Manager: Marshalrusty (Yuriy Rusko)
-phpBB Lead Developer: naderman (Nils Adermann)
+phpBB Product Manager: naderman (Nils Adermann)
+
+phpBB Lead Developer: Marc (Marc Alexander)
phpBB Developers: bantu (Andreas Fischer)
CHItA (Máté Bartus)
- dhruv.goel92 (Dhruv Goel)
Elsensee (Oliver Schramm)
- marc1706 (Marc Alexander)
- nickvergessen (Joas Schilling)
Nicofuma (Tristan Darricau)
prototech (Cesar Gallegos)
@@ -54,11 +53,13 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
ckwalsh (Cullen Walsh) [01/2010 - 07/2011]
DavidMJ (David M.) [12/2005 - 08/2009]
dhn (Dominik Dröscher) [05/2007 - 01/2011]
+ dhruv.goel92 (Dhruv Goel) [04/2013 - 05/2016]
EXreaction (Nathan Guse) [07/2012 - 05/2014]
GrahamJE (Graham Eames) [09/2005 - 11/2006]
igorw (Igor Wiedler) [08/2010 - 02/2013]
imkingdavid (David King) [11/2012 - 06/2014]
kellanved (Henry Sudhof) [04/2007 - 03/2011]
+ nickvergessen (Joas Schilling)[04/2010 - 12/2015]
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
rxu (Ruslan Uzdenov) [04/2010 - 12/2012]
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 4786d8d796..5f3a425cda 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB &bull; FAQ</title>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 132367dd0a..9f8bbe74b8 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB &bull; Install</title>
@@ -147,7 +148,7 @@
<li>Oracle</li>
</ul>
</li>
- <li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li>
+ <li><strong>PHP 5.3.3+</strong> and <strong>PHP < 7.0</strong> with support for the database you intend to use.</li>
<li>The following PHP modules are required:
<ul>
<li>json</li>
@@ -159,7 +160,7 @@
<li>zlib Compression support</li>
<li>Remote FTP support</li>
<li>XML support</li>
- <li>Imagemagick support</li>
+ <li>ImageMagick support</li>
<li>GD Support</li>
</ul>
</li>
@@ -265,7 +266,7 @@
<p>If you are currently using a stable release of phpBB, updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Note</strong>: Before updating, we heavily recommend you do a <em>full backup of your database and existing phpBB files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
-<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong></p>
+<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong> If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<a name="update_full"></a><h3>4.i. Full package</h3>
@@ -273,7 +274,7 @@
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code> and <code>images/</code> directories in place. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
- <p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
+ <p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<p>Once <code>install/database_update.php</code> has completed, you may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
@@ -285,7 +286,7 @@
<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>
- <p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number.</p>
+ <p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<a name="update_patch"></a><h3>4.iii. Patch file</h3>
@@ -297,13 +298,13 @@
<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>
- <p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
+ <p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
<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.13</strong>, you need the <code>phpBB-3.0.13_to_3.0.14.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.1.5</strong>, you need the <code>phpBB-3.1.5_to_3.1.6.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>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index 21639045a3..38f74c199a 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Readme" />
<title>phpBB &bull; Readme</title>
@@ -323,7 +324,7 @@
<div class="content">
- <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>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 and the maximum supported version is any version prior to PHP 7.0.</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 phpBB. 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>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index 27d090c296..960fa76417 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index ffc360b0c3..56b71006c7 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 338bc9f1e9..0ebaf8f3e0 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -1,3 +1,15 @@
+acp_ban_cell_append
+===
+* Location: adm/style/acp_ban.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the end of the ban cell area
+
+acp_ban_cell_prepend
+===
+* Location: adm/style/acp_ban.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the start of the ban cell area
+
acp_bbcodes_actions_append
===
* Location: adm/style/acp_bbcodes.html
@@ -16,12 +28,48 @@ acp_bbcodes_edit_fieldsets_after
* Since: 3.1.0-a3
* Purpose: Add settings to BBCode add/edit form
+acp_email_group_options_append
+===
+* Location: adm/style/acp_email.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the end of the group options select box
+
+acp_email_group_options_prepend
+===
+* Location: adm/style/acp_email.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the start of the group options select box
+
+acp_email_find_username_append
+===
+* Location: adm/style/acp_email.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the end of the fimd username link
+
+acp_email_find_username_prepend
+===
+* Location: adm/style/acp_email.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the start of the fimd username link
+
acp_email_options_after
===
* Location: adm/style/acp_email.html
* Since: 3.1.2-RC1
* Purpose: Add settings to mass email form
+acp_ext_list_disabled_title_after
+===
+* Location: adm/style/acp_ext_list.html
+* Since: 3.1.11-RC1
+* Purpose: Add text after disabled extensions section title.
+
+acp_ext_list_enabled_title_after
+===
+* Location: adm/style/acp_ext_list.html
+* Since: 3.1.11-RC1
+* Purpose: Add text after enabled extensions section title.
+
acp_forums_custom_settings
===
* Location: adm/style/acp_forums.html
@@ -64,6 +112,18 @@ acp_forums_prune_settings_prepend
* Since: 3.1.2-RC1
* Purpose: Add settings to forums before prune settings section
+acp_forums_quick_select_button_append
+===
+* Location: adm/style/acp_forums.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the quick select forum submit button
+
+acp_forums_quick_select_button_prepend
+===
+* Location: adm/style/acp_forums.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the quick select forum submit button
+
acp_forums_rules_settings_append
===
* Location: adm/style/acp_forums.html
@@ -88,6 +148,66 @@ acp_group_options_after
* Since: 3.1.0-b4
* Purpose: Add addtional options to group settings (after GROUP_RECEIVE_PM)
+acp_groups_find_username_append
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the end of the find username link
+
+acp_groups_find_username_prepend
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the start of the find username link
+
+acp_groups_manage_after
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the manage groups table
+
+acp_groups_manage_before
+===
+* Location: adm/style/acp_groups.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the manage groups table
+
+acp_groups_position_legend_add_button_after
+===
+* Location: adm/style/acp_groups_position.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after adding group to legend submit button
+
+acp_groups_position_legend_add_button_before
+===
+* Location: adm/style/acp_groups_position.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before adding group to legend submit button
+
+acp_groups_position_teampage_add_button_after
+===
+* Location: adm/style/acp_groups_position.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after adding group to teampage submit button
+
+acp_groups_position_teampage_add_button_before
+===
+* Location: adm/style/acp_groups_position.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before adding group to teampage submit button
+
+acp_logs_quick_select_forum_button_append
+===
+* Location: adm/style/acp_logs.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the quick forum select form submit button
+
+acp_logs_quick_select_forum_button_prepend
+===
+* Location: adm/style/acp_logs.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the quick forum select form submit button
+
acp_main_actions_append
===
* Location: adm/style/acp_main.html
@@ -125,6 +245,102 @@ acp_overall_header_stylesheets_after
* Purpose: Add assets after stylesheets within the `<head>` tags in the ACP.
Note that INCLUDECSS will not work with this event.
+acp_permission_forum_copy_src_forum_append
+===
+* Location: adm/style/permission_forum_copy.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the sourse forum select form
+
+acp_permission_forum_copy_src_forum_prepend
+===
+* Location: adm/style/permission_forum_copy.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the sourse forum select form
+
+acp_permission_forum_copy_dest_forum_append
+===
+* Location: adm/style/permission_forum_copy.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the destiny forum select form
+
+acp_permission_forum_copy_dest_forum_prepend
+===
+* Location: adm/style/permission_forum_copy.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the destiny forum select form
+
+acp_permissions_add_group_options_append
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the group multiple select form
+
+acp_permissions_add_group_options_prepend
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the group multiple select form
+
+acp_permissions_find_username_append
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the find username link
+
+acp_permissions_find_username_prepend
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the find username link
+
+acp_permissions_select_forum_append
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the forum select form label
+
+acp_permissions_select_forum_prepend
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the forum select form label
+
+acp_permissions_select_group_after
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the group select form in usergroup view
+
+acp_permissions_select_group_append
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the group select form label
+
+acp_permissions_select_group_before
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the group select form in usergroup view
+
+acp_permissions_select_group_prepend
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the group select form label
+
+acp_permissions_select_multiple_forum_append
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the forum multiple select form label
+
+acp_permissions_select_multiple_forum_prepend
+===
+* Location: adm/style/acp_permissions.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the forum multiple select form label
+
acp_posting_buttons_after
===
* Locations:
@@ -139,6 +355,13 @@ acp_posting_buttons_before
* Since: 3.1.0-b4
* Purpose: Add content before BBCode posting buttons in the ACP
+acp_posting_buttons_custom_tags_before
+===
+* Locations:
+ + adm/style/acp_posting_buttons.html
+* Since: 3.1.10-RC1
+* Purpose: Add content before the custom BBCodes in the ACP
+
acp_profile_contact_before
===
* Locations:
@@ -146,6 +369,34 @@ acp_profile_contact_before
* Since: 3.1.6-RC1
* Purpose: Add extra options to custom profile field configuration in the ACP
+acp_prune_forums_append
+===
+* Locations:
+ + adm/style/acp_prune_forums.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the forum select form label
+
+acp_prune_forums_prepend
+===
+* Locations:
+ + adm/style/acp_prune_forums.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the forum select form label
+
+acp_prune_users_find_username_append
+===
+* Locations:
+ + adm/style/acp_prune_users.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the find username link
+
+acp_prune_users_find_username_prepend
+===
+* Locations:
+ + adm/style/acp_prune_users.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the find username link
+
acp_ranks_edit_after
===
* Locations:
@@ -190,6 +441,13 @@ acp_ranks_list_header_before
* Purpose: Add content after the last header-column (but before the action column)
in the ranks list in the ACP
+acp_styles_list_before
+===
+* Locations:
+ + adm/style/acp_styles.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before list of styles
+
acp_users_profile_before
===
* Locations:
@@ -290,6 +548,18 @@ acp_users_prefs_view_prepend
* Since: 3.1.0-b3
* Purpose: Add user options fieldset to the top of ACP users view prefs settings
+acp_users_select_group_after
+===
+* Location: adm/style/acp_users.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after group select form
+
+acp_users_select_group_before
+===
+* Location: adm/style/acp_users.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before group select form
+
attachment_file_after
===
* Locations:
@@ -536,6 +806,22 @@ mcp_ban_unban_before
* Since: 3.1.0-RC3
* Purpose: Add additional fields to the unban form in MCP
+mcp_forum_actions_after
+===
+* Locations:
+ + styles/prosilver/template/mcp_forum.html
+ + styles/subsilver2/template/mcp_forum.html
+* Since: 3.1.11-RC1
+* Purpose: Add some information after actions fieldset
+
+mcp_forum_actions_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_forum.html
+ + styles/subsilver2/template/mcp_forum.html
+* Since: 3.1.11-RC1
+* Purpose: Add some information before actions fieldset
+
mcp_forum_topic_title_before
===
* Locations:
@@ -592,6 +878,14 @@ mcp_front_latest_unapproved_before
* Since: 3.1.3-RC1
* Purpose: Add content before latest unapproved posts list
+mcp_move_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_move.html
+ + styles/subsilver2/template/mcp_move.html
+* Since: 3.1.10-RC1
+* Purpose: Add content before move topic/post form
+
mcp_post_additional_options
===
* Locations:
@@ -616,6 +910,22 @@ mcp_topic_options_before
* Since: 3.1.6-RC1
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
+mcp_topic_postrow_post_details_after
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+ + styles/subsilver2/template/mcp_topic.html
+* Since: 3.1.10-RC1
+* Purpose: Add content after post details in topic moderation
+
+mcp_topic_postrow_post_details_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+ + styles/subsilver2/template/mcp_topic.html
+* Since: 3.1.10-RC1
+* Purpose: Add content before post details in topic moderation
+
mcp_topic_topic_title_after
===
* Locations:
@@ -700,6 +1010,14 @@ memberlist_body_username_prepend
* Purpose: Add information before every username in the memberlist. Works in
all display modes (leader, group and normal memberlist).
+memberlist_email_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_email.html
+ + styles/subsilver2/template/memberlist_email.html
+* Since: 3.1.10-RC1
+* Purpose: Allow adding customizations before the memberlist_email form.
+
memberlist_search_fields_after
===
* Locations:
@@ -740,6 +1058,22 @@ memberlist_view_contact_before
* Since: 3.1.0-b2
* Purpose: Add content before the user contact part of any user profile
+memberlist_view_contact_custom_fields_after
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content after the user contact related custom fields
+
+memberlist_view_contact_custom_fields_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content before the user contact related custom fields
+
memberlist_view_content_append
===
* Locations:
@@ -756,6 +1090,22 @@ memberlist_view_content_prepend
* Since: 3.1.0-b3
* Purpose: Add custom content to the user profile view before the main content
+memberlist_view_non_contact_custom_fields_after
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content after the user not contact related custom fields
+
+memberlist_view_non_contact_custom_fields_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content before the user not contact related custom fields
+
memberlist_view_rank_after
===
* Locations:
@@ -814,6 +1164,22 @@ memberlist_view_user_statistics_before
* Since: 3.1.0-a1
* Purpose: Add entries before the user statistics part of any user profile
+memberlist_view_zebra_after
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content after the user friends/foes links
+
+memberlist_view_zebra_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.9-RC1
+* Purpose: Add content before the user friends/foes links
+
navbar_header_logged_out_content
===
* Locations:
@@ -849,6 +1215,20 @@ navbar_header_quick_links_before
* Since: 3.1.0-RC2
* Purpose: Add links to the top of the quick-links drop-down menu in the header
+navbar_header_user_profile_append
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.8-RC1
+* Purpose: Add links to the right of the user drop down area
+
+navbar_header_user_profile_prepend
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.8-RC1
+* Purpose: Add links to the left of the notification area
+
navbar_header_username_append
===
* Locations:
@@ -1023,6 +1403,20 @@ overall_header_head_append
* Since: 3.1.0-a1
* Purpose: Add asset calls directly before the `</head>` tag
+overall_header_headerbar_after
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+* Since: 3.1.10-RC1
+* Purpose: Add content at the end of the headerbar
+
+overall_header_headerbar_before
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+* Since: 3.1.10-RC1
+* Purpose: Add content at the beginning of the headerbar
+
overall_header_navbar_before
===
* Locations:
@@ -1071,6 +1465,13 @@ overall_header_page_body_before
* Since: 3.1.0-b3
* Purpose: Add content after the page-header, but before the page-body
+overall_header_searchbox_after
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+* Since: 3.1.11-RC1
+* Purpose: Add content after the search box in the header
+
overall_header_searchbox_before
===
* Locations:
@@ -1174,6 +1575,14 @@ posting_editor_subject_after
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen after the subject
+posting_editor_subject_append
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.10-RC1
+* Purpose: Add field, text, etc. to the posting after the subject text box
+
posting_editor_subject_before
===
* Locations:
@@ -1182,6 +1591,14 @@ posting_editor_subject_before
* Since: 3.1.0-a2
* Purpose: Add field (e.g. textbox) to the posting screen before the subject
+posting_editor_subject_prepend
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.10-RC1
+* Purpose: Add field, text, etc. to the posting before the subject text box
+
posting_editor_submit_buttons
===
* Locations:
@@ -1235,6 +1652,38 @@ posting_poll_body_options_after
* Since: 3.1.4-RC1
* Purpose: Add content after the poll options on creating a poll
+posting_preview_poll_after
+===
+* Locations:
+ + styles/prosilver/template/posting_preview.html
+ + styles/subsilver2/template/posting_preview.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the poll preview block
+
+posting_topic_review_row_post_details_after
+===
+* Locations:
+ + styles/prosilver/template/posting_topic_review.html
+ + styles/subsilver2/template/posting_topic_review.html
+* Since: 3.1.10-RC1
+* Purpose: Add content after post details in topic review
+
+posting_topic_review_row_post_details_before
+===
+* Locations:
+ + styles/prosilver/template/posting_topic_review.html
+ + styles/subsilver2/template/posting_topic_review.html
+* Since: 3.1.10-RC1
+* Purpose: Add content before post details in topic review
+
+posting_topic_title_after
+===
+* Locations:
+ + styles/prosilver/template/posting_layout.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.7-RC1
+* Purpose: Allows to add some information after the topic title in the posting form
+
posting_topic_title_before
===
* Locations:
@@ -1275,6 +1724,22 @@ quickreply_editor_message_before
* Since: 3.1.0-a4
* Purpose: Add content before the quick reply textbox
+quickreply_editor_subject_before
+===
+* Locations:
+ + styles/prosilver/template/quickreply_editor.html
+ + styles/subsilver2/template/quickreply_editor.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the quick reply subject textbox
+
+search_body_form_after
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the search form
+
search_body_form_before
===
* Locations:
@@ -1283,6 +1748,102 @@ search_body_form_before
* Since: 3.1.5-RC1
* Purpose: Add content before the search form
+search_body_recent_search_after
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the recent search queries list
+
+search_body_recent_search_before
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the recent search queries list
+
+search_body_search_display_options_append
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the bottom of the search query display options fields set
+
+search_body_search_display_options_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the top of the search query display options fields set
+
+search_body_search_options_after
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the search query options fields set
+
+search_body_search_options_append
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the bottom of the search query options fields set
+
+search_body_search_options_before
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the search query options fields set
+
+search_body_search_options_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the top of the search query options fields set
+
+search_body_search_query_after
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the search query fields set
+
+search_body_search_query_append
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the bottom of the search query fields set
+
+search_body_search_query_before
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the search query fields set
+
+search_body_search_query_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_body.html
+ + styles/subsilver2/template/search_body.html
+* Since: 3.1.7-RC1
+* Purpose: Put content at the top of the search query fields set
+
search_results_header_after
===
* Locations:
@@ -1412,6 +1973,18 @@ topiclist_row_append
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
* Purpose: Add content into topic rows (inside the elements containing topic titles)
+topiclist_row_topic_title_after
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/mcp_forum.html
+ + styles/subsilver2/template/search_results.html
+ + styles/subsilver2/template/viewforum_body.html
+ + styles/subsilver2/template/mcp_forum.html
+* Since: 3.1.10-RC1
+* Purpose: Add content into topic rows (after the elements containing the topic titles)
+
ucp_agreement_terms_after
===
* Locations:
@@ -1754,6 +2327,46 @@ ucp_friend_list_after
* Since: 3.1.0-a4
* Purpose: Add optional elements after list of friends in UCP
+viewforum_body_topic_row_after
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content after the topic list item.
+
+viewforum_body_topic_row_append
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the start of the topic list item.
+
+viewforum_body_topic_row_before
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content before the topic list item.
+
+viewforum_body_topic_row_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content at the end of the topic list item.
+
+viewforum_body_topicrow_row_before
+===
+* Locations:
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.10-RC1
+* Purpose: Add content before list of topics.
+
viewforum_buttons_bottom_before
===
* Locations:
@@ -2022,6 +2635,46 @@ viewtopic_body_post_buttons_list_before
* Purpose: Add post button custom list to posts (next to edit, quote etc),
before the original list.
+viewtopic_body_post_subject_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add data before post icon and subject
+
+viewtopic_body_postrow_back2top_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.8-RC1
+* Purpose: Add content to the post's bottom after the back to top link
+
+viewtopic_body_postrow_back2top_append
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.8-RC1
+* Purpose: Add content to the post's bottom directly after the back to top link
+
+viewtopic_body_postrow_back2top_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.8-RC1
+* Purpose: Add content to the post's bottom before the back to top link
+
+viewtopic_body_postrow_back2top_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.8-RC1
+* Purpose: Add content to the post's bottom directly before the back to top link
+
viewtopic_body_postrow_custom_fields_after
===
* Locations:
@@ -2122,6 +2775,14 @@ viewtopic_body_topic_actions_before
* Since: 3.1.0-a4
* Purpose: Add data before the topic actions buttons (after the posts sorting options)
+viewtopic_topic_title_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.7-RC1
+* Purpose: Add content directly after the topic title link on the View topic screen (outside of the h2 HTML tag)
+
viewtopic_topic_title_append
===
* Locations:
diff --git a/phpBB/docs/lighttpd.sample.conf b/phpBB/docs/lighttpd.sample.conf
index 5862cb319d..5b04122267 100644
--- a/phpBB/docs/lighttpd.sample.conf
+++ b/phpBB/docs/lighttpd.sample.conf
@@ -1,7 +1,7 @@
# Sample lighttpd configuration file for phpBB.
# Global settings have been removed, copy them
# from your system's lighttpd.conf.
-# Tested with lighttpd 1.4.26
+# Tested with lighttpd 1.4.35
# If you want to use the X-Sendfile feature,
# uncomment the 'allow-x-send-file' for the fastcgi
@@ -16,6 +16,7 @@
server.modules += (
"mod_access",
"mod_fastcgi",
+ "mod_rewrite",
"mod_accesslog"
)
@@ -49,7 +50,15 @@ $HTTP["host"] == "www.myforums.com" {
$HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
url.access-deny = ( "" )
}
-
+
+ # 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
+ url.rewrite-if-not-file = (
+ "^/(.*)$" => "/app.php/$1"
+ )
+
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index c82f5c8e49..2ead3552fd 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -64,6 +64,11 @@ http {
location / {
# phpbb uses index.htm
index index.php index.html index.htm;
+ try_files $uri $uri/ @rewriteapp;
+ }
+
+ location @rewriteapp {
+ rewrite ^(.*)$ /app.php/$1 last;
}
# Deny access to internal phpbb files.
@@ -75,12 +80,16 @@ http {
}
# Pass the php scripts to fastcgi server specified in upstream declaration.
- location ~ \.php$ {
- fastcgi_pass php;
- # Necessary for php.
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ location ~ \.php(/|$) {
# Unmodified fastcgi_params from nginx distribution.
include fastcgi_params;
+ # Necessary for php.
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
+ fastcgi_param DOCUMENT_ROOT $realpath_root;
+ try_files $uri $uri/ /app.php$is_args$args;
+ fastcgi_pass php;
}
# Deny access to version control system directories.
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 3e7965899f..56ea273d5c 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -258,17 +258,18 @@ else
* @var array attachment Array with attachment data
* @var int display_cat Attachment category
* @var int download_mode File extension specific download mode
- * @var array extension Array with file extensions data
+ * @var array extensions Array with file extensions data
* @var string mode Download mode
* @var bool thumbnail Flag indicating if the file is a thumbnail
* @since 3.1.6-RC1
+ * @change 3.1.7-RC1 Fixing wrong name of a variable (replacing "extension" by "extensions")
*/
$vars = array(
'attach_id',
'attachment',
'display_cat',
'download_mode',
- 'extension',
+ 'extensions',
'mode',
'thumbnail',
);
diff --git a/phpBB/feed.php b/phpBB/feed.php
index e0c0b01db6..6fd0ed800f 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -84,6 +84,20 @@ $feed->open();
// Iterate through items
while ($row = $feed->get_item())
{
+ /**
+ * Event to modify the feed row
+ *
+ * @event core.feed_modify_feed_row
+ * @var int forum_id Forum ID
+ * @var string mode Feeds mode (forums|topics|topics_new|topics_active|news)
+ * @var array row Array with feed data
+ * @var int topic_id Topic ID
+ *
+ * @since 3.1.10-RC1
+ */
+ $vars = array('forum_id', 'mode', 'row', 'topic_id');
+ extract($phpbb_dispatcher->trigger_event('core.feed_modify_feed_row', compact($vars)));
+
// BBCode options to correctly disable urls, smilies, bbcode...
if ($feed->get('options') === NULL)
{
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 67fba1094d..e4650455c4 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -42,7 +42,7 @@ class acp_attachments
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache, $phpbb_container;
+ global $db, $user, $auth, $template, $cache, $phpbb_container, $phpbb_dispatcher;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
$this->id = $id;
@@ -106,7 +106,10 @@ class acp_attachments
{
case 'attach':
- include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ if (!function_exists('get_supported_image_types'))
+ {
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ }
$sql = 'SELECT group_name, cat_id
FROM ' . EXTENSION_GROUPS_TABLE . '
@@ -159,6 +162,18 @@ class acp_attachments
)
);
+ /**
+ * Event to add and/or modify acp_attachement configurations
+ *
+ * @event core.acp_attachments_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.11-RC1
+ */
+ $vars = array('display_vars', 'mode', 'submit');
+ extract($phpbb_dispatcher->trigger_event('core.acp_attachments_config_edit_add', compact($vars)));
+
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : $this->new_config;
$error = array();
@@ -1423,7 +1438,7 @@ class acp_attachments
$row['group_name'] = $user->lang['NOT_ASSIGNED'];
$group_name[] = $row;
- for ($i = 0; $i < sizeof($group_name); $i++)
+ for ($i = 0, $groups_size = sizeof($group_name); $i < $groups_size; $i++)
{
if ($default_group === false)
{
@@ -1732,8 +1747,8 @@ class acp_attachments
$size_var = $filesize['si_identifier'];
$value = $filesize['value'];
- // 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>';
+ // size and maxlength must not be specified for input of type number
+ return '<input type="number" id="' . $key . '" min="0" max="999999999999999" step="any" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
}
/**
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index b555f46a94..286bc92813 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -28,7 +28,10 @@ class acp_ban
global $user, $template, $request, $phpbb_dispatcher;
global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('user_ban'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$bansubmit = $request->is_set_post('bansubmit');
$unbansubmit = $request->is_set_post('unbansubmit');
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index e245eea069..c98be241e9 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -33,6 +33,7 @@ class acp_bbcodes
// Set up general vars
$action = request_var('action', '');
$bbcode_id = request_var('bbcode', 0);
+ $submit = $request->is_set_post('submit');
$this->tpl_name = 'acp_bbcodes';
$this->page_title = 'ACP_BBCODES';
@@ -40,6 +41,11 @@ class acp_bbcodes
add_form_key($form_key);
+ if ($submit && !check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
// Set up mode-specific vars
switch ($action)
{
@@ -364,7 +370,7 @@ class acp_bbcodes
*
* @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 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
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 4a1c74fd77..c8f6f426c6 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -449,7 +449,7 @@ class acp_board
'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_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', '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),
@@ -842,7 +842,7 @@ class acp_board
{
global $user;
- 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'];
+ return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
@@ -870,7 +870,7 @@ class acp_board
{
global $user;
- 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'];
+ return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
@@ -1017,7 +1017,7 @@ class acp_board
$user->timezone = $old_tz;
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\" />";
+ <input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"64\" />";
}
/**
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 1ea320e674..2188b90729 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -141,7 +141,11 @@ class acp_bots
case 'edit':
case 'add':
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ if (!function_exists('user_update_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$bot_row = array(
'bot_name' => utf8_normalize_nfc(request_var('bot_name', '', true)),
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index fa8d8fb6a9..92d5e1dda6 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -25,7 +25,7 @@ class acp_captcha
function main($id, $mode)
{
- global $db, $user, $auth, $template;
+ global $request, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
$user->add_lang('acp/board');
@@ -52,11 +52,36 @@ class acp_captcha
else
{
$config_vars = array(
- 'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
- 'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
- 'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
- 'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
- 'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
+ 'enable_confirm' => array(
+ 'tpl' => 'REG_ENABLE',
+ 'default' => false,
+ 'validate' => 'bool',
+ 'lang' => 'VISUAL_CONFIRM_REG',
+ ),
+ 'enable_post_confirm' => array(
+ 'tpl' => 'POST_ENABLE',
+ 'default' => false,
+ 'validate' => 'bool',
+ 'lang' => 'VISUAL_CONFIRM_POST',
+ ),
+ 'confirm_refresh' => array(
+ 'tpl' => 'CONFIRM_REFRESH',
+ 'default' => false,
+ 'validate' => 'bool',
+ 'lang' => 'VISUAL_CONFIRM_REFRESH',
+ ),
+ 'max_reg_attempts' => array(
+ 'tpl' => 'REG_LIMIT',
+ 'default' => 0,
+ 'validate' => 'int:0:99999',
+ 'lang' => 'REG_LIMIT',
+ ),
+ 'max_login_attempts' => array(
+ 'tpl' => 'MAX_LOGIN_ATTEMPTS',
+ 'default' => 0,
+ 'validate' => 'int:0:99999',
+ 'lang' => 'MAX_LOGIN_ATTEMPTS',
+ ),
);
$this->tpl_name = 'acp_captcha';
@@ -65,12 +90,31 @@ class acp_captcha
add_form_key($form_key);
$submit = request_var('main_submit', false);
+ $error = $cfg_array = array();
- if ($submit && check_form_key($form_key))
+ if ($submit)
{
foreach ($config_vars as $config_var => $options)
{
- set_config($config_var, request_var($config_var, $options['default']));
+ $cfg_array[$config_var] = $request->variable($config_var, $options['default']);
+ }
+ validate_config_vars($config_vars, $cfg_array, $error);
+
+ if (!check_form_key($form_key))
+ {
+ $error[] = $user->lang['FORM_INVALID'];
+ }
+ if ($error)
+ {
+ $submit = false;
+ }
+ }
+
+ if ($submit)
+ {
+ foreach ($cfg_array as $key => $value)
+ {
+ $config->set($key, $value);
}
if ($selected !== $config['captcha_plugin'])
@@ -94,10 +138,6 @@ class acp_captcha
}
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
- else if ($submit)
- {
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
else
{
$captcha_select = '';
@@ -124,6 +164,7 @@ class acp_captcha
'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id),
'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(),
'CAPTCHA_SELECT' => $captcha_select,
+ 'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action,
));
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 9666ac5b6e..dd0599e06a 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -39,6 +39,9 @@ class acp_database
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
+ $form_key = 'acp_database';
+ add_form_key($form_key);
+
$template->assign_vars(array(
'MODE' => $mode
));
@@ -62,6 +65,11 @@ class acp_database
trigger_error($user->lang['TABLE_SELECT_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
}
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$store = $download = $structure = $schema_data = false;
if ($where == 'store_and_download' || $where == 'store')
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index 4c8f3cc65b..5b12013708 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -26,9 +26,7 @@ class acp_disallow
function main($id, $mode)
{
global $db, $user, $auth, $template, $cache;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
-
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ global $config, $phpbb_admin_path;
$user->add_lang('acp/posting');
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index fda9d50779..917d02318e 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -189,8 +189,15 @@ class acp_email
$db->sql_freeresult($result);
// Send the messages
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
+
+ if (!function_exists('get_group_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$messenger = new messenger($use_queue);
$errored = false;
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 193483050c..5a2ded91e2 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -34,7 +34,7 @@ class acp_extensions
function main()
{
// Start the page
- global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache;
+ global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache, $phpbb_dispatcher;
$this->db = $db;
$this->config = $config;
@@ -43,6 +43,7 @@ class acp_extensions
$this->cache = $cache;
$this->request = $request;
$this->log = $phpbb_log;
+ $this->phpbb_dispatcher = $phpbb_dispatcher;
$user->add_lang(array('install', 'acp/extensions', 'migrator'));
@@ -55,6 +56,21 @@ class acp_extensions
$safe_time_limit = (ini_get('max_execution_time') / 2);
$start_time = time();
+ /**
+ * Event to run a specific action on extension
+ *
+ * @event core.acp_extensions_run_action
+ * @var string action Action to run
+ * @var string u_action Url we are at
+ * @var string ext_name Extension name from request
+ * @var int safe_time_limit Safe limit of execution time
+ * @var int start_time Start time
+ * @since 3.1.11-RC1
+ */
+ $u_action = $this->u_action;
+ $vars = array('action', 'u_action', 'ext_name', 'safe_time_limit', 'start_time');
+ extract($this->phpbb_dispatcher->trigger_event('core.acp_extensions_run_action', compact($vars)));
+
// Cancel action
if ($request->is_set_post('cancel'))
{
@@ -121,8 +137,6 @@ class acp_extensions
'U_ACTION' => $this->u_action,
));
- add_form_key('version_check_settings');
-
$this->tpl_name = 'acp_ext_list';
break;
@@ -369,6 +383,7 @@ class acp_extensions
foreach ($enabled_extension_meta_data as $name => $block_vars)
{
+ $block_vars['NAME'] = $name;
$block_vars['U_DETAILS'] = $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name);
$this->template->assign_block_vars('enabled', $block_vars);
@@ -425,6 +440,7 @@ class acp_extensions
foreach ($disabled_extension_meta_data as $name => $block_vars)
{
+ $block_vars['NAME'] = $name;
$block_vars['U_DETAILS'] = $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name);
$this->template->assign_block_vars('disabled', $block_vars);
@@ -484,6 +500,7 @@ class acp_extensions
foreach ($available_extension_meta_data as $name => $block_vars)
{
+ $block_vars['NAME'] = $name;
$block_vars['U_DETAILS'] = $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name);
$this->template->assign_block_vars('disabled', $block_vars);
@@ -534,7 +551,7 @@ class acp_extensions
$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);
$version_helper->set_current_version($meta['version']);
- $version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);
+ $version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename'], isset($version_check['ssl']) ? $version_check['ssl'] : false);
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);
return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 7e664c6263..1e69a4ad20 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -842,9 +842,26 @@ class acp_forums
ORDER BY left_id";
$result = $db->sql_query($sql);
- if ($row = $db->sql_fetchrow($result))
+ $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[(int) $row['forum_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ /**
+ * Modify the forum list data
+ *
+ * @event core.acp_manage_forums_modify_forum_list
+ * @var array rowset Array with the forums list data
+ * @since 3.1.10-RC1
+ */
+ $vars = array('rowset');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_modify_forum_list', compact($vars)));
+
+ if (!empty($rowset))
{
- do
+ foreach ($rowset as $row)
{
$forum_type = $row['forum_type'];
@@ -888,7 +905,6 @@ class acp_forums
'U_SYNC' => $url . '&amp;action=sync')
);
}
- while ($row = $db->sql_fetchrow($result));
}
else if ($this->parent_id)
{
@@ -904,7 +920,7 @@ class acp_forums
'U_SYNC' => $url . '&amp;action=sync')
);
}
- $db->sql_freeresult($result);
+ unset($rowset);
$template->assign_vars(array(
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
@@ -1411,7 +1427,7 @@ class acp_forums
$diff = sizeof($moved_forums) * 2;
$moved_ids = array();
- for ($i = 0; $i < sizeof($moved_forums); ++$i)
+ for ($i = 0, $size = sizeof($moved_forums); $i < $size; ++$i)
{
$moved_ids[] = $moved_forums[$i]['forum_id'];
}
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index edfada1bf1..0352f6a242 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -42,7 +42,10 @@ class acp_groups
return;
}
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('group_user_attributes'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
// Check and set some common vars
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));
@@ -295,7 +298,10 @@ class acp_groups
case 'edit':
case 'add':
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ if (!function_exists('display_forums'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
$data = $submit_ary = array();
@@ -318,9 +324,11 @@ class acp_groups
$avatar_data = null;
$avatar_error = array();
+ /** @var \phpbb\avatar\manager $phpbb_avatar_manager */
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+
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
@@ -661,14 +669,21 @@ class acp_groups
$avatars_enabled = false;
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));
+ // Assign min and max values before generating avatar driver html
+ $template->assign_vars(array(
+ 'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
+ 'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
+ 'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
+ 'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
+ ));
+
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",
+ 'avatar' => $driver->get_acp_template_name(),
));
if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error))
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 9265415dd1..a0ea7dc9b1 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -40,6 +40,10 @@ class acp_icons
$action = (isset($_POST['edit'])) ? 'edit' : $action;
$action = (isset($_POST['import'])) ? 'import' : $action;
$icon_id = request_var('id', 0);
+ $submit = $request->is_set_post('submit', false);
+
+ $form_key = 'acp_icons';
+ add_form_key($form_key);
$mode = ($mode == 'smilies') ? 'smilies' : 'icons';
@@ -325,6 +329,11 @@ class acp_icons
case 'create':
case 'modify':
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
// Get items to create/modify
$images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
@@ -513,6 +522,11 @@ class acp_icons
{
$order = 0;
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
@@ -698,7 +712,7 @@ class acp_icons
$template->assign_vars(array(
'MESSAGE_TITLE' => $user->lang['EXPORT_' . $lang],
- 'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&amp;action=send">', '</a>'),
+ 'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&amp;action=send&amp;hash=' . generate_link_hash('acp_icons') . '">', '</a>'),
'S_USER_NOTICE' => true,
)
@@ -710,6 +724,11 @@ class acp_icons
case 'send':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_icons'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = "SELECT *
FROM $table
ORDER BY {$fields}_order";
@@ -811,6 +830,11 @@ class acp_icons
case 'move_up':
case 'move_down':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_icons'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
// Get current order id...
$sql = "SELECT {$fields}_order as current_order
FROM $table
@@ -928,8 +952,8 @@ class acp_icons
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row[$fields . '_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row[$fields . '_id'],
- 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start,
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start . '&amp;hash=' . generate_link_hash('acp_icons'),
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'] . '&amp;start=' . $pagination_start . '&amp;hash=' . generate_link_hash('acp_icons'),
));
if (!$spacer && !$row['display_on_posting'])
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index e96c42de05..76c7a1b277 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -34,7 +34,10 @@ class acp_inactive
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);
+ if (!function_exists('user_active_flip'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$user->add_lang('memberlist');
@@ -109,7 +112,10 @@ class acp_inactive
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users))
{
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
$messenger = new messenger(false);
@@ -196,7 +202,10 @@ class acp_inactive
if ($row = $db->sql_fetchrow($result))
{
// Send the messages
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
$messenger = new messenger();
$usernames = $user_ids = array();
@@ -271,9 +280,10 @@ class acp_inactive
'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
- 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview')),
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview&amp;redirect=acp_inactive')),
'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']),
+ 'USER_EMAIL' => $row['user_email'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;mode=overview&amp;u={$row['user_id']}"),
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&amp;sr=posts") : '',
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 284543acd3..a482b41e1d 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -34,7 +34,10 @@ class acp_jabber
$user->add_lang('acp/board');
- include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
+ if (!class_exists('jabber'))
+ {
+ include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
+ }
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 60e338ae7c..bddc2be9cb 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -34,7 +34,10 @@ class acp_language
global $config, $db, $user, $template;
global $phpbb_root_path, $phpEx, $request;
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('validate_language_iso_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
// Check and set some common vars
$action = (isset($_POST['update_details'])) ? 'update_details' : '';
@@ -241,6 +244,11 @@ class acp_language
break;
case 'install':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_language'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$lang_iso = request_var('iso', '');
$lang_iso = basename($lang_iso);
@@ -420,7 +428,7 @@ class acp_language
'ISO' => htmlspecialchars($lang_ary['iso']),
'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'),
'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'),
- 'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']))
+ 'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']) . '&amp;hash=' . generate_link_hash('acp_language'))
);
}
}
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index f6d728ffed..848cafeb67 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -429,20 +429,34 @@ class acp_main
));
}
- $version_helper = $phpbb_container->get('version_helper');
- try
+ if ($auth->acl_get('a_board'))
{
- $recheck = $request->variable('versioncheck_force', false);
- $updates_available = $version_helper->get_suggested_updates($recheck);
+ $version_helper = $phpbb_container->get('version_helper');
+ try
+ {
+ $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));
+ $template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available));
+ }
+ catch (\RuntimeException $e)
+ {
+ $template->assign_vars(array(
+ 'S_VERSIONCHECK_FAIL' => true,
+ 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
+ ));
+ }
}
- catch (\RuntimeException $e)
+ else
{
- $template->assign_vars(array(
- 'S_VERSIONCHECK_FAIL' => true,
- 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
- ));
+ // We set this template var to true, to not display an outdated version notice.
+ $template->assign_var('S_VERSION_UP_TO_DATE', true);
+ }
+
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $template->assign_var('S_UPDATE_INCOMPLETE', true);
}
/**
@@ -553,6 +567,7 @@ class acp_main
'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&amp;mode=version_check'),
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'),
+ 'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false,
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
)
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index ea6b388328..9d14614417 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -46,6 +46,9 @@ class acp_modules
$user->add_lang('acp/modules');
$this->tpl_name = 'acp_modules';
+ $form_key = 'acp_modules';
+ add_form_key($form_key);
+
// module class
$this->module_class = $mode;
@@ -119,6 +122,11 @@ 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);
}
+ if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
@@ -150,6 +158,11 @@ 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);
}
+ if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
@@ -273,6 +286,11 @@ class acp_modules
if ($submit)
{
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
+ }
+
if (!$module_data['module_langname'])
{
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
@@ -460,12 +478,12 @@ class acp_modules
'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,
'U_MODULE' => $this->u_action . '&amp;parent_id=' . $row['module_id'],
- 'U_MOVE_UP' => $url . '&amp;action=move_up',
- 'U_MOVE_DOWN' => $url . '&amp;action=move_down',
+ 'U_MOVE_UP' => $url . '&amp;action=move_up&amp;hash=' . generate_link_hash('acp_modules'),
+ 'U_MOVE_DOWN' => $url . '&amp;action=move_down&amp;hash=' . generate_link_hash('acp_modules'),
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
- 'U_ENABLE' => $url . '&amp;action=enable',
- 'U_DISABLE' => $url . '&amp;action=disable')
+ 'U_ENABLE' => $url . '&amp;action=enable&amp;hash=' . generate_link_hash('acp_modules'),
+ 'U_DISABLE' => $url . '&amp;action=disable&amp;hash=' . generate_link_hash('acp_modules'))
);
}
while ($row = $db->sql_fetchrow($result));
@@ -484,8 +502,8 @@ class acp_modules
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
- 'U_ENABLE' => $url . '&amp;action=enable',
- 'U_DISABLE' => $url . '&amp;action=disable')
+ 'U_ENABLE' => $url . '&amp;action=enable&amp;hash=' . generate_link_hash('acp_modules'),
+ 'U_DISABLE' => $url . '&amp;action=disable&amp;hash=' . generate_link_hash('acp_modules'))
);
}
$db->sql_freeresult($result);
@@ -888,7 +906,7 @@ class acp_modules
$diff = sizeof($moved_modules) * 2;
$moved_ids = array();
- for ($i = 0; $i < sizeof($moved_modules); ++$i)
+ for ($i = 0, $size = sizeof($moved_modules); $i < $size; ++$i)
{
$moved_ids[] = $moved_modules[$i]['module_id'];
}
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index cd3616208d..0796b36fef 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -30,8 +30,15 @@ class acp_permission_roles
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);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ if (!class_exists('auth_admin'))
+ {
+ include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ }
$this->auth_admin = new auth_admin();
@@ -359,6 +366,11 @@ class acp_permission_roles
case 'move_up':
case 'move_down':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_permission_roles'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = 'SELECT role_order
FROM ' . ACL_ROLES_TABLE . "
WHERE role_id = $role_id";
@@ -433,8 +445,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;role_id=' . $row['role_id'],
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;role_id=' . $row['role_id'],
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;role_id=' . $row['role_id'] . '&amp;hash=' . generate_link_hash('acp_permission_roles'),
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;role_id=' . $row['role_id'] . '&amp;hash=' . generate_link_hash('acp_permission_roles'),
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to')
);
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index cb408e304f..660afb4e93 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -30,8 +30,15 @@ class acp_permissions
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);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ if (!class_exists('auth_admin'))
+ {
+ include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ }
$this->permissions = $phpbb_container->get('acl.permissions');
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 43668b8ad5..2012d3c513 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -33,8 +33,15 @@ class acp_profile
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
global $request, $phpbb_container, $phpbb_dispatcher;
- include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('generate_smilies'))
+ {
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ }
+
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$user->add_lang(array('ucp', 'acp/profile'));
$this->tpl_name = 'acp_profile';
@@ -46,6 +53,9 @@ class acp_profile
$error = array();
$s_hidden_fields = '';
+ $form_key = 'acp_profile';
+ add_form_key($form_key);
+
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);
@@ -154,6 +164,11 @@ class acp_profile
case 'activate':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
@@ -194,6 +209,11 @@ class acp_profile
case 'deactivate':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
SET field_active = 0
WHERE field_id = $field_id";
@@ -223,6 +243,11 @@ class acp_profile
case 'move_up':
case 'move_down':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = 'SELECT field_order
FROM ' . PROFILE_FIELDS_TABLE . "
WHERE field_id = $field_id";
@@ -537,13 +562,14 @@ class acp_profile
}
}
- $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
-
if (sizeof($error))
{
- $step--;
$submit = false;
}
+ else
+ {
+ $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
+ }
// Build up the specific hidden fields
foreach ($exclude as $num => $key_ary)
@@ -561,7 +587,7 @@ class acp_profile
$var = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
if ($var !== null)
{
- $_new_key_ary[$key] = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
+ $_new_key_ary[$key] = $var;
}
}
$cp->vars = $field_data;
@@ -571,12 +597,13 @@ class acp_profile
if (!sizeof($error))
{
- if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save))
- {
- $this->save_profile_field($cp, $field_type, $action);
- }
- else if ($action == 'edit' && $save)
+ if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
{
+ if (!check_form_key($form_key))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$this->save_profile_field($cp, $field_type, $action);
}
}
@@ -731,12 +758,12 @@ class acp_profile
'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_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;action=$active_value&amp;field_id=$id" . '&amp;hash=' . generate_link_hash('acp_profile'),
'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;field_id=$id",
- 'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;field_id=$id",
+ 'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;field_id=$id" . '&amp;hash=' . generate_link_hash('acp_profile'),
+ 'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;field_id=$id" . '&amp;hash=' . generate_link_hash('acp_profile'),
'S_NEED_EDIT' => $s_need_edit)
);
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index e17399e3d9..98d9caabdd 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -28,7 +28,11 @@ class acp_prune
global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
$user->add_lang('acp/prune');
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ if (!function_exists('user_active_flip'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
switch ($mode)
{
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 3d7ccf422c..bd40a88138 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -282,6 +282,11 @@ class acp_reasons
case 'move_up':
case 'move_down':
+ if (!check_link_hash($request->variable('hash', ''), 'acp_reasons'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$sql = 'SELECT reason_order
FROM ' . REPORTS_REASONS_TABLE . "
WHERE reason_id = $reason_id";
@@ -383,8 +388,8 @@ 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;id=' . $row['reason_id'],
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row['reason_id'])
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row['reason_id'] . '&amp;hash=' . generate_link_hash('acp_reasons'),
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row['reason_id'] . '&amp;hash=' . generate_link_hash('acp_reasons'))
);
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index abb8301507..cc1e5df084 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -50,11 +50,16 @@ class acp_search
function settings($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$submit = (isset($_POST['submit'])) ? true : false;
+ if ($submit && !check_link_hash($request->variable('hash', ''), 'acp_search'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
$search_types = $this->get_search_types();
$settings = array(
@@ -226,13 +231,13 @@ class acp_search
'S_YES_SEARCH' => (bool) $config['load_search'],
'S_SETTINGS' => true,
- 'U_ACTION' => $this->u_action)
+ 'U_ACTION' => $this->u_action . '&amp;hash=' . generate_link_hash('acp_search'))
);
}
function index($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$action = request_var('action', '');
@@ -244,6 +249,12 @@ class acp_search
$this->state = array();
$this->save_state();
}
+ $submit = $request->is_set_post('submit', false);
+
+ if (!check_link_hash($request->variable('hash', ''), 'acp_search') && in_array($action, array('create', 'delete')))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
if ($action)
{
@@ -294,7 +305,7 @@ class acp_search
if (method_exists($this->search, 'delete_index'))
{
// pass a reference to myself so the $search object can make use of save_state() and attributes
- if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete", false)))
+ if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete&hash=" . generate_link_hash('acp_search'), false)))
{
$this->state = array('');
$this->save_state();
@@ -339,7 +350,7 @@ class acp_search
$mtime = explode(' ', microtime());
$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));
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
}
}
@@ -429,7 +440,7 @@ class acp_search
$mtime = explode(' ', microtime());
$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));
+ meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
}
}
@@ -508,7 +519,7 @@ class acp_search
$template->assign_vars(array(
'S_INDEX' => true,
- 'U_ACTION' => $this->u_action,
+ 'U_ACTION' => $this->u_action . '&amp;hash=' . generate_link_hash('acp_search'),
'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar"),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar")),
));
@@ -517,7 +528,7 @@ class acp_search
{
$template->assign_vars(array(
'S_CONTINUE_INDEXING' => $this->state[1],
- 'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1],
+ 'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1] . '&amp;hash=' . generate_link_hash('acp_search'),
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
);
diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_send_statistics.php
index d178be2fb0..7c9e9cf78e 100644
--- a/phpBB/includes/acp/acp_send_statistics.php
+++ b/phpBB/includes/acp/acp_send_statistics.php
@@ -27,7 +27,10 @@ class acp_send_statistics
{
global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
+ if (!class_exists('phpbb_questionnaire_data_collector'))
+ {
+ include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
+ }
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index a36a6c1ecd..5181b87ecb 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -56,9 +56,12 @@ class acp_styles
/** @var string */
protected $php_ext;
+ /** @var \phpbb\event\dispatcher_interface */
+ protected $dispatcher;
+
public function main($id, $mode)
{
- global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config;
+ global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher;
$this->db = $db;
$this->user = $user;
@@ -69,6 +72,7 @@ class acp_styles
$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $phpEx;
+ $this->dispatcher = $phpbb_dispatcher;
$this->default_style = $config['default_style'];
$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';
@@ -118,6 +122,18 @@ class acp_styles
)
);
+ /**
+ * Run code before ACP styles action execution
+ *
+ * @event core.acp_styles_action_before
+ * @var int id Module ID
+ * @var string mode Active module
+ * @var string action Module that should be run
+ * @since 3.1.7-RC1
+ */
+ $vars = array('id', 'mode', 'action');
+ extract($this->dispatcher->trigger_event('core.acp_styles_action_before', compact($vars)));
+
// Execute actions
switch ($action)
{
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 0167a06dbb..529f0f2185 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -62,5 +62,17 @@ class acp_update
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
));
+
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $database_update_link = append_sid($phpbb_root_path . 'install/database_update.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'S_UPDATE_INCOMPLETE' => true,
+ 'FILES_VERSION' => PHPBB_VERSION,
+ 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link),
+ ));
+ }
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 8c17fb6311..008cc02471 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -44,6 +44,11 @@ class acp_users
$user_id = request_var('u', 0);
$action = request_var('action', '');
+ // Get referer to redirect user to the appropriate page after delete action
+ $redirect = request_var('redirect', '');
+ $redirect_tag = "redirect=$redirect";
+ $redirect_url = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$redirect");
+
$submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false;
$form_name = 'acp_users';
@@ -52,7 +57,10 @@ class acp_users
// Whois (special case)
if ($action == 'whois')
{
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$this->page_title = 'WHOIS';
$this->tpl_name = 'simple_body';
@@ -146,9 +154,9 @@ class acp_users
}
$template->assign_vars(array(
- 'U_BACK' => $this->u_action,
+ 'U_BACK' => (empty($redirect)) ? $this->u_action : $redirect_url,
'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;u=$user_id"),
- 'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
+ 'U_ACTION' => $this->u_action . '&amp;u=' . $user_id . ((empty($redirect)) ? '' : '&amp;' . $redirect_tag),
'S_FORM_OPTIONS' => $s_form_options,
'MANAGED_USERNAME' => $user_row['username'])
);
@@ -165,7 +173,10 @@ class acp_users
{
case 'overview':
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$user->add_lang('acp/ban');
@@ -221,19 +232,30 @@ class acp_users
user_delete($delete_type, $user_id, $user_row['username']);
add_log('admin', 'LOG_USER_DELETED', $user_row['username']);
- trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['USER_DELETED'] . adm_back_link(
+ (empty($redirect)) ? $this->u_action : $redirect_url
+ )
+ );
}
else
{
- confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ $delete_confirm_hidden_fields = array(
'u' => $user_id,
'i' => $id,
'mode' => $mode,
'action' => $action,
'update' => true,
'delete' => 1,
- 'delete_type' => $delete_type))
+ 'delete_type' => $delete_type,
);
+
+ // Checks if the redirection page is specified
+ if (!empty($redirect))
+ {
+ $delete_confirm_hidden_fields['redirect'] = $redirect;
+ }
+
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($delete_confirm_hidden_fields));
}
}
else
@@ -338,7 +360,10 @@ class acp_users
if ($config['email_enable'])
{
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
$server_url = generate_board_url();
@@ -348,11 +373,6 @@ class acp_users
if ($user_row['user_type'] == USER_NORMAL)
{
user_active_flip('deactivate', $user_id, INACTIVE_REMIND);
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_actkey = '" . $db->sql_escape($user_actkey) . "'
- WHERE user_id = $user_id";
- $db->sql_query($sql);
}
else
{
@@ -361,8 +381,18 @@ class acp_users
FROM ' . USERS_TABLE . '
WHERE user_id = ' . $user_id;
$result = $db->sql_query($sql);
- $user_actkey = (string) $db->sql_fetchfield('user_actkey');
+ $user_activation_key = (string) $db->sql_fetchfield('user_actkey');
$db->sql_freeresult($result);
+
+ $user_actkey = empty($user_activation_key) ? $user_actkey : $user_activation_key;
+ }
+
+ if ($user_row['user_type'] == USER_NORMAL || empty($user_activation_key))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_actkey = '" . $db->sql_escape($user_actkey) . "'
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
}
$messenger = new messenger(false);
@@ -421,7 +451,10 @@ class acp_users
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
$messenger = new messenger(false);
@@ -1345,7 +1378,10 @@ class acp_users
case 'profile':
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$cp = $phpbb_container->get('profilefields.manager');
@@ -1504,7 +1540,10 @@ class acp_users
case 'prefs':
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('user_get_id_name'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$data = array(
'dateformat' => utf8_normalize_nfc(request_var('dateformat', $user_row['user_dateformat'], true)),
@@ -1553,7 +1592,7 @@ class acp_users
if ($submit)
{
$error = validate_data($data, array(
- 'dateformat' => array('string', false, 1, 30),
+ 'dateformat' => array('string', false, 1, 64),
'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
'tz' => array('timezone'),
@@ -1774,13 +1813,12 @@ class acp_users
case 'avatar':
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
-
$avatars_enabled = false;
+ /** @var \phpbb\avatar\manager $phpbb_avatar_manager */
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
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 user_ prefix
@@ -1841,14 +1879,21 @@ class acp_users
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user_row['user_avatar_type']));
+ // Assign min and max values before generating avatar driver html
+ $template->assign_vars(array(
+ 'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
+ 'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
+ 'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
+ 'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
+ ));
+
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",
+ 'avatar' => $driver->get_acp_template_name(),
));
if ($driver->prepare_form($request, $template, $user, $avatar_data, $error))
@@ -1868,8 +1913,12 @@ class acp_users
}
}
- // Replace "error" strings with their real, localised form
- $error = $phpbb_avatar_manager->localize_errors($user, $error);
+ // Avatar manager is not initialized if avatars are disabled
+ if (isset($phpbb_avatar_manager))
+ {
+ // 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);
@@ -1930,8 +1979,15 @@ class acp_users
case 'sig':
- include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
- include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ if (!function_exists('generate_smilies'))
+ {
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ }
+
+ if (!function_exists('display_custom_bbcodes'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
$enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $this->optionget($user_row, 'sig_bbcode') : false;
$enable_smilies = ($config['allow_sig_smilies']) ? (bool) $this->optionget($user_row, 'sig_smilies') : false;
@@ -1942,7 +1998,10 @@ class acp_users
if ($submit || $preview)
{
- include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ }
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false;
@@ -2183,7 +2242,10 @@ class acp_users
case 'groups':
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ if (!function_exists('group_user_attributes'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
$user->add_lang(array('groups', 'acp/groups'));
$group_id = request_var('g', 0);
@@ -2217,6 +2279,12 @@ class acp_users
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
+
+ if (!check_link_hash($request->variable('hash', ''), 'acp_users'))
+ {
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
group_user_attributes($action, $group_id, $user_id);
if ($action == 'default')
@@ -2374,8 +2442,8 @@ class acp_users
{
$template->assign_block_vars('group', array(
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&amp;mode=manage&amp;action=edit&amp;u=$user_id&amp;g={$data['group_id']}&amp;back_link=acp_users_groups"),
- 'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'],
- 'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'],
+ 'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
+ 'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'],
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&amp;action=approve&amp;u=$user_id&amp;g=" . $data['group_id'] : '',
@@ -2399,7 +2467,10 @@ class acp_users
case 'perm':
- include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ if (!class_exists('auth_admin'))
+ {
+ include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ }
$auth_admin = new auth_admin();
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 905e981cdc..52c45499b2 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -1113,6 +1113,11 @@ class auth_admin extends \phpbb\auth\auth
@reset($category_array);
while (list($cat, $cat_array) = each($category_array))
{
+ if (!$phpbb_permissions->category_defined($cat))
+ {
+ continue;
+ }
+
$template->assign_block_vars($tpl_cat, array(
'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,
@@ -1139,6 +1144,11 @@ class auth_admin extends \phpbb\auth\auth
@reset($cat_array['permissions']);
while (list($permission, $allowed) = each($cat_array['permissions']))
{
+ if (!$phpbb_permissions->permission_defined($permission))
+ {
+ continue;
+ }
+
if ($s_view)
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 62e5fe7a0a..23839e3d9a 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.1.6-dev');
+define('PHPBB_VERSION', '3.1.10');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index fff55d993e..a152d9b620 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2233,7 +2233,6 @@ function generate_board_url($without_script_path = false)
global $config, $user, $request;
$server_name = $user->host;
- $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)
@@ -2248,6 +2247,13 @@ function generate_board_url($without_script_path = false)
}
else
{
+ $server_port = $request->server('SERVER_PORT', 0);
+ $forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
+
+ if (!empty($forwarded_proto) && $forwarded_proto === 'https')
+ {
+ $server_port = 443;
+ }
// Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection
$cookie_secure = $request->is_secure() ? 1 : 0;
$url = (($cookie_secure) ? 'https://' : 'http://') . $server_name;
@@ -2401,6 +2407,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&amp;', $url) . '" />';
echo '<title>' . $user->lang['REDIRECT'] . '</title>';
echo '</head>';
@@ -2602,8 +2609,9 @@ function check_link_hash($token, $link_name)
/**
* Add a secret token to the form (requires the S_FORM_TOKEN template variable)
* @param string $form_name The name of the form; has to match the name used in check_form_key, otherwise no restrictions apply
+* @param string $template_variable_suffix A string that is appended to the name of the template variable to which the form elements are assigned
*/
-function add_form_key($form_name)
+function add_form_key($form_name, $template_variable_suffix = '')
{
global $config, $template, $user, $phpbb_dispatcher;
@@ -2620,13 +2628,15 @@ function add_form_key($form_name)
* Perform additional actions on creation of the form token
*
* @event core.add_form_key
- * @var string form_name The form name
- * @var int now Current time timestamp
- * @var string s_fields Generated hidden fields
- * @var string token Form token
- * @var string token_sid User session ID
+ * @var string form_name The form name
+ * @var int now Current time timestamp
+ * @var string s_fields Generated hidden fields
+ * @var string token Form token
+ * @var string token_sid User session ID
+ * @var string template_variable_suffix The string that is appended to template variable name
*
* @since 3.1.0-RC3
+ * @changed 3.1.11-RC1 Added template_variable_suffix
*/
$vars = array(
'form_name',
@@ -2634,12 +2644,11 @@ function add_form_key($form_name)
's_fields',
'token',
'token_sid',
+ 'template_variable_suffix',
);
extract($phpbb_dispatcher->trigger_event('core.add_form_key', compact($vars)));
- $template->assign_vars(array(
- 'S_FORM_TOKEN' => $s_fields,
- ));
+ $template->assign_var('S_FORM_TOKEN' . $template_variable_suffix, $s_fields);
}
/**
@@ -2821,6 +2830,21 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$user->setup();
}
+ /**
+ * This event allows an extension to modify the login process
+ *
+ * @event core.login_box_before
+ * @var string redirect Redirect string
+ * @var string l_explain Explain language string
+ * @var string l_success Success language string
+ * @var bool admin Is admin?
+ * @var bool s_display Display full login form?
+ * @var string err Error string
+ * @since 3.1.9-RC1
+ */
+ $vars = array('redirect', 'l_explain', 'l_success', 'admin', 's_display', 'err');
+ extract($phpbb_dispatcher->trigger_event('core.login_box_before', compact($vars)));
+
// Print out error if user tries to authenticate as an administrator without having the privileges...
if ($admin && !$auth->acl_get('a_'))
{
@@ -2833,7 +2857,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN');
}
- if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))
+ if (empty($err) && ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external')))
{
// Get credential
if ($admin)
@@ -2902,11 +2926,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
*
* @event core.login_box_redirect
* @var string redirect Redirect string
- * @var boolean admin Is admin?
- * @var bool return If true, do not redirect but return the sanitized URL.
+ * @var bool admin Is admin?
* @since 3.1.0-RC5
+ * @changed 3.1.9-RC1 Removed undefined return variable
*/
- $vars = array('redirect', 'admin', 'return');
+ $vars = array('redirect', 'admin');
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
// append/replace SID (may change during the session for AOL users)
@@ -3982,6 +4006,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo '<html dir="ltr">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
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; } ';
@@ -4264,10 +4289,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
if (sizeof($online_users['online_users']))
{
- $sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
- ORDER BY username_clean ASC';
+ $sql_ary = array(
+ 'SELECT' => 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => $db->sql_in_set('u.user_id', $online_users['online_users']),
+ 'ORDER_BY' => 'u.username_clean ASC',
+ );
/**
* Modify SQL query to obtain online users data
@@ -4279,13 +4308,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
* @var string item Restrict online users to a certain
* session item, e.g. forum for
* session_forum_id
- * @var string sql SQL query to obtain users online data
+ * @var array sql_ary SQL query array to obtain users online data
* @since 3.1.4-RC1
+ * @changed 3.1.7-RC1 Change sql query into array and adjust var accordingly. Allows extension authors the ability to adjust the sql_ary.
*/
- $vars = array('online_users', 'item_id', 'item', 'sql');
+ $vars = array('online_users', 'item_id', 'item', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars)));
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$rowset = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
@@ -4299,13 +4329,37 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
$row['username'] = '<em>' . $row['username'] . '</em>';
}
- if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
+ if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id'])
{
$user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
}
}
}
}
+
+ /**
+ * Modify online userlist data
+ *
+ * @event core.obtain_users_online_string_before_modify
+ * @var array online_users Array with online users data
+ * from obtain_users_online()
+ * @var int item_id Restrict online users to item id
+ * @var string item Restrict online users to a certain
+ * session item, e.g. forum for
+ * session_forum_id
+ * @var array rowset Array with online users data
+ * @var array user_online_link Array with online users items (usernames)
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'online_users',
+ 'item_id',
+ 'item',
+ 'rowset',
+ 'user_online_link',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_before_modify', compact($vars)));
+
$online_userlist = implode(', ', $user_online_link);
if (!$online_userlist)
@@ -4837,7 +4891,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
);
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
- $driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], $ignore_config);
+ $driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], !$ignore_config);
$html = '';
if ($driver)
@@ -4848,7 +4902,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
return $html;
}
- $avatar_data = $driver->get_data($row, $ignore_config);
+ $avatar_data = $driver->get_data($row);
}
else
{
@@ -4904,7 +4958,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
/**
* Generate page header
*/
-function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum')
+function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = true)
{
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path;
@@ -4964,6 +5018,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
}
+ $user->update_session_infos();
+
// Generate logged in/logged out status
if ($user->data['user_id'] != ANONYMOUS)
{
@@ -5242,17 +5298,22 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'SITE_LOGO_IMG' => $user->img('site_logo'),
));
- // An array of http headers that phpbb will set. The following event may override these.
- $http_headers = array(
- // application/xhtml+xml not used because of IE
- 'Content-type' => 'text/html; charset=UTF-8',
- 'Cache-Control' => 'private, no-cache="set-cookie"',
- 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
- );
- if (!empty($user->data['is_bot']))
+ $http_headers = array();
+
+ if ($send_headers)
{
- // Let reverse proxies know we detected a bot.
- $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ // An array of http headers that phpbb will set. The following event may override these.
+ $http_headers += array(
+ // application/xhtml+xml not used because of IE
+ 'Content-type' => 'text/html; charset=UTF-8',
+ 'Cache-Control' => 'private, no-cache="set-cookie"',
+ 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
+ );
+ if (!empty($user->data['is_bot']))
+ {
+ // Let reverse proxies know we detected a bot.
+ $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ }
}
/**
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index d566336d26..c4afb39ff0 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -55,6 +55,8 @@ function adm_page_header($page_title)
return;
}
+ $user->update_session_infos();
+
// gzip_compression
if ($config['gzip_compress'])
{
@@ -254,46 +256,49 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
case 'text':
case 'url':
case 'email':
- case 'color':
- case 'date':
- case 'time':
- case 'datetime':
- case 'datetime-local':
- case 'month':
- case 'range':
- case 'search':
case 'tel':
- case 'week':
+ case 'search':
+ // maxlength and size are only valid for these types and will be
+ // ignored for other input types.
$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 'color':
+ case 'datetime':
+ case 'datetime-local':
+ case 'month':
+ case 'week':
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '" name="' . $name . '" value="' . $new[$config_key] . '" />';
+ break;
+
+ case 'date':
+ case 'time':
case 'number':
- $min = $max = $maxlength = '';
+ case 'range':
+ $max = '';
$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] . '" />';
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="' . $name . '" value="' . $new[$config_key] . '" />';
break;
case 'dimension':
- $min = $max = $maxlength = $size = '';
+ $max = '';
$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'] . '" />';
+ $tpl = '<input id="' . $key . '" type="number"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
break;
case 'textarea':
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index afd3dce730..1dc246ec33 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -65,7 +65,7 @@ function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = ar
*/
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
{
- global $db, $user, $auth;
+ global $db, $user, $auth, $phpbb_dispatcher;
// This query is identical to the jumpbox one
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
@@ -73,16 +73,33 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
ORDER BY left_id ASC';
$result = $db->sql_query($sql, 600);
+ $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[(int) $row['forum_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
$right = 0;
$padding_store = array('0' => '');
$padding = '';
$forum_list = ($return_array) ? array() : '';
+ /**
+ * Modify the forum list data
+ *
+ * @event core.make_forum_select_modify_forum_list
+ * @var array rowset Array with the forums list data
+ * @since 3.1.10-RC1
+ */
+ $vars = array('rowset');
+ extract($phpbb_dispatcher->trigger_event('core.make_forum_select_modify_forum_list', compact($vars)));
+
// Sometimes it could happen that forums will be displayed here not be displayed within the index page
// This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
// If this happens, the padding could be "broken"
- while ($row = $db->sql_fetchrow($result))
+ foreach ($rowset as $row)
{
if ($row['left_id'] < $right)
{
@@ -133,8 +150,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
$forum_list .= '<option value="' . $row['forum_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['forum_name'] . '</option>';
}
}
- $db->sql_freeresult($result);
- unset($padding_store);
+ unset($padding_store, $rowset);
return $forum_list;
}
@@ -201,7 +217,7 @@ function group_select_options($group_id, $exclude_ids = false, $manage_founder =
*/
function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = false, $no_cache = false)
{
- global $db, $auth;
+ global $db, $auth, $phpbb_dispatcher;
static $forum_rows;
if (!isset($forum_rows))
@@ -256,6 +272,16 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
}
}
+ /**
+ * Modify the forum list data
+ *
+ * @event core.get_forum_list_modify_data
+ * @var array rowset Array with the forum list data
+ * @since 3.1.10-RC1
+ */
+ $vars = array('rowset');
+ extract($phpbb_dispatcher->trigger_event('core.get_forum_list_modify_data', compact($vars)));
+
return $rowset;
}
@@ -576,7 +602,7 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
*/
function move_posts($post_ids, $topic_id, $auto_sync = true)
{
- global $db;
+ global $db, $phpbb_dispatcher;
if (!is_array($post_ids))
{
@@ -610,6 +636,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
trigger_error('NO_TOPIC');
}
+ /**
+ * Perform additional actions before moving posts
+ *
+ * @event core.move_posts_before
+ * @var array post_ids Array of post ids to move
+ * @var string topic_id The topic id the posts are moved to
+ * @var bool auto_sync Whether or not to perform auto sync
+ * @var array forum_ids Array of the forum ids the posts are moved from
+ * @var array topic_ids Array of the topic ids the posts are moved from
+ * @var array forum_row Array with the forum id of the topic the posts are moved to
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'post_ids',
+ 'topic_id',
+ 'auto_sync',
+ 'forum_ids',
+ 'topic_ids',
+ 'forum_row',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_posts_before', compact($vars)));
+
$sql = 'UPDATE ' . POSTS_TABLE . '
SET forum_id = ' . (int) $forum_row['forum_id'] . ", topic_id = $topic_id
WHERE " . $db->sql_in_set('post_id', $post_ids);
@@ -620,6 +668,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
WHERE " . $db->sql_in_set('post_msg_id', $post_ids);
$db->sql_query($sql);
+ /**
+ * Perform additional actions after moving posts
+ *
+ * @event core.move_posts_after
+ * @var array post_ids Array of the moved post ids
+ * @var string topic_id The topic id the posts are moved to
+ * @var bool auto_sync Whether or not to perform auto sync
+ * @var array forum_ids Array of the forum ids the posts are moved from
+ * @var array topic_ids Array of the topic ids the posts are moved from
+ * @var array forum_row Array with the forum id of the topic the posts are moved to
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'post_ids',
+ 'topic_id',
+ 'auto_sync',
+ 'forum_ids',
+ 'topic_ids',
+ 'forum_row',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_posts_after', compact($vars)));
+
if ($auto_sync)
{
$forum_ids[] = (int) $forum_row['forum_id'];
@@ -785,6 +855,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
'notification.type.quote',
'notification.type.approve_post',
'notification.type.post_in_queue',
+ 'notification.type.report_post',
);
/**
@@ -886,6 +957,32 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
$table_ary = array(POSTS_TABLE, REPORTS_TABLE);
+ /**
+ * Perform additional actions during post(s) deletion before running the queries
+ *
+ * @event core.delete_posts_in_transaction_before
+ * @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 post ids to delete
+ * @var array delete_notifications_types Array with notifications types to delete
+ * @var array table_ary Array with table names to delete data from
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'post_ids',
+ 'poster_ids',
+ 'topic_ids',
+ 'forum_ids',
+ 'where_type',
+ 'where_ids',
+ 'delete_notifications_types',
+ 'table_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_posts_in_transaction_before', compact($vars)));
+
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
@@ -1042,7 +1139,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
*/
function delete_attachments($mode, $ids, $resync = true)
{
- global $db, $config;
+ global $db, $config, $phpbb_dispatcher;
// 0 is as bad as an empty array
if (empty($ids))
@@ -1087,6 +1184,24 @@ function delete_attachments($mode, $ids, $resync = true)
$post_ids = $message_ids = $topic_ids = $physical = array();
+ /**
+ * Perform additional actions before collecting data for attachment(s) deletion
+ *
+ * @event core.delete_attachments_collect_data_before
+ * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
+ * @var mixed ids Array or comma separated list of ids corresponding to the mode
+ * @var bool resync Flag indicating if posts/messages/topics should be synchronized
+ * @var string sql_id The field name to collect/delete data for depending on the mode
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'ids',
+ 'resync',
+ 'sql_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_attachments_collect_data_before', compact($vars)));
+
// Collect post and topic ids for later use if we need to touch remaining entries (if resync is enabled)
$sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan
FROM ' . ATTACHMENTS_TABLE . '
@@ -1116,6 +1231,32 @@ function delete_attachments($mode, $ids, $resync = true)
}
$db->sql_freeresult($result);
+ /**
+ * Perform additional actions before attachment(s) deletion
+ *
+ * @event core.delete_attachments_before
+ * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
+ * @var mixed ids Array or comma separated list of ids corresponding to the mode
+ * @var bool resync Flag indicating if posts/messages/topics should be synchronized
+ * @var string sql_id The field name to collect/delete data for depending on the mode
+ * @var array post_ids Array with post ids for deleted attachment(s)
+ * @var array topic_ids Array with topic ids for deleted attachment(s)
+ * @var array message_ids Array with private message ids for deleted attachment(s)
+ * @var array physical Array with deleted attachment(s) physical file(s) data
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'ids',
+ 'resync',
+ 'sql_id',
+ 'post_ids',
+ 'topic_ids',
+ 'message_ids',
+ 'physical',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_attachments_before', compact($vars)));
+
// Delete attachments
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set($sql_id, $ids);
@@ -1125,6 +1266,34 @@ function delete_attachments($mode, $ids, $resync = true)
$db->sql_query($sql);
$num_deleted = $db->sql_affectedrows();
+ /**
+ * Perform additional actions after attachment(s) deletion from the database
+ *
+ * @event core.delete_attachments_from_database_after
+ * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
+ * @var mixed ids Array or comma separated list of ids corresponding to the mode
+ * @var bool resync Flag indicating if posts/messages/topics should be synchronized
+ * @var string sql_id The field name to collect/delete data for depending on the mode
+ * @var array post_ids Array with post ids for deleted attachment(s)
+ * @var array topic_ids Array with topic ids for deleted attachment(s)
+ * @var array message_ids Array with private message ids for deleted attachment(s)
+ * @var array physical Array with deleted attachment(s) physical file(s) data
+ * @var int num_deleted The number of deleted attachment(s) from the database
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'ids',
+ 'resync',
+ 'sql_id',
+ 'post_ids',
+ 'topic_ids',
+ 'message_ids',
+ 'physical',
+ 'num_deleted',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_database_after', compact($vars)));
+
if (!$num_deleted)
{
return 0;
@@ -1147,6 +1316,38 @@ function delete_attachments($mode, $ids, $resync = true)
}
}
+ /**
+ * Perform additional actions after attachment(s) deletion from the filesystem
+ *
+ * @event core.delete_attachments_from_filesystem_after
+ * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
+ * @var mixed ids Array or comma separated list of ids corresponding to the mode
+ * @var bool resync Flag indicating if posts/messages/topics should be synchronized
+ * @var string sql_id The field name to collect/delete data for depending on the mode
+ * @var array post_ids Array with post ids for deleted attachment(s)
+ * @var array topic_ids Array with topic ids for deleted attachment(s)
+ * @var array message_ids Array with private message ids for deleted attachment(s)
+ * @var array physical Array with deleted attachment(s) physical file(s) data
+ * @var int num_deleted The number of deleted attachment(s) from the database
+ * @var int space_removed The size of deleted files(s) from the filesystem
+ * @var int files_removed The number of deleted file(s) from the filesystem
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'mode',
+ 'ids',
+ 'resync',
+ 'sql_id',
+ 'post_ids',
+ 'topic_ids',
+ 'message_ids',
+ 'physical',
+ 'num_deleted',
+ 'space_removed',
+ 'files_removed',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_filesystem_after', compact($vars)));
+
if ($space_removed || $files_removed)
{
set_config_count('upload_dir_size', $space_removed * (-1), true);
@@ -2356,7 +2557,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
/**
* Prune function
*/
-function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
+function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true, $prune_limit = 0)
{
global $db, $phpbb_dispatcher;
@@ -2408,9 +2609,19 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
* @var int prune_flags The prune flags
* @var bool auto_sync Whether or not to perform auto sync
* @var string sql_and SQL text appended to where clause
+ * @var int prune_limit The prune limit
* @since 3.1.3-RC1
+ * @changed 3.1.10-RC1 Added prune_limit
*/
- $vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
+ $vars = array(
+ 'forum_id',
+ 'prune_mode',
+ 'prune_date',
+ 'prune_flags',
+ 'auto_sync',
+ 'sql_and',
+ 'prune_limit',
+ );
extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
$sql = 'SELECT topic_id
@@ -2418,7 +2629,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
AND poll_start = 0
$sql_and";
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, $prune_limit);
$topic_list = array();
while ($row = $db->sql_fetchrow($result))
@@ -2435,7 +2646,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
AND poll_start > 0
AND poll_last_vote < $prune_date
$sql_and";
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, $prune_limit);
while ($row = $db->sql_fetchrow($result))
{
@@ -2468,12 +2679,15 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
$prune_date = time() - ($prune_days * 86400);
$next_prune = time() + ($prune_freq * 86400);
- prune($forum_id, $prune_mode, $prune_date, $prune_flags, true);
+ $result = prune($forum_id, $prune_mode, $prune_date, $prune_flags, true, 300);
- $sql = 'UPDATE ' . FORUMS_TABLE . "
- SET prune_next = $next_prune
- WHERE forum_id = $forum_id";
- $db->sql_query($sql);
+ if ($result['topics'] == 0 && $result['posts'] == 0)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET prune_next = $next_prune
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+ }
add_log('admin', 'LOG_AUTO_PRUNE', $row['forum_name']);
}
@@ -2926,9 +3140,9 @@ function get_database_size()
{
$version = $row['mysql_version'];
- if (preg_match('#(3\.23|[45]\.)#', $version))
+ if (preg_match('#(3\.23|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria)#', $version))
{
- $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
+ $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
$sql = 'SHOW TABLE STATUS
FROM ' . $db_name;
@@ -2937,7 +3151,7 @@ function get_database_size()
$database_size = 0;
while ($row = $db->sql_fetchrow($result))
{
- if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
+ if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB' || $row['Engine'] == 'Aria')))
{
if ($table_prefix != '')
{
@@ -3145,18 +3359,47 @@ function tidy_database()
*/
function add_permission_language()
{
- global $user, $phpEx, $phpbb_extension_manager;
+ global $config, $user, $phpEx, $phpbb_extension_manager;
// add permission language files from extensions
$finder = $phpbb_extension_manager->get_finder();
- $lang_files = $finder
+ // We grab the language files from the default, English and user's language.
+ // So we can fall back to the other files like we do when using add_lang()
+ $default_lang_files = $english_lang_files = $user_lang_files = array();
+
+ // Search for board default language if it's not the user language
+ if ($config['default_lang'] != $user->lang_name)
+ {
+ $default_lang_files = $finder
+ ->prefix('permissions_')
+ ->suffix(".$phpEx")
+ ->core_path('language/' . basename($config['default_lang']) . '/')
+ ->extension_directory('/language/' . basename($config['default_lang']))
+ ->find();
+ }
+
+ // Search for english, if its not the default or user language
+ if ($config['default_lang'] != 'en' && $user->lang_name != 'en')
+ {
+ $english_lang_files = $finder
+ ->prefix('permissions_')
+ ->suffix(".$phpEx")
+ ->core_path('language/en/')
+ ->extension_directory('/language/en')
+ ->find();
+ }
+
+ // Find files in the user's language
+ $user_lang_files = $finder
->prefix('permissions_')
->suffix(".$phpEx")
->core_path('language/' . $user->lang_name . '/')
->extension_directory('/language/' . $user->lang_name)
->find();
+ $lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files);
+
foreach ($lang_files as $lang_file => $ext_name)
{
if ($ext_name === '/')
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 6f861b8607..8e60804d6e 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -47,7 +47,7 @@ if (!defined('IN_PHPBB'))
*/
function 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, $def_st = false, $def_sk = false, $def_sd = false)
{
- global $user;
+ global $user, $phpbb_dispatcher;
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
@@ -106,6 +106,42 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
$u_sort_param .= ($selected !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&amp;' : '') . "{$name}={$selected}" : '';
}
+ /**
+ * Run code before generated sort selects are returned
+ *
+ * @event core.gen_sort_selects_after
+ * @var int limit_days Days limit
+ * @var array sort_by_text Sort by text options
+ * @var int sort_days Sort by days flag
+ * @var string sort_key Sort key
+ * @var string sort_dir Sort dir
+ * @var string s_limit_days String of days limit
+ * @var string s_sort_key String of sort key
+ * @var string s_sort_dir String of sort dir
+ * @var string u_sort_param Sort URL params
+ * @var bool def_st Default sort days
+ * @var bool def_sk Default sort key
+ * @var bool def_sd Default sort dir
+ * @var array sorts Sorts
+ * @since 3.1.9-RC1
+ */
+ $vars = array(
+ 'limit_days',
+ 'sort_by_text',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 's_limit_days',
+ 's_sort_key',
+ 's_sort_dir',
+ 'u_sort_param',
+ 'def_st',
+ 'def_sk',
+ 'def_sd',
+ 'sorts',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.gen_sort_selects_after', compact($vars)));
+
return;
}
@@ -114,7 +150,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
*/
function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false, $force_display = false)
{
- global $config, $auth, $template, $user, $db, $phpbb_path_helper;
+ global $config, $auth, $template, $user, $db, $phpbb_path_helper, $phpbb_dispatcher;
// We only return if the jumpbox is not forced to be displayed (in case it is needed for functionality)
if (!$config['load_jumpbox'] && $force_display === false)
@@ -127,16 +163,33 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
ORDER BY left_id ASC';
$result = $db->sql_query($sql, 600);
+ $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[(int) $row['forum_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
$right = $padding = 0;
$padding_store = array('0' => 0);
$display_jumpbox = false;
$iteration = 0;
+ /**
+ * Modify the jumpbox forum list data
+ *
+ * @event core.make_jumpbox_modify_forum_list
+ * @var array rowset Array with the forums list data
+ * @since 3.1.10-RC1
+ */
+ $vars = array('rowset');
+ extract($phpbb_dispatcher->trigger_event('core.make_jumpbox_modify_forum_list', compact($vars)));
+
// Sometimes it could happen that forums will be displayed here not be displayed within the index page
// This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
// If this happens, the padding could be "broken"
- while ($row = $db->sql_fetchrow($result))
+ foreach ($rowset as $row)
{
if ($row['left_id'] < $right)
{
@@ -169,20 +222,21 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
continue;
}
+ $tpl_ary = array();
if (!$display_jumpbox)
{
- $template->assign_block_vars('jumpbox_forums', array(
+ $tpl_ary[] = array(
'FORUM_ID' => ($select_all) ? 0 : -1,
'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'],
'S_FORUM_COUNT' => $iteration,
'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $forum_id)),
- ));
+ );
$iteration++;
$display_jumpbox = true;
}
- $template->assign_block_vars('jumpbox_forums', array(
+ $tpl_ary[] = array(
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'],
'SELECTED' => ($row['forum_id'] == $forum_id) ? ' selected="selected"' : '',
@@ -191,7 +245,25 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false,
'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $row['forum_id'])),
- ));
+ );
+
+ /**
+ * Modify the jumpbox before it is assigned to the template
+ *
+ * @event core.make_jumpbox_modify_tpl_ary
+ * @var array row The data of the forum
+ * @var array tpl_ary Template data of the forum
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'row',
+ 'tpl_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.make_jumpbox_modify_tpl_ary', compact($vars)));
+
+ $template->assign_block_vars_array('jumpbox_forums', $tpl_ary);
+
+ unset($tpl_ary);
for ($i = 0; $i < $padding; $i++)
{
@@ -199,8 +271,7 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
}
$iteration++;
}
- $db->sql_freeresult($result);
- unset($padding_store);
+ unset($padding_store, $rowset);
$url_parts = $phpbb_path_helper->get_url_parts($action);
@@ -392,7 +463,7 @@ function phpbb_clean_search_string($search_string)
*/
function decode_message(&$message, $bbcode_uid = '')
{
- global $config;
+ global $config, $phpbb_dispatcher;
if ($bbcode_uid)
{
@@ -405,12 +476,38 @@ function decode_message(&$message, $bbcode_uid = '')
$replace = array("\n");
}
+ /**
+ * Use this event to modify the message before it is decoded
+ *
+ * @event core.decode_message_before
+ * @var string message_text The message content
+ * @var string bbcode_uid The message BBCode UID
+ * @since 3.1.9-RC1
+ */
+ $message_text = $message;
+ $vars = array('message_text', 'bbcode_uid');
+ extract($phpbb_dispatcher->trigger_event('core.decode_message_before', compact($vars)));
+ $message = $message_text;
+
$message = str_replace($match, $replace, $message);
$match = get_preg_expression('bbcode_htm');
$replace = array('\1', '\1', '\2', '\1', '', '');
$message = preg_replace($match, $replace, $message);
+
+ /**
+ * Use this event to modify the message after it is decoded
+ *
+ * @event core.decode_message_after
+ * @var string message_text The message content
+ * @var string bbcode_uid The message BBCode UID
+ * @since 3.1.9-RC1
+ */
+ $message_text = $message;
+ $vars = array('message_text', 'bbcode_uid');
+ extract($phpbb_dispatcher->trigger_event('core.decode_message_after', compact($vars)));
+ $message = $message_text;
}
/**
@@ -974,17 +1071,8 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
unset($new_attachment_data);
}
- // Sort correctly
- if ($config['display_order'])
- {
- // Ascending sort
- krsort($attachments);
- }
- else
- {
- // Descending sort
- ksort($attachments);
- }
+ // Make sure attachments are properly ordered
+ ksort($attachments);
foreach ($attachments as $attachment)
{
@@ -1223,8 +1311,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
$attachments = $compiled_attachments;
unset($compiled_attachments);
- $tpl_size = sizeof($attachments);
-
$unset_tpl = array();
preg_match_all('#<!\-\- ia([0-9]+) \-\->(.*?)<!\-\- ia\1 \-\->#', $message, $matches, PREG_PATTERN_ORDER);
@@ -1232,8 +1318,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
$replace = array();
foreach ($matches[0] as $num => $capture)
{
- // Flip index if we are displaying the reverse way
- $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num];
+ $index = $matches[1][$num];
$replace['from'][] = $matches[0][$num];
$replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]);
@@ -1248,6 +1333,18 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
$unset_tpl = array_unique($unset_tpl);
+ // Sort correctly
+ if ($config['display_order'])
+ {
+ // Ascending sort
+ krsort($attachments);
+ }
+ else
+ {
+ // Descending sort
+ ksort($attachments);
+ }
+
// Needed to let not display the inlined attachments at the end of the post again
foreach ($unset_tpl as $index)
{
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index b380273f0c..da4820134d 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -479,7 +479,7 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
$dir->close();
}
- for ($i = 0; $i < sizeof($dirlist); ++$i)
+ for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
{
$dir = $dirlist[$i];
@@ -1427,7 +1427,7 @@ function get_path($src_path, $src_url, $test_file)
$path_array = array();
$phpbb_parts = explode('/', $script_path);
- for ($i = 0; $i < sizeof($url_parts); ++$i)
+ for ($i = 0, $end = sizeof($url_parts); $i < $end; ++$i)
{
if ($i < sizeof($phpbb_parts[$i]) && $url_parts[$i] == $phpbb_parts[$i])
{
@@ -1437,7 +1437,7 @@ function get_path($src_path, $src_url, $test_file)
else
{
$path = '';
- for ($j = $i; $j < sizeof($phpbb_parts); ++$j)
+ for ($j = $i, $end2 = sizeof($phpbb_parts); $j < $end2; ++$j)
{
$path .= '../';
}
@@ -2269,7 +2269,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
"\n\n"
);
- for ($i = 0; $i < sizeof($str_from); ++$i)
+ for ($i = 0, $end = sizeof($str_from); $i < $end; ++$i)
{
$origx[] = '#\\' . str_replace(']', '\\]', $str_from[$i]) . '#is';
$replx[] = $str_to[$i];
@@ -2278,7 +2278,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
if (preg_match_all('#\[email=([^\]]+)\](.*?)\[/email\]#i', $message, $m))
{
- for ($i = 0; $i < sizeof($m[1]); ++$i)
+ for ($i = 0, $end = sizeof($m[1]); $i < $end; ++$i)
{
if ($m[1][$i] == $m[2][$i])
{
@@ -2339,7 +2339,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour
$parts = explode('/', $trg);
unset($parts[sizeof($parts) - 1]);
- for ($i = 0; $i < sizeof($parts); ++$i)
+ for ($i = 0, $end = sizeof($parts); $i < $end; ++$i)
{
$path .= $parts[$i] . '/';
@@ -2436,7 +2436,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
if ($copy_subdirs)
{
- for ($i = 0; $i < sizeof($dirlist); ++$i)
+ for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
{
$dir = $dirlist[$i];
@@ -2471,7 +2471,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
$convert->p_master->error(sprintf($str, implode('<br />', $bad_dirs)), __LINE__, __FILE__);
}
- for ($i = 0; $i < sizeof($filelist); ++$i)
+ for ($i = 0, $end = sizeof($filelist); $i < $end; ++$i)
{
copy_file($src . $filelist[$i], $trg . $filelist[$i], $overwrite, $die_on_failure, $source_relative_path);
}
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 8aee80ba34..4881dde6f5 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1496,7 +1496,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
* @param array $user_data the current stored users data
* @param int $user_posts the users number of posts
*
-* @return array An associative array containing the rank title (title), the rank image source (img) and the rank image as full img tag (img)
+* @return array An associative array containing the rank title (title), the rank image as full img tag (img) and the rank image source (img_src)
*
* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
*/
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 254e65ae3d..c571de579e 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -108,6 +108,7 @@ function wrap_img_in_html($src, $title)
echo '<html>';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';
@@ -165,7 +166,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
// Make sure the database record for the filesize is correct
- if ($size > 0 && $size != $attachment['filesize'])
+ if ($size > 0 && $size != $attachment['filesize'] && strpos($attachment['physical_filename'], 'thumb_') === false)
{
// Update database record
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
@@ -283,7 +284,7 @@ function header_filename($file)
// 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 (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Konqueror') !== false)
{
return "filename=" . rawurlencode($file);
}
@@ -412,7 +413,7 @@ 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;
+ $last_load = $request->header('If-Modified-Since') ? strtotime(trim($request->header('If-Modified-Since'))) : false;
if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
{
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index ed96dcf338..1e08864bdc 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -388,7 +388,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
if (!$auth->acl_get('m_approve', $forum_id))
{
- $sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
+ $sql .= ' AND topic_visibility = ' . ITEM_APPROVED;
}
break;
@@ -404,7 +404,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
if (!$auth->acl_get('m_approve', $forum_id))
{
- $sql .= 'AND post_visibility = ' . ITEM_APPROVED;
+ $sql .= ' AND post_visibility = ' . ITEM_APPROVED;
}
break;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index fbac3e6f1d..9b3ca14101 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -210,10 +210,12 @@ class messenger
/**
* Set email template to use
*/
- function template($template_file, $template_lang = '', $template_path = '')
+ function template($template_file, $template_lang = '', $template_path = '', $template_dir_prefix = '')
{
global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
+ $template_dir_prefix = (!$template_dir_prefix || $template_dir_prefix[0] === '/') ? $template_dir_prefix : '/' . $template_dir_prefix;
+
$this->setup_template();
if (!trim($template_file))
@@ -229,10 +231,17 @@ class messenger
$template_lang = basename($config['default_lang']);
}
+ $ext_template_paths = array(
+ array(
+ 'name' => $template_lang . '_email',
+ 'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
+ ),
+ );
+
if ($template_path)
{
$template_paths = array(
- $template_path,
+ $template_path . $template_dir_prefix,
);
}
else
@@ -241,26 +250,41 @@ class messenger
$template_path .= $template_lang . '/email';
$template_paths = array(
- $template_path,
+ $template_path . $template_dir_prefix,
);
+ $board_language = basename($config['default_lang']);
+
// 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']))
+ if ($template_lang !== $board_language)
+ {
+ $fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
+ $fallback_template_path .= $board_language . '/email';
+
+ $template_paths[] = $fallback_template_path . $template_dir_prefix;
+
+ $ext_template_paths[] = array(
+ 'name' => $board_language . '_email',
+ 'ext_path' => 'language/' . $board_language . '/email' . $template_dir_prefix,
+ );
+ }
+ // If everything fails just fall back to en template
+ if ($template_lang !== 'en' && $board_language !== 'en')
{
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
- $fallback_template_path .= basename($config['default_lang']) . '/email';
+ $fallback_template_path .= 'en/email';
- $template_paths[] = $fallback_template_path;
+ $template_paths[] = $fallback_template_path . $template_dir_prefix;
+
+ $ext_template_paths[] = array(
+ 'name' => 'en_email',
+ 'ext_path' => 'language/en/email' . $template_dir_prefix,
+ );
}
}
- $this->set_template_paths(array(
- array(
- 'name' => $template_lang . '_email',
- 'ext_path' => 'language/' . $template_lang . '/email'
- ),
- ), $template_paths);
+ $this->set_template_paths($ext_template_paths, $template_paths);
$this->template->set_filenames(array(
'body' => $template_file . '.txt',
@@ -859,6 +883,11 @@ class queue
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
fclose($fp);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($this->cache_file);
+ }
+
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
}
}
@@ -901,7 +930,14 @@ class queue
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
fclose($fp);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($this->cache_file);
+ }
+
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
+
+ $this->data = array();
}
$lock->release();
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index ca8baecff8..4a4d2de0fe 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -310,6 +310,7 @@ function posting_gen_topic_icons($mode, $icon_id)
{
$template->assign_block_vars('topic_icon', array(
'ICON_ID' => $id,
+ 'ICON_NAME' => $data['img'],
'ICON_IMG' => $root_path . $config['icons_path'] . '/' . $data['img'],
'ICON_WIDTH' => $data['width'],
'ICON_HEIGHT' => $data['height'],
@@ -701,7 +702,7 @@ function create_thumbnail($source, $destination, $mimetype)
$used_imagick = false;
- // Only use imagemagick if defined and the passthru function not disabled
+ // Only use ImageMagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
if (substr($config['img_imagick'], -1) !== '/')
@@ -1073,7 +1074,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
}
$sql_ary = array(
- 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
+ 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe, uu.username as post_delete_username, uu.user_colour as post_delete_user_colour',
'FROM' => array(
USERS_TABLE => 'u',
@@ -1085,6 +1086,10 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'FROM' => array(ZEBRA_TABLE => 'z'),
'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id',
),
+ array(
+ 'FROM' => array(USERS_TABLE => 'uu'),
+ 'ON' => 'uu.user_id = p.post_delete_user',
+ ),
),
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
@@ -1128,6 +1133,32 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$db->sql_freeresult($result);
}
+ /**
+ * Event to modify the posts list for topic reviews
+ *
+ * @event core.topic_review_modify_post_list
+ * @var array attachments Array with the post attachments data
+ * @var int cur_post_id Post offset ID
+ * @var int forum_id The topic's forum ID
+ * @var string mode The topic review mode
+ * @var array post_list Array with the post IDs
+ * @var array rowset Array with the posts data
+ * @var bool show_quote_button Flag indicating if the quote button should be displayed
+ * @var int topic_id The topic ID that is being reviewed
+ * @since 3.1.9-RC1
+ */
+ $vars = array(
+ 'attachments',
+ 'cur_post_id',
+ 'forum_id',
+ 'mode',
+ 'post_list',
+ 'rowset',
+ 'show_quote_button',
+ 'topic_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_post_list', compact($vars)));
+
for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
{
// A non-existing rowset only happens if there was no user present for the entered poster_id
@@ -1167,6 +1198,31 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
+ $l_deleted_message = '';
+ if ($row['post_visibility'] == ITEM_DELETED)
+ {
+ $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'], $row['post_delete_username'], $row['post_delete_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));
+ }
+ }
+
$post_row = array(
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
@@ -1177,6 +1233,8 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'S_FRIEND' => ($row['friend']) ? true : false,
'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']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
+ 'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
+ 'L_DELETE_POST' => $l_deleted_message,
'POST_SUBJECT' => $post_subject,
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
@@ -1609,6 +1667,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
}
+ else if (isset($data['post_visibility']) && $data['post_visibility'] !== false)
+ {
+ $post_visibility = $data['post_visibility'];
+ }
// MODs/Extensions are able to force any visibility on posts
if (isset($data['force_approved_state']))
@@ -2402,7 +2464,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$params = $add_anchor = '';
- if ($post_visibility == ITEM_APPROVED)
+ if ($post_visibility == ITEM_APPROVED ||
+ ($auth->acl_get('m_softdelete', $data['forum_id']) && $post_visibility == ITEM_DELETED) ||
+ ($auth->acl_get('m_approve', $data['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{
$params .= '&amp;t=' . $data['topic_id'];
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 8e1561b842..1639eb1a4c 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1594,7 +1594,7 @@ function get_folder_status($folder_id, $folder)
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
);
- $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);
+ $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), (int) $return['cur'], $return['percent']);
return $return;
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 89bc31fa25..1aac0e803c 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -776,9 +776,18 @@ class fileupload
$url = parse_url($upload_url);
+ $default_port = 80;
+ $hostname = $url['host'];
+
+ if ($url['scheme'] == 'https')
+ {
+ $default_port = 443;
+ $hostname = 'tls://' . $url['host'];
+ }
+
$host = $url['host'];
$path = $url['path'];
- $port = (!empty($url['port'])) ? (int) $url['port'] : 80;
+ $port = (!empty($url['port'])) ? (int) $url['port'] : $default_port;
$upload_ary['type'] = 'application/octet-stream';
@@ -818,7 +827,7 @@ class fileupload
$errno = 0;
$errstr = '';
- if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
+ if (!($fsock = @fsockopen($hostname, $port, $errno, $errstr)))
{
$file = new fileerror($user->lang[$this->error_prefix . 'NOT_UPLOADED']);
return $file;
@@ -919,7 +928,7 @@ class fileupload
return $file;
}
- $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache';
+ $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? sys_get_temp_dir() : $phpbb_root_path . 'cache';
$filename = tempnam($tmp_path, unique_id() . '-');
if (!($fp = @fopen($filename, 'wb')))
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c46653db9e..b82abe0c5e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -119,19 +119,29 @@ function user_update_name($old_name, $new_name)
global $config, $db, $cache, $phpbb_dispatcher;
$update_ary = array(
- FORUMS_TABLE => array('forum_last_poster_name'),
- MODERATOR_CACHE_TABLE => array('username'),
- POSTS_TABLE => array('post_username'),
- TOPICS_TABLE => array('topic_first_poster_name', 'topic_last_poster_name'),
+ FORUMS_TABLE => array(
+ 'forum_last_poster_id' => 'forum_last_poster_name',
+ ),
+ MODERATOR_CACHE_TABLE => array(
+ 'user_id' => 'username',
+ ),
+ POSTS_TABLE => array(
+ 'poster_id' => 'post_username',
+ ),
+ TOPICS_TABLE => array(
+ 'topic_poster' => 'topic_first_poster_name',
+ 'topic_last_poster_id' => 'topic_last_poster_name',
+ ),
);
foreach ($update_ary as $table => $field_ary)
{
- foreach ($field_ary as $field)
+ foreach ($field_ary as $id_field => $name_field)
{
$sql = "UPDATE $table
- SET $field = '" . $db->sql_escape($new_name) . "'
- WHERE $field = '" . $db->sql_escape($old_name) . "'";
+ SET $name_field = '" . $db->sql_escape($new_name) . "'
+ WHERE $name_field = '" . $db->sql_escape($old_name) . "'
+ AND $id_field <> " . ANONYMOUS;
$db->sql_query($sql);
}
}
@@ -2698,7 +2708,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, $phpbb_container;
+ global $db, $auth, $phpbb_container, $phpbb_dispatcher;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -2775,6 +2785,26 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
// Clear permissions cache of relevant users
$auth->acl_clear_prefetch($user_id_ary);
+ /**
+ * Event after users are added to a group
+ *
+ * @event core.group_add_user_after
+ * @var int group_id ID of the group to which users are added
+ * @var string group_name Name of the group
+ * @var array user_id_ary IDs of the users which are added
+ * @var array username_ary names of the users which are added
+ * @var int pending Pending setting, 1 if user(s) added are pending
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'group_id',
+ 'group_name',
+ 'user_id_ary',
+ 'username_ary',
+ 'pending',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.group_add_user_after', compact($vars)));
+
if (!$group_name)
{
$group_name = get_group_name($group_id);
@@ -2811,7 +2841,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
*
* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
*/
-function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
+function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $log_action = true)
{
global $db, $auth, $config, $phpbb_dispatcher, $phpbb_container;
@@ -2933,16 +2963,32 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
// Clear permissions cache of relevant users
$auth->acl_clear_prefetch($user_id_ary);
- if (!$group_name)
+ /**
+ * Event after users are removed from a group
+ *
+ * @event core.group_delete_user_after
+ * @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.7-RC1
+ */
+ $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary');
+ extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars)));
+
+ if ($log_action)
{
- $group_name = get_group_name($group_id);
- }
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
- $log = 'LOG_GROUP_REMOVE';
+ $log = 'LOG_GROUP_REMOVE';
- if ($group_name)
- {
- add_log('admin', $log, $group_name, implode(', ', $username_ary));
+ if ($group_name)
+ {
+ add_log('admin', $log, $group_name, implode(', ', $username_ary));
+ }
}
group_update_listings($group_id);
@@ -3040,7 +3086,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, $phpbb_container;
+ global $db, $auth, $phpbb_root_path, $phpEx, $config, $phpbb_container, $phpbb_dispatcher;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -3171,6 +3217,28 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
break;
}
+ /**
+ * Event to perform additional actions on setting user group attributes
+ *
+ * @event core.user_set_group_attributes
+ * @var int group_id ID of the group
+ * @var string group_name Name of the group
+ * @var array user_id_ary IDs of the users to set group attributes
+ * @var array username_ary Names of the users to set group attributes
+ * @var array group_attributes Group attributes which were changed
+ * @var string action Action to perform over the group members
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'group_id',
+ 'group_name',
+ 'user_id_ary',
+ 'username_ary',
+ 'group_attributes',
+ 'action',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.user_set_group_attributes', compact($vars)));
+
// Clear permissions cache of relevant users
$auth->acl_clear_prefetch($user_id_ary);
@@ -3586,8 +3654,8 @@ function remove_newly_registered($user_id, $user_data = false)
}
// We need to call group_user_del here, because this function makes sure everything is correctly changed.
- // A downside for a call within the session handler is that the language is not set up yet - so no log entry
- group_user_del($group_id, $user_id);
+ // Force function to not log the removal of users from newly registered users group
+ group_user_del($group_id, $user_id, false, false, false);
// Set user_new to 0 to let this not be triggered again
$sql = 'UPDATE ' . USERS_TABLE . '
diff --git a/phpBB/includes/mcp/info/mcp_pm_reports.php b/phpBB/includes/mcp/info/mcp_pm_reports.php
index 8670b71084..c80f3b86a3 100644
--- a/phpBB/includes/mcp/info/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/info/mcp_pm_reports.php
@@ -20,9 +20,9 @@ class mcp_pm_reports_info
'title' => 'MCP_PM_REPORTS',
'version' => '1.0.0',
'modes' => array(
- 'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
- 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
- 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
+ 'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
+ 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
+ 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
),
);
}
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 157134b09e..e4c0640ec7 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -35,15 +35,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
// merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action
$merge_select = ($action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics') ? true : false;
- if ($merge_select)
- {
- // Fixes a "bug" that makes forum_view use the same ordering as topic_view
- $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'];
$start = request_var('start', 0);
$topic_id_list = request_var('topic_id_list', array(0));
@@ -282,7 +273,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'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') : '',
+ 'DELETED_IMG' => ($topic_deleted) ? $user->img('icon_topic_deleted', 'TOPIC_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']),
@@ -405,7 +396,7 @@ function mcp_resync_topics($topic_ids)
*/
function merge_topics($forum_id, $topic_ids, $to_topic_id)
{
- global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;
+ global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_dispatcher;
if (!sizeof($topic_ids))
{
@@ -420,21 +411,23 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
$sync_topics = array_merge($topic_ids, array($to_topic_id));
- $topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
+ $all_topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
- if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
+ if (!sizeof($all_topic_data) || empty($all_topic_data[$to_topic_id]))
{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
return;
}
$sync_forums = array();
- foreach ($topic_data as $data)
+ $topic_views = 0;
+ foreach ($all_topic_data as $data)
{
$sync_forums[$data['forum_id']] = $data['forum_id'];
+ $topic_views = max($topic_views, $data['topic_views']);
}
- $topic_data = $topic_data[$to_topic_id];
+ $to_topic_data = $all_topic_data[$to_topic_id];
$post_id_list = request_var('post_id_list', array(0));
$start = request_var('start', 0);
@@ -482,10 +475,16 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
if (confirm_box(true))
{
- $to_forum_id = $topic_data['forum_id'];
+ $to_forum_id = $to_topic_data['forum_id'];
move_posts($post_id_list, $to_topic_id, false);
- add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']);
+ add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $to_topic_data['topic_title']);
+
+ // Update topic views count
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_views = ' . $topic_views . '
+ WHERE topic_id = ' . $to_topic_id;
+ $db->sql_query($sql);
// Message and return links
$success_msg = 'POSTS_MERGED_SUCCESS';
@@ -512,6 +511,20 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$redirect = reapply_sid($redirect);
+ /**
+ * Perform additional actions after merging topics.
+ *
+ * @event core.mcp_forum_merge_topics_after
+ * @var array all_topic_data The data from all topics involved in the merge
+ * @var int to_topic_id The ID of the topic into which the rest are merged
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'all_topic_data',
+ 'to_topic_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_forum_merge_topics_after', compact($vars)));
+
meta_refresh(3, $redirect);
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 629b6fd275..5d8aa18c16 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -54,8 +54,8 @@ function mcp_front_view($id, $mode, $action)
* Allow altering the query to get the number of unapproved posts
*
* @event core.mcp_front_queue_unapproved_total_before
- * @var int sql_ary Query to get the total number of unapproved posts
- * @var array forum_list List of forums to look for unapproved posts
+ * @var array sql_ary Query array to get the total number of unapproved posts
+ * @var array forum_list List of forums to look for unapproved posts
* @since 3.1.5-RC1
*/
$vars = array('sql_ary', 'forum_list');
@@ -179,7 +179,7 @@ function mcp_front_view($id, $mode, $action)
* Alter sql query to count the number of reported posts
*
* @event core.mcp_front_reports_count_query_before
- * @var int sql The query string used to get the number of reports that exist
+ * @var string sql The query string used to get the number of reports that exist
* @var array forum_list List of forums that contain the posts
* @since 3.1.5-RC1
*/
@@ -226,8 +226,8 @@ function mcp_front_view($id, $mode, $action)
* Alter sql query to get latest reported posts
*
* @event core.mcp_front_reports_listing_query_before
- * @var int sql_ary Associative array with the query to be executed
- * @var array forum_list List of forums that contain the posts
+ * @var array sql_ary Associative array with the query to be executed
+ * @var array forum_list List of forums that contain the posts
* @since 3.1.0-RC3
*/
$vars = array('sql_ary', 'forum_list');
@@ -274,7 +274,7 @@ function mcp_front_view($id, $mode, $action)
}
// Latest 5 reported PMs
- if ($module->loaded('pm_reports') && $auth->acl_getf_global('m_report'))
+ if ($module->loaded('pm_reports') && $auth->acl_get('m_pm_report'))
{
$template->assign_var('S_SHOW_PM_REPORTS', true);
$user->add_lang(array('ucp'));
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index fc28968101..b2441aed1b 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -262,7 +262,7 @@ class mcp_main
*/
function lock_unlock($action, $ids)
{
- global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_dispatcher;
if ($action == 'lock' || $action == 'unlock')
{
@@ -322,6 +322,22 @@ function lock_unlock($action, $ids)
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']);
}
+ /**
+ * Perform additional actions after locking/unlocking posts/topics
+ *
+ * @event core.mcp_lock_unlock_after
+ * @var string action Variable containing the action we perform on the posts/topics ('lock', 'unlock', 'lock_post' or 'unlock_post')
+ * @var array ids Array containing the post/topic IDs that have been locked/unlocked
+ * @var array data Array containing posts/topics data
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'action',
+ 'ids',
+ 'data',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_lock_unlock_after', compact($vars)));
+
$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
meta_refresh(2, $redirect);
@@ -861,11 +877,12 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
}
$template->assign_vars(array(
- 'S_SHADOW_TOPICS' => $only_shadow,
- '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_SHADOW_TOPICS' => $only_shadow,
+ '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),
+ 'DELETE_TOPIC_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_TOPIC_PERMANENTLY', sizeof($topic_ids)),
));
$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
@@ -1100,9 +1117,10 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
}
$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_SOFTDELETED' => $only_softdeleted,
+ 'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
+ 'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
+ 'DELETE_POST_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_POST_PERMANENTLY', sizeof($post_ids)),
));
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 7a93f73228..2dcfcd608b 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -549,16 +549,6 @@ function change_poster(&$post_info, $userdata)
$from_username = $post_info['username'];
$to_username = $userdata['username'];
- // Renew post info
- $post_info = phpbb_get_post_data(array($post_id), false, true);
-
- if (!sizeof($post_info))
- {
- trigger_error('POST_NOT_EXIST');
- }
-
- $post_info = $post_info[$post_id];
-
/**
* This event allows you to perform additional tasks after changing a post's poster
*
@@ -566,10 +556,21 @@ function change_poster(&$post_info, $userdata)
* @var array userdata Information on a post's new poster
* @var array post_info Information on the affected post
* @since 3.1.6-RC1
+ * @changed 3.1.7-RC1 Change location to prevent post_info from being set to the new post information
*/
$vars = array('userdata', 'post_info');
extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars)));
+ // Renew post info
+ $post_info = phpbb_get_post_data(array($post_id), false, true);
+
+ if (!sizeof($post_info))
+ {
+ trigger_error('POST_NOT_EXIST');
+ }
+
+ $post_info = $post_info[$post_id];
+
// 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);
}
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 5fde63ecb4..3567e545f0 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -72,6 +72,7 @@ class mcp_queue
case 'delete':
$post_id_list = $request->variable('post_id_list', array(0));
$topic_id_list = $request->variable('topic_id_list', array(0));
+ $delete_reason = $request->variable('delete_reason', '', true);
if (!empty($post_id_list))
{
@@ -80,7 +81,7 @@ class mcp_queue
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
}
- mcp_delete_post($post_id_list, false, '', $action);
+ mcp_delete_post($post_id_list, false, $delete_reason, $action);
}
else if (!empty($topic_id_list))
{
@@ -89,7 +90,7 @@ class mcp_queue
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
}
- mcp_delete_topic($topic_id_list, false, '', $action);
+ mcp_delete_topic($topic_id_list, false, $delete_reason, $action);
}
else
{
@@ -283,6 +284,7 @@ class mcp_queue
$template->assign_vars(array(
'S_MCP_QUEUE' => true,
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
+ 'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['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_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE,
@@ -1130,6 +1132,11 @@ class mcp_queue
// Build a list of posts to be disapproved and get the related topics real replies count
foreach ($post_info as $post_id => $post_data)
{
+ if ($mode === 'unapproved_topics' && $post_data['post_visibility'] == ITEM_APPROVED)
+ {
+ continue;
+ }
+
$post_disapprove_list[$post_id] = $post_data['topic_id'];
if (!isset($topic_posts_unapproved[$post_data['topic_id']]))
{
@@ -1139,6 +1146,12 @@ class mcp_queue
$topic_posts_unapproved[$post_data['topic_id']]++;
}
+ // Do not try to disapprove if no posts are selected
+ if (empty($post_disapprove_list))
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
+
// Now we build the log array
foreach ($post_disapprove_list as $post_id => $topic_id)
{
@@ -1240,7 +1253,7 @@ class mcp_queue
continue;
}
- $post_data['disapprove_reason'] = '';
+ $post_data['disapprove_reason'] = $disapprove_reason;
if (isset($disapprove_reason_lang))
{
// Okay we need to get the reason from the posters language
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index fa2fed842f..6bb606a990 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -95,7 +95,7 @@ class mcp_reports
*
* @event core.mcp_reports_report_details_query_before
* @var array sql_ary The array in the format of the query builder with the query
- * @var mixed forum_id The forum_id, the number in the f GET parameter
+ * @var int forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
* @since 3.1.5-RC1
@@ -118,10 +118,10 @@ class mcp_reports
*
* @event core.mcp_reports_report_details_query_after
* @var array sql_ary The array in the format of the query builder with the query that had been executted
- * @var mixed forum_id The forum_id, the number in the f GET parameter
+ * @var int forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
- * @var int report The query's resulting row.
+ * @var array report The query's resulting row.
* @since 3.1.5-RC1
*/
$vars = array(
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 8347830d0f..2217f8fdeb 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -194,6 +194,30 @@ function mcp_topic_view($id, $mode, $action)
}
}
+ /**
+ * Event to modify the post data for the MCP topic review before assigning the posts
+ *
+ * @event core.mcp_topic_modify_post_data
+ * @var array attachments List of attachments post_id => array of attachments
+ * @var int forum_id The forum ID we are currently in
+ * @var int id ID of the tab we are displaying
+ * @var string mode Mode of the MCP page we are displaying
+ * @var array post_id_list Array with post ids we are going to display
+ * @var array rowset Array with the posts data
+ * @var int topic_id The topic ID we are currently reviewing
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'attachments',
+ 'forum_id',
+ 'id',
+ 'mode',
+ 'post_id_list',
+ 'rowset',
+ 'topic_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_topic_modify_post_data', compact($vars)));
+
foreach ($rowset as $i => $row)
{
$message = $row['post_text'];
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index d724b8703b..33c898ffc2 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -530,12 +530,28 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
- $user_row['user_lang'] = (file_exists($phpbb_root_path . 'language/' . $user_row['user_lang'] . "/mcp.$phpEx")) ? $user_row['user_lang'] : $config['default_lang'];
- include($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp.$phpEx");
+ // Attempt to translate warning to language of user being warned if user's language differs from issuer's language
+ if ($user_row['user_lang'] != $user->lang_name)
+ {
+ $lang = array();
+
+ $user_row['user_lang'] = (file_exists($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp." . $phpEx)) ? $user_row['user_lang'] : $config['default_lang'];
+ include($phpbb_root_path . 'language/' . basename($user_row['user_lang']) . "/mcp." . $phpEx);
+
+ $warn_pm_subject = $lang['WARNING_PM_SUBJECT'];
+ $warn_pm_body = sprintf($lang['WARNING_PM_BODY'], $warning);
+
+ unset($lang);
+ }
+ else
+ {
+ $warn_pm_subject = $user->lang('WARNING_PM_SUBJECT');
+ $warn_pm_body = $user->lang('WARNING_PM_BODY', $warning);
+ }
$message_parser = new parse_message();
- $message_parser->message = $user->lang('WARNING_PM_BODY', $warning);
+ $message_parser->message = $warn_pm_body;
$message_parser->parse(true, true, true, false, false, true, true);
$pm_data = array(
@@ -553,7 +569,7 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
'address_list' => array('u' => array($user_row['user_id'] => 'to')),
);
- submit_pm('post', $user->lang('WARNING_PM_SUBJECT'), $pm_data, false);
+ submit_pm('post', $warn_pm_subject, $pm_data, false);
}
add_log('admin', 'LOG_USER_WARNING', $user_row['username']);
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e63f6b822b..16b65fb83e 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1822,7 +1822,7 @@ class parse_message extends bbcode_firstpass
$this->message = $poll['poll_title'];
$this->bbcode_bitfield = $bbcode_bitfield;
- $poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
+ $poll['poll_options'] = preg_split('/\s*?\n\s*/', trim($poll['poll_option_text']));
$poll['poll_options_size'] = sizeof($poll['poll_options']);
if (!$poll['poll_title'] && $poll['poll_options_size'])
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index b9606945b4..86a8226d5b 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -462,9 +462,11 @@ class ucp_groups
$avatar_data = null;
$avatar_error = array();
+ /** @var \phpbb\avatar\manager $phpbb_avatar_manager */
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+
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
@@ -649,6 +651,14 @@ class ucp_groups
$avatars_enabled = false;
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));
+ // Assign min and max values before generating avatar driver html
+ $template->assign_vars(array(
+ 'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
+ 'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
+ 'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
+ 'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
+ ));
+
foreach ($avatar_drivers as $current_driver)
{
$driver = $phpbb_avatar_manager->get_driver($current_driver);
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index a1624e78ec..8584a9a0fd 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -35,7 +35,7 @@ class ucp_main
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
global $request;
switch ($mode)
@@ -215,6 +215,14 @@ class ucp_main
$unwatch = (isset($_POST['unwatch'])) ? true : false;
+ /**
+ * Read and potentially modify the post data used to remove subscriptions to forums/topics
+ *
+ * @event core.ucp_main_subscribed_post_data
+ * @since 3.1.10-RC1
+ */
+ $phpbb_dispatcher->dispatch('core.ucp_main_subscribed_post_data');
+
if ($unwatch)
{
if (check_form_key('ucp_front_subscribed'))
@@ -300,6 +308,20 @@ class ucp_main
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
+ /**
+ * Modify the query used to retrieve a list of subscribed forums
+ *
+ * @event core.ucp_main_subscribed_forums_modify_query
+ * @var array sql_array The subscribed forums query
+ * @var array forbidden_forums The list of forbidden forums
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forums',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forums_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
@@ -341,7 +363,7 @@ class ucp_main
$last_post_time = $last_post_url = '';
}
- $template->assign_block_vars('forumrow', array(
+ $template_vars = array(
'FORUM_ID' => $forum_id,
'FORUM_IMG_STYLE' => $folder_image,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
@@ -360,8 +382,36 @@ class ucp_main
'S_UNREAD_FORUM' => $unread_forum,
'U_LAST_POST' => $last_post_url,
- 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])
+ );
+
+ /**
+ * Add template variables to a subscribed forum row.
+ *
+ * @event core.ucp_main_subscribed_forum_modify_template_vars
+ * @var array template_vars Array containing the template variables for the row
+ * @var array row Array containing the subscribed forum row data
+ * @var int forum_id Forum ID
+ * @var string folder_image Folder image
+ * @var string folder_alt Alt text for the folder image
+ * @var bool unread_forum Whether the forum has unread content or not
+ * @var string last_post_time The time of the most recent post, expressed as a formatted date string
+ * @var string last_post_url The URL of the most recent post in the forum
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'row',
+ 'forum_id',
+ 'folder_image',
+ 'folder_alt',
+ 'unread_forum',
+ 'last_post_time',
+ 'last_post_url',
);
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forum_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('forumrow', $template_vars);
}
$db->sql_freeresult($result);
}
@@ -643,7 +693,7 @@ class ucp_main
*/
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
{
- global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;
+ global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request, $phpbb_dispatcher;
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
@@ -664,6 +714,23 @@ class ucp_main
AND i.user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
);
+
+ /**
+ * Modify the query used to retrieve the count of subscribed/bookmarked topics
+ *
+ * @event core.ucp_main_topiclist_count_modify_query
+ * @var array sql_array The subscribed/bookmarked topics query
+ * @var array forbidden_forum_ary The list of forbidden forums
+ * @var string mode The type of topic list ('subscribed' or 'bookmarks')
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forum_ary',
+ 'mode',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_count_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$topics_count = (int) $db->sql_fetchfield('topics_count');
@@ -732,6 +799,22 @@ class ucp_main
$sql_array['SELECT'] .= ', tp.topic_posted';
}
+ /**
+ * Modify the query used to retrieve the list of subscribed/bookmarked topics
+ *
+ * @event core.ucp_main_topiclist_modify_query
+ * @var array sql_array The subscribed/bookmarked topics query
+ * @var array forbidden_forum_ary The list of forbidden forums
+ * @var string mode The type of topic list ('subscribed' or 'bookmarks')
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'sql_array',
+ 'forbidden_forum_ary',
+ 'mode',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_modify_query', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -796,7 +879,7 @@ class ucp_main
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
// Send vars to template
- $template->assign_block_vars('topicrow', array(
+ $template_vars = array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
@@ -838,7 +921,41 @@ class ucp_main
'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_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
- ));
+ );
+
+ /**
+ * Add template variables to a subscribed/bookmarked topic row.
+ *
+ * @event core.ucp_main_topiclist_topic_modify_template_vars
+ * @var array template_vars Array containing the template variables for the row
+ * @var array row Array containing the subscribed/bookmarked topic row data
+ * @var int forum_id ID of the forum containing the topic
+ * @var int topic_id Topic ID
+ * @var int replies Number of replies in the topic
+ * @var string topic_type Topic type
+ * @var string folder_img Folder image
+ * @var string folder_alt Alt text for the folder image
+ * @var array icons Array containing topic icons
+ * @var bool unread_topic Whether the topic has unread content or not
+ * @var string view_topic_url The URL of the topic
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'row',
+ 'forum_id',
+ 'topic_id',
+ 'replies',
+ 'topic_type',
+ 'folder_img',
+ 'folder_alt',
+ 'icons',
+ 'unread_topic',
+ 'view_topic_url',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_topic_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('topicrow', $template_vars);
$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);
}
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index 425a56cf6c..f026cd3eb3 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -92,7 +92,7 @@ class ucp_pm
$user_folders = get_folder($user->data['user_id']);
- if (!$auth->acl_get('u_sendpm'))
+ if ($action != 'delete' && !$auth->acl_get('u_sendpm'))
{
// trigger_error('NO_AUTH_SEND_MESSAGE');
$template->assign_vars(array(
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 8b7d42e9c9..d365e8b489 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -154,7 +154,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
'S_SHOW_PM_BOX' => true,
'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
- 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=$select_single"),
+ 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=" . (int) $select_single),
));
}
@@ -751,6 +751,34 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
$enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
+ /**
+ * Modify private message
+ *
+ * @event core.ucp_pm_compose_modify_parse_before
+ * @var bool enable_bbcode Whether or not bbcode is enabled
+ * @var bool enable_smilies Whether or not smilies are enabled
+ * @var bool enable_urls Whether or not urls are enabled
+ * @var bool enable_sig Whether or not signature is enabled
+ * @var string subject PM subject text
+ * @var object message_parser The message parser object
+ * @var bool submit Whether or not the form has been sumitted
+ * @var bool preview Whether or not the signature is being previewed
+ * @var array error Any error strings
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'enable_bbcode',
+ 'enable_smilies',
+ 'enable_urls',
+ 'enable_sig',
+ 'subject',
+ 'message_parser',
+ 'submit',
+ 'preview',
+ 'error',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars)));
+
if ($submit)
{
$status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1);
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 3c274b53c7..e63e9b4c08 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -86,7 +86,7 @@ class ucp_prefs
}
$error = array_merge(validate_data($data, array(
- 'dateformat' => array('string', false, 1, 30),
+ 'dateformat' => array('string', false, 1, 64),
'lang' => array('language_iso_name'),
'tz' => array('timezone'),
)), $error);
@@ -368,6 +368,49 @@ class ucp_prefs
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
}
+ /**
+ * Run code before view form is displayed
+ *
+ * @event core.ucp_prefs_view_after
+ * @var bool submit Do we display the form only
+ * or did the user press submit
+ * @var array data Array with current ucp options data
+ * @var array sort_dir_text Array with sort dir language strings
+ * @var array limit_topic_days Topic ordering options
+ * @var array sort_by_topic_text Topic ordering language strings
+ * @var array sort_by_topic_sql Topic ordering sql
+ * @var array limit_post_days Post ordering options
+ * @var array sort_by_post_text Post ordering language strings
+ * @var array sort_by_post_sql Post ordering sql
+ * @var array _options Sort options
+ * @var string s_limit_topic_days Sort limit topic by days select box
+ * @var string s_sort_topic_key Sort topic key select box
+ * @var string s_sort_topic_dir Sort topic dir select box
+ * @var string s_limit_post_days Sort limit post by days select box
+ * @var string s_sort_post_key Sort post key select box
+ * @var string s_sort_post_dir Sort post dir select box
+ * @since 3.1.8-RC1
+ */
+ $vars = array(
+ 'submit',
+ 'data',
+ 'sort_dir_text',
+ 'limit_topic_days',
+ 'sort_by_topic_text',
+ 'sort_by_topic_sql',
+ 'limit_post_days',
+ 'sort_by_post_text',
+ 'sort_by_post_sql',
+ '_options',
+ 's_limit_topic_days',
+ 's_sort_topic_key',
+ 's_sort_topic_dir',
+ 's_limit_post_days',
+ 's_sort_post_key',
+ 's_sort_post_dir',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_after', compact($vars)));
+
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 8d8d42e742..0be1930f1a 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -183,37 +183,12 @@ class ucp_profile
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
- // 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->set_addresses($row);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($data['username']),
- 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
- 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
- );
-
- $messenger->send($row['user_notify_type']);
- }
- $db->sql_freeresult($result);
+ $notifications_manager = $phpbb_container->get('notification_manager');
+ $notifications_manager->add_notifications('notification.type.admin_activate_user', array(
+ 'user_id' => $user->data['user_id'],
+ 'user_actkey' => $user_actkey,
+ 'user_regdate' => time(), // Notification time
+ ));
}
user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE);
@@ -504,6 +479,32 @@ class ucp_profile
{
$message_parser = new parse_message($signature);
+ /**
+ * Modify user signature on editing profile in UCP
+ *
+ * @event core.ucp_profile_modify_signature
+ * @var bool enable_bbcode Whether or not bbcode is enabled
+ * @var bool enable_smilies Whether or not smilies are enabled
+ * @var bool enable_urls Whether or not urls are enabled
+ * @var string signature Users signature text
+ * @var object message_parser The message parser object
+ * @var array error Any error strings
+ * @var bool submit Whether or not the form has been sumitted
+ * @var bool preview Whether or not the signature is being previewed
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'enable_bbcode',
+ 'enable_smilies',
+ 'enable_urls',
+ 'signature',
+ 'message_parser',
+ 'error',
+ 'submit',
+ 'preview',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars)));
+
// Allowing Quote BBCode
$message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');
@@ -530,6 +531,16 @@ class ucp_profile
'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield
);
+ /**
+ * Modify user registration data before submitting it to the database
+ *
+ * @event core.ucp_profile_modify_signature_sql_ary
+ * @var array sql_ary Array with user signature data to submit to the database
+ * @since 3.1.10-RC1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature_sql_ary', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
@@ -663,6 +674,13 @@ class ucp_profile
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user->data['user_avatar_type']));
+ $template->assign_vars(array(
+ 'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
+ 'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
+ 'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
+ 'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
+ ));
+
foreach ($avatar_drivers as $current_driver)
{
$driver = $phpbb_avatar_manager->get_driver($current_driver);
diff --git a/phpBB/index.php b/phpBB/index.php
index df6932f6c0..e4c03949c1 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -119,7 +119,7 @@ $db->sql_freeresult($result);
$legend = implode($user->lang['COMMA_SEPARATOR'], $legend);
// Generate birthday list if required ...
-$birthday_list = array();
+$birthdays = $birthday_list = array();
if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
{
$time = $user->create_datetime();
@@ -132,33 +132,66 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
$leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
}
- $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
- FROM ' . USERS_TABLE . ' u
- LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
- WHERE (b.ban_id IS NULL
- OR b.ban_exclude = 1)
+ $sql_ary = array(
+ 'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_birthday',
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(BANLIST_TABLE => 'b'),
+ 'ON' => 'u.user_id = b.ban_userid',
+ ),
+ ),
+ 'WHERE' => "(b.ban_id IS NULL OR b.ban_exclude = 1)
AND (u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' $leap_year_birthdays)
- AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')',
+ );
+
+ /**
+ * Event to modify the SQL query to get birthdays data
+ *
+ * @event core.index_modify_birthdays_sql
+ * @var array now The assoc array with the 'now' local timestamp data
+ * @var array sql_ary The SQL array to get the birthdays data
+ * @var object time The user related Datetime object
+ * @since 3.1.7-RC1
+ */
+ $vars = array('now', 'sql_ary', 'time');
+ extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_sql', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
+ $rows = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
- while ($row = $db->sql_fetchrow($result))
+ foreach ($rows as $row)
{
$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(
+ $birthdays[] = array(
'USERNAME' => $birthday_username,
'AGE' => $birthday_age,
- ));
+ );
// For 3.0 compatibility
- if ($age = (int) substr($row['user_birthday'], -4))
- {
- $birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : '');
- }
+ $birthday_list[] = $birthday_username . (($birthday_age) ? " ({$birthday_age})" : '');
}
- $db->sql_freeresult($result);
+
+ /**
+ * Event to modify the birthdays list
+ *
+ * @event core.index_modify_birthdays_list
+ * @var array birthdays Array with the users birthdays data
+ * @var array rows Array with the birthdays SQL query result
+ * @since 3.1.7-RC1
+ */
+ $vars = array('birthdays', 'rows');
+ extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_list', compact($vars)));
+
+ $template->assign_block_vars_array('birthdays', $birthdays);
}
// Assign index specific vars
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 7edbd08e03..2afec68de6 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.1.5',
+ 'phpbb_version' => '3.1.10',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 80fd40a944..f367ae1fc0 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -31,7 +31,6 @@ function phpbb_end_update($cache, $config)
</p>
</div>
</div>
- <span class="corners-bottom"><span></span></span>
</div>
</div>
</div>
@@ -138,6 +137,7 @@ header('Content-type: text/html; charset=UTF-8');
<html dir="<?php echo $user->lang['DIRECTION']; ?>" lang="<?php echo $user->lang['USER_LANG']; ?>">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $user->lang['UPDATING_TO_LATEST_STABLE']; ?></title>
@@ -152,7 +152,6 @@ header('Content-type: text/html; charset=UTF-8');
<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">
@@ -212,13 +211,6 @@ while (!$migrator->finished())
phpbb_end_update($cache, $config);
}
- $state = array_merge(array(
- 'migration_schema_done' => false,
- 'migration_data_done' => false,
- ),
- $migrator->last_run_migration['state']
- );
-
// 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)
{
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 5c16421499..b5d14f27cf 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -633,6 +633,7 @@ class module
echo '<html dir="ltr">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
echo '</head>';
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index a0f8a928de..10b05eb559 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -932,7 +932,7 @@ class install_convert extends module
$val = array($val);
}
- for ($j = 0; $j < sizeof($val); ++$j)
+ for ($j = 0, $size = sizeof($val); $j < $size; ++$j)
{
if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m))
{
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 5b818f9475..8e57ed3edd 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -151,10 +151,10 @@ class install_install extends module
'LEGEND_EXPLAIN' => $lang['PHP_SETTINGS_EXPLAIN'],
));
- // Test the minimum PHP version
+ // Test the minimum and maximum version of PHP
$php_version = PHP_VERSION;
- if (version_compare($php_version, '5.3.3') < 0)
+ if ((version_compare($php_version, '5.3.3') < 0) || (version_compare($php_version, '7.0.0-dev', '>=')))
{
$result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
}
@@ -404,7 +404,7 @@ class install_install extends module
));
}
- // Can we find Imagemagick anywhere on the system?
+ // Can we find ImageMagick anywhere on the system?
$exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : '';
$magic_home = getenv('MAGICK_HOME');
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 82ca0fc18d..a00280a925 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -283,6 +283,7 @@ class install_update extends module
// Make sure the update list is destroyed.
$cache->destroy('_update_list');
+ $cache->destroy('_update_list_time');
$cache->destroy('_diff_files');
$cache->destroy('_expected_files');
break;
@@ -355,7 +356,7 @@ class install_update extends module
// We are directly within an update. To make sure our update list is correct we check its status.
$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;
+ $modified = ($update_list !== false) ? $cache->get('_update_list_time') : 0;
// Make sure the list is up-to-date
if ($update_list !== false)
@@ -384,6 +385,7 @@ class install_update extends module
{
$this->get_update_structure($update_list, $expected_files);
$cache->put('_update_list', $update_list);
+ $cache->put('_update_list_time', time());
// Refresh the page if we are still not finished...
if ($update_list['status'] != -1)
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index bc5df123f7..3449829d8c 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -273,7 +273,7 @@ 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 ('use_system_cron', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.6-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.10');
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');
@@ -355,6 +355,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_soft
# -- Global moderator auth option (not a local option)
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_pm_report', 0, 1);
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1);
# -- Admin related auth options
@@ -542,7 +543,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_softdelete', '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', 'm_pm_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');
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index cf2f0a45d2..7d3d93d693 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -117,7 +117,7 @@ $lang = array_merge($lang, array(
'IMAGE_LINK_SIZE' => 'Image link dimensions',
'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as an inline text link if image is larger than this. To disable this behaviour, set the values to 0px by 0px.',
- 'IMAGICK_PATH' => 'Imagemagick path',
+ 'IMAGICK_PATH' => 'ImageMagick path',
'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. <samp>/usr/bin/</samp>.',
'MAX_ATTACHMENTS' => 'Maximum number of attachments per post',
@@ -153,7 +153,7 @@ $lang = array_merge($lang, array(
'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames',
'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?',
- 'SEARCH_IMAGICK' => 'Search for Imagemagick',
+ 'SEARCH_IMAGICK' => 'Search for ImageMagick',
'SECURE_ALLOW_DENY' => 'Allow/Deny list',
'SECURE_ALLOW_DENY_EXPLAIN' => 'Change the default behaviour when secure downloads are enabled of the Allow/Deny list to that of a <strong>whitelist</strong> (Allow) or a <strong>blacklist</strong> (Deny).',
'SECURE_DOWNLOADS' => 'Enable secure downloads',
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 8d6c1c141d..8b4db6a061 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -570,6 +570,7 @@ $lang = array_merge($lang, array(
'SMTP_PORT' => 'SMTP server port',
'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.',
'SMTP_SERVER' => 'SMTP server address',
+ 'SMTP_SERVER_EXPLAIN' => 'Note that you have to provide the protocol that your server uses. If you are using SSL, this has to be "ssl://your.mailserver.com"',
'SMTP_SETTINGS' => 'SMTP settings',
'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index fdbc4aebd0..88e60d00a3 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -594,6 +594,7 @@ $lang = array_merge($lang, array(
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
+ 'LOG_ERROR_CAPTCHA' => '<strong>CAPTCHA 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',
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index b9aeed8fcb..2e80e61adc 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -155,9 +155,10 @@ $lang = array_merge($lang, array(
'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)
+ '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_PM_REPORT' => 'Can close and delete reports of private messages<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
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index bda965b615..c52b71c121 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -54,7 +54,7 @@ $lang = array_merge($lang, array(
'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.',
'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_NOT_SUPPORTED' => 'MySQL fulltext indexes can only be used with MyISAM or InnoDB tables. MySQL 5.6.8 or later is required for fulltext indexes on InnoDB tables.',
'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',
'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.',
diff --git a/phpBB/language/en/app.php b/phpBB/language/en/app.php
index 2da0f098c1..39c4065ebd 100644
--- a/phpBB/language/en/app.php
+++ b/phpBB/language/en/app.php
@@ -44,5 +44,5 @@ $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_METHOD_NOT_SPECIFIED' => 'No method was specified for the controller.',
- 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller "<strong>%s</strong>" is not defined in ./config/services.yml.',
+ 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller “<strong>%s</strong>” is not defined in ./config/services.yml.',
));
diff --git a/phpBB/language/en/captcha_qa.php b/phpBB/language/en/captcha_qa.php
index f764a83f24..28011eb636 100644
--- a/phpBB/language/en/captcha_qa.php
+++ b/phpBB/language/en/captcha_qa.php
@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'CAPTCHA_QA' => 'Q&amp;A',
'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of preventing automated form submissions by spambots.',
'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the question.',
+ 'CONFIRM_QUESTION_MISSING' => 'Questions for the captcha could not be retrieved. Please contact a board administrator.',
'QUESTION_ANSWERS' => 'Answers',
'ANSWERS_EXPLAIN' => 'Please enter valid answers to the question, one per line.',
@@ -60,5 +61,4 @@ $lang = array_merge($lang, array(
'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
-
));
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 0e7dc39b95..6989f26f72 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -54,9 +54,9 @@ $lang = array_merge($lang, array(
'CLI_DESCRIPTION_DELETE_CONFIG' => 'Deletes a configuration option',
'CLI_DESCRIPTION_DISABLE_EXTENSION' => 'Disables the specified extension.',
'CLI_DESCRIPTION_ENABLE_EXTENSION' => 'Enables the specified extension.',
- 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended on.',
+ 'CLI_DESCRIPTION_FIND_MIGRATIONS' => 'Finds migrations that are not depended upon.',
'CLI_DESCRIPTION_GET_CONFIG' => 'Gets a configuration option’s value',
- 'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option’s value',
+ 'CLI_DESCRIPTION_INCREMENT_CONFIG' => 'Increments a configuration option’s integer value',
'CLI_DESCRIPTION_LIST_EXTENSIONS' => 'Lists all extensions in the database and on the filesystem.',
'CLI_DESCRIPTION_OPTION_SAFE_MODE' => 'Run in Safe Mode (without extensions).',
'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.',
@@ -79,3 +79,8 @@ $lang = array_merge($lang, array(
'CLI_FIXUP_RECALCULATE_EMAIL_HASH_SUCCESS' => 'Successfully recalculated all email hashes.',
));
+
+// Additional help for commands.
+$lang = array_merge($lang, array(
+ 'CLI_HELP_CRON_RUN' => $lang['CLI_DESCRIPTION_CRON_RUN'] . ' Optionally you can specify a cron task name to run only the specified cron task.',
+));
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 79d504a67d..a2cfd958aa 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -329,6 +329,7 @@ $lang = array_merge($lang, array(
'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.',
'IMAGE_FILETYPE_MISMATCH' => 'Image file type mismatch: expected extension %1$s but extension %2$s given.',
'IN' => 'in',
+ 'INACTIVE' => 'Inactive',
'INDEX' => 'Index page',
'INFORMATION' => 'Information',
'INSECURE_REDIRECT' => 'Tried to redirect to potentially insecure url.',
@@ -467,7 +468,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TOPIC_DISAPPROVED' => '<strong>Topic disapproved</strong>:',
'NOTIFICATION_TOPIC_IN_QUEUE' => '<strong>Topic approval</strong> request by %1$s:',
'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.',
- 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for newly registered user: “%1$s”',
+ 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for deactivated or newly registered user: “%1$s”',
// Used in conjuction with NOTIFICATION_BOOKMARK and NOTIFICATION_POST.
'NOTIFICATION_MANY_OTHERS' => 'others',
'NOTIFICATION_X_OTHERS' => array(
@@ -672,7 +673,7 @@ $lang = array_merge($lang, array(
'SEARCH_POSTS_BY' => 'Search posts by',
'SEARCH_SELF' => 'Your posts',
'SEARCH_TOPIC' => 'Search this topic…',
- 'SEARCH_UNANSWERED' => 'Unanswered posts',
+ 'SEARCH_UNANSWERED' => 'Unanswered topics',
'SEARCH_UNREAD' => 'Unread posts',
'SEARCH_USER_POSTS' => 'Search user’s posts',
'SECONDS' => 'Seconds',
@@ -814,7 +815,7 @@ $lang = array_merge($lang, array(
'USERS' => 'Users',
'USE_PERMISSIONS' => 'Test out user’s permissions',
- 'USER_NEW_PERMISSION_DISALLOWED' => 'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more to be able to use this feature.',
+ 'USER_NEW_PERMISSION_DISALLOWED' => 'We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more in discussions to be able to use this feature.',
'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',
diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt
index a05be5fd96..ccae82c862 100644
--- a/phpBB/language/en/email/forum_notify.txt
+++ b/phpBB/language/en/email/forum_notify.txt
@@ -2,7 +2,7 @@ Subject: Forum post 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 reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic.
+You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic.
{U_NEWEST_POST}
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index 5089e7dcb8..b9416d8e40 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -2,7 +2,7 @@ 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.
+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}
diff --git a/phpBB/language/en/email/short/newtopic_notify.txt b/phpBB/language/en/email/short/newtopic_notify.txt
index 5089e7dcb8..b9416d8e40 100644
--- a/phpBB/language/en/email/short/newtopic_notify.txt
+++ b/phpBB/language/en/email/short/newtopic_notify.txt
@@ -2,7 +2,7 @@ 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.
+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}
diff --git a/phpBB/language/en/email/short/topic_notify.txt b/phpBB/language/en/email/short/topic_notify.txt
index 529478eae2..b1ed65727c 100644
--- a/phpBB/language/en/email/short/topic_notify.txt
+++ b/phpBB/language/en/email/short/topic_notify.txt
@@ -2,7 +2,7 @@ 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.
+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}
diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt
index d5272d7416..20b86ee729 100644
--- a/phpBB/language/en/email/topic_notify.txt
+++ b/phpBB/language/en/email/topic_notify.txt
@@ -2,7 +2,7 @@ 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. No more notifications will be sent until you visit the topic.
+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. 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}
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
index 989e5fc26e..800ce3dfb7 100644
--- a/phpBB/language/en/help_bbcode.php
+++ b/phpBB/language/en/help_bbcode.php
@@ -73,11 +73,11 @@ $help = array(
),
array(
0 => 'Creating an Unordered list',
- 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul>'
+ 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul><br />Alternatively you can specify the list’s bullet style using <strong>[list=disc][/list]</strong>, <strong>[list=circle][/list]</strong>, or <strong>[list=square][/list]</strong>.'
),
array(
0 => 'Creating an Ordered list',
- 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
+ 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=A]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=i]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=I]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
),
// This block will switch the FAQ-Questions to the second template column
array(
@@ -90,7 +90,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=https://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://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>https://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://www.phpbb.com/">https://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 https://. For example typing www.phpbb.com into your message will automatically lead to <a href="https://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=https://www.phpbb.com/][img]</strong>https://www.phpbb.com/theme/images/logos/blue/160x52.png<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=https://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://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>https://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://www.phpbb.com/">https://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=https://www.phpbb.com/][img]</strong>https://www.phpbb.com/theme/images/logos/blue/160x52.png<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 => '--',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index dd22e84fcb..6477a929e9 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -44,7 +44,7 @@ $lang = array_merge($lang, array(
'ADMIN_TEST' => 'Check administrator settings',
'ADMIN_USERNAME' => 'Administrator username',
'ADMIN_USERNAME_EXPLAIN' => 'Please enter a username between 3 and 20 characters in length.',
- 'APP_MAGICK' => 'Imagemagick support [ Attachments ]',
+ 'APP_MAGICK' => 'ImageMagick support [ Attachments ]',
'AUTHOR_NOTES' => 'Author notes<br />» %s',
'AVAILABLE' => 'Available',
'AVAILABLE_CONVERTORS' => 'Available convertors',
@@ -282,7 +282,7 @@ $lang = array_merge($lang, array(
'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s (“%s”)',
'NO_CONVERTORS' => 'No convertors are available for use.',
'NO_CONVERT_SPECIFIED' => 'No convertor specified.',
- 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel',
+ 'NO_LOCATION' => 'Cannot determine location. If you know ImageMagick is installed, you may specify the location later within your administration control panel',
'NO_TABLES_FOUND' => 'No tables found.',
'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
@@ -301,10 +301,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 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_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 5.3.3 of PHP (PHP 7 is not supported) 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 >= 5.3.3',
+ 'PHP_VERSION_REQD' => 'PHP version: >= 5.3.3, < 7.0.0-dev',
'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',
@@ -400,6 +400,7 @@ $lang = array_merge($lang, array(
'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.',
+ 'DATABASE_VERSION' => 'Database version',
'DELETE_USER_REMOVE' => 'Delete user and remove posts',
'DELETE_USER_RETAIN' => 'Delete user but keep posts',
'DESTINATION' => 'Destination file',
@@ -439,6 +440,7 @@ $lang = array_merge($lang, array(
'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files are not modified and represent the original phpBB files from the version you want to update from.',
'FILES_UP_TO_DATE' => 'Already updated files',
'FILES_UP_TO_DATE_EXPLAIN' => 'The following files are already up to date and do not need to be updated.',
+ 'FILES_VERSION' => 'Files Version',
'FTP_SETTINGS' => 'FTP settings',
'FTP_UPDATE_METHOD' => 'FTP upload',
@@ -486,6 +488,7 @@ $lang = array_merge($lang, array(
'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.',
'PACKAGE_UPDATES_TO' => 'Current package updates to version',
+ 'PACKAGE_VERSION' => 'Package version installed',
'PERFORM_DATABASE_UPDATE' => 'Perform database update',
'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update has been performed just follow the instructions to continue the update process.',
'PREVIOUS_VERSION' => 'Previous version',
@@ -530,6 +533,12 @@ $lang = array_merge($lang, array(
'UPDATE_DATABASE_SCHEMA' => 'Updating database schema',
'UPDATE_FILES' => 'Update files',
'UPDATE_FILES_NOTICE' => 'Please make sure you have updated your board files too, this file is only updating your database.',
+ 'UPDATE_INCOMPLETE' => 'Your phpBB installation has not been correctly updated.',
+ 'UPDATE_INCOMPLETE_MORE' => 'Please read the information below in order to fix this error.',
+ 'UPDATE_INCOMPLETE_EXPLAIN' => '<h1>Incomplete update</h1>
+
+ <p>We noticed that the last update of your phpBB installation hasn’t been completed. Visit the <a href="%1$s" title="%1$s">database_update script</a> and run it. If it is missing, please <a href="https://www.phpbb.com/downloads/" title="phpBB downloads">download your package version</a>, upload the "install" folder to your phpBB root directory (where your config.php file is) and <a href="%1$s" title="%1$s">run the database update script</a>.</p>',
+
'UPDATE_INSTALLATION' => 'Update phpBB installation',
'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
'UPDATE_INSTRUCTIONS' => '
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index 5605f8f4b5..c7b2bf55d1 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -101,6 +101,7 @@ $lang = array_merge($lang, array(
'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.',
+ 'MANAGE_GROUP' => 'Manage Group',
'MORE_THAN' => 'More than',
'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.',
diff --git a/phpBB/language/en/migrator.php b/phpBB/language/en/migrator.php
index 244a5faadf..b3b5995cc0 100644
--- a/phpBB/language/en/migrator.php
+++ b/phpBB/language/en/migrator.php
@@ -50,6 +50,7 @@ $lang = array_merge($lang, array(
'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".',
'MIGRATION_NOT_VALID' => '%s is not a valid migration.',
'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %1$s; Time: %2$.2f seconds',
+ 'MIGRATION_SCHEMA_IN_PROGRESS' => 'Installing Schema: %1$s; Time: %2$.2f seconds',
'MIGRATION_SCHEMA_RUNNING' => 'Installing Schema: %s.',
'MIGRATION_INVALID_DATA_MISSING_CONDITION' => 'A migration is invalid. An if statement helper is missing a condition.',
@@ -60,9 +61,12 @@ $lang = array_merge($lang, array(
'MIGRATION_INVALID_DATA_UNDEFINED_METHOD' => 'A migration is invalid. An undefined migration tool method was encountered.',
'MODULE_ERROR' => 'An error occurred while creating a module: %s',
+ 'MODULE_EXISTS' => 'A module already exists: %s',
+ 'MODULE_EXIST_MULTIPLE' => 'Several modules with the given parent module langname already exist: %s. Try using before/after keys to clarify the module placement.',
'MODULE_INFO_FILE_NOT_EXIST' => 'A required module info file is missing: %2$s',
'MODULE_NOT_EXIST' => 'A required module does not exist: %s',
+ 'PARENT_MODULE_FIND_ERROR' => 'Unable to determine the parent module identifier: %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/posting.php b/phpBB/language/en/posting.php
index 924395ed44..ef52f59753 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -90,14 +90,20 @@ $lang = array_merge($lang, array(
'DELETE_PERMANENTLY' => 'Delete permanently',
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
'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_POST_PERMANENTLY' => array(
+ 1 => 'Permanently delete this post so it can not be recovered',
+ 2 => 'Permanently delete %1$d posts so they 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' => 'Reason for deletion',
'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' => array(
+ 1 => 'Permanently delete this topic so it can not be recovered',
+ 2 => 'Permanently delete %1$d topics so they 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?',
diff --git a/phpBB/language/en/search_ignore_words.php b/phpBB/language/en/search_ignore_words.php
deleted file mode 100644
index 3db209d120..0000000000
--- a/phpBB/language/en/search_ignore_words.php
+++ /dev/null
@@ -1,271 +0,0 @@
-<?php
-/**
-*
-* This file is part of the phpBB Forum Software package.
-*
-* @copyright (c) phpBB Limited <https://www.phpbb.com>
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-* For full copyright and license information, please see
-* the docs/CREDITS.txt file.
-*
-*/
-
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-$words = array(
- 'a',
- 'about',
- 'after',
- 'ago',
- 'all',
- 'almost',
- 'along',
- 'alot',
- 'also',
- 'am',
- 'an',
- 'and',
- 'answer',
- 'any',
- 'anybody',
- 'anybodys',
- 'anywhere',
- 'are',
- 'arent',
- 'around',
- 'as',
- 'ask',
- 'askd',
- 'at',
- 'bad',
- 'be',
- 'because',
- 'been',
- 'before',
- 'being',
- 'best',
- 'better',
- 'between',
- 'big',
- 'btw',
- 'but',
- 'by',
- 'can',
- 'cant',
- 'come',
- 'could',
- 'couldnt',
- 'day',
- 'days',
- 'days',
- 'did',
- 'didnt',
- 'do',
- 'does',
- 'doesnt',
- 'dont',
- 'down',
- 'each',
- 'etc',
- 'either',
- 'else',
- 'even',
- 'ever',
- 'every',
- 'everybody',
- 'everybodys',
- 'everyone',
- 'far',
- 'find',
- 'for',
- 'found',
- 'from',
- 'get',
- 'go',
- 'going',
- 'gone',
- 'good',
- 'got',
- 'gotten',
- 'had',
- 'has',
- 'have',
- 'havent',
- 'having',
- 'her',
- 'here',
- 'hers',
- 'him',
- 'his',
- 'home',
- 'how',
- 'hows',
- 'href',
- 'I',
- 'Ive',
- 'if',
- 'in',
- 'ini',
- 'into',
- 'is',
- 'isnt',
- 'it',
- 'its',
- 'its',
- 'just',
- 'know',
- 'large',
- 'less',
- 'like',
- 'liked',
- 'little',
- 'looking',
- 'look',
- 'looked',
- 'looking',
- 'lot',
- 'maybe',
- 'many',
- 'me',
- 'more',
- 'most',
- 'much',
- 'must',
- 'mustnt',
- 'my',
- 'near',
- 'need',
- 'never',
- 'new',
- 'news',
- 'no',
- 'none',
- 'not',
- 'nothing',
- 'now',
- 'of',
- 'off',
- 'often',
- 'old',
- 'on',
- 'once',
- 'only',
- 'oops',
- 'or',
- 'other',
- 'our',
- 'ours',
- 'out',
- 'over',
- 'page',
- 'please',
- 'put',
- 'question',
- 'questions',
- 'questioned',
- 'quote',
- 'rather',
- 'really',
- 'recent',
- 'said',
- 'saw',
- 'say',
- 'says',
- 'she',
- 'see',
- 'sees',
- 'should',
- 'sites',
- 'small',
- 'so',
- 'some',
- 'something',
- 'sometime',
- 'somewhere',
- 'soon',
- 'take',
- 'than',
- 'true',
- 'thank',
- 'that',
- 'thatd',
- 'thats',
- 'the',
- 'their',
- 'theirs',
- 'theres',
- 'theirs',
- 'them',
- 'then',
- 'there',
- 'these',
- 'they',
- 'theyll',
- 'theyd',
- 'theyre',
- 'this',
- 'those',
- 'though',
- 'through',
- 'thus',
- 'time',
- 'times',
- 'to',
- 'too',
- 'under',
- 'until',
- 'untrue',
- 'up',
- 'upon',
- 'use',
- 'users',
- 'version',
- 'very',
- 'via',
- 'want',
- 'was',
- 'way',
- 'we',
- 'well',
- 'went',
- 'were',
- 'werent',
- 'what',
- 'when',
- 'where',
- 'which',
- 'who',
- 'whom',
- 'whose',
- 'why',
- 'wide',
- 'will',
- 'with',
- 'within',
- 'without',
- 'wont',
- 'world',
- 'worse',
- 'worst',
- 'would',
- 'wrote',
- 'www',
- 'yes',
- 'yet',
- 'you',
- 'youd',
- 'youll',
- 'your',
- 'youre',
- 'yours',
- 'AFAIK',
- 'IIRC',
- 'LOL',
- 'ROTF',
- 'ROTFLMAO',
- 'YMMV',
-);
diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php
deleted file mode 100644
index 6a8c257f0b..0000000000
--- a/phpBB/language/en/search_synonyms.php
+++ /dev/null
@@ -1,191 +0,0 @@
-<?php
-/**
-*
-* This file is part of the phpBB Forum Software package.
-*
-* @copyright (c) phpBB Limited <https://www.phpbb.com>
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-* For full copyright and license information, please see
-* the docs/CREDITS.txt file.
-*
-*/
-
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-$synonyms = array(
- 'abcense' => 'absence',
- 'abridgement' => 'abridgment',
- 'accomodate' => 'accommodate',
- 'acknowledgment' => 'acknowledgement',
- 'airplane' => 'aeroplane',
- 'allright' => 'alright ',
- 'andy' => 'andrew',
- 'anemia' => 'anaemia',
- 'anemic' => 'anaemic',
- 'anesthesia' => 'anaesthesia',
- 'apologize' => 'apologise',
- 'archean' => 'archaean',
- 'archeology' => 'archaeology',
- 'archeozoic' => 'archaeozoic',
- 'armor' => 'armour',
- 'artic' => 'arctic',
- 'attachment' => 'attachement',
- 'attendence' => 'attendance',
-
- 'barbecue' => 'barbeque',
- 'behavior' => 'behaviour',
- 'biassed' => 'biased',
- 'biol' => 'biology',
- 'buletin' => 'bulletin',
-
- 'calender' => 'calendar',
- 'canceled' => 'cancelled',
- 'car' => 'automobile',
- 'catalog' => 'catalogue',
- 'cenozoic' => 'caenozoic',
- 'center' => 'centre',
- 'check' => 'cheque',
- 'color' => 'colour',
- 'comission' => 'commission',
- 'comittee' => 'committee',
- 'commitee' => 'committee',
- 'conceed' => 'concede',
- 'creating' => 'createing',
- 'curiculum' => 'curriculum',
-
- 'defense' => 'defence',
- 'develope' => 'develop',
- 'discription' => 'description',
- 'dulness' => 'dullness',
-
- 'encyclopedia' => 'encyclopaedia',
- 'enroll' => 'enrol',
- 'esthetic' => 'aesthetic',
- 'etiology' => 'aetiology',
- 'exhorbitant' => 'exorbitant',
- 'exhuberant' => 'exuberant',
- 'existance' => 'existence',
-
- 'favorite' => 'favourite',
- 'fetus' => 'foetus',
- 'ficticious' => 'fictitious',
- 'flavor' => 'flavour',
- 'flourescent' => 'fluorescent',
- 'foriegn' => 'foreign',
- 'fourty' => 'forty',
-
- 'gage' => 'gauge',
- 'geneology' => 'genealogy',
- 'grammer' => 'grammar',
- 'gray' => 'grey',
- 'guerilla' => 'guerrilla',
- 'gynecology' => 'gynaecology',
-
- 'harbor' => 'harbour',
- 'heighth' => 'height',
- 'hemaglobin' => 'haemaglobin',
- 'hematin' => 'haematin',
- 'hematite' => 'haematite',
- 'hematology' => 'haematology',
- 'honor' => 'honour',
-
- 'innoculate' => 'inoculate',
- 'installment' => 'instalment',
- 'irrelevent' => 'irrelevant',
- 'irrevelant' => 'irrelevant',
-
- 'jeweler' => 'jeweller',
- 'judgment' => 'judgement',
-
- 'labeled' => 'labelled',
- 'labor' => 'labour',
- 'laborer' => 'labourer',
- 'laborers' => 'labourers',
- 'laboring' => 'labouring',
- 'licence' => 'license',
- 'liesure' => 'leisure',
- 'liquify' => 'liquefy',
-
- 'maintainance' => 'maintenance',
- 'maintenence' => 'maintenance',
- 'medieval' => 'mediaeval',
- 'meter' => 'metre',
- 'milage' => 'mileage',
- 'millipede' => 'millepede',
- 'miscelaneous' => 'miscellaneous',
- 'morgage' => 'mortgage',
-
- 'noticable' => 'noticeable',
-
- 'occurence' => 'occurrence',
- 'offense' => 'offence',
- 'ommision' => 'omission',
- 'ommission' => 'omission',
- 'optimize' => 'optimise',
- 'organize' => 'organise',
-
- 'pajamas' => 'pyjamas',
- 'paleography' => 'palaeography',
- 'paleolithic' => 'palaeolithic',
- 'paleontological' => 'palaeontological',
- 'paleontologist' => 'palaeontologist',
- 'paleontology' => 'palaeontology',
- 'paleozoic' => 'palaeozoic',
- 'pamplet' => 'pamphlet',
- 'paralell' => 'parallel',
- 'parl' => 'parliament',
- 'parlt' => 'parliament',
- 'pediatric' => 'paediatric',
- 'pediatrician' => 'paediatrician',
- 'pediatrics' => 'paediatrics',
- 'pedodontia' => 'paedodontia',
- 'pedodontics' => 'paedodontics',
- 'personel' => 'personnel',
- 'practise' => 'practice',
- 'program' => 'programme',
- 'psych' => 'psychology',
-
- 'questionaire' => 'questionnaire',
-
- 'rarify' => 'rarefy',
- 'reccomend' => 'recommend',
- 'recieve' => 'receive',
- 'resistence' => 'resistance',
- 'restaraunt' => 'restaurant',
-
- 'savior' => 'saviour',
- 'sep' => 'september',
- 'seperate' => 'separate',
- 'sept' => 'september',
- 'sieze' => 'seize',
- 'summarize' => 'summarise',
- 'summerize' => 'summarise',
- 'superceed' => 'supercede',
- 'superintendant' => 'superintendent',
- 'supersede' => 'supercede',
- 'suprise' => 'surprise',
- 'surprize' => 'surprise',
- 'synchronise' => 'synchronize',
-
- 'temperary' => 'temporary',
- 'theater' => 'theatre',
- 'threshhold' => 'threshold',
- 'transfered' => 'transferred',
- 'truely' => 'truly',
- 'truley' => 'truly',
-
- 'useable' => 'usable',
-
- 'valor' => 'valour',
- 'vigor' => 'vigour',
- 'vol' => 'volume',
-
- 'whack' => 'wack',
- 'withold' => 'withhold',
-
- 'yeild' => 'yield',
-);
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 07751d1f7f..59525c6b16 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -66,7 +66,7 @@ $lang = array_merge($lang, array(
'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' => '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 and also be sure to check your junk mail box. It may take a while to get the email depending on your email provider.',
'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.',
@@ -339,7 +339,7 @@ $lang = array_merge($lang, array(
'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',
+ 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'User requiring activation',
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index e64dab635b..b93476b3bb 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -90,6 +90,12 @@ $default_key = 'c';
$sort_key = request_var('sk', $default_key);
$sort_dir = request_var('sd', 'a');
+$user_types = array(USER_NORMAL, USER_FOUNDER);
+if ($auth->acl_get('a_user'))
+{
+ $user_types[] = USER_INACTIVE;
+}
+
// What do you want to do today? ... oops, I think that line is taken ...
switch ($mode)
{
@@ -151,7 +157,7 @@ switch ($mode)
$db->sql_freeresult($result);
$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',
+ 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_type, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id',
'FROM' => array(
USER_GROUP_TABLE => 'ug',
@@ -314,6 +320,8 @@ switch ($mode)
'RANK_IMG' => $user_rank_data['img'],
'RANK_IMG_SRC' => $user_rank_data['img_src'],
+ 'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,
+
'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']),
@@ -832,7 +840,7 @@ switch ($mode)
$sql = 'SELECT username, user_id, user_colour
FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . '
+ WHERE ' . $db->sql_in_set('user_type', $user_types) . '
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
$result = $db->sql_query_limit($sql, 10);
$user_list = array();
@@ -1025,6 +1033,23 @@ switch ($mode)
FROM ' . POSTS_TABLE . '
WHERE poster_ip ' . ((strpos($ips, '%') !== false) ? 'LIKE' : 'IN') . " ($ips)
AND " . $db->sql_in_set('forum_id', $ip_forums);
+
+ /**
+ * Modify sql query for members search by ip address / hostname
+ *
+ * @event core.memberlist_modify_ip_search_sql_query
+ * @var string ipdomain The host name
+ * @var string ips IP address list for the given host name
+ * @var string sql The SQL query for searching members by IP address
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'ipdomain',
+ 'ips',
+ 'sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_ip_search_sql_query', compact($vars)));
+
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
@@ -1069,7 +1094,7 @@ switch ($mode)
if ($mode == 'group')
{
// We JOIN here to save a query for determining membership for hidden groups. ;)
- $sql = 'SELECT g.*, ug.user_id
+ $sql = 'SELECT g.*, ug.user_id, ug.group_leader
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id'] . " AND ug.group_id = $group_id)
WHERE g.group_id = $group_id";
@@ -1128,6 +1153,24 @@ switch ($mode)
$user_rank_data['img'] .= '<br />';
}
}
+ // include modules for manage groups link display or not
+ // need to ensure the module is active
+ $can_manage_group = false;
+ if ($user->data['is_registered'] && $group_row['group_leader'])
+ {
+ if (!class_exists('p_master'))
+ {
+ include($phpbb_root_path . 'includes/functions_module.' . $phpEx);
+ }
+ $module = new p_master;
+ $module->list_modules('ucp');
+
+ if ($module->is_active('ucp_groups', 'manage'))
+ {
+ $can_manage_group = true;
+ }
+ unset($module);
+ }
$template->assign_vars(array(
'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
@@ -1140,7 +1183,8 @@ switch ($mode)
'RANK_IMG' => $user_rank_data['img'],
'RANK_IMG_SRC' => $user_rank_data['img_src'],
- 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
+ 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',
+ 'U_MANAGE' => ($can_manage_group) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_groups&amp;mode=manage') : false,)
);
$sql_select = ', ug.group_leader';
@@ -1165,21 +1209,40 @@ switch ($mode)
$order_by .= ', u.user_posts DESC';
}
+ /**
+ * Modify sql query data for members search
+ *
+ * @event core.memberlist_modify_sql_query_data
+ * @var string order_by SQL ORDER BY clause condition
+ * @var string sort_dir The sorting direction
+ * @var string sort_key The sorting key
+ * @var array sort_key_sql Arraty with the sorting conditions data
+ * @var string sql_from SQL FROM clause condition
+ * @var string sql_select SQL SELECT fields list
+ * @var string sql_where SQL WHERE clause condition
+ * @var string sql_where_data SQL WHERE clause additional conditions data
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'order_by',
+ 'sort_dir',
+ 'sort_key',
+ 'sort_key_sql',
+ 'sql_from',
+ 'sql_select',
+ 'sql_where',
+ 'sql_where_data',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_sql_query_data', compact($vars)));
+
// Count the users ...
- if ($sql_where)
- {
- $sql = 'SELECT COUNT(u.user_id) AS total_users
- FROM ' . USERS_TABLE . " u$sql_from
- WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
- $sql_where";
- $result = $db->sql_query($sql);
- $total_users = (int) $db->sql_fetchfield('total_users');
- $db->sql_freeresult($result);
- }
- else
- {
- $total_users = $config['num_users'];
- }
+ $sql = 'SELECT COUNT(u.user_id) AS total_users
+ FROM ' . USERS_TABLE . " u$sql_from
+ WHERE " . $db->sql_in_set('u.user_type', $user_types) . "
+ $sql_where";
+ $result = $db->sql_query($sql);
+ $total_users = (int) $db->sql_fetchfield('total_users');
+ $db->sql_freeresult($result);
// Build a relevant pagination_url
$params = $sort_params = array();
@@ -1215,7 +1278,8 @@ switch ($mode)
}
$param = call_user_func_array('request_var', $call);
- $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param);
+ // Encode strings, convert everything else to int in order to prevent empty parameters.
+ $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : (int) $param);
$params[] = $param;
if ($key != 'first_char')
@@ -1345,13 +1409,13 @@ switch ($mode)
);
}
- $start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']);
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $total_users);
// Get us some users :D
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u
$sql_from
- WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
+ WHERE " . $db->sql_in_set('u.user_type', $user_types) . "
$sql_where
ORDER BY $order_by";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -1448,6 +1512,20 @@ switch ($mode)
usort($user_list, 'phpbb_sort_last_active');
}
+ // do we need to display contact fields as such
+ $use_contact_fields = false;
+
+ /**
+ * Modify list of users before member row is created
+ *
+ * @event core.memberlist_memberrow_before
+ * @var array user_list Array containing list of users
+ * @var bool use_contact_fields Should we display contact fields as such?
+ * @since 3.1.7-RC1
+ */
+ $vars = array('user_list', 'use_contact_fields');
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_memberrow_before', compact($vars)));
+
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
{
$user_id = $user_list[$i];
@@ -1458,7 +1536,7 @@ switch ($mode)
$cp_row = array();
if ($config['load_cpf_memberlist'])
{
- $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
+ $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], $use_contact_fields) : array();
}
$memberrow = array_merge(phpbb_show_profile($row, false, false, false), array(
@@ -1466,6 +1544,7 @@ switch ($mode)
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
'S_GROUP_LEADER' => $is_leader,
+ 'S_INACTIVE' => $row['user_type'] == USER_INACTIVE,
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $row['username']),
));
@@ -1505,12 +1584,12 @@ switch ($mode)
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '',
'U_LIVE_SEARCH' => ($config['allow_live_searches']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch') : false,
'U_SORT_USERNAME' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'a' && $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_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'),
+ 'U_SORT_JOINED' => $sort_url . '&amp;sk=c&amp;sd=' . (($sort_key == 'c' && $sort_dir == 'd') ? 'a' : 'd'),
+ 'U_SORT_POSTS' => $sort_url . '&amp;sk=d&amp;sd=' . (($sort_key == 'd' && $sort_dir == 'd') ? 'a' : 'd'),
+ 'U_SORT_EMAIL' => $sort_url . '&amp;sk=e&amp;sd=' . (($sort_key == 'e' && $sort_dir == 'd') ? 'a' : 'd'),
+ 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&amp;sk=l&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd') : '',
+ 'U_SORT_RANK' => $sort_url . '&amp;sk=m&amp;sd=' . (($sort_key == 'm' && $sort_dir == 'd') ? 'a' : 'd'),
+ 'U_LIST_CHAR' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd'),
'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
'S_VIEWONLINE' => $auth->acl_get('u_viewonline'),
diff --git a/phpBB/phpbb/auth/auth.php b/phpBB/phpbb/auth/auth.php
index b59f0e60ec..b7634e04ce 100644
--- a/phpBB/phpbb/auth/auth.php
+++ b/phpBB/phpbb/auth/auth.php
@@ -928,6 +928,7 @@ class auth
function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
{
global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
+ global $phpbb_dispatcher;
$provider_collection = $phpbb_container->get('auth.provider_collection');
@@ -982,6 +983,24 @@ class auth
redirect($url);
}
+ /**
+ * Event is triggered after checking for valid username and password, and before the actual session creation.
+ *
+ * @event core.auth_login_session_create_before
+ * @var array login Variable containing login array
+ * @var bool admin Boolean variable whether user is logging into the ACP
+ * @var string username Username of user to log in
+ * @var bool autologin Boolean variable signaling whether login is triggered via auto login
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'login',
+ 'admin',
+ 'username',
+ 'autologin',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.auth_login_session_create_before', compact($vars)));
+
// If login succeeded, we will log the user in... else we pass the login array through...
if ($login['status'] == LOGIN_SUCCESS)
{
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index be0fbf5831..bd2a414033 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -98,6 +98,13 @@ class oauth extends \phpbb\auth\provider\base
protected $phpbb_container;
/**
+ * phpBB event dispatcher
+ *
+ * @var \phpbb\event\dispatcher_interface
+ */
+ protected $dispatcher;
+
+ /**
* phpBB root path
*
* @var string
@@ -124,10 +131,11 @@ class oauth extends \phpbb\auth\provider\base
* @param \phpbb\di\service_collection $service_providers Contains \phpbb\auth\provider\oauth\service_interface
* @param string $users_table
* @param \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container DI container
+ * @param \phpbb\event\dispatcher_interface $dispatcher phpBB event dispatcher
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(\phpbb\db\driver\driver_interface $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, \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\db\driver\driver_interface $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, \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container, \phpbb\event\dispatcher_interface $dispatcher, $phpbb_root_path, $php_ext)
{
$this->db = $db;
$this->config = $config;
@@ -139,6 +147,7 @@ class oauth extends \phpbb\auth\provider\base
$this->service_providers = $service_providers;
$this->users_table = $users_table;
$this->phpbb_container = $phpbb_container;
+ $this->dispatcher = $dispatcher;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
}
@@ -238,6 +247,18 @@ class oauth extends \phpbb\auth\provider\base
// Update token storage to store the user_id
$storage->set_user_id($row['user_id']);
+ /**
+ * Event is triggered after user is successfuly logged in via OAuth.
+ *
+ * @event core.auth_oauth_login_after
+ * @var array row User row
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'row',
+ );
+ extract($this->dispatcher->trigger_event('core.auth_oauth_login_after', compact($vars)));
+
// The user is now authenticated and can be logged in
return array(
'status' => LOGIN_SUCCESS,
@@ -271,7 +292,13 @@ class oauth extends \phpbb\auth\provider\base
}
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
- $current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(\phpbb\request\request_interface::SERVER));
+ $super_globals = $this->request->get_super_global(\phpbb\request\request_interface::SERVER);
+ if (!empty($super_globals['HTTP_X_FORWARDED_PROTO']) && $super_globals['HTTP_X_FORWARDED_PROTO'] === 'https')
+ {
+ $super_globals['HTTPS'] = 'on';
+ $super_globals['SERVER_PORT'] = 443;
+ }
+ $current_uri = $uri_factory->createFromSuperGlobalArray($super_globals);
$current_uri->setQuery($query);
$this->current_uri = $current_uri;
@@ -536,6 +563,18 @@ class oauth extends \phpbb\auth\provider\base
$sql = 'INSERT INTO ' . $this->auth_provider_oauth_token_account_assoc . '
' . $this->db->sql_build_array('INSERT', $data);
$this->db->sql_query($sql);
+
+ /**
+ * Event is triggered after user links account.
+ *
+ * @event core.auth_oauth_link_after
+ * @var array data User row
+ * @since 3.1.11-RC1
+ */
+ $vars = array(
+ 'data',
+ );
+ extract($this->dispatcher->trigger_event('core.auth_oauth_link_after', compact($vars)));
}
/**
diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php
index b3ced7edf7..ad186635f2 100644
--- a/phpBB/phpbb/avatar/driver/driver.php
+++ b/phpBB/phpbb/avatar/driver/driver.php
@@ -120,6 +120,22 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
}
/**
+ * {@inheritdoc}
+ */
+ public function get_config_name()
+ {
+ return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($this));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_acp_template_name()
+ {
+ return 'acp_avatar_options_' . $this->get_config_name() . '.html';
+ }
+
+ /**
* Sets the name of the driver.
*
* @param string $name Driver name
diff --git a/phpBB/phpbb/avatar/driver/driver_interface.php b/phpBB/phpbb/avatar/driver/driver_interface.php
index 835609745a..7d6c2cff8a 100644
--- a/phpBB/phpbb/avatar/driver/driver_interface.php
+++ b/phpBB/phpbb/avatar/driver/driver_interface.php
@@ -26,6 +26,13 @@ interface driver_interface
public function get_name();
/**
+ * Returns the config name of the driver. To be used in accessing the CONFIG variables.
+ *
+ * @return string Config name of driver.
+ */
+ public function get_config_name();
+
+ /**
* Get the avatar url and dimensions
*
* @param array $row User data or group data that has been cleaned with
@@ -110,4 +117,11 @@ interface driver_interface
* @return string Avatar driver's template name
*/
public function get_template_name();
+
+ /**
+ * Get the avatar driver's template name (ACP)
+ *
+ * @return string Avatar driver's template name
+ */
+ public function get_acp_template_name();
}
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
index 2082e0fd02..7a43b55852 100644
--- a/phpBB/phpbb/avatar/driver/gravatar.php
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -52,8 +52,8 @@ class gravatar extends \phpbb\avatar\driver\driver
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_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''),
+ 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', ''),
'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '',
));
@@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver
*/
protected function get_gravatar_url($row)
{
+ global $phpbb_dispatcher;
+
$url = self::GRAVATAR_URL;
$url .= md5(strtolower(trim($row['avatar'])));
@@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver
$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
}
+ /**
+ * Modify gravatar url
+ *
+ * @event core.get_gravatar_url_after
+ * @var string row User data or group data
+ * @var string url Gravatar URL
+ * @since 3.1.7-RC1
+ */
+ $vars = array('row', 'url');
+ extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars)));
+
return $url;
}
}
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index 36087f8ba0..75c384f31e 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -84,11 +84,13 @@ class local extends \phpbb\avatar\driver\driver
'AVATAR_IMAGE' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $img['file'],
'AVATAR_NAME' => $img['name'],
'AVATAR_FILE' => $img['filename'],
+ 'CHECKED' => $img['file'] === $row['avatar'],
));
$template->assign_block_vars('avatar_local_row.avatar_local_option', array(
'AVATAR_FILE' => $img['filename'],
- 'S_OPTIONS_AVATAR' => $img['filename']
+ 'S_OPTIONS_AVATAR' => $img['filename'],
+ 'CHECKED' => $img['file'] === $row['avatar'],
));
$col_count = ($col_count + 1) % $table_cols;
@@ -182,7 +184,7 @@ class local extends \phpbb\avatar\driver\driver
}
$cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path);
$avatar_list[$cat][$image] = array(
- 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
+ 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? str_replace('%2F', '/', rawurlencode($cat)) . '/' . rawurlencode($image) : rawurlencode($image),
'filename' => rawurlencode($image),
'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $image))),
'width' => $dims[0],
diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php
index 4b0ee3f06f..bec54897b2 100644
--- a/phpBB/phpbb/avatar/driver/remote.php
+++ b/phpBB/phpbb/avatar/driver/remote.php
@@ -36,8 +36,8 @@ class remote extends \phpbb\avatar\driver\driver
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_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', ''),
+ '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', ''),
'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '',
));
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index a1d84345e1..cb8dfcad4f 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -53,7 +53,7 @@ class upload extends \phpbb\avatar\driver\driver
/**
* {@inheritdoc}
*/
- public function get_data($row, $ignore_config = false)
+ public function get_data($row)
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
@@ -167,17 +167,29 @@ class upload extends \phpbb\avatar\driver\driver
$destination = '';
}
+ $filedata = array(
+ 'filename' => $file->get('filename'),
+ 'filesize' => $file->get('filesize'),
+ 'mimetype' => $file->get('mimetype'),
+ 'extension' => $file->get('extension'),
+ 'physical_filename' => $file->get('realname'),
+ 'real_filename' => $file->get('uploadname'),
+ );
+
/**
* Before moving new file in place (and eventually overwriting the existing avatar with the newly uploaded avatar)
*
* @event core.avatar_driver_upload_move_file_before
+ * @var array filedata Array containing uploaded file data
* @var string destination Destination directory where the file is going to be moved
* @var string prefix Prefix for the avatar filename
* @var array row Array with avatar row data
* @var array error Array of errors, if filled in by this event file will not be moved
* @since 3.1.6-RC1
+ * @changed 3.1.9-RC1 Added filedata
*/
$vars = array(
+ 'filedata',
'destination',
'prefix',
'row',
@@ -185,6 +197,8 @@ class upload extends \phpbb\avatar\driver\driver
);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars)));
+ unset($filedata);
+
if (!sizeof($error))
{
// Move file and overwrite any existing image
diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php
index 8d83152ed6..26eb17c265 100644
--- a/phpBB/phpbb/avatar/manager.php
+++ b/phpBB/phpbb/avatar/manager.php
@@ -246,7 +246,7 @@ class manager
*/
public function is_enabled($driver)
{
- $config_name = $this->get_driver_config_name($driver);
+ $config_name = $driver->get_config_name();
return $this->config["allow_avatar_{$config_name}"];
}
@@ -260,7 +260,7 @@ class manager
*/
public function get_avatar_settings($driver)
{
- $config_name = $this->get_driver_config_name($driver);
+ $config_name = $driver->get_config_name();
return array(
'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@@ -268,18 +268,6 @@ class manager
}
/**
- * 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
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php
index 4c20ad916d..53c50eeda3 100644
--- a/phpBB/phpbb/cache/driver/base.php
+++ b/phpBB/phpbb/cache/driver/base.php
@@ -61,6 +61,11 @@ abstract class base implements \phpbb\cache\driver\driver_interface
unset($this->sql_rowset);
unset($this->sql_row_pointer);
+ if (function_exists('opcache_reset'))
+ {
+ @opcache_reset();
+ }
+
$this->vars = array();
$this->sql_rowset = array();
$this->sql_row_pointer = array();
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index 9a7c4aec7f..fae4614039 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -568,6 +568,11 @@ class file extends \phpbb\cache\driver\base
fclose($handle);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($file);
+ }
+
if (!function_exists('phpbb_chmod'))
{
global $phpbb_root_path;
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index 2771369e57..a9d133d8f2 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -100,6 +100,28 @@ class qa
$db->sql_freeresult($result);
}
+ // final fallback to any language
+ if (!sizeof($this->question_ids))
+ {
+ $this->question_lang = '';
+
+ $sql = 'SELECT q.question_id, q.lang_iso
+ FROM ' . $this->table_captcha_questions . ' q, ' . $this->table_captcha_answers . ' a
+ WHERE q.question_id = a.question_id
+ GROUP BY lang_iso';
+ $result = $db->sql_query($sql, 7200);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if (empty($this->question_lang))
+ {
+ $this->question_lang = $row['lang_iso'];
+ }
+ $this->question_ids[$row['question_id']] = $row['question_id'];
+ }
+ $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()))
{
@@ -198,19 +220,25 @@ class qa
*/
function get_template()
{
- global $template;
+ global $phpbb_log, $template, $user;
if ($this->is_solved())
{
return false;
}
+ else if (empty($this->question_text) || !count($this->question_ids))
+ {
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
+ return false;
+ }
else
{
$template->assign_vars(array(
- 'QA_CONFIRM_QUESTION' => $this->question_text,
- 'QA_CONFIRM_ID' => $this->confirm_id,
- 'S_CONFIRM_CODE' => true,
- 'S_TYPE' => $this->type,
+ 'QA_CONFIRM_QUESTION' => $this->question_text,
+ 'QA_CONFIRM_ID' => $this->confirm_id,
+ 'S_CONFIRM_CODE' => true,
+ 'S_TYPE' => $this->type,
));
return 'captcha_qa.html';
@@ -364,13 +392,15 @@ class qa
*/
function validate()
{
- global $user;
+ global $phpbb_log, $user;
$error = '';
if (!sizeof($this->question_ids))
{
- return false;
+ /** @var \phpbb\log\log_interface $phpbb_log */
+ $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));
+ return $user->lang('CONFIRM_QUESTION_MISSING');
}
if (!$this->confirm_id)
diff --git a/phpBB/phpbb/composer.json b/phpBB/phpbb/composer.json
index 513d7e4559..6b3888ef64 100644
--- a/phpBB/phpbb/composer.json
+++ b/phpBB/phpbb/composer.json
@@ -23,5 +23,10 @@
},
"require": {
"php": ">=5.3.3"
- }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev"
+ }
+ }
}
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
index 72ad1205ef..a9648fcd41 100644
--- a/phpBB/phpbb/console/command/cron/run.php
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -50,6 +50,7 @@ class run extends \phpbb\console\command\command
$this
->setName('cron:run')
->setDescription($this->user->lang('CLI_DESCRIPTION_CRON_RUN'))
+ ->setHelp($this->user->lang('CLI_HELP_CRON_RUN'))
->addArgument('name', InputArgument::OPTIONAL, $this->user->lang('CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1'))
;
}
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 0ba0489cb7..bf7dc2c703 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -417,13 +417,46 @@ class content_visibility
return array();
}
+ if (!function_exists('truncate_string'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_content.' . $this->php_ext);
+ }
+
$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),
);
-
+ /**
+ * Perform actions right before the query to change post visibility
+ *
+ * @event core.set_post_visibility_before_sql
+ * @var int visibility Element of {ITEM_APPROVED, ITEM_DELETED, ITEM_REAPPROVE}
+ * @var array post_id Array containing all post IDs to be modified. If blank, all posts within the topic are modified.
+ * @var int topic_id Topic of the post IDs to be modified.
+ * @var int forum_id Forum ID that the topic_id resides in.
+ * @var int user_id User ID doing this action.
+ * @var int timestamp Timestamp of this action.
+ * @var string reason Reason specified by the user for this change.
+ * @var bool is_starter Are we changing the topic's starter?
+ * @var bool is_latest Are we changing the topic's latest post?
+ * @var array data The data array for this action.
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'visibility',
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'user_id',
+ 'timestamp',
+ 'reason',
+ 'is_starter',
+ 'is_latest',
+ 'data',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.set_post_visibility_before_sql', compact($vars)));
$sql = 'UPDATE ' . $this->posts_table . '
SET ' . $this->db->sql_build_array('UPDATE', $data) . '
WHERE ' . $this->db->sql_in_set('post_id', $post_ids);
@@ -580,7 +613,35 @@ class content_visibility
WHERE topic_id = ' . (int) $topic_id;
$this->db->sql_query($sql);
}
-
+ /**
+ * Perform actions after all steps to changing post visibility
+ *
+ * @event core.set_post_visibility_after
+ * @var int visibility Element of {ITEM_APPROVED, ITEM_DELETED, ITEM_REAPPROVE}
+ * @var array post_id Array containing all post IDs to be modified. If blank, all posts within the topic are modified.
+ * @var int topic_id Topic of the post IDs to be modified.
+ * @var int forum_id Forum ID that the topic_id resides in.
+ * @var int user_id User ID doing this action.
+ * @var int timestamp Timestamp of this action.
+ * @var string reason Reason specified by the user for this change.
+ * @var bool is_starter Are we changing the topic's starter?
+ * @var bool is_latest Are we changing the topic's latest post?
+ * @var array data The data array for this action.
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'visibility',
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'user_id',
+ 'timestamp',
+ 'reason',
+ 'is_starter',
+ 'is_latest',
+ 'data',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.set_post_visibility_after', compact($vars)));
return $data;
}
@@ -628,6 +689,11 @@ class content_visibility
}
}
+ if (!function_exists('truncate_string'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_content.' . $this->php_ext);
+ }
+
// Note, we do not set a reason for the posts, just for the topic
$data = array(
'topic_visibility' => (int) $visibility,
@@ -635,7 +701,31 @@ class content_visibility
'topic_delete_time' => ((int) $time) ?: time(),
'topic_delete_reason' => truncate_string($reason, 255, 255, false),
);
-
+ /**
+ * Perform actions right before the query to change topic visibility
+ *
+ * @event core.set_topic_visibility_before_sql
+ * @var int visibility Element of {ITEM_APPROVED, ITEM_DELETED, ITEM_REAPPROVE}
+ * @var int topic_id Topic of the post IDs to be modified.
+ * @var int forum_id Forum ID that the topic_id resides in.
+ * @var int user_id User ID doing this action.
+ * @var int timestamp Timestamp of this action.
+ * @var string reason Reason specified by the user for this change.
+ * @var bool force_update_all Force an update on all posts within the topic, regardless of their current approval state.
+ * @var array data The data array for this action.
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'visibility',
+ 'topic_id',
+ 'forum_id',
+ 'user_id',
+ 'timestamp',
+ 'reason',
+ 'force_update_all',
+ 'data',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.set_topic_visibility_before_sql', compact($vars)));
$sql = 'UPDATE ' . $this->topics_table . '
SET ' . $this->db->sql_build_array('UPDATE', $data) . '
WHERE topic_id = ' . (int) $topic_id;
@@ -660,7 +750,31 @@ class content_visibility
{
$this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true);
}
-
+ /**
+ * Perform actions after all steps to changing topic visibility
+ *
+ * @event core.set_topic_visibility_after
+ * @var int visibility Element of {ITEM_APPROVED, ITEM_DELETED, ITEM_REAPPROVE}
+ * @var int topic_id Topic of the post IDs to be modified.
+ * @var int forum_id Forum ID that the topic_id resides in.
+ * @var int user_id User ID doing this action.
+ * @var int timestamp Timestamp of this action.
+ * @var string reason Reason specified by the user for this change.
+ * @var bool force_update_all Force an update on all posts within the topic, regardless of their current approval state.
+ * @var array data The data array for this action.
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'visibility',
+ 'topic_id',
+ 'forum_id',
+ 'user_id',
+ 'timestamp',
+ 'reason',
+ 'force_update_all',
+ 'data',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.set_topic_visibility_after', compact($vars)));
return $data;
}
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index a07a396e73..ce6bfba981 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -71,7 +71,8 @@ class helper
* @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 \phpbb\controller\provider $provider Path provider
* @param \phpbb\extension\manager $manager Extension manager object
* @param \phpbb\symfony_request $symfony_request Symfony Request object
* @param \phpbb\request\request_interface $request phpBB request object
@@ -100,12 +101,15 @@ class helper
* @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
* @param bool $display_online_list Do we display online users list
+ * @param int $item_id Restrict online users to item id
+ * @param string $item Restrict online users to a certain session item, e.g. forum for session_forum_id
+ * @param bool $send_headers Whether headers should be sent by page_header(). Defaults to false for controllers.
*
* @return Response object containing rendered page
*/
- public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false)
+ public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = false)
{
- page_header($page_title, $display_online_list);
+ page_header($page_title, $display_online_list, $item_id, $item, $send_headers);
$this->template->set_filenames(array(
'body' => $template_file,
@@ -113,7 +117,9 @@ class helper
page_footer(true, false, false);
- return new Response($this->template->assign_display('body'), $status_code);
+ $headers = !empty($this->user->data['is_bot']) ? array('X-PHPBB-IS-BOT' => 'yes') : array();
+
+ return new Response($this->template->assign_display('body'), $status_code, $headers);
}
/**
@@ -138,6 +144,15 @@ class helper
$context = new RequestContext();
$context->fromRequest($this->symfony_request);
+ if ($this->config['force_server_vars'])
+ {
+ $context->setHost($this->config['server_name']);
+ $context->setScheme(substr($this->config['server_protocol'], 0, -3));
+ $context->setHttpPort($this->config['server_port']);
+ $context->setHttpsPort($this->config['server_port']);
+ $context->setBaseUrl(rtrim($this->config['script_path'], '/'));
+ }
+
$script_name = $this->symfony_request->getScriptName();
$page_name = substr($script_name, -1, 1) == '/' ? '' : utf8_basename($script_name);
@@ -153,7 +168,7 @@ class helper
$base_url = str_replace('/' . $page_name, empty($this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : '', $base_url);
// We need to update the base url to move to the directory of the app.php file if the current script is not app.php
- if ($page_name !== 'app.php')
+ if ($page_name !== 'app.php' && !$this->config['force_server_vars'])
{
if (empty($this->config['enable_mod_rewrite']))
{
diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
index 079ce8107e..9bd30a0a5b 100644
--- a/phpBB/phpbb/cron/manager.php
+++ b/phpBB/phpbb/cron/manager.php
@@ -110,7 +110,7 @@ class manager
* 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.
+ * @return \phpbb\cron\task\wrapper A wrapped task corresponding to the given name, or null.
*/
public function find_task($name)
{
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 1b49775b32..01dd66cd6e 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -897,6 +897,7 @@ abstract class driver implements driver_interface
<html dir="ltr">
<head>
<meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SQL Report</title>
<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>
diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php
index 4e3e0d3329..cc3352af34 100644
--- a/phpBB/phpbb/db/driver/sqlite3.php
+++ b/phpBB/phpbb/db/driver/sqlite3.php
@@ -48,6 +48,7 @@ class sqlite3 extends \phpbb\db\driver\driver
try
{
$this->dbo = new \SQLite3($this->server, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
+ $this->dbo->busyTimeout(60000);
$this->db_connect_id = true;
}
catch (\Exception $e)
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php
index 1df85bc64c..4a48d2830a 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha1.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha2.php b/phpBB/phpbb/db/migration/data/v310/alpha2.php
index 78bc755ec9..bfbcc4f6f5 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha2.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha3.php b/phpBB/phpbb/db/migration/data/v310/alpha3.php
index 574d19d2f4..bb0f904fd4 100644
--- a/phpBB/phpbb/db/migration/data/v310/alpha3.php
+++ b/phpBB/phpbb/db/migration/data/v310/alpha3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class alpha3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-a3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta1.php b/phpBB/phpbb/db/migration/data/v310/beta1.php
index 84887bd58e..9feba5235d 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta1.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta2.php b/phpBB/phpbb/db/migration/data/v310/beta2.php
index 458e305c7b..d5e31ce4cb 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta2.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta3.php b/phpBB/phpbb/db/migration/data/v310/beta3.php
index a6c62bf936..78c61e8e90 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta3.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/beta4.php b/phpBB/phpbb/db/migration/data/v310/beta4.php
index 3e91d95178..e634785c38 100644
--- a/phpBB/phpbb/db/migration/data/v310/beta4.php
+++ b/phpBB/phpbb/db/migration/data/v310/beta4.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class beta4 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-b4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/gold.php b/phpBB/phpbb/db/migration/data/v310/gold.php
index e84c7ee951..188851f87d 100644
--- a/phpBB/phpbb/db/migration/data/v310/gold.php
+++ b/phpBB/phpbb/db/migration/data/v310/gold.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class gold extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
index aad8e44681..295f2d2a14 100644
--- a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
+++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
@@ -56,19 +56,16 @@ class passwords_convert_p1 extends \phpbb\db\migration\migration
{
// Use $CP$ prefix for passwords that need to
// be converted and set pass convert to false.
- $update_users[$user_id] = array(
- 'user_password' => '$CP$' . $row['user_password'],
- 'user_pass_convert' => 0,
- );
+ $update_users[$user_id] = '$CP$' . $row['user_password'];
}
}
$this->db->sql_freeresult($result);
- foreach ($update_users as $user_id => $user_data)
+ foreach ($update_users as $user_id => $user_password)
{
- $sql = 'UPDATE ' . $this->table_prefix . 'users
- SET ' . $this->db->sql_build_array('UPDATE', $user_data) . '
- WHERE user_id = ' . $user_id;
+ $sql = 'UPDATE ' . $this->table_prefix . "users
+ SET user_password = '" . $this->db->sql_escape($user_password) . "'
+ WHERE user_id = $user_id";
$this->sql_query($sql);
}
diff --git a/phpBB/phpbb/db/migration/data/v310/rc1.php b/phpBB/phpbb/db/migration/data/v310/rc1.php
index 10ba7fefff..751208c6ca 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc1.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc2.php b/phpBB/phpbb/db/migration/data/v310/rc2.php
index e1323659da..5cd0393a13 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc2.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc3.php b/phpBB/phpbb/db/migration/data/v310/rc3.php
index 0e6a452251..9fb483ef6a 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc3.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc3.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc3 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc4.php b/phpBB/phpbb/db/migration/data/v310/rc4.php
index 47de8291c1..0d756c762c 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc4.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc4.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc4 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc5.php b/phpBB/phpbb/db/migration/data/v310/rc5.php
index 5b6f70e32e..d92537d877 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc5.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc5.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc5 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC5', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v310/rc6.php b/phpBB/phpbb/db/migration/data/v310/rc6.php
index b84f2edcc9..1df502a1e4 100644
--- a/phpBB/phpbb/db/migration/data/v310/rc6.php
+++ b/phpBB/phpbb/db/migration/data/v310/rc6.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v310;
class rc6 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.0-RC6', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/add_log_time_index.php b/phpBB/phpbb/db/migration/data/v31x/add_log_time_index.php
new file mode 100644
index 0000000000..f53eedcd49
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/add_log_time_index.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class add_log_time_index extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v319',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_index' => array(
+ $this->table_prefix . 'log' => array(
+ 'log_time' => array('log_time'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'log' => array(
+ 'log_time',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php
new file mode 100644
index 0000000000..bdf83f3d62
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/increase_size_of_dateformat.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class increase_size_of_dateformat extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v317',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_dateformat' => array('VCHAR_UNI:64', 'd M Y H:i'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
new file mode 100644
index 0000000000..9b5710c639
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class m_pm_report extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v31x\v316rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('permission.add', array('m_pm_report', true, 'm_report')),
+ array('custom', array(
+ array($this, 'update_module_auth'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_data()
+ {
+ return array(
+ array('permission.remove', array('m_pm_report')),
+ array('custom', array(
+ array($this, 'revert_module_auth'),
+ ),
+ ),
+ );
+ }
+
+ public function update_module_auth()
+ {
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_auth = 'acl_m_pm_report'
+ WHERE module_class = 'mcp'
+ AND module_basename = 'mcp_pm_reports'
+ AND module_auth = 'aclf_m_report'";
+ $this->db->sql_query($sql);
+ }
+
+ public function revert_module_auth()
+ {
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_auth = 'aclf_m_report'
+ WHERE module_class = 'mcp'
+ AND module_basename = 'mcp_pm_reports'
+ AND module_auth = 'acl_m_pm_report'";
+ $this->db->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php b/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php
new file mode 100644
index 0000000000..417d569a09
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/remove_duplicate_migrations.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\db\migration\data\v31x;
+
+class remove_duplicate_migrations extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v31x\v3110');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'deduplicate_entries'))),
+ );
+ }
+
+ public function deduplicate_entries()
+ {
+ $migration_state = array();
+ $duplicate_migrations = array();
+
+ $sql = "SELECT *
+ FROM " . $this->table_prefix . 'migrations';
+ $result = $this->db->sql_query($sql);
+
+ if (!$this->db->get_sql_error_triggered())
+ {
+ while ($migration = $this->db->sql_fetchrow($result))
+ {
+ $migration_state[$migration['migration_name']] = $migration;
+
+ $migration_state[$migration['migration_name']]['migration_depends_on'] = unserialize($migration['migration_depends_on']);
+ }
+ }
+
+ $this->db->sql_freeresult($result);
+
+ foreach ($migration_state as $name => $migration)
+ {
+ $prepended_name = ($name[0] == '\\' ? '' : '\\') . $name;
+ $prefixless_name = $name[0] == '\\' ? substr($name, 1) : $name;
+
+ if ($prepended_name != $name && isset($migration_state[$prepended_name]) && $migration_state[$prepended_name]['migration_depends_on'] == $migration_state[$name]['migration_depends_on'])
+ {
+ $duplicate_migrations[] = $name;
+ unset($migration_state[$prepended_name]);
+ }
+ else if ($prefixless_name != $name && isset($migration_state[$prefixless_name]) && $migration_state[$prefixless_name]['migration_depends_on'] == $migration_state[$name]['migration_depends_on'])
+ {
+ $duplicate_migrations[] = $prefixless_name;
+ unset($migration_state[$prefixless_name]);
+ }
+ }
+
+ if (count($duplicate_migrations))
+ {
+ $sql = 'DELETE
+ FROM ' . $this->table_prefix . 'migrations
+ WHERE ' . $this->db->sql_in_set('migration_name', $duplicate_migrations);
+ $this->db->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v311.php b/phpBB/phpbb/db/migration/data/v31x/v311.php
index 00844dd4c0..b9d6ed3053 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v311.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v311.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v311 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v3110.php b/phpBB/phpbb/db/migration/data/v31x/v3110.php
new file mode 100644
index 0000000000..b89b4cc6e6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v3110.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v3110 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.10', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v3110rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.10')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v3110rc1.php b/phpBB/phpbb/db/migration/data/v31x/v3110rc1.php
new file mode 100644
index 0000000000..da69f2384e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v3110rc1.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v3110rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.10-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v319',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.10-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v312.php b/phpBB/phpbb/db/migration/data/v31x/v312.php
index bf49935f4d..114c2b959b 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v312.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v312.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v312 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v312rc1.php b/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
index d4b133fc01..e2408d432b 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v312rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v312rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.2-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313.php b/phpBB/phpbb/db/migration/data/v31x/v313.php
index 5a4e21a9b7..b86788da16 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313rc1.php b/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
index e50754f805..b1dcc03364 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v313rc2.php b/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
index d832d6f502..b701dca5ed 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v313rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v313rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.3-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314.php b/phpBB/phpbb/db/migration/data/v31x/v314.php
index b7793ca569..82dbbf29c9 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314rc1.php b/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
index 10cdbe3f9c..e7baf0c2ce 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v314rc2.php b/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
index b75b7a9be8..3fc5bf2ad5 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v314rc2.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v314rc2 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.4-RC2', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v315.php b/phpBB/phpbb/db/migration/data/v31x/v315.php
index 778cdf717e..d5eacf8dd3 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v315.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v315.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v315 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.5', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v315rc1.php b/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
index 4cf4472aa7..a58b6a0f2a 100644
--- a/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
+++ b/phpBB/phpbb/db/migration/data/v31x/v315rc1.php
@@ -15,6 +15,11 @@ namespace phpbb\db\migration\data\v31x;
class v315rc1 extends \phpbb\db\migration\migration
{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.5-RC1', '>=');
+ }
+
static public function depends_on()
{
return array(
diff --git a/phpBB/phpbb/db/migration/data/v31x/v316.php b/phpBB/phpbb/db/migration/data/v31x/v316.php
new file mode 100644
index 0000000000..b3e0060ced
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v316.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v316 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.6', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v316rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.6')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v316rc1.php b/phpBB/phpbb/db/migration/data/v31x/v316rc1.php
new file mode 100644
index 0000000000..6badfb68d4
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v316rc1.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v316rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.6-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v315',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.6-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317.php b/phpBB/phpbb/db/migration/data/v31x/v317.php
new file mode 100644
index 0000000000..d95be06ba6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v317.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v317 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v317rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.7')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317pl1.php b/phpBB/phpbb/db/migration/data/v31x/v317pl1.php
new file mode 100644
index 0000000000..1cb39b03f0
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v317pl1.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v317pl1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7-pl1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v317',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.7-pl1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v317rc1.php b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php
new file mode 100644
index 0000000000..77759daa66
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v317rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.7-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\m_pm_report',
+ '\phpbb\db\migration\data\v31x\v316',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.7-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v318.php b/phpBB/phpbb/db/migration/data/v31x/v318.php
new file mode 100644
index 0000000000..7663529d3a
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v318.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v318 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.8', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v318rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.8')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v318rc1.php b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
new file mode 100644
index 0000000000..2cab5c96d4
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v318rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.8-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\increase_size_of_dateformat',
+ '\phpbb\db\migration\data\v31x\v317pl1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.8-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v319.php b/phpBB/phpbb/db/migration/data/v31x/v319.php
new file mode 100644
index 0000000000..f773814028
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v319.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v319 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.9', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v319rc1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.9')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v31x/v319rc1.php b/phpBB/phpbb/db/migration/data/v31x/v319rc1.php
new file mode 100644
index 0000000000..9805b45572
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v319rc1.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v319rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.1.9-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v318',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.9-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/helper.php b/phpBB/phpbb/db/migration/helper.php
index e40deeb37b..bce2efff51 100644
--- a/phpBB/phpbb/db/migration/helper.php
+++ b/phpBB/phpbb/db/migration/helper.php
@@ -81,4 +81,36 @@ class helper
return $steps;
}
+
+ /**
+ * Reverse the update steps from an array of data changes
+ *
+ * 'If' statements and custom methods will be skipped, for all
+ * other calls the reverse method of the tool class will be called
+ *
+ * @param array $steps Update changes from migration
+ *
+ * @return array
+ */
+ public function reverse_update_data($steps)
+ {
+ $reversed_array = array();
+
+ foreach ($steps as $step)
+ {
+ $parts = explode('.', $step[0]);
+ $parameters = $step[1];
+
+ $class = $parts[0];
+ $method = isset($parts[1]) ? $parts[1] : false;
+
+ if ($class !== 'if' && $class !== 'custom')
+ {
+ array_unshift($parameters, $method);
+ $reversed_array[] = array($class . '.reverse', $parameters);
+ }
+ }
+
+ return array_reverse($reversed_array);
+ }
}
diff --git a/phpBB/phpbb/db/migration/tool/config.php b/phpBB/phpbb/db/migration/tool/config.php
index f93e7118c4..33aa8ff026 100644
--- a/phpBB/phpbb/db/migration/tool/config.php
+++ b/phpBB/phpbb/db/migration/tool/config.php
@@ -150,6 +150,11 @@ class config implements \phpbb\db\migration\tool\tool_interface
$arguments[0],
);
break;
+
+ case 'reverse':
+ // Reversing a reverse is just the call itself
+ $call = array_shift($arguments);
+ break;
}
if ($call)
diff --git a/phpBB/phpbb/db/migration/tool/config_text.php b/phpBB/phpbb/db/migration/tool/config_text.php
index bf8ac55023..54b45f6f6d 100644
--- a/phpBB/phpbb/db/migration/tool/config_text.php
+++ b/phpBB/phpbb/db/migration/tool/config_text.php
@@ -115,6 +115,11 @@ class config_text implements \phpbb\db\migration\tool\tool_interface
$arguments[] = '';
}
break;
+
+ case 'reverse':
+ // Reversing a reverse is just the call itself
+ $call = array_shift($arguments);
+ break;
}
if ($call)
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 035625b095..7ea7d1dac1 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -36,6 +36,9 @@ class module implements \phpbb\db\migration\tool\tool_interface
/** @var string */
protected $modules_table;
+ /** @var array */
+ protected $module_categories = array();
+
/**
* Constructor
*
@@ -87,30 +90,13 @@ class module implements \phpbb\db\migration\tool\tool_interface
$parent_sql = '';
if ($parent !== false)
{
- // Allows '' to be sent as 0
- $parent = $parent ?: 0;
-
- if (!is_numeric($parent))
+ $parent = $this->get_parent_module_id($parent, $module, false);
+ if ($parent === false)
{
- $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;
+ return false;
}
+
+ $parent_sql = 'AND parent_id = ' . (int) $parent;
}
$sql = 'SELECT module_id
@@ -171,15 +157,14 @@ class module implements \phpbb\db\migration\tool\tool_interface
*/
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);
}
+ $parent = $data['parent_id'] = $this->get_parent_module_id($parent, $data);
+
if (!isset($data['module_langname']))
{
// The "automatic" way
@@ -210,31 +195,14 @@ class module implements \phpbb\db\migration\tool\tool_interface
}
// 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))
+ 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;
+ throw new \phpbb\db\migration\exception('MODULE_EXISTS', $data['module_langname']);
}
if (!class_exists('acp_modules'))
@@ -373,26 +341,8 @@ class module implements \phpbb\db\migration\tool\tool_interface
$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;
- }
+ $parent = $this->get_parent_module_id($parent, $module);
+ $parent_sql = 'AND parent_id = ' . (int) $parent;
}
$module_ids = array();
@@ -454,6 +404,11 @@ class module implements \phpbb\db\migration\tool\tool_interface
case 'remove':
$call = 'add';
break;
+
+ case 'reverse':
+ // Reversing a reverse is just the call itself
+ $call = array_shift($arguments);
+ break;
}
if ($call)
@@ -487,4 +442,122 @@ class module implements \phpbb\db\migration\tool\tool_interface
return array_pop($module);
}
+
+ /**
+ * Get the list of installed module categories
+ * key - module_id
+ * value - module_langname
+ *
+ * @return null
+ */
+ protected function get_categories_list()
+ {
+ // Select the top level categories
+ // and 2nd level [sub]categories
+ $sql = 'SELECT m2.module_id, m2.module_langname
+ FROM ' . $this->modules_table . ' m1, ' . $this->modules_table . " m2
+ WHERE m1.parent_id = 0
+ AND (m1.module_id = m2.module_id OR m2.parent_id = m1.module_id)
+ ORDER BY m1.module_id, m2.module_id ASC";
+
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->module_categories[(int) $row['module_id']] = $row['module_langname'];
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Get parent module id
+ *
+ * @param string|int $parent_id The parent module_id|module_langname
+ * @param int|string|array $data The module_id, module_langname for existance checking or module data array for adding
+ * @param bool $throw_exception The flag indicating if exception should be thrown on error
+ * @return mixed The int parent module_id or false
+ * @throws \phpbb\db\migration\exception
+ */
+ public function get_parent_module_id($parent_id, $data = '', $throw_exception = true)
+ {
+ // Initialize exception object placeholder
+ $exception = false;
+
+ // Allow '' to be sent as 0
+ $parent_id = $parent_id ?: 0;
+
+ // If automatic adding is in action, convert array back to string to simplify things
+ if (is_array($data) && sizeof($data) == 1)
+ {
+ $data = $data['module_langname'];
+ }
+
+ if (!is_numeric($parent_id))
+ {
+ // Refresh the $module_categories array
+ $this->get_categories_list();
+
+ // Search for the parent module_langname
+ $ids = array_keys($this->module_categories, $parent_id);
+
+ switch (sizeof($ids))
+ {
+ // No parent with the given module_langname exist
+ case 0:
+ $exception = new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent_id);
+ break;
+
+ // Return the module id
+ case 1:
+ $parent_id = (int) $ids[0];
+ break;
+
+ // Several modules with the given module_langname were found
+ // Try to determine the parent_id by the neighbour module parent
+ default:
+ if (is_array($data) && (isset($data['before']) || isset($data['after'])))
+ {
+ $neighbour_module_langname = isset($data['before']) ? $data['before'] : $data['after'];
+ $sql = 'SELECT parent_id
+ FROM ' . $this->modules_table . "
+ WHERE module_langname = '" . $this->db->sql_escape($neighbour_module_langname) . "'
+ AND " . $this->db->sql_in_set('parent_id', $ids);
+ $result = $this->db->sql_query($sql);
+ $parent_id = (int) $this->db->sql_fetchfield('parent_id');
+ if (!$parent_id)
+ {
+ $exception = new \phpbb\db\migration\exception('PARENT_MODULE_FIND_ERROR', $data['parent_id']);
+ }
+ }
+ else if (!empty($data) && !is_array($data))
+ {
+ // The module_langname is set, checking for the module existance
+ // As more than 1 parents were found already, there's no way for null parent_id here
+ $sql = 'SELECT m2.module_id as module_parent_id
+ FROM ' . $this->modules_table . ' m1, ' . $this->modules_table . " m2
+ WHERE " . ((is_numeric($data)) ? 'm1.module_id = ' . (int) $data : "m1.module_langname = '" . $this->db->sql_escape($data)) . "'
+ AND m2.module_id = m1.parent_id
+ AND " . $this->db->sql_in_set('m2.module_id', $ids);
+ $result = $this->db->sql_query($sql);
+ $parent_id = (int) $this->db->sql_fetchfield('module_parent_id');
+ }
+ else
+ {
+ //Unable to get the parent module id, throwing an exception
+ $exception = new \phpbb\db\migration\exception('MODULE_EXIST_MULTIPLE', $parent_id);
+ }
+ break;
+ }
+ }
+
+ if ($exception !== false)
+ {
+ if ($throw_exception)
+ {
+ throw $exception;
+ }
+ return false;
+ }
+
+ return $parent_id;
+ }
}
diff --git a/phpBB/phpbb/db/migration/tool/permission.php b/phpBB/phpbb/db/migration/tool/permission.php
index ceff6d7d5a..9688420025 100644
--- a/phpBB/phpbb/db/migration/tool/permission.php
+++ b/phpBB/phpbb/db/migration/tool/permission.php
@@ -637,6 +637,11 @@ class permission implements \phpbb\db\migration\tool\tool_interface
$arguments[0],
);
break;
+
+ case 'reverse':
+ // Reversing a reverse is just the call itself
+ $call = array_shift($arguments);
+ break;
}
if ($call)
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 7fc3e787e2..45a333ac94 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -80,14 +80,14 @@ class migrator
*
* @var array
*/
- public $last_run_migration = false;
+ protected $last_run_migration = false;
/**
* The output handler. A null handler is configured by default.
*
* @var migrator_output_handler_interface
*/
- public $output_handler;
+ protected $output_handler;
/**
* Constructor of the database migrator
@@ -152,6 +152,7 @@ class migrator
$this->migration_state[$migration['migration_name']] = $migration;
$this->migration_state[$migration['migration_name']]['migration_depends_on'] = unserialize($migration['migration_depends_on']);
+ $this->migration_state[$migration['migration_name']]['migration_data_state'] = !empty($migration['migration_data_state']) ? unserialize($migration['migration_data_state']) : '';
}
}
@@ -161,6 +162,19 @@ class migrator
}
/**
+ * Get an array with information about the last migration run.
+ *
+ * The array contains 'name', 'class' and 'state'. 'effectively_installed' is set
+ * and set to true if the last migration was effectively_installed.
+ *
+ * @return array
+ */
+ public function get_last_run_migration()
+ {
+ return $this->last_run_migration;
+ }
+
+ /**
* Sets the list of available migration class names to the given array.
*
* @param array $class_names An array of migration class names
@@ -187,6 +201,34 @@ class migrator
}
/**
+ * Get a valid migration name from the migration state array in case the
+ * supplied name is not in the migration state list.
+ *
+ * @param string $name Migration name
+ * @return string Migration name
+ */
+ protected function get_valid_name($name)
+ {
+ // Try falling back to a valid migration name with or without leading backslash
+ if (!isset($this->migration_state[$name]))
+ {
+ $prepended_name = ($name[0] == '\\' ? '' : '\\') . $name;
+ $prefixless_name = $name[0] == '\\' ? substr($name, 1) : $name;
+
+ if (isset($this->migration_state[$prepended_name]))
+ {
+ $name = $prepended_name;
+ }
+ else if (isset($this->migration_state[$prefixless_name]))
+ {
+ $name = $prefixless_name;
+ }
+ }
+
+ return $name;
+ }
+
+ /**
* Effectively runs a single update step from the next migration to be applied.
*
* @return null
@@ -195,6 +237,8 @@ class migrator
{
foreach ($this->migrations as $name)
{
+ $name = $this->get_valid_name($name);
+
if (!isset($this->migration_state[$name]) ||
!$this->migration_state[$name]['migration_schema_done'] ||
!$this->migration_state[$name]['migration_data_done'])
@@ -250,6 +294,9 @@ class migrator
foreach ($state['migration_depends_on'] as $depend)
{
+ $depend = $this->get_valid_name($depend);
+
+ // Test all possible namings before throwing exception
if ($this->unfulfillable($depend) !== false)
{
throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend);
@@ -297,38 +344,70 @@ class migrator
if (!$state['migration_schema_done'])
{
- $this->output_handler->write(array('MIGRATION_SCHEMA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE);
+ $verbosity = empty($state['migration_data_state']) ?
+ migrator_output_handler_interface::VERBOSITY_VERBOSE : migrator_output_handler_interface::VERBOSITY_DEBUG;
+ $this->output_handler->write(array('MIGRATION_SCHEMA_RUNNING', $name), $verbosity);
$this->last_run_migration['task'] = 'process_schema_step';
+
+ $total_time = (is_array($state['migration_data_state']) && isset($state['migration_data_state']['_total_time'])) ?
+ $state['migration_data_state']['_total_time'] : 0.0;
$elapsed_time = microtime(true);
+
$steps = $this->helper->get_schema_steps($migration->update_schema());
$result = $this->process_data_step($steps, $state['migration_data_state']);
+
$elapsed_time = microtime(true) - $elapsed_time;
+ $total_time += $elapsed_time;
+
+ if (is_array($result))
+ {
+ $result['_total_time'] = $total_time;
+ }
$state['migration_data_state'] = ($result === true) ? '' : $result;
$state['migration_schema_done'] = ($result === true);
- $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL);
+ if ($state['migration_schema_done'])
+ {
+ $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $total_time), migrator_output_handler_interface::VERBOSITY_NORMAL);
+ }
+ else
+ {
+ $this->output_handler->write(array('MIGRATION_SCHEMA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_VERY_VERBOSE);
+ }
}
else if (!$state['migration_data_done'])
{
try
{
- $this->output_handler->write(array('MIGRATION_DATA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE);
+ $verbosity = empty($state['migration_data_state']) ?
+ migrator_output_handler_interface::VERBOSITY_VERBOSE : migrator_output_handler_interface::VERBOSITY_DEBUG;
+ $this->output_handler->write(array('MIGRATION_DATA_RUNNING', $name), $verbosity);
$this->last_run_migration['task'] = 'process_data_step';
+ $total_time = (is_array($state['migration_data_state']) && isset($state['migration_data_state']['_total_time'])) ?
+ $state['migration_data_state']['_total_time'] : 0.0;
$elapsed_time = microtime(true);
+
$result = $this->process_data_step($migration->update_data(), $state['migration_data_state']);
+
$elapsed_time = microtime(true) - $elapsed_time;
+ $total_time += $elapsed_time;
+
+ if (is_array($result))
+ {
+ $result['_total_time'] = $total_time;
+ }
$state['migration_data_state'] = ($result === true) ? '' : $result;
$state['migration_data_done'] = ($result === true);
$state['migration_end_time'] = ($result === true) ? time() : 0;
- if ($state['migration_schema_done'])
+ if ($state['migration_data_done'])
{
- $this->output_handler->write(array('MIGRATION_DATA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL);
+ $this->output_handler->write(array('MIGRATION_DATA_DONE', $name, $total_time), migrator_output_handler_interface::VERBOSITY_NORMAL);
}
else
{
@@ -337,10 +416,12 @@ class migrator
}
catch (\phpbb\db\migration\exception $e)
{
- // Revert the schema changes
+ // Reset data state and revert the schema changes
+ $state['migration_data_state'] = '';
+ $this->set_migration_state($name, $state);
+
$this->revert_do($name);
- // Rethrow exception
throw $e;
}
}
@@ -416,19 +497,11 @@ class migrator
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);
+ $steps = array_merge($this->helper->reverse_update_data($migration->update_data()), $migration->revert_data());
+ $result = $this->process_data_step($steps, $state['migration_data_state']);
- $state['migration_data_state'] = ($result === true) ? '' : $result;
- $state['migration_data_done'] = ($result === true) ? false : true;
- }
+ $state['migration_data_state'] = ($result === true) ? '' : $result;
+ $state['migration_data_done'] = ($result === true) ? false : true;
$this->set_migration_state($name, $state);
}
@@ -446,8 +519,13 @@ class migrator
WHERE migration_name = '" . $this->db->sql_escape($name) . "'";
$this->db->sql_query($sql);
+ $this->last_run_migration = false;
unset($this->migration_state[$name]);
}
+ else
+ {
+ $this->set_migration_state($name, $state);
+ }
}
return true;
@@ -464,7 +542,12 @@ class migrator
*/
protected function process_data_step($steps, $state, $revert = false)
{
- $state = ($state) ? unserialize($state) : false;
+ if (sizeof($steps) === 0)
+ {
+ return true;
+ }
+
+ $state = is_array($state) ? $state : false;
// reverse order of steps if reverting
if ($revert === true)
@@ -472,54 +555,45 @@ class migrator
$steps = array_reverse($steps);
}
- foreach ($steps as $step_identifier => $step)
+ $step = $last_result = 0;
+ if ($state)
{
- $last_result = 0;
- if ($state)
- {
- // Continue until we reach the step that matches the last step called
- if ($state['step'] != $step_identifier)
- {
- continue;
- }
+ $step = $state['step'];
- // 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;
- }
+ // We send the result from last time to the callable function
+ $last_result = $state['result'];
+ }
- try
+ try
+ {
+ // Result will be null or true if everything completed correctly
+ // Stop after each update step, to let the updater control the script runtime
+ $result = $this->run_step($steps[$step], $last_result, $revert);
+ if (($result !== null && $result !== true) || $step + 1 < sizeof($steps))
{
- // 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,
- ));
- }
+ return array(
+ 'result' => $result,
+ // Move on if the last call finished
+ 'step' => ($result !== null && $result !== true) ? $step : $step + 1,
+ );
}
- catch (\phpbb\db\migration\exception $e)
+ }
+ catch (\phpbb\db\migration\exception $e)
+ {
+ // We should try rolling back here
+ foreach ($steps as $reverse_step_identifier => $reverse_step)
{
- // 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)
{
- // 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);
+ break;
}
- // rethrow the exception
- throw $e;
+ // Reverse the step that was run
+ $result = $this->run_step($reverse_step, false, !$revert);
}
+
+ throw $e;
}
return true;
@@ -587,6 +661,13 @@ class migrator
throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_MISSING_STEP', $step);
}
+ if ($reverse)
+ {
+ // We might get unexpected results when trying
+ // to revert this, so just avoid it
+ return false;
+ }
+
$condition = $parameters[0];
if (!$condition)
@@ -664,6 +745,7 @@ class migrator
{
$migration_row = $state;
$migration_row['migration_depends_on'] = serialize($state['migration_depends_on']);
+ $migration_row['migration_data_state'] = !empty($state['migration_data_state']) ? serialize($state['migration_data_state']) : '';
if (isset($this->migration_state[$name]))
{
@@ -693,6 +775,8 @@ class migrator
*/
public function unfulfillable($name)
{
+ $name = $this->get_valid_name($name);
+
if (isset($this->migration_state[$name]) || isset($this->fulfillable_migrations[$name]))
{
return false;
@@ -708,6 +792,7 @@ class migrator
foreach ($depends as $depend)
{
+ $depend = $this->get_valid_name($depend);
$unfulfillable = $this->unfulfillable($depend);
if ($unfulfillable !== false)
{
diff --git a/phpBB/phpbb/db/migrator_output_handler_interface.php b/phpBB/phpbb/db/migrator_output_handler_interface.php
index a923af99f6..9947b51dcc 100644
--- a/phpBB/phpbb/db/migrator_output_handler_interface.php
+++ b/phpBB/phpbb/db/migrator_output_handler_interface.php
@@ -15,11 +15,11 @@ namespace phpbb\db;
interface migrator_output_handler_interface
{
- const VERBOSITY_QUIET = 0;
- const VERBOSITY_NORMAL = 1;
- const VERBOSITY_VERBOSE = 2;
- const VERBOSITY_VERY_VERBOSE = 3;
- const VERBOSITY_DEBUG = 4;
+ const VERBOSITY_QUIET = 16;
+ const VERBOSITY_NORMAL = 32;
+ const VERBOSITY_VERBOSE = 64;
+ const VERBOSITY_VERY_VERBOSE = 128;
+ const VERBOSITY_DEBUG = 256;
/**
* Write output using the configured closure.
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 775deccc30..832a0c510c 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -1533,6 +1533,11 @@ class tools
}
}
+ if (isset($column_data['after']))
+ {
+ $return_array['after'] = $column_data['after'];
+ }
+
break;
case 'oracle':
@@ -2335,7 +2340,7 @@ class tools
if (!empty($column_data['default']))
{
// Add new default value constraint
- $statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $this->db->sql_escape($column_data['default']) . ' FOR [' . $column_name . ']';
+ $statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $column_data['default'] . ' FOR [' . $column_name . ']';
}
if (!empty($indexes))
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
index eb7831ad34..9d15f9370e 100644
--- a/phpBB/phpbb/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -34,6 +34,9 @@ class kernel_exception_subscriber implements EventSubscriberInterface
*/
protected $user;
+ /** @var \phpbb\request\type_cast_helper */
+ protected $type_caster;
+
/**
* Construct method
*
@@ -44,6 +47,7 @@ class kernel_exception_subscriber implements EventSubscriberInterface
{
$this->template = $template;
$this->user = $user;
+ $this->type_caster = new \phpbb\request\type_cast_helper();
}
/**
@@ -57,12 +61,16 @@ class kernel_exception_subscriber implements EventSubscriberInterface
$exception = $event->getException();
$message = $exception->getMessage();
+ $this->type_caster->set_var($message, $message, 'string', false, false);
if ($exception instanceof \phpbb\exception\exception_interface)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($message), $exception->get_parameters()));
}
+ // Show <strong> text in bold
+ $message = preg_replace('#&lt;(/?strong)&gt;#i', '<$1>', $message);
+
if (!$event->getRequest()->isXmlHttpRequest())
{
page_header($this->user->lang('INFORMATION'));
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php
index 322e2ee9f1..eeea0a55df 100644
--- a/phpBB/phpbb/feed/base.php
+++ b/phpBB/phpbb/feed/base.php
@@ -39,6 +39,12 @@ abstract class base
/** @var \phpbb\auth\auth */
protected $auth;
+ /** @var \phpbb\content_visibility */
+ protected $content_visibility;
+
+ /** @var \phpbb\event\dispatcher_interface */
+ protected $phpbb_dispatcher;
+
/** @var string */
protected $phpEx;
@@ -79,10 +85,21 @@ abstract class base
* @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 \phpbb\content_visibility $content_visibility Content visibility object
+ * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object
* @param string $phpEx php file extension
*/
- function __construct(\phpbb\feed\helper $helper, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, $phpEx)
+ function __construct(
+ \phpbb\feed\helper $helper,
+ \phpbb\config\config $config,
+ \phpbb\db\driver\driver_interface $db,
+ \phpbb\cache\driver\driver_interface $cache,
+ \phpbb\user $user,
+ \phpbb\auth\auth $auth,
+ \phpbb\content_visibility $content_visibility,
+ \phpbb\event\dispatcher_interface $phpbb_dispatcher,
+ $phpEx
+ )
{
$this->config = $config;
$this->helper = $helper;
@@ -91,6 +108,7 @@ abstract class base
$this->user = $user;
$this->auth = $auth;
$this->content_visibility = $content_visibility;
+ $this->phpbb_dispatcher = $phpbb_dispatcher;
$this->phpEx = $phpEx;
$this->set_keys();
@@ -239,6 +257,21 @@ abstract class base
return false;
}
+ $sql_ary = $this->sql;
+
+ /**
+ * Event to modify the feed item sql
+ *
+ * @event core.feed_base_modify_item_sql
+ * @var array sql_ary The SQL array to get the feed item data
+ *
+ * @since 3.1.10-RC1
+ */
+ $vars = array('sql_ary');
+ extract($this->phpbb_dispatcher->trigger_event('core.feed_base_modify_item_sql', compact($vars)));
+ $this->sql = $sql_ary;
+ unset($sql_ary);
+
// Query database
$sql = $this->db->sql_build_query('SELECT', $this->sql);
$this->result = $this->db->sql_query_limit($sql, $this->num_items);
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
index 198134cdcf..f2030f5ced 100644
--- a/phpBB/phpbb/feed/helper.php
+++ b/phpBB/phpbb/feed/helper.php
@@ -149,12 +149,10 @@ class helper
{
$update_count = array();
parse_attachments($forum_id, $content, $post_attachments, $update_count);
- $post_attachments = implode('<br />', $post_attachments);
+ $content .= 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;
+ $content = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $content);
}
// Remove Comments from inline attachments [ia]
diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php
index 462b87ca51..ab9505a14c 100644
--- a/phpBB/phpbb/file_downloader.php
+++ b/phpBB/phpbb/file_downloader.php
@@ -42,7 +42,7 @@ class file_downloader
$this->error_number = 0;
$this->error_string = '';
- if ($socket = @fsockopen($host, $port, $this->error_number, $this->error_string, $timeout))
+ if ($socket = @fsockopen(($port == 443 ? 'tls://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout))
{
@fputs($socket, "GET $directory/$filename HTTP/1.0\r\n");
@fputs($socket, "HOST: $host\r\n");
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 3d995b4e4a..094ff78abe 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -229,8 +229,8 @@ class log implements \phpbb\log\log_interface
}
$sql_ary = array(
- 'user_id' => $user_id,
- 'log_ip' => $log_ip,
+ 'user_id' => !empty($user_id) ? $user_id : ANONYMOUS,
+ 'log_ip' => !empty($log_ip) ? $log_ip : '',
'log_time' => $log_time,
'log_operation' => $log_operation,
);
@@ -402,7 +402,7 @@ class log implements \phpbb\log\log_interface
}
}
- $sql = 'DELETE FROM ' . LOG_TABLE . "
+ $sql = 'DELETE FROM ' . $this->log_table . "
$sql_where";
$this->db->sql_query($sql);
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index db92170dd8..f5663f4b34 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -186,12 +186,13 @@ class manager
if (!$options['count_total'] || $total_count)
{
$rowset = array();
+ $selected_unread_count = 0;
// 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']) : '') . '
+ (($options['notification_id']) ? ' AND ' . $this->db->sql_in_set('n.notification_id', $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']);
@@ -200,11 +201,12 @@ class manager
while ($row = $this->db->sql_fetchrow($result))
{
$rowset[$row['notification_id']] = $row;
+ $selected_unread_count += (int) !$row['notification_read'];
}
$this->db->sql_freeresult($result);
// Get all unread notifications
- if ($unread_count && $options['all_unread'] && !empty($rowset))
+ if ($selected_unread_count < $unread_count && $options['all_unread'] && !empty($rowset))
{
$sql = 'SELECT n.*, nt.notification_type_name
FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
@@ -273,10 +275,9 @@ class manager
$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) : '');
+ (($notification_type_name !== false) ? ' AND ' . $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : '') .
+ (($user_id !== false) ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : '') .
+ (($item_id !== false) ? ' AND ' . $this->db->sql_in_set('item_id', $item_id) : '');
$this->db->sql_query($sql);
}
@@ -295,10 +296,9 @@ class manager
$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, false, true) : '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) : '');
+ (($notification_type_name !== false) ? ' AND ' . $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : '') .
+ (($item_parent_id !== false) ? ' AND ' . $this->db->sql_in_set('item_parent_id', $item_parent_id, false, true) : '') .
+ (($user_id !== false) ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : '');
$this->db->sql_query($sql);
}
@@ -315,7 +315,7 @@ class manager
$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);
+ AND ' . $this->db->sql_in_set('notification_id', $notification_id);
$this->db->sql_query($sql);
}
@@ -540,8 +540,8 @@ class manager
$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)) : '');
+ AND ' . $this->db->sql_in_set('item_id', $item_id) .
+ (($parent_id !== false) ? ' AND ' . $this->db->sql_in_set('item_parent_id', $parent_id) : '');
$this->db->sql_query($sql);
}
@@ -923,6 +923,8 @@ class manager
{
$notification_type_ids = $this->cache->get('notification_type_ids');
+ $this->db->sql_transaction('begin');
+
if ($notification_type_ids === false)
{
$notification_type_ids = array();
@@ -943,6 +945,7 @@ class manager
{
if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
{
+ $this->db->sql_transaction('rollback');
throw new \phpbb\notification\exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name));
}
@@ -957,17 +960,24 @@ class manager
$this->cache->put('notification_type_ids', $notification_type_ids);
}
+ $this->db->sql_transaction('commit');
+
return $notification_type_ids[$notification_type_name];
}
/**
* Get notification type ids (as an array)
*
- * @param array $notification_type_names Array of strings
+ * @param string|array $notification_type_names Notification type names
* @return array Array of integers
*/
- public function get_notification_type_ids(array $notification_type_names)
+ public function get_notification_type_ids($notification_type_names)
{
+ if (!is_array($notification_type_names))
+ {
+ $notification_type_names = array($notification_type_names);
+ }
+
$notification_type_ids = array();
foreach ($notification_type_names as $name)
diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php
index c3aee088f9..0bfbfd6b02 100644
--- a/phpBB/phpbb/notification/method/messenger_base.php
+++ b/phpBB/phpbb/notification/method/messenger_base.php
@@ -74,14 +74,14 @@ abstract class messenger_base extends \phpbb\notification\method\base
continue;
}
- $messenger->template($template_dir_prefix . $notification->get_email_template(), $user['user_lang']);
+ $messenger->template($notification->get_email_template(), $user['user_lang'], '', $template_dir_prefix);
$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',
+ 'U_NOTIFICATION_SETTINGS' => generate_board_url() . '/ucp.' . $this->php_ext . '?i=ucp_notifications&mode=notification_options',
), $notification->get_email_template_variables()));
$messenger->send($notify_method);
diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php
index a9e635b41a..5760c12166 100644
--- a/phpBB/phpbb/notification/type/approve_post.php
+++ b/phpBB/phpbb/notification/type/approve_post.php
@@ -82,7 +82,7 @@ class approve_post extends \phpbb\notification\type\post
$users[$post['poster_id']] = array('');
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
- 'item_type' => self::$notification_option['id'],
+ 'item_type' => static::$notification_option['id'],
)));
}
diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php
index 2f4678359c..26e51bf9cd 100644
--- a/phpBB/phpbb/notification/type/approve_topic.php
+++ b/phpBB/phpbb/notification/type/approve_topic.php
@@ -82,7 +82,7 @@ class approve_topic extends \phpbb\notification\type\topic
$users[$post['poster_id']] = array('');
return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array(
- 'item_type' => self::$notification_option['id'],
+ 'item_type' => static::$notification_option['id'],
)));
}
diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php
index 4f2d34cb60..1626add22c 100644
--- a/phpBB/phpbb/notification/type/bookmark.php
+++ b/phpBB/phpbb/notification/type/bookmark.php
@@ -95,7 +95,7 @@ class bookmark extends \phpbb\notification\type\post
$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.item_parent_id = ' . (int) static::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';
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php
index e25fdcd808..2969da550d 100644
--- a/phpBB/phpbb/notification/type/post.php
+++ b/phpBB/phpbb/notification/type/post.php
@@ -135,7 +135,7 @@ class post extends \phpbb\notification\type\base
$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.item_parent_id = ' . (int) static::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';
diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php
index 315b8b0243..5832c99cd2 100644
--- a/phpBB/phpbb/notification/type/post_in_queue.php
+++ b/phpBB/phpbb/notification/type/post_in_queue.php
@@ -108,7 +108,7 @@ class post_in_queue extends \phpbb\notification\type\post
}
return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
- 'item_type' => self::$notification_option['id'],
+ 'item_type' => static::$notification_option['id'],
)));
}
diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php
index 508ca92fa0..2732cb84e4 100644
--- a/phpBB/phpbb/notification/type/quote.php
+++ b/phpBB/phpbb/notification/type/quote.php
@@ -78,7 +78,7 @@ class quote extends \phpbb\notification\type\post
), $options);
$usernames = false;
- preg_match_all(self::$regular_expression_match, $post['post_text'], $usernames);
+ preg_match_all(static::$regular_expression_match, $post['post_text'], $usernames);
if (empty($usernames[1]))
{
@@ -116,7 +116,7 @@ class quote extends \phpbb\notification\type\post
$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 n.item_id = ' . static::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);
@@ -147,7 +147,7 @@ class quote extends \phpbb\notification\type\post
{
$sql = 'DELETE FROM ' . $this->notifications_table . '
WHERE notification_type_id = ' . (int) $this->notification_type_id . '
- AND item_id = ' . self::get_item_id($post) . '
+ AND item_id = ' . static::get_item_id($post) . '
AND ' . $this->db->sql_in_set('user_id', $remove_notifications);
$this->db->sql_query($sql);
}
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
index 749cfe0b8e..cc32984ac6 100644
--- a/phpBB/phpbb/notification/type/report_pm.php
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -52,7 +52,7 @@ class report_pm extends \phpbb\notification\type\pm
*
* @var string Permission name
*/
- protected $permission = 'm_report';
+ protected $permission = 'm_pm_report';
/**
* Notification option data (for outputting to the user)
@@ -120,7 +120,7 @@ class report_pm extends \phpbb\notification\type\pm
}
return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array(
- 'item_type' => self::$notification_option['id'],
+ 'item_type' => static::$notification_option['id'],
)));
}
diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php
index 4c60c6b858..6e57b9ac0c 100644
--- a/phpBB/phpbb/notification/type/topic_in_queue.php
+++ b/phpBB/phpbb/notification/type/topic_in_queue.php
@@ -108,7 +108,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
}
return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array(
- 'item_type' => self::$notification_option['id'],
+ 'item_type' => static::$notification_option['id'],
)));
}
diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php
index 81ac010785..38d6d9cd2c 100644
--- a/phpBB/phpbb/passwords/driver/salted_md5.php
+++ b/phpBB/phpbb/passwords/driver/salted_md5.php
@@ -75,7 +75,7 @@ class salted_md5 extends base
// 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
+ // implementation in phpBB 3.0
return md5($password);
}
}
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index 82f59b5c20..e75476f59b 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -160,6 +160,28 @@ class permissions
}
/**
+ * Checks if a category has been defined
+ *
+ * @param string $category Identifier of the category
+ * @return bool True if the category is defined, false otherwise
+ */
+ public function category_defined($category)
+ {
+ return isset($this->categories[$category]);
+ }
+
+ /**
+ * Checks if a permission has been defined
+ *
+ * @param string $permission Identifier of the permission
+ * @return bool True if the permission is defined, false otherwise
+ */
+ public function permission_defined($permission)
+ {
+ return isset($this->permissions[$permission]);
+ }
+
+ /**
* Returns the language string of a permission
*
* @param string $permission Identifier of the permission
@@ -285,8 +307,9 @@ class permissions
'm_split' => array('lang' => 'ACL_M_SPLIT', 'cat' => 'topic_actions'),
'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'),
- 'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
- 'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
+ 'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
+ 'm_pm_report' => array('lang' => 'ACL_M_PM_REPORT', 'cat' => 'misc'),
+ 'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
// Admin Permissions
'a_board' => array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'),
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index ca78167ec0..7f6267ed32 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -125,7 +125,7 @@ class plupload
// 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', ''),
+ 'name' => $this->request->variable('real_filename', '', true),
'size' => filesize($file_path),
'type' => $this->mimetype_guesser->guess($file_path, $file_name),
);
diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php
index dd08df94c1..9dc0181cb8 100644
--- a/phpBB/phpbb/profilefields/type/type_int.php
+++ b/phpBB/phpbb/profilefields/type/type_int.php
@@ -61,9 +61,9 @@ class type_int extends type_base
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'] . '" />'),
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_length" 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" 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" 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'] . '" />'),
);
diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php
index 67befc457d..a8432eaae5 100644
--- a/phpBB/phpbb/profilefields/type/type_string.php
+++ b/phpBB/phpbb/profilefields/type/type_string.php
@@ -61,9 +61,9 @@ class type_string extends type_string_common
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'] . '" />'),
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_length" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_minlen" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0 max="99999"" name="field_maxlen" value="' . $field_data['field_maxlen'] . '" />'),
3 => array('TITLE' => $this->user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options($field_data) . '</select>'),
);
diff --git a/phpBB/phpbb/profilefields/type/type_text.php b/phpBB/phpbb/profilefields/type/type_text.php
index bacf60a213..79ee82351a 100644
--- a/phpBB/phpbb/profilefields/type/type_text.php
+++ b/phpBB/phpbb/profilefields/type/type_text.php
@@ -61,9 +61,9 @@ class type_text extends type_string_common
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'] . '" />'),
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="rows" value="' . $field_data['rows'] . '" /> ' . $this->user->lang['ROWS'] . '</dd><dd><input type="number" min="0" max="99999" name="columns" 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" 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" value="' . $field_data['field_maxlen'] . '" />'),
3 => array('TITLE' => $this->user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options($field_data) . '</select>'),
);
diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php
index fe0bffd582..375cf5b19a 100644
--- a/phpBB/phpbb/profilefields/type/type_url.php
+++ b/phpBB/phpbb/profilefields/type/type_url.php
@@ -29,9 +29,9 @@ class type_url extends type_string
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'] . '" />'),
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_length" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_minlen" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_maxlen" value="' . $field_data['field_maxlen'] . '" />'),
);
return $options;
diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
index 2500ba0cf8..1446551b8b 100644
--- a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
+++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
@@ -25,6 +25,6 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
public function accept()
{
$filename = $this->current()->getFilename();
- return !$this->current()->isDir() || $filename[0] !== '.';
+ return $filename[0] !== '.' || !$this->current()->isDir();
}
}
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index 56ce3999ed..4cac6fbaea 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -325,7 +325,9 @@ class request implements \phpbb\request\request_interface
*/
public function is_secure()
{
- return $this->server('HTTPS') == 'on';
+ $https = $this->server('HTTPS');
+ $https = $this->server('HTTP_X_FORWARDED_PROTO') === 'https' ? 'on' : $https;
+ return !empty($https) && $https !== 'off';
}
/**
diff --git a/phpBB/phpbb/search/base.php b/phpBB/phpbb/search/base.php
index 30781975d8..d9313dddab 100644
--- a/phpBB/phpbb/search/base.php
+++ b/phpBB/phpbb/search/base.php
@@ -37,52 +37,6 @@ class base
}
/**
- * Retrieves a language dependend list of words that should be ignored by the search
- */
- function get_ignore_words()
- {
- if (!sizeof($this->ignore_words))
- {
- global $user, $phpEx;
-
- $words = array();
-
- if (file_exists("{$user->lang_path}{$user->lang_name}/search_ignore_words.$phpEx"))
- {
- // include the file containing ignore words
- include("{$user->lang_path}{$user->lang_name}/search_ignore_words.$phpEx");
- }
-
- $this->ignore_words = $words;
- unset($words);
- }
- }
-
- /**
- * Stores a list of synonyms that should be replaced in $this->match_synonym and $this->replace_synonym and caches them
- */
- function get_synonyms()
- {
- if (!sizeof($this->match_synonym))
- {
- global $user, $phpEx;
-
- $synonyms = array();
-
- if (file_exists("{$user->lang_path}{$user->lang_name}/search_synonyms.$phpEx"))
- {
- // include the file containing synonyms
- include("{$user->lang_path}{$user->lang_name}/search_synonyms.$phpEx");
- }
-
- $this->match_synonym = array_keys($synonyms);
- $this->replace_synonym = array_values($synonyms);
-
- unset($synonyms);
- }
- }
-
- /**
* Retrieves cached search results
*
* @param string $search_key an md5 string generated from all the passed search options to identify the results
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index bad2003000..9faf5ca08b 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -177,8 +177,10 @@ class fulltext_mysql extends \phpbb\search\base
$engine === 'MyISAM' ||
// 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
+ // We also require https://bugs.mysql.com/bug.php?id=67004 to be
+ // fixed for proper overall operation. Hence we require 5.6.8.
$engine === 'InnoDB' &&
- phpbb_version_compare($this->db->sql_server_info(true), '5.6.4', '>=');
+ phpbb_version_compare($this->db->sql_server_info(true), '5.6.8', '>=');
if (!$fulltext_supported)
{
@@ -379,7 +381,7 @@ class fulltext_mysql extends \phpbb\search\base
}
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
implode(', ', $this->split_words),
$type,
$fields,
@@ -390,7 +392,39 @@ class fulltext_mysql extends \phpbb\search\base
implode(',', $ex_fid_ary),
$post_visibility,
implode(',', $author_ary)
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_mysql_by_keyword_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var string type Searching type ('posts', 'topics')
+ * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all')
+ * @var string terms Searching terms ('all', 'any')
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'type',
+ 'fields',
+ 'terms',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_by_keyword_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
if ($start < 0)
{
@@ -610,7 +644,7 @@ class fulltext_mysql extends \phpbb\search\base
}
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
'',
$type,
($firstpost_only) ? 'firstpost' : '',
@@ -623,7 +657,39 @@ class fulltext_mysql extends \phpbb\search\base
$post_visibility,
implode(',', $author_ary),
$author_name,
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_mysql_by_author_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var string type Searching type ('posts', 'topics')
+ * @var boolean firstpost_only Flag indicating if only topic starting posts are considered
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @var string author_name The username to search on
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'type',
+ 'firstpost_only',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ 'author_name',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_by_author_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
if ($start < 0)
{
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 02337cbf98..63b0b24edf 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -57,7 +57,7 @@ class fulltext_native extends \phpbb\search\base
protected $must_not_contain_ids = array();
/**
- * Post ids of posts containing atleast one word that needs to be excluded
+ * Post ids of posts containing at least one word that needs to be excluded
* @var array
*/
protected $must_exclude_one_ids = array();
@@ -530,7 +530,7 @@ class fulltext_native extends \phpbb\search\base
sort($must_exclude_one_ids);
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
serialize($must_contain_ids),
serialize($must_not_contain_ids),
serialize($must_exclude_one_ids),
@@ -544,7 +544,45 @@ class fulltext_native extends \phpbb\search\base
$post_visibility,
implode(',', $author_ary),
$author_name,
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_native_by_keyword_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var array must_contain_ids Array with post ids of posts containing words that are to be included
+ * @var array must_not_contain_ids Array with post ids of posts containing words that should not be included
+ * @var array must_exclude_one_ids Array with post ids of posts containing at least one word that needs to be excluded
+ * @var string type Searching type ('posts', 'topics')
+ * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all')
+ * @var string terms Searching terms ('all', 'any')
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'must_contain_ids',
+ 'must_not_contain_ids',
+ 'must_exclude_one_ids',
+ 'type',
+ 'fields',
+ 'terms',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_native_by_keyword_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
// try reading the results from cache
$total_results = 0;
@@ -980,7 +1018,7 @@ class fulltext_native extends \phpbb\search\base
}
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
'',
$type,
($firstpost_only) ? 'firstpost' : '',
@@ -993,7 +1031,39 @@ class fulltext_native extends \phpbb\search\base
$post_visibility,
implode(',', $author_ary),
$author_name,
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_native_by_author_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var string type Searching type ('posts', 'topics')
+ * @var boolean firstpost_only Flag indicating if only topic starting posts are considered
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @var string author_name The username to search on
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'type',
+ 'firstpost_only',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ 'author_name',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_native_by_author_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
// try reading the results from cache
$total_results = 0;
@@ -1192,7 +1262,7 @@ class fulltext_native extends \phpbb\search\base
if (!$total_results && $is_mysql)
{
// Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
- $sql_calc = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
+ $sql_calc = str_replace('SELECT ' . $select, 'SELECT SQL_CALC_FOUND_ROWS ' . $select, $sql);
$result = $this->db->sql_query($sql_calc);
$this->db->sql_freeresult($result);
@@ -1905,15 +1975,15 @@ class fulltext_native extends \phpbb\search\base
</dl>
<dl>
<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>
+ <dd><input id="fulltext_native_min_chars" type="number" 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">' . $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>
+ <dd><input id="fulltext_native_max_chars" type="number" 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">' . $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>
+ <dd><input id="fulltext_native_common_thres" type="text" name="config[fulltext_native_common_thres]" value="' . (double) $this->config['fulltext_native_common_thres'] . '" /> %</dd>
</dl>
';
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php
index d17b26be8f..04441e6226 100644
--- a/phpBB/phpbb/search/fulltext_postgres.php
+++ b/phpBB/phpbb/search/fulltext_postgres.php
@@ -341,7 +341,7 @@ class fulltext_postgres extends \phpbb\search\base
}
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
implode(', ', $this->split_words),
$type,
$fields,
@@ -352,7 +352,39 @@ class fulltext_postgres extends \phpbb\search\base
implode(',', $ex_fid_ary),
$post_visibility,
implode(',', $author_ary)
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_postgres_by_keyword_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var string type Searching type ('posts', 'topics')
+ * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all')
+ * @var string terms Searching terms ('all', 'any')
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'type',
+ 'fields',
+ 'terms',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_by_keyword_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
if ($start < 0)
{
@@ -585,7 +617,7 @@ class fulltext_postgres extends \phpbb\search\base
}
// generate a search_key from all the options to identify the results
- $search_key = md5(implode('#', array(
+ $search_key_array = array(
'',
$type,
($firstpost_only) ? 'firstpost' : '',
@@ -598,7 +630,39 @@ class fulltext_postgres extends \phpbb\search\base
$post_visibility,
implode(',', $author_ary),
$author_name,
- )));
+ );
+
+ /**
+ * Allow changing the search_key for cached results
+ *
+ * @event core.search_postgres_by_author_modify_search_key
+ * @var array search_key_array Array with search parameters to generate the search_key
+ * @var string type Searching type ('posts', 'topics')
+ * @var boolean firstpost_only Flag indicating if only topic starting posts are considered
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @var string author_name The username to search on
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'search_key_array',
+ 'type',
+ 'firstpost_only',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ 'author_name',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_by_author_modify_search_key', compact($vars)));
+
+ $search_key = md5(implode('#', $search_key_array));
if ($start < 0)
{
@@ -1025,11 +1089,11 @@ class fulltext_postgres extends \phpbb\search\base
</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>
+ <dd><input id="fulltext_postgres_min_word_len" type="number" 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>
+ <dd><input id="fulltext_postgres_max_word_len" type="number" min="0" max="255" name="config[fulltext_postgres_max_word_len]" value="' . (int) $this->config['fulltext_postgres_max_word_len'] . '" /></dd>
</dl>
';
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index cd7add72f0..0dbc6e33df 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -358,6 +358,23 @@ class fulltext_sphinx
$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);
+
+ /**
+ * Allow adding/changing the Sphinx configuration data
+ *
+ * @event core.search_sphinx_modify_config_data
+ * @var array config_data Array with the Sphinx configuration data
+ * @var array non_unique Array with the Sphinx non-unique variables to delete
+ * @var array delete Array with the Sphinx variables to delete
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'config_data',
+ 'non_unique',
+ 'delete',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_sphinx_modify_config_data', compact($vars)));
+
foreach ($config_data as $section_name => $section_data)
{
$section = $config_object->get_section_by_name($section_name);
@@ -531,6 +548,41 @@ class fulltext_sphinx
$this->sphinx->SetFilter('topic_id', array($topic_id));
}
+ /**
+ * Allow modifying the Sphinx search options
+ *
+ * @event core.search_sphinx_keywords_modify_options
+ * @var string type Searching type ('posts', 'topics')
+ * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all')
+ * @var string terms Searching terms ('all', 'any')
+ * @var int sort_days Time, in days, of the oldest possible post to list
+ * @var string sort_key The sort type used from the possible sort types
+ * @var int topic_id Limit the search to this topic_id only
+ * @var array ex_fid_ary Which forums not to search on
+ * @var string post_visibility Post visibility data
+ * @var array author_ary Array of user_id containing the users to filter the results to
+ * @var string author_name The username to search on
+ * @var object sphinx The Sphinx searchd client object
+ * @since 3.1.7-RC1
+ */
+ $sphinx = $this->sphinx;
+ $vars = array(
+ 'type',
+ 'fields',
+ 'terms',
+ 'sort_days',
+ 'sort_key',
+ 'topic_id',
+ 'ex_fid_ary',
+ 'post_visibility',
+ 'author_ary',
+ 'author_name',
+ 'sphinx',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.search_sphinx_keywords_modify_options', compact($vars)));
+ $this->sphinx = $sphinx;
+ unset($sphinx);
+
$search_query_prefix = '';
switch ($fields)
@@ -900,11 +952,11 @@ class fulltext_sphinx
</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>
+ <dd><input id="fulltext_sphinx_port" type="number" min="0" max="9999999999" 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>
+ <dd><input id="fulltext_sphinx_indexer_mem_limit" type="number" min="0" max="9999999999" 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>
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index a5c8f264e0..eb5543b50b 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -219,7 +219,7 @@ class session
function session_begin($update_session_page = true)
{
global $phpEx, $SID, $_SID, $_EXTRA_URL, $db, $config, $phpbb_root_path;
- global $request, $phpbb_container;
+ global $request, $phpbb_container, $phpbb_dispatcher;
// Give us some basic information
$this->time_now = time();
@@ -281,11 +281,21 @@ 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 = htmlspecialchars_decode($request->server('REMOTE_ADDR'));
- $this->ip = preg_replace('# {2,}#', ' ', str_replace(',', ' ', $this->ip));
+ $ip = htmlspecialchars_decode($request->server('REMOTE_ADDR'));
+ $ip = preg_replace('# {2,}#', ' ', str_replace(',', ' ', $ip));
+
+ /**
+ * Event to alter user IP address
+ *
+ * @event core.session_ip_after
+ * @var string ip REMOTE_ADDR
+ * @since 3.1.10-RC1
+ */
+ $vars = array('ip');
+ extract($phpbb_dispatcher->trigger_event('core.session_ip_after', compact($vars)));
// split the list of IPs
- $ips = explode(' ', trim($this->ip));
+ $ips = explode(' ', trim($ip));
// Default IP if REMOTE_ADDR is invalid
$this->ip = '127.0.0.1';
@@ -446,39 +456,6 @@ class session
if (!$session_expired)
{
- // Only update session DB a minute or so after last update or if page changes
- if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
- {
- $sql_ary = array('session_time' => $this->time_now);
-
- // Do not update the session page for ajax requests, so the view online still works as intended
- if ($this->update_session_page && !$request->is_ajax())
- {
- $sql_ary['session_page'] = substr($this->page['page'], 0, 199);
- $sql_ary['session_forum_id'] = $this->page['forum'];
- }
-
- $db->sql_return_on_error(true);
-
- $this->update_session($sql_ary);
-
- $db->sql_return_on_error(false);
-
- // If the database is not yet updated, there will be an error due to the session_forum_id
- // @todo REMOVE for 3.0.2
- if ($result === false)
- {
- unset($sql_ary['session_forum_id']);
-
- $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'])
- {
- $this->leave_newly_registered();
- }
- }
-
$this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
$this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false;
$this->data['user_lang'] = basename($this->data['user_lang']);
@@ -734,18 +711,6 @@ class session
// Only update session DB a minute or so after last update or if page changes
if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
{
- $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now;
-
- $sql_ary = array('session_time' => $this->time_now, 'session_last_visit' => $this->time_now, 'session_admin' => 0);
-
- if ($this->update_session_page)
- {
- $sql_ary['session_page'] = substr($this->page['page'], 0, 199);
- $sql_ary['session_forum_id'] = $this->page['forum'];
- }
-
- $this->update_session($sql_ary);
-
// Update the last visit time
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
@@ -1599,4 +1564,41 @@ class session
$vars = array('session_data', 'session_id');
extract($phpbb_dispatcher->trigger_event('core.update_session_after', compact($vars)));
}
+
+ public function update_session_infos()
+ {
+ global $config, $db, $request;
+
+ // No need to update if it's a new session. Informations are already inserted by session_create()
+ if (isset($this->data['session_created']) && $this->data['session_created'])
+ {
+ return;
+ }
+
+ // Only update session DB a minute or so after last update or if page changes
+ if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
+ {
+ $sql_ary = array('session_time' => $this->time_now);
+
+ // Do not update the session page for ajax requests, so the view online still works as intended
+ if ($this->update_session_page && !$request->is_ajax())
+ {
+ $sql_ary['session_page'] = substr($this->page['page'], 0, 199);
+ $sql_ary['session_forum_id'] = $this->page['forum'];
+ }
+
+ $db->sql_return_on_error(true);
+
+ $this->update_session($sql_ary);
+
+ $db->sql_return_on_error(false);
+
+ $this->data = array_merge($this->data, $sql_ary);
+
+ if ($this->data['user_id'] != ANONYMOUS && isset($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts'])
+ {
+ $this->leave_newly_registered();
+ }
+ }
+ }
}
diff --git a/phpBB/phpbb/template/asset.php b/phpBB/phpbb/template/asset.php
index 67dbd7b357..ff9366af4a 100644
--- a/phpBB/phpbb/template/asset.php
+++ b/phpBB/phpbb/template/asset.php
@@ -152,6 +152,24 @@ class asset
*/
public function set_path($path, $urlencode = false)
{
+ // Since 1.7.0 Twig returns the real path of the file. We need it to be relative to the working directory.
+ $real_root_path = realpath($this->path_helper->get_phpbb_root_path()) . DIRECTORY_SEPARATOR;
+
+ // If the asset is under the phpBB root path we need to remove its path and then prepend $phpbb_root_path
+ if (substr($path . DIRECTORY_SEPARATOR, 0, strlen($real_root_path)) === $real_root_path)
+ {
+ $path = $this->path_helper->get_phpbb_root_path() . str_replace('\\', '/', substr($path, strlen($real_root_path)));
+ }
+ else
+ {
+ // Else we make the path relative to the current working directory
+ $real_root_path = realpath('.') . DIRECTORY_SEPARATOR;
+ if ($real_root_path && substr($path . DIRECTORY_SEPARATOR, 0, strlen($real_root_path)) === $real_root_path)
+ {
+ $path = str_replace('\\', '/', substr($path, strlen($real_root_path)));
+ }
+ }
+
if ($urlencode)
{
$paths = explode('/', $path);
@@ -161,6 +179,7 @@ class asset
}
$path = implode('/', $paths);
}
+
$this->components['path'] = $path;
}
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index bd754d9bbd..d1bbb2b55a 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -350,7 +350,7 @@ class twig extends \phpbb\template\base
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())));
+ $this->assign_var($template_var, $this->twig->render($this->get_filename_from_handle($handle), $this->get_template_vars()));
return $this;
}
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index f5ad5096bb..faedd79703 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -725,7 +725,7 @@ class user extends \phpbb\session
$utc = new \DateTimeZone('UTC');
}
- $time = new $this->datetime($this, "@$gmepoch", $utc);
+ $time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
$time->setTimezone($this->timezone);
return $time->format($format, $forcedate);
diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php
index 5ce8ca2d4d..967d96d73a 100644
--- a/phpBB/phpbb/user_loader.php
+++ b/phpBB/phpbb/user_loader.php
@@ -189,12 +189,7 @@ class user_loader
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'], 'USER_AVATAR', false, $lazy);
+ return phpbb_get_avatar(\phpbb\avatar\manager::clean_row($user, 'user'), 'USER_AVATAR', false, $lazy);
}
/**
diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php
index e4f68f5aab..a1e66ba8fe 100644
--- a/phpBB/phpbb/version_helper.php
+++ b/phpBB/phpbb/version_helper.php
@@ -34,6 +34,11 @@ class version_helper
protected $file = 'versions.json';
/**
+ * @var bool Use SSL or not
+ */
+ protected $use_ssl = false;
+
+ /**
* @var string Current version installed
*/
protected $current_version;
@@ -85,13 +90,15 @@ class version_helper
* @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)
+ * @param bool $use_ssl Use SSL or not (Default: false)
* @return version_helper
*/
- public function set_file_location($host, $path, $file = 'versions.json')
+ public function set_file_location($host, $path, $file = 'versions.json', $use_ssl = false)
{
$this->host = $host;
$this->path = $path;
$this->file = $file;
+ $this->use_ssl = $use_ssl;
return $this;
}
@@ -244,7 +251,7 @@ class version_helper
*/
public function get_versions($force_update = false, $force_cache = false)
{
- $cache_file = '_versioncheck_' . $this->host . $this->path . $this->file;
+ $cache_file = '_versioncheck_' . $this->host . $this->path . $this->file . $this->use_ssl;
$info = $this->cache->get($cache_file);
@@ -255,7 +262,7 @@ class version_helper
else if ($info === false || $force_update)
{
try {
- $info = $this->file_downloader->get($this->host, $this->path, $this->file);
+ $info = $this->file_downloader->get($this->host, $this->path, $this->file, $this->use_ssl ? 443 : 80);
}
catch (\phpbb\exception\runtime_exception $exception)
{
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 2bd3a1a1d2..db580d926b 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -371,7 +371,9 @@ switch ($mode)
* NOTE: Should be actual language strings, NOT
* language keys.
* @var bool is_authed Does the user have the required permissions?
+* @var array post_data All post data from database
* @since 3.1.3-RC1
+* @changed 3.1.10-RC1 Added post_data
*/
$vars = array(
'post_id',
@@ -387,6 +389,7 @@ $vars = array(
'mode',
'error',
'is_authed',
+ 'post_data',
);
extract($phpbb_dispatcher->trigger_event('core.modify_posting_auth', compact($vars)));
@@ -481,7 +484,7 @@ if ($mode == 'delete' || $mode == 'soft_delete')
}
$delete_reason = $request->variable('delete_reason', '', true);
- phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete'), $delete_reason);
+ phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete' && !$request->is_set_post('delete_permanent')), $delete_reason);
return;
}
@@ -599,7 +602,7 @@ if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode
WHERE post_msg_id = $post_id
AND in_message = 0
AND is_orphan = 0
- ORDER BY filetime DESC";
+ ORDER BY attach_id DESC";
$result = $db->sql_query($sql);
$message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
$db->sql_freeresult($result);
@@ -1027,7 +1030,8 @@ if ($submit || $preview || $refresh)
$message_parser->bbcode_bitfield = $post_data['bbcode_bitfield'];
}
- if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id))
+ $ignore_flood = $auth->acl_get('u_ignoreflood') ? true : $auth->acl_get('f_ignoreflood', $forum_id);
+ if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$ignore_flood)
{
// Flood check
$last_post_time = 0;
@@ -1588,6 +1592,9 @@ $message_parser->decode_message($post_data['bbcode_uid']);
if ($generate_quote)
{
+ // Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
+ $message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);
+
if ($config['allow_bbcode'])
{
$message_parser->message = '[quote=&quot;' . $post_data['quote_username'] . '&quot;]' . censor_text(trim($message_parser->message)) . "[/quote]\n";
@@ -1737,6 +1744,7 @@ $page_data = 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' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
+ 'L_DELETE_POST_PERMANENTLY' => $user->lang('DELETE_POST_PERMANENTLY', 1),
'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']) : '',
diff --git a/phpBB/search.php b/phpBB/search.php
index d8f0bd1426..27ec8e4dab 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -126,6 +126,26 @@ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
$pagination = $phpbb_container->get('pagination');
+/**
+* This event allows you to alter the above parameters, such as keywords and submit
+*
+* @event core.search_modify_submit_parameters
+* @var string keywords The search keywords
+* @var string author Specifies the author match, when ANONYMOUS is also a search-match
+* @var int author_id ID of the author to search by
+* @var string search_id Predefined search type name
+* @var bool submit Whether or not the form has been submitted
+* @since 3.1.10-RC1
+*/
+$vars = array(
+ 'keywords',
+ 'author',
+ 'author_id',
+ 'search_id',
+ 'submit',
+);
+extract($phpbb_dispatcher->trigger_event('core.search_modify_submit_parameters', compact($vars)));
+
if ($keywords || $author || $author_id || $search_id || $submit)
{
// clear arrays
@@ -320,7 +340,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
* @var array ex_fid_ary Array of excluded forum ids
* @var array author_id_ary Array of exclusive author ids
* @var string search_id The id of the search request
+ * @var array id_ary Array of post or topic ids for search result
+ * @var string show_results 'posts' or 'topics' type of ids
* @since 3.1.3-RC1
+ * @changed 3.1.10-RC1 Added id_ary, show_results
*/
$vars = array(
'keywords',
@@ -328,6 +351,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'ex_fid_ary',
'author_id_ary',
'search_id',
+ 'id_ary',
+ 'show_results',
);
extract($phpbb_dispatcher->trigger_event('core.search_modify_param_before', compact($vars)));
@@ -427,6 +452,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
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);
$s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
+
+ $template->assign_var('U_MARK_ALL_READ', ($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()) : '');
break;
case 'newposts':
@@ -483,6 +510,24 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
}
+ /**
+ * Event to modify data after pre-made searches
+ *
+ * @event core.search_modify_param_after
+ * @var string l_search_title The title of the search page
+ * @var string search_id Predefined search type name
+ * @var string show_results Display topics or posts
+ * @var string sql SQL query corresponding to the pre-made search id
+ * @since 3.1.7-RC1
+ */
+ $vars = array(
+ 'l_search_title',
+ 'search_id',
+ 'show_results',
+ 'sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_param_after', compact($vars)));
+
// show_results should not change after this
$per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page'];
$total_match_count = 0;
@@ -550,6 +595,48 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$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);
}
+ /**
+ * Event to search otherwise than by keywords or author
+ *
+ * @event core.search_backend_search_after
+ * @var string show_results 'posts' or 'topics' type of ids
+ * @var string search_fields The data fields to search in
+ * @var string search_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)
+ * @var array sort_by_sql Array of SQL sorting instructions
+ * @var string sort_key The sort key
+ * @var string sort_dir The sort direction
+ * @var int sort_days Limit the age of results
+ * @var array ex_fid_ary Array of excluded forum ids
+ * @var string m_approve_posts_fid_sql Specifies which types of posts the user can view in which forums
+ * @var 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
+ * @var array author_id_ary Array of exclusive author ids
+ * @var string sql_author_match Specifies the author match, when ANONYMOUS is also a search-match
+ * @var array id_ary Array of post or topic ids for search result
+ * @var int start The starting id of the results
+ * @var int per_page Number of ids each page is supposed to contain
+ * @var int total_match_count The total number of search matches
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ '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',
+ 'total_match_count',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_backend_search_after', compact($vars)));
+
$sql_where = '';
if (sizeof($id_ary))
@@ -594,6 +681,30 @@ 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 : '';
+ /**
+ * Event to add or modify search URL parameters
+ *
+ * @event core.search_modify_url_parameters
+ * @var string u_search Search URL parameters string
+ * @var string search_id Predefined search type name
+ * @var string show_results String indicating the show results mode
+ * @var string sql_where The SQL WHERE string used by search to get topic data
+ * @var int total_match_count The total number of search matches
+ * @var array ex_fid_ary Array of excluded forum ids
+ * @since 3.1.7-RC1
+ * @changed 3.1.10-RC1 Added show_results, sql_where, total_match_count
+ * @changed 3.1.11-RC1 Added ex_fid_ary
+ */
+ $vars = array(
+ 'u_search',
+ 'search_id',
+ 'show_results',
+ 'sql_where',
+ 'total_match_count',
+ 'ex_fid_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_url_parameters', compact($vars)));
+
if ($sql_where)
{
if ($show_results == 'posts')
@@ -704,6 +815,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
+ $sql_order_by = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
/**
* Event to modify the SQL query before the topic data is retrieved
*
@@ -712,16 +825,30 @@ if ($keywords || $author || $author_id || $search_id || $submit)
* @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
* @var int total_match_count The total number of search matches
+ * @var array sort_by_sql Array of SQL sorting instructions
+ * @var string sort_dir The sorting direction
+ * @var string sort_key The sorting key
+ * @var string sql_order_by The SQL ORDER BY string used by search to get topic data
* @since 3.1.0-a1
* @changed 3.1.0-RC5 Added total_match_count
+ * @changed 3.1.7-RC1 Added sort_by_sql, sort_dir, sort_key, sql_order_by
*/
- $vars = array('sql_select', 'sql_from', 'sql_where', 'total_match_count');
+ $vars = array(
+ 'sql_select',
+ 'sql_from',
+ 'sql_where',
+ 'total_match_count',
+ 'sort_by_sql',
+ 'sort_dir',
+ 'sort_key',
+ 'sql_order_by',
+ );
extract($phpbb_dispatcher->trigger_event('core.search_get_topic_data', compact($vars)));
$sql = "SELECT $sql_select
FROM $sql_from
- WHERE $sql_where";
- $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+ WHERE $sql_where
+ ORDER BY $sql_order_by";
}
$result = $db->sql_query($sql);
$result_topic_id = 0;
@@ -936,7 +1063,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$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) : $u_mcp_queue;
- $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
+ $row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['topic_title']);
$tpl_ary = array(
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -1019,8 +1146,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($hilit)
{
// post highlighting
- $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
- $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
+ $row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_text']);
+ $row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $row['post_subject']);
}
$tpl_ary = array(
@@ -1199,6 +1326,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
// Search forum
+$rowset = array();
$s_forums = '';
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, f.enable_indexing, fa.user_id
FROM ' . FORUMS_TABLE . ' f
@@ -1207,11 +1335,27 @@ $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f
ORDER BY f.left_id ASC";
$result = $db->sql_query($sql);
+while ($row = $db->sql_fetchrow($result))
+{
+ $rowset[(int) $row['forum_id']] = $row;
+}
+$db->sql_freeresult($result);
+
$right = $cat_right = $padding_inc = 0;
$padding = $forum_list = $holding = '';
$pad_store = array('0' => '');
-while ($row = $db->sql_fetchrow($result))
+/**
+* Modify the forum select list for advanced search page
+*
+* @event core.search_modify_forum_select_list
+* @var array rowset Array with the forums list data
+* @since 3.1.10-RC1
+*/
+$vars = array('rowset');
+extract($phpbb_dispatcher->trigger_event('core.search_modify_forum_select_list', compact($vars)));
+
+foreach ($rowset as $row)
{
if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id']))
{
@@ -1283,8 +1427,8 @@ if ($holding)
$s_forums .= $holding;
}
-$db->sql_freeresult($result);
unset($pad_store);
+unset($rowset);
if (!$s_forums)
{
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index 0b13b17bea..300a83164b 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
-style_version = 3.1.5
-phpbb_version = 3.1.5
+style_version = 3.1.10
+phpbb_version = 3.1.10
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 76c605dd19..311da92a95 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -132,9 +132,9 @@ phpbb.markNotifications = function($popup, unreadCount) {
// Update the unread count.
$('strong', '#notification_list_button').html(unreadCount);
- // Remove the Mark all read link if there are no unread notifications.
+ // Remove the Mark all read link & notification count if there are no unread notifications.
if (!unreadCount) {
- $('#mark_all_notifications').remove();
+ $('#mark_all_notifications, #notification_list_button > strong').remove();
}
// Update page title
@@ -242,7 +242,14 @@ phpbb.addAjaxCallback('vote_poll', function(res) {
var mostVoted = (res.vote_counts[optionId] === mostVotes);
var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[optionId] / res.total_votes) * 100);
var percentRel = (mostVotes === 0) ? 0 : Math.round((res.vote_counts[optionId] / mostVotes) * 100);
-
+ var altText;
+
+ altText = $this.attr('data-alt-text');
+ if (voted) {
+ $this.attr('title', $.trim(altText));
+ } else {
+ $this.attr('title', '');
+ };
$this.toggleClass('voted', voted);
$this.toggleClass('most-votes', mostVoted);
diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html
index f0a7ab2bdb..fbd881a940 100644
--- a/phpBB/styles/prosilver/template/confirm_delete_body.html
+++ b/phpBB/styles/prosilver/template/confirm_delete_body.html
@@ -7,7 +7,7 @@
<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 -->
+ <!-- IF S_TOPIC_MODE -->{DELETE_TOPIC_PERMANENTLY_EXPLAIN}<!-- ELSE -->{DELETE_POST_PERMANENTLY_EXPLAIN}<!-- ENDIF -->
</label>
<!-- ENDIF -->
@@ -43,7 +43,7 @@
<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 -->
+ <!-- IF S_TOPIC_MODE -->{DELETE_TOPIC_PERMANENTLY_EXPLAIN}<!-- ELSE -->{DELETE_POST_PERMANENTLY_EXPLAIN}<!-- ENDIF -->
</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 8e5b257ba4..99f3108fad 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -159,7 +159,10 @@ function selectCode(a) {
try {
s.setBaseAndExtent(e, 0, e, l);
} catch (error) {
- s.setBaseAndExtent(e, 0, e, 1);
+ r = document.createRange();
+ r.selectNodeContents(e);
+ s.removeAllRanges();
+ s.addRange(r);
}
}
// Firefox and Opera
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index 9b472ccd30..5858a2c801 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -50,7 +50,7 @@
<!-- 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 />
-
+ <!-- EVENT topiclist_row_topic_title_after -->
<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 />
@@ -120,6 +120,7 @@
</div>
</div>
+<!-- EVENT mcp_forum_actions_before -->
<fieldset class="display-actions">
<!-- IF not S_MERGE_SELECT -->
<select name="action">
@@ -143,6 +144,7 @@
<!-- ENDIF -->
{S_FORM_TOKEN}
</fieldset>
+<!-- EVENT mcp_forum_actions_after -->
</form>
<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html
index d028fffeb4..45a9ae83bc 100644
--- a/phpBB/styles/prosilver/template/mcp_move.html
+++ b/phpBB/styles/prosilver/template/mcp_move.html
@@ -31,6 +31,8 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT mcp_move_before -->
+
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
<div class="panel">
@@ -54,7 +56,7 @@
</fieldset>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html
index 81d1be795e..e5777d206a 100644
--- a/phpBB/styles/prosilver/template/mcp_post.html
+++ b/phpBB/styles/prosilver/template/mcp_post.html
@@ -91,9 +91,9 @@
<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;
+ <!-- IF S_CAN_DELETE_POST --><input class="button2" type="submit" value="{L_DELETE}" name="action[delete]" /> &nbsp;<!-- ENDIF -->
<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 -->
+ <!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="deleted_posts" /><!-- ENDIF -->
<input type="hidden" name="post_id_list[]" value="{POST_ID}" />
{S_FORM_TOKEN}
</p>
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index c21b676370..22d837b3d1 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -34,7 +34,7 @@
<fieldset id="display-panel" class="fields2" role="tabpanel">
<dl>
<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="0" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
+ <dd><input class="inputbox autowidth" type="number" min="0" max="999999" name="posts_per_page" id="posts_per_page" value="{POSTS_PER_PAGE}" /></dd>
</dl>
<dl>
<dt><label>{L_DISPLAY_POSTS}{L_COLON}</label></dt>
@@ -73,7 +73,7 @@
<dl>
<dt><label for="to_topic_id">{L_MERGE_TOPIC_ID}{L_COLON}</label></dt>
<dd>
- <input class="inputbox autowidth" type="number" min="0" size="6" name="to_topic_id" id="to_topic_id" value="{TO_TOPIC_ID}" />
+ <input class="inputbox autowidth" type="number" min="0" max="9999999999" 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 -->
@@ -112,7 +112,10 @@
</ul>
<h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>
+
+ <!-- EVENT mcp_topic_postrow_post_details_before -->
<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>
+ <!-- EVENT mcp_topic_postrow_post_details_after -->
<!-- IF postrow.S_POST_UNAPPROVED -->
<p class="post-notice unapproved">
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 414569019e..5fba59159c 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -14,7 +14,11 @@
<!-- IF S_SHOW_GROUP -->
<h2 class="group-title"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2>
+ <!-- IF U_MANAGE -->
+ <p class="right responsive-center manage rightside"><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a></p>
+ <!-- ENDIF -->
<p>{GROUP_DESC} {GROUP_TYPE}</p>
+
<p>
<!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF -->
<!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
@@ -101,8 +105,8 @@
<!-- ENDIF -->
<!-- ENDIF -->
- <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td><span class="rank-img"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></span><!-- 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>
+ <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF memberrow.S_INACTIVE --> inactive<!-- ENDIF -->">
+ <td><span class="rank-img"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></span><!-- 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}<!-- IF memberrow.S_INACTIVE --> ({L_INACTIVE})<!-- ENDIF --><!-- 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"><!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- BEGINELSE -->&nbsp;<!-- END custom_fields --></td>
<td>{memberrow.JOINED}</td>
diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html
index 4a9f764d07..eea699da08 100644
--- a/phpBB/styles/prosilver/template/memberlist_email.html
+++ b/phpBB/styles/prosilver/template/memberlist_email.html
@@ -1,5 +1,7 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT memberlist_email_before -->
+
<!-- IF S_CONTACT_ADMIN-->
<h2 class="titlespace">{L_CONTACT_ADMIN}</h2>
<!-- ELSEIF S_SEND_USER -->
diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html
index bc71aa0969..874607d913 100644
--- a/phpBB/styles/prosilver/template/memberlist_im.html
+++ b/phpBB/styles/prosilver/template/memberlist_im.html
@@ -9,6 +9,10 @@
<p>{L_SEND_IM_EXPLAIN}</p>
+ <!-- IF S_SENT_JABBER -->
+ <p>{L_IM_SENT_JABBER}</p>
+ <!-- ENDIF -->
+
<fieldset>
<dl class="fields2">
<dt><label>{L_IM_RECIPIENT}{L_COLON}</label></dt>
@@ -24,10 +28,6 @@
<dt>&nbsp;</dt>
<dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
</dl>
- <dl class="fields2">
- <dt>&nbsp;</dt>
- <dd>{L_IM_SENT_JABBER}</dd>
- </dl>
<!-- ELSE IF S_NO_SEND_JABBER -->
<dl class="fields2">
<dt>&nbsp;</dt>
diff --git a/phpBB/styles/prosilver/template/memberlist_team.html b/phpBB/styles/prosilver/template/memberlist_team.html
index fd2ba564d3..b7f2d66d94 100644
--- a/phpBB/styles/prosilver/template/memberlist_team.html
+++ b/phpBB/styles/prosilver/template/memberlist_team.html
@@ -8,7 +8,7 @@
<div class="forumbg forumbg-table">
<div class="inner">
- <table class="table1">
+ <table class="table1" id="team">
<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>
@@ -18,8 +18,8 @@
</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>
+ <tr class="<!-- IF group.user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF group.user.S_INACTIVE --> inactive<!-- 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}<!-- IF group.user.S_INACTIVE --> ({L_INACTIVE})<!-- ENDIF --></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 -->
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index 8ecca49a60..a7439bc759 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -36,11 +36,14 @@
<!-- 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 -->
+ <!-- EVENT memberlist_view_non_contact_custom_fields_before -->
<!-- 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 -->
+ <!-- EVENT memberlist_view_non_contact_custom_fields_after -->
+ <!-- EVENT memberlist_view_zebra_before -->
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
<!-- IF U_REMOVE_FRIEND -->
<dt>&nbsp;</dt> <dd class="zebra"><a href="{U_REMOVE_FRIEND}" data-ajax="zebra"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
@@ -55,6 +58,7 @@
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_zebra_after -->
</dl>
</div>
@@ -71,6 +75,7 @@
<!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER}</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, 750, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
+ <!-- EVENT memberlist_view_contact_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF custom_fields.S_PROFILE_CONTACT -->
<dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt>
@@ -81,6 +86,7 @@
<!-- ENDIF -->
<!-- ENDIF -->
<!-- END custom_fields -->
+ <!-- EVENT memberlist_view_contact_custom_fields_after -->
<!-- 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}{L_COLON}</dt> <dd>{PROFILE_FIELD1_VALUE}</dd>
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index faf48e0b05..e5f354a943 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -18,7 +18,7 @@
<!-- IF S_USER_LOGGED_IN -->
<li class="small-icon icon-search-new"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li>
<!-- ENDIF -->
- <!-- IF S_LOAD_UNREADS -->
+ <!-- IF S_LOAD_UNREADS -->
<li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li>
<!-- ENDIF -->
<li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li>
@@ -46,6 +46,7 @@
<!-- IF U_MCP --><li class="small-icon icon-mcp" data-last-responsive="true"><a href="{U_MCP}" title="{L_MCP}" role="menuitem">{L_MCP_SHORT}</a></li><!-- ENDIF -->
<!-- IF S_REGISTERED_USER -->
+ <!-- EVENT navbar_header_user_profile_prepend -->
<li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true">
<!-- EVENT navbar_header_username_prepend -->
<div class="header-profile dropdown-container">
@@ -54,14 +55,14 @@
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents" role="menu">
<!-- IF U_RESTORE_PERMISSIONS --><li class="small-icon icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
-
+
<!-- EVENT navbar_header_profile_list_before -->
-
+
<li class="small-icon icon-ucp"><a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">{L_PROFILE}</a></li>
<li class="small-icon icon-profile"><a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">{L_READ_PROFILE}</a></li>
-
+
<!-- EVENT navbar_header_profile_list_after -->
-
+
<li class="separator"></li>
<li class="small-icon icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
</ul>
@@ -71,15 +72,16 @@
</li>
<!-- IF S_DISPLAY_PM -->
<li class="small-icon icon-pm rightside" data-skip-responsive="true">
- <a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></a>
+ <a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} </span><!-- IF PRIVATE_MESSAGE_COUNT --><strong class="badge">{PRIVATE_MESSAGE_COUNT}</strong><!-- ENDIF --></a>
</li>
<!-- ENDIF -->
<!-- IF S_NOTIFICATIONS_DISPLAY -->
<li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
- <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} </span><!-- IF NOTIFICATIONS_COUNT --><strong class="badge">{NOTIFICATIONS_COUNT}</strong><!-- ENDIF --></a>
<!-- INCLUDE notification_dropdown.html -->
</li>
<!-- ENDIF -->
+ <!-- EVENT navbar_header_user_profile_append -->
<!-- ELSE -->
<li class="small-icon icon-logout rightside" data-skip-responsive="true"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
<!-- IF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index ecba72f6f4..ff54f3a0aa 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -37,7 +37,7 @@
</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.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</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 -->
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 45f8eaa1c9..e583c6e890 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<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>
@@ -46,7 +47,7 @@
<!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">
-<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" media="all and (max-width: 700px), all and (max-device-width: 700px)">
+<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" media="all and (max-width: 700px)">
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
@@ -75,6 +76,7 @@
<a id="top" class="anchor" accesskey="t"></a>
<div id="page-header">
<div class="headerbar" role="banner">
+ <!-- EVENT overall_header_headerbar_before -->
<div class="inner">
<div id="site-description">
@@ -97,8 +99,10 @@
</form>
</div>
<!-- ENDIF -->
+ <!-- EVENT overall_header_searchbox_after -->
</div>
+ <!-- EVENT overall_header_headerbar_after -->
</div>
<!-- EVENT overall_header_navbar_before -->
<!-- INCLUDE navbar_header.html -->
diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html
index 4680eaa175..88c67459c2 100644
--- a/phpBB/styles/prosilver/template/pagination.html
+++ b/phpBB/styles/prosilver/template/pagination.html
@@ -7,7 +7,7 @@
<ul class="dropdown-contents">
<li>{L_JUMP_TO_PAGE}{L_COLON}</li>
<li class="page-jump-form">
- <input type="number" name="page-number" min="1" maxlength="6" title="{L_JUMP_PAGE}" class="inputbox tiny" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" />
+ <input type="number" name="page-number" min="1" max="999999" title="{L_JUMP_PAGE}" class="inputbox tiny" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" />
<input class="button2" value="{L_GO}" type="button" />
</li>
</ul>
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 1a9b3398aa..5258ea09a2 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -6,7 +6,7 @@
<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 -->
+ <!-- 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="{topic_icon.ICON_NAME}" title="" /></label> <!-- END topic_icon -->
</dd>
</dl>
<!-- ENDIF -->
@@ -23,7 +23,11 @@
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
<dl style="clear: left;">
<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>
+ <dd>
+ <!-- EVENT posting_editor_subject_prepend -->
+ <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" />
+ <!-- EVENT posting_editor_subject_append -->
+ </dd>
</dl>
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
@@ -164,7 +168,7 @@
<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
<dl>
<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><label for="topic_time_limit"><input type="number" min="0" max="999" name="topic_time_limit" id="topic_time_limit" value="{TOPIC_TIME_LIMIT}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
<dd>{L_STICK_TOPIC_FOR_EXPLAIN}</dd>
</dl>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html
index 19a7351d78..22da32076c 100644
--- a/phpBB/styles/prosilver/template/posting_layout.html
+++ b/phpBB/styles/prosilver/template/posting_layout.html
@@ -1,7 +1,7 @@
<!-- INCLUDE overall_header.html -->
<!-- IF TOPIC_TITLE -->
- <h2 class="posting-title"><!-- EVENT posting_topic_title_before --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+ <h2 class="posting-title"><!-- EVENT posting_topic_title_before --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT posting_topic_title_after --></h2>
<!-- ELSE -->
<h2 class="posting-title"><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html
index dcaec14a93..ee7100aded 100644
--- a/phpBB/styles/prosilver/template/posting_poll_body.html
+++ b/phpBB/styles/prosilver/template/posting_poll_body.html
@@ -27,12 +27,12 @@
<dl>
<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><input type="number" min="0" max="999" name="poll_max_options" id="poll_max_options" 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}{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><label for="poll_length"><input type="number" min="0" max="999" name="poll_length" id="poll_length" value="{POLL_LENGTH}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
<dd>{L_POLL_FOR_EXPLAIN}</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html
index a5aae8c436..aac117c090 100644
--- a/phpBB/styles/prosilver/template/posting_preview.html
+++ b/phpBB/styles/prosilver/template/posting_preview.html
@@ -24,6 +24,8 @@
<!-- ENDIF -->
+<!-- EVENT posting_preview_poll_after -->
+
<div class="postbody">
<h3>{L_PREVIEW}{L_COLON} {PREVIEW_SUBJECT}</h3>
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index 6909877196..4d5ab16afe 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -16,6 +16,10 @@
<div class="post bg3 post-ignore">
<div class="inner">
{topic_review_row.L_IGNORE_POST}
+ <!-- ELSE IF topic_review_row.S_POST_DELETED -->
+ <div class="post bg3 post-ignore">
+ <div class="inner">
+ {topic_review_row.L_DELETE_POST}
<!-- ELSE -->
<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">
@@ -43,7 +47,10 @@
</ul>
<!-- ENDIF -->
+ <!-- EVENT posting_topic_review_row_post_details_before -->
<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>
+ <!-- EVENT posting_topic_review_row_post_details_after -->
+
<div class="content">{topic_review_row.MESSAGE}</div>
<!-- IF topic_review_row.S_HAS_ATTACHMENTS -->
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html
index 6a8846626e..ca8ccc0a6b 100644
--- a/phpBB/styles/prosilver/template/quickreply_editor.html
+++ b/phpBB/styles/prosilver/template/quickreply_editor.html
@@ -4,6 +4,7 @@
<div class="inner">
<h2 class="quickreply-title">{L_QUICKREPLY}</h2>
<fieldset class="fields1">
+ <!-- EVENT quickreply_editor_subject_before -->
<dl style="clear: left;">
<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>
diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html
index 8d56a103d2..618e2680ba 100644
--- a/phpBB/styles/prosilver/template/search_body.html
+++ b/phpBB/styles/prosilver/template/search_body.html
@@ -9,7 +9,9 @@
<div class="inner">
<h3>{L_SEARCH_QUERY}</h3>
+ <!-- EVENT search_body_search_query_before -->
<fieldset>
+ <!-- EVENT search_body_search_query_prepend -->
<dl>
<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>
@@ -20,7 +22,9 @@
<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>
+ <!-- EVENT search_body_search_query_append -->
</fieldset>
+ <!-- EVENT search_body_search_query_after -->
</div>
</div>
@@ -30,7 +34,9 @@
<h3>{L_SEARCH_OPTIONS}</h3>
+ <!-- EVENT search_body_search_options_before -->
<fieldset>
+ <!-- EVENT search_body_search_options_prepend -->
<dl>
<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>
@@ -49,9 +55,11 @@
<dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd>
<dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd>
</dl>
+ <!-- EVENT search_body_search_options_append -->
<hr class="dashed" />
+ <!-- EVENT search_body_search_display_options_prepend -->
<dl>
<dt><label for="show_results1">{L_DISPLAY_RESULTS}{L_COLON}</label></dt>
<dd>
@@ -74,7 +82,9 @@
<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>
+ <!-- EVENT search_body_search_display_options_append -->
</fieldset>
+ <!-- EVENT search_body_search_options_after -->
</div>
</div>
@@ -91,7 +101,9 @@
</div>
</form>
+<!-- EVENT search_body_form_after -->
+<!-- EVENT search_body_recent_search_before -->
<!-- IF .recentsearch -->
<div class="forumbg forumbg-table">
<div class="inner">
@@ -119,5 +131,6 @@
</div>
</div>
<!-- ENDIF -->
+<!-- EVENT search_body_recent_search_after -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index f76afe3767..b6c454bf05 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -33,6 +33,7 @@
<!-- EVENT search_results_searchbox_after -->
<div class="pagination">
+ <!-- IF U_MARK_ALL_READ --><a href="{U_MARK_ALL_READ}" class="mark-read" accesskey="m">{L_MARK_ALL_READ}</a> &bull;<!-- ENDIF -->
{SEARCH_MATCHES}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
@@ -90,6 +91,7 @@
</div>
<!-- ENDIF -->
<!-- IF searchresults.S_HAS_POLL -->{POLL_IMG} <!-- ENDIF -->
+ <!-- EVENT topiclist_row_topic_title_after -->
{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 -->
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
index 123f8992f2..77980a9dea 100644
--- a/phpBB/styles/prosilver/template/simple_footer.html
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -21,7 +21,7 @@
</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.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</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 -->
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index baa6223754..3924aa29d9 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
@@ -24,7 +25,7 @@
<!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">
-<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)">
+<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" media="all and (max-width: 700px)">
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
index b1076c2d14..130a7c2cca 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
@@ -5,7 +5,7 @@
<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>
+ <label for="avatar_gravatar_width"><input type="number" name="avatar_gravatar_width" id="avatar_gravatar_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_gravatar_height"><input type="number" name="avatar_gravatar_height" id="avatar_gravatar_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" 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
index 2a0f403782..80c7f28ca3 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
@@ -10,7 +10,8 @@
<!-- 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>
+ <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}"<!-- IF avatar_local_row.avatar_local_col.CHECKED --> checked="checked"<!-- ENDIF --> /></label>
<!-- END avatar_local_col -->
<!-- END avatar_local_row -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
index a8f6135fb2..8e175623ac 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
@@ -5,7 +5,7 @@
<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>
+ <label for="avatar_remote_width"><input type="number" name="avatar_remote_width" id="avatar_remote_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_remote_height"><input type="number" name="avatar_remote_height" id="avatar_remote_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index ef03317578..2d65b800a0 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -30,7 +30,7 @@
{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>
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_TIME}</a>
</div>
<!-- ENDIF -->
</div>
@@ -113,9 +113,9 @@
<div class="action-bar bottom">
<div class="pagination">
{TOTAL_TOPICS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 55d81b4e69..d431561834 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
index c8b028f83a..4cd9f6655b 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -70,7 +70,7 @@
{S_DATEFORMAT_OPTIONS}
</select>
</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>
+ <dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="64" class="inputbox narrow" style="margin-top: 3px;" /></dd>
</dl>
<!-- EVENT ucp_prefs_personal_append -->
</fieldset>
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index fafd0cce00..655c0fc48c 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -14,7 +14,7 @@
// ]]>
</script>
-<form method="post" action="{S_UCP_ACTION}" id="register">
+<form id="register" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
<div class="panel">
<div class="inner">
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 2679a2cd29..643b78823f 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -121,6 +121,8 @@
<!-- ENDIF -->
+<!-- EVENT viewforum_body_topic_row_before -->
+
<!-- BEGIN topicrow -->
<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
@@ -145,7 +147,9 @@
<ul class="topiclist topics">
<!-- ENDIF -->
+ <!-- EVENT viewforum_body_topicrow_row_before -->
<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 -->">
+ <!-- EVENT viewforum_body_topic_row_prepend -->
<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 -->
@@ -155,7 +159,7 @@
<!-- 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 />
-
+ <!-- EVENT topiclist_row_topic_title_after -->
<!-- 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>
@@ -195,7 +199,9 @@
<!-- 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>
+ <!-- EVENT viewforum_body_topic_row_append -->
</li>
+ <!-- EVENT viewforum_body_topic_row_after -->
<!-- IF topicrow.S_LAST_ROW -->
</ul>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 87a9e95dce..d2a253bb77 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -1,6 +1,7 @@
<!-- INCLUDE overall_header.html -->
<h2 class="topic-title"><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2>
+<!-- EVENT viewtopic_topic_title_after -->
<!-- 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 -->
@@ -83,7 +84,7 @@
<fieldset class="polls">
<!-- BEGIN poll_option -->
<!-- EVENT viewtopic_body_poll_option_before -->
- <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}">
+ <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" 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;" 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_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>
@@ -215,6 +216,7 @@
<!-- ENDIF -->
<div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
+ <!-- EVENT viewtopic_body_post_subject_before -->
<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>
<!-- DEFINE $SHOW_POST_BUTTONS = (postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE) -->
@@ -277,7 +279,9 @@
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
<p class="post-notice deleted">
<strong>{L_POST_DELETED_ACTION}</strong>
- <input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" />
+ <!-- IF postrow.S_DELETE_PERMANENT -->
+ <input class="button2" type="submit" value="{L_DELETE}" name="action[delete]" />
+ <!-- ENDIF -->
<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}
@@ -327,7 +331,9 @@
</div>
- <div class="back2top"><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
+ <!-- EVENT viewtopic_body_postrow_back2top_before -->
+ <div class="back2top"><!-- EVENT viewtopic_body_postrow_back2top_prepend --><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a><!-- EVENT viewtopic_body_postrow_back2top_append --></div>
+ <!-- EVENT viewtopic_body_postrow_back2top_after -->
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index f65f1ab542..919c9397e1 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 29cf641df2..9095e61369 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -1161,3 +1161,8 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist
li.notification-reported strong, li.notification-disapproved strong {
color: #D31141;
}
+
+.badge {
+ background-color: #D31141;
+ color: #ffffff;
+}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 19b0f65a2d..9c2f33f7a9 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -1173,6 +1173,12 @@ ul.linklist:after,
text-transform: none;
}
+.dropdown-extended .header:after {
+ content: '';
+ display: table;
+ clear: both;
+}
+
.dropdown-extended .footer {
text-align: center;
font-size: 1.1em;
@@ -1245,6 +1251,22 @@ ul.linklist:after,
margin-left: 58px;
}
+.badge {
+ border-radius: 10px;
+ opacity: 0.8;
+ text-align: center;
+ white-space: nowrap;
+ font-size: 10px;
+ line-height: 1;
+ float: right;
+ display: inline-block;
+ margin-left: 3px;
+ vertical-align: baseline;
+ position: relative;
+ top: 3px;
+ padding: 4px 6px;
+}
+
/* Navbar specific list items
----------------------------------------*/
@@ -1275,10 +1297,6 @@ ul.linklist:after,
display: none;
}
-.compact .icon-notification > a > strong, .compact .icon-pm > a > strong {
- padding-left: 2px;
-}
-
.dropdown-page-jump .dropdown {
top: 20px;
}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index 380b285b83..92a7db81d9 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -672,7 +672,7 @@ fieldset.polls dd div {
text-align: right;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
- padding: 0 2px;
+ padding: 2px 2px 0 2px;
overflow: visible;
min-width: 8px;
}
@@ -842,3 +842,7 @@ table.fixed-width-table {
background: rgba(0, 0, 0, .3);
border-radius: 3px;
}
+
+#memberlist tr.inactive, #team tr.inactive {
+ font-style: italic;
+}
diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css
index 7d4092c3fe..b17cca5f25 100644
--- a/phpBB/styles/prosilver/theme/plupload.css
+++ b/phpBB/styles/prosilver/theme/plupload.css
@@ -15,6 +15,11 @@
width: 30%;
}
+.attach-comment .inputbox {
+ resize: vertical;
+ width: 100%;
+}
+
.attach-filesize {
width: 15%;
}
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index f78e417b84..4c9abcc02d 100644
--- a/phpBB/styles/subsilver2/style.cfg
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = subsilver2
copyright = © 2005 phpBB Limited
-style_version = 3.1.5
-phpbb_version = 3.1.5
+style_version = 3.1.10
+phpbb_version = 3.1.10
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html
index 8a20b96538..d905910c22 100644
--- a/phpBB/styles/subsilver2/template/mcp_forum.html
+++ b/phpBB/styles/subsilver2/template/mcp_forum.html
@@ -43,6 +43,7 @@
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->
[ <a href="{topicrow.U_DELETE_TOPIC}">{L_DELETE_SHADOW_TOPIC}</a> ]&nbsp;
<!-- ENDIF -->
+ <!-- EVENT topiclist_row_topic_title_after -->
</p>
<!-- EVENT topiclist_row_append -->
</td>
@@ -57,6 +58,7 @@
<td class="row1" colspan="8" align="center"><p class="gen">{L_NO_TOPICS}</p></td>
</tr>
<!-- END topicrow -->
+<!-- EVENT mcp_forum_actions_before -->
<!-- IF not S_MERGE_SELECT -->
<tr>
<td class="cat" colspan="6" align="{S_CONTENT_FLOW_END}">
@@ -80,6 +82,7 @@
</td>
</tr>
<!-- ENDIF -->
+<!-- EVENT mcp_forum_actions_after -->
</table>
{S_FORM_TOKEN}
</form>
diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html
index b8958187e6..429fee7e38 100644
--- a/phpBB/styles/subsilver2/template/mcp_move.html
+++ b/phpBB/styles/subsilver2/template/mcp_move.html
@@ -1,9 +1,11 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT mcp_move_before -->
+
<div id="pagecontent">
<form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
-
+
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>{MESSAGE_TITLE}</th>
@@ -32,9 +34,9 @@
</td>
</tr>
</table>
- {S_FORM_TOKEN}
+ {S_FORM_TOKEN}
</form>
-
+
</div>
<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html
index 7d54510cee..eee7fa95ea 100644
--- a/phpBB/styles/subsilver2/template/mcp_topic.html
+++ b/phpBB/styles/subsilver2/template/mcp_topic.html
@@ -44,7 +44,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="number" min="0" 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" max="9999999999" name="to_topic_id" value="{TO_TOPIC_ID}" /> <a href="{U_SELECT_TOPIC}">{L_SELECT_TOPIC}</a></td>
</tr>
<!-- IF TO_TOPIC_INFO -->
<tr>
@@ -57,7 +57,7 @@
</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="number" min="0" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
+ <td class="row2" colspan="2"><input class="post" type="number" min="0" max="999999" name="posts_per_page" value="{POSTS_PER_PAGE}" /></td>
</tr>
<tr>
<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>
@@ -74,12 +74,14 @@
<td align="center"><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td>
<td width="100%">
+ <!-- EVENT mcp_topic_postrow_post_details_before -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<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>
+ <!-- EVENT mcp_topic_postrow_post_details_after -->
</td>
<td width="5%" align="center"><a href="{postrow.U_POST_DETAILS}" class="imageset">{INFO_IMG}</a></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html
index 79b78f32a4..9044896bca 100644
--- a/phpBB/styles/subsilver2/template/memberlist_body.html
+++ b/phpBB/styles/subsilver2/template/memberlist_body.html
@@ -64,7 +64,7 @@
<!-- 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}"><!-- 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="{S_CONTENT_FLOW_BEGIN}"><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- IF memberrow.S_INACTIVE --> <em>({L_INACTIVE})</em><!-- ENDIF --><!-- 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"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></td>
diff --git a/phpBB/styles/subsilver2/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html
index 1416aa0c10..04f36b2244 100644
--- a/phpBB/styles/subsilver2/template/memberlist_email.html
+++ b/phpBB/styles/subsilver2/template/memberlist_email.html
@@ -1,5 +1,7 @@
<!-- INCLUDE overall_header.html -->
+<!-- EVENT memberlist_email_before -->
+
<div id="pagecontent">
<form action="{S_POST_ACTION}" method="post" name="postform">
@@ -48,7 +50,11 @@
<td class="row2"><input class="post" type="text" name="name" size="50" value="{NAME}" /></td>
</tr>
<!-- ENDIF -->
- <!-- ELSE -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_SUBJECT}</b></td>
+ <td class="row2"><input class="post" type="text" name="subject" size="50" tabindex="2" value="{SUBJECT}" /></td>
+ </tr>
+ <!-- ELSE -->
<tr>
<td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}</b></td>
<td class="row2"><input class="post" type="email" name="email" size="50" maxlength="100" value="{EMAIL}" /></td>
diff --git a/phpBB/styles/subsilver2/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html
index 4140c8cdbf..ff8c96c120 100644
--- a/phpBB/styles/subsilver2/template/memberlist_group.html
+++ b/phpBB/styles/subsilver2/template/memberlist_group.html
@@ -5,7 +5,7 @@
</tr>
<tr>
<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>
+ <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b> <!-- IF U_MANAGE --><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a><!-- ENDIF --></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}" class="imageset">{PM_IMG}</a><!-- ENDIF --></td>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html
index a19229605a..ecd9aca86f 100644
--- a/phpBB/styles/subsilver2/template/memberlist_im.html
+++ b/phpBB/styles/subsilver2/template/memberlist_im.html
@@ -7,6 +7,11 @@
<tr>
<th colspan="2">{L_SEND_IM}</th>
</tr>
+ <!-- IF S_SENT_JABBER -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td>
+ </tr>
+ <!-- ENDIF -->
<tr>
<td class="row3" colspan="2"><span class="gensmall">{L_SEND_IM_EXPLAIN}</span></td>
</tr>
@@ -23,12 +28,6 @@
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" name="submit" type="submit" value="{L_IM_SEND}" /></td>
</tr>
- <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>
diff --git a/phpBB/styles/subsilver2/template/memberlist_team.html b/phpBB/styles/subsilver2/template/memberlist_team.html
index a4f38aafc4..18995b6e50 100644
--- a/phpBB/styles/subsilver2/template/memberlist_team.html
+++ b/phpBB/styles/subsilver2/template/memberlist_team.html
@@ -17,7 +17,7 @@
<!-- 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>
+ <td class="gen" align="center"><strong>{group.user.USERNAME_FULL}</strong><!-- IF group.user.S_INACTIVE --> <em>({L_INACTIVE})</em><!-- ENDIF --></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 -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html
index 24e96c412c..731d2c8bca 100644
--- a/phpBB/styles/subsilver2/template/memberlist_view.html
+++ b/phpBB/styles/subsilver2/template/memberlist_view.html
@@ -53,6 +53,7 @@
<td class="genmed" align="center">[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_zebra_before -->
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
<tr>
<td class="genmed" align="center">[
@@ -66,6 +67,7 @@
]</td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_zebra_after -->
</table>
</td>
<td class="row1">
@@ -129,6 +131,7 @@
<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>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_contact_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF custom_fields.S_PROFILE_CONTACT -->
<tr>
@@ -141,6 +144,7 @@
</tr>
<!-- ENDIF -->
<!-- END custom_fields -->
+ <!-- EVENT memberlist_view_contact_custom_fields_after -->
</table>
</td>
<td class="row1">
@@ -162,6 +166,7 @@
<td><b class="genmed">{PROFILE_FIELD1_VALUE}</b></td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_non_contact_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF not custom_fields.S_PROFILE_CONTACT -->
<tr>
@@ -170,6 +175,7 @@
</tr>
<!-- ENDIF -->
<!-- END custom_fields -->
+ <!-- EVENT memberlist_view_non_contact_custom_fields_after -->
</table>
</td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 7648edc35a..a4185785e3 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
{META}
<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>
diff --git a/phpBB/styles/subsilver2/template/posting_attach_body.html b/phpBB/styles/subsilver2/template/posting_attach_body.html
index 8c70e4c831..67b3aaf3ea 100644
--- a/phpBB/styles/subsilver2/template/posting_attach_body.html
+++ b/phpBB/styles/subsilver2/template/posting_attach_body.html
@@ -31,7 +31,7 @@
<tr>
<td class="row1"><b class="genmed">{L_FILENAME}</b></td>
- <td class="row2"><input type="file" name="fileupload" size="40" maxlength="{FILESIZE}" value="" class="btnfile" /></td>
+ <td class="row2"><input type="file" name="fileupload" maxlength="{FILESIZE}" value="" class="btnfile" /></td>
</tr>
<tr>
<td class="row1"><b class="genmed">{L_FILE_COMMENT}</b></td>
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index 7adac0fee9..95f817e838 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -20,7 +20,7 @@
<!-- IF not S_PRIVMSGS -->
<div id="pageheader">
- <h2><!-- IF TOPIC_TITLE --><!-- EVENT posting_topic_title_before --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
+ <h2><!-- IF TOPIC_TITLE --><!-- EVENT posting_topic_title_before --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT posting_topic_title_after --><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
<!-- IF MODERATORS -->
<p class="moderators">{L_MODERATORS}{L_COLON} {MODERATORS}</p>
@@ -120,7 +120,7 @@
<td class="row2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
- <td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} tabindex="1" /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" 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="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
+ <td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} tabindex="1" /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" 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="{topic_icon.ICON_NAME}" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
</tr>
</table>
</td>
@@ -166,7 +166,11 @@
<!-- EVENT posting_editor_subject_before -->
<tr>
<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>
+ <td class="row2" width="78%">
+ <!-- EVENT posting_editor_subject_prepend -->
+ <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}" />
+ <!-- EVENT posting_editor_subject_append -->
+ </td>
</tr>
<!-- EVENT posting_editor_subject_after -->
<tr>
@@ -336,7 +340,7 @@
<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
<tr>
<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>
+ <td class="row2"><input class="post" type="number" min="0" max="999" name="topic_time_limit" value="{TOPIC_TIME_LIMIT}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_STICK_TOPIC_FOR_EXPLAIN}</span></td>
</tr>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_poll_body.html b/phpBB/styles/subsilver2/template/posting_poll_body.html
index 07cb6d527e..a18f319c1c 100644
--- a/phpBB/styles/subsilver2/template/posting_poll_body.html
+++ b/phpBB/styles/subsilver2/template/posting_poll_body.html
@@ -15,11 +15,11 @@
</tr>
<tr>
<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="0" max="999" name="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" /></td>
+ <td class="row2"><input class="post" type="number" min="0" max="999" name="poll_max_options" value="{POLL_MAX_OPTIONS}" /></td>
</tr>
<tr>
<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>
+ <td class="row2"><input class="post" type="number" min="0" max="999" name="poll_length" 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>
diff --git a/phpBB/styles/subsilver2/template/posting_preview.html b/phpBB/styles/subsilver2/template/posting_preview.html
index b0dbef6a5a..c451e4c871 100644
--- a/phpBB/styles/subsilver2/template/posting_preview.html
+++ b/phpBB/styles/subsilver2/template/posting_preview.html
@@ -38,6 +38,7 @@
</td>
</tr>
<!-- ENDIF -->
+<!-- EVENT posting_preview_poll_after -->
<tr>
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html
index 20976861fc..46329e19fa 100644
--- a/phpBB/styles/subsilver2/template/posting_topic_review.html
+++ b/phpBB/styles/subsilver2/template/posting_topic_review.html
@@ -18,6 +18,7 @@
</tr>
<!-- BEGIN topic_review_row -->
+ <!-- EVENT posting_topic_review_row_post_details_before -->
<!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<!-- IF topic_review_row.S_IGNORE_POST -->
@@ -41,6 +42,7 @@
</table>
</td>
</tr>
+ <!-- EVENT posting_topic_review_row_post_details_after -->
<!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html
index 5afc723f48..a7614e841f 100644
--- a/phpBB/styles/subsilver2/template/quickreply_editor.html
+++ b/phpBB/styles/subsilver2/template/quickreply_editor.html
@@ -4,6 +4,7 @@
<tr>
<th align="center" colspan="2">{L_QUICKREPLY}</th>
</tr>
+ <!-- EVENT quickreply_editor_subject_before -->
<tr>
<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>
diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html
index d3aa758b43..84ea73ea30 100644
--- a/phpBB/styles/subsilver2/template/search_body.html
+++ b/phpBB/styles/subsilver2/template/search_body.html
@@ -6,9 +6,12 @@
<form method="get" action="{S_SEARCH_ACTION}">
<table class="tablebg" width="100%" cellspacing="1">
+ <!-- DEFINE $COLSPAN = 4 -->
+ <!-- EVENT search_body_search_query_before -->
<tr>
- <th colspan="4">{L_SEARCH_QUERY}</th>
+ <th colspan="{$COLSPAN}">{L_SEARCH_QUERY}</th>
</tr>
+ <!-- EVENT search_body_search_query_prepend -->
<tr>
<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>
@@ -21,15 +24,21 @@
<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>
+ <!-- EVENT search_body_search_query_append -->
+ <!-- EVENT search_body_search_query_after -->
+ <!-- EVENT search_body_search_options_before -->
<tr>
- <th colspan="4">{L_SEARCH_OPTIONS}</th>
+ <th colspan="{$COLSPAN}">{L_SEARCH_OPTIONS}</th>
</tr>
+ <!-- EVENT search_body_search_options_prepend -->
<tr>
<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}{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>
+ <!-- EVENT search_body_search_options_append -->
+ <!-- EVENT search_body_search_display_options_prepend -->
<tr>
<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>
@@ -42,15 +51,19 @@
<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>
+ <!-- EVENT search_body_search_display_options_append -->
+ <!-- EVENT search_body_search_options_after -->
<tr>
- <td class="cat" colspan="4" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" name="submit" type="submit" value="{L_SEARCH}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
+ <td class="cat" colspan="{$COLSPAN}" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" name="submit" type="submit" value="{L_SEARCH}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
</tr>
</table>
</form>
+ <!-- EVENT search_body_form_after -->
<br clear="all" />
+ <!-- EVENT search_body_recent_search_before -->
<!-- IF .recentsearch -->
<table class="tablebg" width="100%" cellspacing="1">
<tr>
@@ -67,6 +80,7 @@
<br clear="all" />
<!-- ENDIF -->
+ <!-- EVENT search_body_recent_search_after -->
</div>
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html
index 6f651b2618..1ba8af7fe2 100644
--- a/phpBB/styles/subsilver2/template/search_results.html
+++ b/phpBB/styles/subsilver2/template/search_results.html
@@ -51,6 +51,7 @@
<!-- IF searchresults.S_TOPIC_REPORTED -->
<a href="{searchresults.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
+ <!-- EVENT topiclist_row_topic_title_after -->
<!-- IF .searchresults.pagination -->
<p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
<!-- BEGIN pagination -->
diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html
index 3abf89719f..2beeac2548 100644
--- a/phpBB/styles/subsilver2/template/simple_header.html
+++ b/phpBB/styles/subsilver2/template/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
index b8840e0aab..9fb3f0e754 100644
--- a/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
@@ -6,8 +6,8 @@
<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}
+ <input type="number" name="avatar_gravatar_width" id="avatar_gravatar_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="number" name="avatar_gravatar_height" id="avatar_gravatar_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" 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
index 919cf49e44..921126ba22 100644
--- a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
@@ -19,7 +19,11 @@
</tr>
<tr>
<!-- BEGIN avatar_local_option -->
- <td class="row2" align="center"><input type="radio" class="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_option.S_OPTIONS_AVATAR}" /></td>
+ <td class="row2" align="center"><input type="radio" class="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_option.S_OPTIONS_AVATAR}"
+ <!-- IF avatar_local_row.avatar_local_option.CHECKED --> checked="checked"<!-- ENDIF --> />
+ </td>
<!-- END avatar_local_option -->
</tr>
<!-- BEGINELSE -->
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
index 50ebb9b93d..309b3f9836 100644
--- a/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
@@ -5,6 +5,6 @@
</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>
+ <td class="row2"><input class="post" type="number" name="avatar_remote_width" min="{AVATAR_MIN_WIDTH}" max="{AVATAR_MAX_WIDTH}" value="{AVATAR_REMOTE_WIDTH}" /> <span class="gen">{L_PIXEL} &times; </span> <input class="post" type="number" name="avatar_remote_height" min="{AVATAR_MIN_HEIGHT}" max="{AVATAR_MAX_HEIGHT}" value="{AVATAR_REMOTE_HEIGHT}" /> <span class="gen">{L_PIXEL}</span></td>
</tr>
</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
index fd5e390d83..624a6ea8ef 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
<title>{SITENAME} :: {PAGE_TITLE}</title>
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
index 1c76e3226d..0dd50b8fa2 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -59,7 +59,7 @@
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
</select>
- <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>
+ <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="64" class="post" style="margin-top: 3px;" /></div>
</td>
</tr>
<!-- EVENT ucp_prefs_personal_append -->
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index 83b01b9f6d..c76c081ba7 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -32,9 +32,13 @@
<th>&nbsp;{L_LAST_POST}&nbsp;</th>
</tr>
+ <!-- EVENT viewforum_body_topic_row_before -->
+
<!-- BEGIN topicrow -->
+ <!-- EVENT viewforum_body_topicrow_row_before -->
<tr>
+ <!-- EVENT viewforum_body_topic_row_prepend -->
<td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<!-- IF S_TOPIC_ICONS -->
<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>
@@ -52,6 +56,7 @@
<!-- IF topicrow.S_TOPIC_REPORTED -->
<a href="{topicrow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
+ <!-- EVENT topiclist_row_topic_title_after -->
<!-- IF .topicrow.pagination -->
<p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
<!-- BEGIN pagination -->
@@ -75,7 +80,9 @@
<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
</p>
</td>
+ <!-- EVENT viewforum_body_topic_row_append -->
</tr>
+ <!-- EVENT viewforum_body_topic_row_after -->
<!-- BEGINELSE -->
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index ca0377d6b0..e340334cf8 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -16,6 +16,7 @@
<div id="pageheader">
<h2><!-- EVENT viewtopic_topic_title_prepend --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2>
+ <!-- EVENT viewtopic_topic_title_after -->
<!-- IF MODERATORS -->
<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
@@ -170,6 +171,7 @@
<!-- EVENT viewtopic_body_post_author_after -->
</td>
<!-- EVENT viewtopic_body_postrow_post_details_before -->
+ <!-- EVENT viewtopic_body_post_subject_before -->
<td width="100%" height="25">
<table width="100%" cellspacing="0">
<tr>
@@ -344,7 +346,9 @@
<!-- 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>
+ <!-- EVENT viewtopic_body_postrow_back2top_before -->
+ <td class="profile"><!-- EVENT viewtopic_body_postrow_back2top_prepend --><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong><!-- EVENT viewtopic_body_postrow_back2top_append --></td>
+ <!-- EVENT viewtopic_body_postrow_back2top_after -->
<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 -->
diff --git a/phpBB/styles/subsilver2/template/viewtopic_print.html b/phpBB/styles/subsilver2/template/viewtopic_print.html
index 9497fda121..53b38f414e 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_print.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
<title>{SITENAME} :: {PAGE_TITLE}</title>
diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css
index 784643a5b9..8f0bbffdda 100644
--- a/phpBB/styles/subsilver2/theme/stylesheet.css
+++ b/phpBB/styles/subsilver2/theme/stylesheet.css
@@ -1224,6 +1224,12 @@ a.imageset {
text-transform: none;
}
+#notification_list .header:after {
+ content: '';
+ display: table;
+ clear: both;
+}
+
#notification_list .footer {
text-align: center;
font-size: 1.2em;
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index cd55114bad..e0cc9ba512 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -264,7 +264,7 @@ 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' => array('t.topic_last_post_time', 't.topic_last_post_id'), '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');
+$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), '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' => 'LOWER(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);
@@ -274,14 +274,42 @@ if ($sort_days)
{
$min_post_time = time() - ($sort_days * 86400);
- $sql = 'SELECT COUNT(topic_id) AS num_topics
- FROM ' . TOPICS_TABLE . "
- WHERE forum_id = $forum_id
- 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);
+ $sql_array = array(
+ 'SELECT' => 'COUNT(t.topic_id) AS num_topics',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ ),
+ 'WHERE' => 't.forum_id = ' . $forum_id . '
+ AND (t.topic_last_post_time >= ' . $min_post_time . '
+ OR t.topic_type = ' . POST_ANNOUNCE . '
+ OR t.topic_type = ' . POST_GLOBAL . ')
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'),
+ );
+
+ /**
+ * Modify the sort data SQL query for getting additional fields if needed
+ *
+ * @event core.viewforum_modify_sort_data_sql
+ * @var int forum_id The forum_id whose topics are being listed
+ * @var int start Variable containing start for pagination
+ * @var int sort_days The oldest topic displayable in elapsed days
+ * @var string sort_key The sorting by. It is one of the first character of (in low case):
+ * Author, Post time, Replies, Subject, Views
+ * @var string sort_dir Either "a" for ascending or "d" for descending
+ * @var array sql_array The SQL array to get the data of all topics
+ * @since 3.1.9-RC1
+ */
+ $vars = array(
+ 'forum_id',
+ 'start',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 'sql_array',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_data_sql', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_array));
$topics_count = (int) $db->sql_fetchfield('num_topics');
$db->sql_freeresult($result);
@@ -396,15 +424,16 @@ $sql_array = array(
* @event core.viewforum_get_topic_data
* @var array forum_data Array with forum data
* @var array sql_array The SQL array to get the data of all topics
-* @var array forum_id The forum_id whose topics are being listed
-* @var array topics_count The total number of topics for display
-* @var array sort_days The oldest topic displayable in elapsed days
-* @var array sort_key The sorting by. It is one of the first character of (in low case):
+* @var int forum_id The forum_id whose topics are being listed
+* @var int topics_count The total number of topics for display
+* @var int sort_days The oldest topic displayable in elapsed days
+* @var string sort_key The sorting by. It is one of the first character of (in low case):
* Author, Post time, Replies, Subject, Views
-* @var array sort_dir Either "a" for ascending or "d" for descending
+* @var string sort_dir Either "a" for ascending or "d" for descending
* @since 3.1.0-a1
* @change 3.1.0-RC4 Added forum_data var
* @change 3.1.4-RC1 Added forum_id, topics_count, sort_days, sort_key and sort_dir vars
+* @change 3.1.9-RC1 Fix types of properties
*/
$vars = array(
'forum_data',
@@ -463,6 +492,28 @@ if ($forum_data['forum_type'] == FORUM_POST)
'ORDER_BY' => 't.topic_time DESC',
);
+
+ /**
+ * Event to modify the SQL query before the announcement topic ids data is retrieved
+ *
+ * @event core.viewforum_get_announcement_topic_ids_data
+ * @var array forum_data Data about the forum
+ * @var array g_forum_ary Global announcement forums array
+ * @var array sql_anounce_array SQL announcement array
+ * @var array sql_ary SQL query array to get the announcement topic ids data
+ * @var int forum_id The forum ID
+ *
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'forum_data',
+ 'g_forum_ary',
+ 'sql_anounce_array',
+ 'sql_ary',
+ 'forum_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_get_announcement_topic_ids_data', compact($vars)));
+
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
@@ -888,11 +939,15 @@ if (sizeof($topic_list))
* 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
+ * @var array row Array with topic data
+ * @var array topic_row Template array with topic data
+ * @var bool s_type_switch Flag indicating if the topic type is [global] announcement
+ * @var bool s_type_switch_test Flag indicating if the test topic type is [global] announcement
* @since 3.1.0-a1
+ *
+ * @changed 3.1.10-RC1 Added s_type_switch, s_type_switch_test
*/
- $vars = array('row', 'topic_row');
+ $vars = array('row', 'topic_row', 's_type_switch', 's_type_switch_test');
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topicrow', compact($vars)));
$template->assign_block_vars('topicrow', $topic_row);
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 583e297682..8bfa422e26 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -85,6 +85,8 @@ if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
page_footer();
}
+$user->update_session_infos();
+
// Forum info
$sql_ary = array(
'SELECT' => 'f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id',
@@ -187,7 +189,7 @@ while ($row = $db->sql_fetchrow($result))
if (!$row['session_viewonline'])
{
- $view_online = ($auth->acl_get('u_viewonline')) ? true : false;
+ $view_online = ($auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id']) ? true : false;
$logged_hidden_online++;
$username_full = '<em>' . $username_full . '</em>';
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 26524283e1..780e43e09b 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -588,6 +588,33 @@ $quickmod_array = array(
'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)),
);
+/**
+* Event to modify data in the quickmod_array before it gets sent to the
+* phpbb_add_quickmod_option function.
+*
+* @event core.viewtopic_add_quickmod_option_before
+* @var int forum_id Forum ID
+* @var int post_id Post ID
+* @var array quickmod_array Array with quick moderation options data
+* @var array topic_data Array with topic data
+* @var int topic_id Topic ID
+* @var array topic_tracking_info Array with topic tracking data
+* @var string viewtopic_url URL to the topic page
+* @var bool allow_change_type Topic change permissions check
+* @since 3.1.9-RC1
+*/
+$vars = array(
+ 'forum_id',
+ 'post_id',
+ 'quickmod_array',
+ 'topic_data',
+ 'topic_id',
+ 'topic_tracking_info',
+ 'viewtopic_url',
+ 'allow_change_type',
+);
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_add_quickmod_option_before', compact($vars)));
+
foreach ($quickmod_array as $option => $qm_ary)
{
if (!empty($qm_ary[1]))
@@ -1452,7 +1479,7 @@ if (sizeof($attach_list))
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
AND in_message = 0
- ORDER BY filetime DESC, post_msg_id ASC';
+ ORDER BY attach_id DESC, post_msg_id ASC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1821,11 +1848,20 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
($user->data['user_id'] == ANONYMOUS || $auth->acl_get('f_reply', $forum_id))
);
+ // Only display the quote button if the post is quotable. Posts not approved are not quotable.
+ $quote_allowed = ($quote_allowed && $row['post_visibility'] == ITEM_APPROVED) ? true : false;
+
$delete_allowed = $force_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)) ||
(!$s_cannot_delete && !$s_cannot_delete_lastpost && !$s_cannot_delete_time && !$s_cannot_delete_locked)
));
+ $softdelete_allowed = ($auth->acl_get('m_softdelete', $forum_id) ||
+ ($auth->acl_get('f_softdelete', $forum_id) && $user->data['user_id'] == $poster_id)) && ($row['post_visibility'] != ITEM_DELETED);
+
+ $permanent_delete_allowed = ($auth->acl_get('m_delete', $forum_id) ||
+ ($auth->acl_get('f_delete', $forum_id) && $user->data['user_id'] == $poster_id));
+
// Can this user receive a Private Message?
$can_receive_pm = (
// They must be a "normal" user
@@ -1888,7 +1924,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'U_EDIT' => ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
'U_QUOTE' => ($quote_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=post_details&amp;f=$forum_id&amp;p=" . $row['post_id'], true, $user->session_id) : '',
- 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
+ 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=' . (($softdelete_allowed) ? 'soft_delete' : 'delete') . "&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
'U_SEARCH' => $user_cache[$poster_id]['search'],
'U_PM' => $u_pm,
@@ -1927,6 +1963,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'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>') : '',
+ 'S_DELETE_PERMANENT' => $permanent_delete_allowed,
);
$user_poster_data = $user_cache[$poster_id];
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 9b97fa6a68..344eef38ff 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -64,10 +64,13 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case
->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 = $this->getMock('\phpbb\avatar\driver\barfoo', array('get_name', 'get_config_name'));
$this->avatar_barfoo->expects($this->any())
->method('get_name')
->will($this->returnValue('avatar.driver.barfoo'));
+ $this->avatar_barfoo->expects($this->any())
+ ->method('get_config_name')
+ ->will($this->returnValue('barfoo'));
$avatar_drivers = array($this->avatar_foobar, $this->avatar_barfoo);
foreach ($this->avatar_drivers() as $driver)
diff --git a/tests/composer.json b/tests/composer.json
index 69512f30a6..057e0115a5 100644
--- a/tests/composer.json
+++ b/tests/composer.json
@@ -1,5 +1,5 @@
{
"require-dev": {
- "facebook/webdriver": "dev-master"
+ "facebook/webdriver": "~1.1"
}
}
diff --git a/tests/composer.lock b/tests/composer.lock
index f714495d84..f172de4669 100644
--- a/tests/composer.lock
+++ b/tests/composer.lock
@@ -1,45 +1,48 @@
{
"_readme": [
"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": "cf1d8a4841e5e669b148e0df6645a788",
- "packages": [
-
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
],
+ "hash": "25ad22c35c19f2b0a2331640fb6b5577",
+ "content-hash": "617c33144bd2877c3c9a78f167a871b6",
+ "packages": [],
"packages-dev": [
{
"name": "facebook/webdriver",
- "version": "dev-master",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/facebook/php-webdriver.git",
- "reference": "b6e002e5bf811a8edba393ce6872322c1b7cf796"
+ "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/b6e002e5bf811a8edba393ce6872322c1b7cf796",
- "reference": "b6e002e5bf811a8edba393ce6872322c1b7cf796",
+ "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/0b889d7de7461439f8a3bbcca46e0f696cb27986",
+ "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986",
"shasum": ""
},
"require": {
+ "ext-curl": "*",
"php": ">=5.3.19"
},
"require-dev": {
- "phpdocumentor/phpdocumentor": "2.*",
- "phpunit/phpunit": "3.7.*"
+ "phpunit/phpunit": "4.6.*"
+ },
+ "suggest": {
+ "phpdocumentor/phpdocumentor": "2.*"
},
"type": "library",
"autoload": {
- "classmap": [
- "lib/"
- ]
+ "psr-4": {
+ "Facebook\\WebDriver\\": "lib/"
+ }
},
- "notification-url": "http://packagist.org/downloads/",
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
- "description": "A php client for WebDriver",
+ "description": "A PHP client for WebDriver",
"homepage": "https://github.com/facebook/php-webdriver",
"keywords": [
"facebook",
@@ -47,20 +50,14 @@
"selenium",
"webdriver"
],
- "time": "2014-08-05 02:55:46"
+ "time": "2016-06-04 00:02:34"
}
],
- "aliases": [
-
- ],
+ "aliases": [],
"minimum-stability": "stable",
- "stability-flags": {
- "facebook/webdriver": 20
- },
- "platform": [
-
- ],
- "platform-dev": [
-
- ]
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": []
}
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index ff1af8119b..ea77a289c9 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -18,6 +18,15 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
abstract class phpbb_controller_common_helper_route extends phpbb_test_case
{
protected $root_path;
+ private $user;
+ private $config;
+ private $template;
+ private $extension_manager;
+ private $request;
+ private $symfony_request;
+ private $provider;
+ private $filesystem;
+ private $phpbb_path_helper;
public function setUp()
{
@@ -68,6 +77,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
protected function generate_route_objects()
{
+ global $request;
+
$this->request = new phpbb_mock_request();
$this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SCRIPT_FILENAME', $this->get_script_name(), \phpbb\request\request_interface::SERVER);
@@ -75,6 +86,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
$this->request->overwrite('SERVER_NAME', 'localhost', \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SERVER_PORT', '80', \phpbb\request\request_interface::SERVER);
+ $request = $this->request;
+
$this->symfony_request = new \phpbb\symfony_request(
$this->request
);
@@ -135,8 +148,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
*/
public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{
- $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id), $description);
}
public function helper_url_data_with_rewrite()
@@ -175,8 +188,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
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_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id), $description);
}
public function helper_url_data_absolute()
@@ -215,8 +228,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_absolute($route, $params, $is_amp, $session_id, $expected, $description)
{
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
- $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL), $description);
}
public function helper_url_data_relative_path()
@@ -255,8 +268,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_relative_path($route, $params, $is_amp, $session_id, $expected, $description)
{
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
- $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH), $description);
}
public function helper_url_data_network()
@@ -295,8 +308,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_network($route, $params, $is_amp, $session_id, $expected, $description)
{
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
- $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH), $description);
}
//TODO
public function helper_url_data_absolute_with_rewrite()
@@ -335,8 +348,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_absolute_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_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL), $description);
}
public function helper_url_data_relative_path_with_rewrite()
@@ -375,8 +388,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_relative_path_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_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH), $description);
}
public function helper_url_data_network_with_rewrite()
@@ -415,7 +428,40 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_network_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_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
- $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH));
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH), $description);
+ }
+
+ public function helper_url_data_force_server_vars()
+ {
+ return array(
+ array(false, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::ABSOLUTE_URL, 'http://my_server:443/my/board/app.php/foo'),
+ array(true, true, 'my_server', 444, '/my/board', 'https://', UrlGeneratorInterface::ABSOLUTE_URL, 'https://my_server:444/my/board/foo'),
+ array(false, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::NETWORK_PATH, '//my_server:443/my/board/app.php/foo'),
+ array(true, true, 'my_server', 444, '/my/board', 'https://', UrlGeneratorInterface::NETWORK_PATH, '//my_server:444/my/board/foo'),
+ array(false, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::ABSOLUTE_PATH, '/my/board/app.php/foo'),
+ array(true, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::ABSOLUTE_PATH, '/my/board/foo'),
+ array(false, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::RELATIVE_PATH, 'app.php/foo'),
+ array(true, true, 'my_server', 443, '/my/board', 'http://', UrlGeneratorInterface::RELATIVE_PATH, 'foo'),
+ );
+ }
+
+ /**
+ * @dataProvider helper_url_data_force_server_vars()
+ */
+ public function test_helper_url_force_server_vars($enable_mod_rewrite, $force_server_vars, $server_name, $server_port, $script_path, $server_protocol, $type, $expected)
+ {
+ $this->config = new \phpbb\config\config(array(
+ 'enable_mod_rewrite' => $enable_mod_rewrite,
+ 'force_server_vars' => $force_server_vars,
+ 'server_name' => $server_name,
+ 'server_port' => $server_port,
+ 'script_path' => $script_path,
+ 'server_protocol' => $server_protocol,
+ ));
+
+ $helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
+ static::assertEquals($expected, $helper->route('controller1', array(), false, false, $type));
+
}
}
diff --git a/tests/dbal/fixtures/migrator_module.xml b/tests/dbal/fixtures/migrator_module.xml
index 32afe7e6f3..e85c43ee25 100644
--- a/tests/dbal/fixtures/migrator_module.xml
+++ b/tests/dbal/fixtures/migrator_module.xml
@@ -20,7 +20,7 @@
<value>acp</value>
<value>0</value>
<value>1</value>
- <value>4</value>
+ <value>6</value>
<value>ACP_CAT</value>
<value></value>
<value></value>
@@ -38,5 +38,96 @@
<value>test</value>
<value></value>
</row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>acp</value>
+ <value>1</value>
+ <value>4</value>
+ <value>5</value>
+ <value>ACP_FORUM_BASED_PERMISSIONS</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>acp</value>
+ <value>0</value>
+ <value>7</value>
+ <value>12</value>
+ <value>ACP_CAT_FORUMS</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>acp</value>
+ <value>4</value>
+ <value>8</value>
+ <value>11</value>
+ <value>ACP_FORUM_BASED_PERMISSIONS</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>acp</value>
+ <value>5</value>
+ <value>9</value>
+ <value>10</value>
+ <value>ACP_FORUM_BASED_PERMISSIONS_CHILD_1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>ucp</value>
+ <value>0</value>
+ <value>13</value>
+ <value>18</value>
+ <value>UCP_MAIN_CAT</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>1</value>
+ <value>1</value>
+ <value>ucp_subcat</value>
+ <value>ucp</value>
+ <value>7</value>
+ <value>14</value>
+ <value>17</value>
+ <value>UCP_SUBCATEGORY</value>
+ <value>ucp_test</value>
+ <value></value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>1</value>
+ <value>1</value>
+ <value>ucp_module</value>
+ <value>ucp</value>
+ <value>8</value>
+ <value>15</value>
+ <value>16</value>
+ <value>UCP_MODULE</value>
+ <value>ucp_module_test</value>
+ <value></value>
+ </row>
</table>
</dataset>
diff --git a/tests/dbal/migration/if.php b/tests/dbal/migration/if.php
index 98a66526ed..481250ea77 100644
--- a/tests/dbal/migration/if.php
+++ b/tests/dbal/migration/if.php
@@ -36,13 +36,13 @@ class phpbb_dbal_migration_if extends \phpbb\db\migration\migration
{
global $migrator_test_if_true_failed;
- $migrator_test_if_true_failed = false;
+ $migrator_test_if_true_failed = !$migrator_test_if_true_failed;
}
function test_false()
{
global $migrator_test_if_false_failed;
- $migrator_test_if_false_failed = true;
+ $migrator_test_if_false_failed = !$migrator_test_if_false_failed;
}
}
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index 4c4306888c..798200eef1 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -156,6 +156,14 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$this->assertFalse($migrator_test_if_true_failed, 'True test failed');
$this->assertFalse($migrator_test_if_false_failed, 'False test failed');
+
+ while ($this->migrator->migration_state('phpbb_dbal_migration_if') !== false)
+ {
+ $this->migrator->revert('phpbb_dbal_migration_if');
+ }
+
+ $this->assertFalse($migrator_test_if_true_failed, 'True test after revert failed');
+ $this->assertFalse($migrator_test_if_false_failed, 'False test after revert failed');
}
public function test_recall()
diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php
index 08c3e979b8..bbe543f347 100644
--- a/tests/dbal/migrator_tool_module_test.php
+++ b/tests/dbal/migrator_tool_module_test.php
@@ -42,10 +42,10 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
$this->tool = new \phpbb\db\migration\tool\module($this->db, $this->cache, $this->user, $phpbb_root_path, $phpEx, 'phpbb_modules');
}
- public function exists_data()
+ public function exists_data_acp()
{
return array(
- // Test the category
+ // Test the existing category
array(
'',
'ACP_CAT',
@@ -57,7 +57,7 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
true,
),
- // Test the module
+ // Test the existing module
array(
'',
'ACP_MODULE',
@@ -73,17 +73,88 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
'ACP_MODULE',
true,
),
+
+ // Test for non-existant modules
+ array(
+ '',
+ 'ACP_NON_EXISTANT_CAT',
+ false,
+ ),
+ array(
+ 'ACP_CAT',
+ 'ACP_NON_EXISTANT_MODULE',
+ false,
+ ),
);
}
/**
- * @dataProvider exists_data
+ * @dataProvider exists_data_acp
*/
- public function test_exists($parent, $module, $expected)
+ public function test_exists_acp($parent, $module, $expected)
{
$this->assertEquals($expected, $this->tool->exists('acp', $parent, $module));
}
+ public function exists_data_ucp()
+ {
+ return array(
+ // Test the existing category
+ array(
+ '',
+ 'UCP_MAIN_CAT',
+ true,
+ ),
+ array(
+ 0,
+ 'UCP_MAIN_CAT',
+ true,
+ ),
+
+ // Test the existing module
+ array(
+ '',
+ 'UCP_SUBCATEGORY',
+ false,
+ ),
+ array(
+ false,
+ 'UCP_SUBCATEGORY',
+ true,
+ ),
+ array(
+ 'UCP_MAIN_CAT',
+ 'UCP_SUBCATEGORY',
+ true,
+ ),
+ array(
+ 'UCP_SUBCATEGORY',
+ 'UCP_MODULE',
+ true,
+ ),
+
+ // Test for non-existant modules
+ array(
+ '',
+ 'UCP_NON_EXISTANT_CAT',
+ false,
+ ),
+ array(
+ 'UCP_MAIN_CAT',
+ 'UCP_NON_EXISTANT_MODULE',
+ false,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider exists_data_ucp
+ */
+ public function test_exists_ucp($parent, $module, $expected)
+ {
+ $this->assertEquals($expected, $this->tool->exists('ucp', $parent, $module));
+ }
+
public function test_add()
{
try
@@ -118,6 +189,83 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
$this->fail($e);
}
$this->assertEquals(true, $this->tool->exists('acp', 'ACP_NEW_CAT', 'ACP_NEW_MODULE'));
+
+ // Test adding module when plural parent module_langname exists
+ // PHPBB3-14703
+ // Adding fail
+ try
+ {
+ $this->tool->add('acp', 'ACP_FORUM_BASED_PERMISSIONS', array(
+ 'module_basename' => 'acp_new_permissions_module',
+ 'module_langname' => 'ACP_NEW_PERMISSIONS_MODULE',
+ 'module_mode' => 'test',
+ 'module_auth' => '',
+ ));
+ $this->fail('Exception not thrown');
+ }
+ catch (Exception $e)
+ {
+ $this->assertEquals('phpbb\db\migration\exception', get_class($e));
+ $this->assertEquals('MODULE_EXIST_MULTIPLE', $e->getMessage());
+ }
+
+ // Test adding module when plural parent module_langname exists
+ // PHPBB3-14703
+ // Adding success
+ try
+ {
+ $this->tool->add('acp', 'ACP_FORUM_BASED_PERMISSIONS', array(
+ 'module_basename' => 'acp_new_permissions_module',
+ 'module_langname' => 'ACP_NEW_PERMISSIONS_MODULE',
+ 'module_mode' => 'test',
+ 'module_auth' => '',
+ 'after' => 'ACP_FORUM_BASED_PERMISSIONS_CHILD_1',
+ ));
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('acp', 'ACP_FORUM_BASED_PERMISSIONS', 'ACP_NEW_PERMISSIONS_MODULE'));
+
+ // Test adding UCP modules
+ // Test adding new UCP category
+ try
+ {
+ $this->tool->add('ucp', 0, 'UCP_NEW_CAT');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('ucp', 0, 'UCP_NEW_CAT'));
+
+ // Test adding new UCP subcategory
+ try
+ {
+ $this->tool->add('ucp', 'UCP_NEW_CAT', 'UCP_NEW_SUBCAT');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_CAT', 'UCP_NEW_SUBCAT'));
+
+ // Test adding new UCP module
+ try
+ {
+ $this->tool->add('ucp', 'UCP_NEW_SUBCAT', array(
+ 'module_basename' => 'ucp_new_module',
+ 'module_langname' => 'UCP_NEW_MODULE',
+ 'module_mode' => 'ucp_test',
+ 'module_auth' => '',
+ ));
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('ucp', 'UCP_NEW_SUBCAT', 'UCP_NEW_MODULE'));
}
public function test_remove()
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php
index 7be8957ec7..8a71a5ce04 100644
--- a/tests/functional/extension_acp_test.php
+++ b/tests/functional/extension_acp_test.php
@@ -41,6 +41,8 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
{
parent::setUp();
+ $this->purge_cache();
+
$this->get_db();
// Clear the phpbb_ext table
diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php
index 53bb9af5ca..f615114c08 100644
--- a/tests/functional/extension_global_lang_test.php
+++ b/tests/functional/extension_global_lang_test.php
@@ -52,6 +52,13 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_
$this->purge_cache();
}
+ public function tearDown()
+ {
+ parent::tearDown();
+
+ $this->purge_cache();
+ }
+
public function test_load_extension_lang_globally()
{
$this->phpbb_extension_manager->enable('foo/bar');
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index 9041c8dc69..e48dfc043a 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -20,6 +20,12 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
static public $init_values = array();
+ public function setUp()
+ {
+ parent::setUp();
+ $this->purge_cache();
+ }
+
public function __construct($name = null, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
@@ -1395,7 +1401,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
foreach ($attachments as $i => $attachment)
{
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
- $url = "./download/file.php?id={$attachment['id']}";
+ $url = self::$root_url . "download/file.php?id={$attachment['id']}";
$string = "Attachment #{$i}";
if ($attachment['displayed'])
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
index 080822d249..0d2fdf082e 100644
--- a/tests/functional/metadata_manager_test.php
+++ b/tests/functional/metadata_manager_test.php
@@ -24,6 +24,13 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
'foo/bar/',
);
+ public function tearDown()
+ {
+ $this->purge_cache();
+
+ parent::tearDown();
+ }
+
static public function setUpBeforeClass()
{
parent::setUpBeforeClass();
diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php
index ec03f7a6a4..d4c61cc062 100644
--- a/tests/functional/notification_test.php
+++ b/tests/functional/notification_test.php
@@ -82,6 +82,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
// Get form token
$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
$crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
- $this->assertEquals(0, $crawler->filter('#notification_list_button strong')->text());
+ $this->assertCount(0, $crawler->filter('#notification_list_button strong'));
}
}
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
index ee71597ffc..d358681ad1 100644
--- a/tests/functional/plupload_test.php
+++ b/tests/functional/plupload_test.php
@@ -33,6 +33,7 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
public function setUp()
{
parent::setUp();
+ $this->purge_cache();
$this->set_extension_group_permission(1);
$this->path = __DIR__ . '/fixtures/files/';
$this->add_lang('posting');
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 33632a01e1..914233240e 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -130,6 +130,22 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
}
}
+ public function test_post_poll()
+ {
+ $this->login();
+
+ $post = $this->create_topic(
+ 2,
+ '[ticket/14802] Test Poll Option Spacing',
+ 'Empty/blank lines should not be additional poll options.',
+ array('poll_title' => 'Poll Title', 'poll_option_text' => "\n A \nB\n\nC \n D\nE\n\n \n")
+ );
+
+ $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
+ $this->assertEquals('Poll Title', $crawler->filter('.poll-title')->text());
+ $this->assertEquals(5, $crawler->filter('*[data-poll-option-id]')->count());
+ }
+
protected function set_quote_depth($depth)
{
$crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=post');
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
index 1d37d748df..f1e9b517d4 100644
--- a/tests/functional/search/base.php
+++ b/tests/functional/search/base.php
@@ -75,30 +75,34 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
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,
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
+ $form = $crawler->selectButton('Create index')->form();
+ $form_values = $form->getValues();
+ $form_values = array_merge($form_values,
array(
'search_type' => $this->search_backend,
'action' => 'create',
- 'submit' => true,
)
);
+ $form->setValues($form_values);
+ $crawler = self::submit($form);
$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,
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
+ $form = $crawler->selectButton('Delete index')->form();
+ $form_values = $form->getValues();
+ $form_values = array_merge($form_values,
array(
'search_type' => $this->search_backend,
'action' => 'delete',
- 'submit' => true,
)
);
+ $form->setValues($form_values);
+ $crawler = self::submit($form);
$this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text());
}
}
diff --git a/tests/functional/user_password_reset_test.php b/tests/functional/user_password_reset_test.php
index f9406f0eb5..3da78407cf 100644
--- a/tests/functional/user_password_reset_test.php
+++ b/tests/functional/user_password_reset_test.php
@@ -113,6 +113,49 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca
$this->assertContains($this->lang('LOGIN_ERROR_PASSWORD', '', ''), $crawler->filter('html')->text());
}
+ /**
+ * @depends test_login
+ */
+ public function test_acivateAfterDeactivate()
+ {
+ // User is active, actkey should not exist
+ $this->get_user_data();
+ $this->assertEmpty($this->user_data['user_actkey']);
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/users');
+
+ // Go to user account page
+ $crawler = self::request('GET', 'adm/index.php?i=acp_users&mode=overview&sid=' . $this->sid);
+ $this->assertContainsLang('FIND_USERNAME', $crawler->filter('html')->text());
+
+ $form = $crawler->selectButton('Submit')->form();
+ $crawler = self::submit($form, array('username' => 'reset-password-test-user'));
+
+ // Deactivate account and go back to overview of current user
+ $this->assertContainsLang('USER_TOOLS', $crawler->filter('html')->text());
+ $form = $crawler->filter('input[name=update]')->selectButton('Submit')->form();
+ $crawler = self::submit($form, array('action' => 'active'));
+
+ $this->assertContainsLang('USER_ADMIN_DEACTIVED', $crawler->filter('html')->text());
+ $link = $crawler->selectLink('Back to previous page')->link();
+ $crawler = self::request('GET', preg_replace('#(.+)(adm/index.php.+)#', '$2', $link->getUri()));
+
+ // Ensure again that actkey is empty after deactivation
+ $this->get_user_data();
+ $this->assertEmpty($this->user_data['user_actkey']);
+
+ // Force reactivation of account and check that act key is not empty anymore
+ $this->assertContainsLang('USER_TOOLS', $crawler->filter('html')->text());
+ $form = $crawler->filter('input[name=update]')->selectButton('Submit')->form();
+ $crawler = self::submit($form, array('action' => 'reactivate'));
+ $this->assertContainsLang('FORCE_REACTIVATION_SUCCESS', $crawler->filter('html')->text());
+
+ $this->get_user_data();
+ $this->assertNotEmpty($this->user_data['user_actkey']);
+ }
+
protected function get_user_data()
{
$db = $this->get_db();
diff --git a/tests/functions/user_delete_test.php b/tests/functions/user_delete_test.php
index db52dcded7..c224323273 100644
--- a/tests/functions/user_delete_test.php
+++ b/tests/functions/user_delete_test.php
@@ -71,6 +71,7 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
$oauth_provider_collection,
'phpbb_users',
$phpbb_container,
+ $phpbb_dispatcher,
$this->phpbb_root_path,
$this->php_ext
);
diff --git a/tests/functions_acp/build_cfg_template_test.php b/tests/functions_acp/build_cfg_template_test.php
index a8d7ae6f09..2e3a8adac7 100644
--- a/tests/functions_acp/build_cfg_template_test.php
+++ b/tests/functions_acp/build_cfg_template_test.php
@@ -68,7 +68,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case
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" />',
+ '<input id="number_key_name" type="number" min="5" max="15" name="config[config_key_name_width]" value="10" /> x <input type="number" min="5" max="15" name="config[config_key_name_height]" value="20" />',
),
array(
array('dimension', 0, 15),
@@ -76,7 +76,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case
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" />',
+ '<input id="number_key_name" type="number" min="0" max="15" name="config[config_key_name_width]" value="10" /> x <input type="number" min="0" max="15" name="config[config_key_name_height]" value="20" />',
),
);
}
@@ -104,7 +104,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case
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" />',
+ '<input id="number_key_name" type="number" min="5" max="15" name="config[config_key_name]" value="10" />',
),
array(
array('number', -1, 9999),
@@ -112,7 +112,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case
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" />',
+ '<input id="number_key_name" type="number" min="-1" max="9999" name="config[config_key_name]" value="10" />',
),
);
}
diff --git a/tests/log/add_test.php b/tests/log/add_test.php
index bacc0c76f7..29d3adaeb6 100644
--- a/tests/log/add_test.php
+++ b/tests/log/add_test.php
@@ -88,5 +88,14 @@ class phpbb_log_add_test extends phpbb_database_test_case
// Invalid mode specified
$this->assertFalse($log->add('mode_does_not_exist', $user_id, $log_ip, $log_operation, $log_time));
+
+ // null user and null ip given
+ $this->assertEquals(3, $log->add($mode, null, null, $log_operation, $log_time), 'Adding log with null user_id and null user_ip failed');
+ $sql = 'SELECT user_id, log_ip FROM ' . LOG_TABLE . ' WHERE log_id = 3';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $this->assertEquals(ANONYMOUS, $row['user_id'], 'Adding log with null user_id failed');
+ $this->assertEquals('', $row['log_ip'], 'Adding log with null user_ip failed');
}
}
diff --git a/tests/migrator/reverse_update_data_test.php b/tests/migrator/reverse_update_data_test.php
new file mode 100644
index 0000000000..b85e48c64c
--- /dev/null
+++ b/tests/migrator/reverse_update_data_test.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+class reverse_update_data_test extends phpbb_test_case
+{
+ /** @var \phpbb\db\migration\helper */
+ protected $helper;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->helper = new \phpbb\db\migration\helper();
+ }
+
+ public function update_data_provider()
+ {
+ return array(
+ array(
+ array(
+ array('config.add', array('foobar', 1)),
+ array('if', array(
+ (false === true),
+ array('permission.add', array('some_data')),
+ )),
+ array('config.remove', array('foobar')),
+ array('custom', array(array($this, 'foo_bar'))),
+ array('tool.method', array('test_data')),
+ ),
+ array(
+ array('tool.reverse', array('method', 'test_data')),
+ array('config.reverse', array('remove', 'foobar')),
+ array('config.reverse', array('add', 'foobar', 1)),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider update_data_provider
+ */
+ public function test_get_schema_steps($data_changes, $expected)
+ {
+ $this->assertEquals($expected, $this->helper->reverse_update_data($data_changes));
+ }
+}
diff --git a/tests/request/request_test.php b/tests/request/request_test.php
index 131abe6aac..ebaea1f9ef 100644
--- a/tests/request/request_test.php
+++ b/tests/request/request_test.php
@@ -13,7 +13,10 @@
class phpbb_request_test extends phpbb_test_case
{
+ /** @var \phpbb\request\type_cast_helper_interface */
private $type_cast_helper;
+
+ /** @var \phpbb\request\request */
private $request;
protected function setUp()
@@ -143,15 +146,112 @@ class phpbb_request_test extends phpbb_test_case
$this->assertTrue($this->request->is_ajax());
}
- public function test_is_secure()
+ public function data_is_secure()
+ {
+ return array(
+ array(
+ array(
+ 'HTTPS' => 'on',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => '1',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'yes',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 1,
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'off',
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTPS' => '0',
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTPS' => 0,
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTPS' => '',
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'off',
+ 'HTTP_X_FORWARDED_PROTO' => 'https',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'on',
+ 'HTTP_X_FORWARDED_PROTO' => 'http',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'off',
+ 'HTTP_X_FORWARDED_PROTO' => 'http',
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTP_X_FORWARDED_PROTO' => 'http',
+ ),
+ false,
+ ),
+ array(
+ array(
+ 'HTTP_X_FORWARDED_PROTO' => 'https',
+ ),
+ true,
+ ),
+ array(
+ array(
+ 'HTTPS' => 'on',
+ 'HTTP_X_FORWARDED_PROTO' => 'http',
+ ),
+ true,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider data_is_secure
+ */
+ public function test_is_secure($server_data, $expected)
{
$this->assertFalse($this->request->is_secure());
$this->request->enable_super_globals();
- $_SERVER['HTTPS'] = 'on';
+ $_SERVER = $server_data;
$this->request = new \phpbb\request\request($this->type_cast_helper);
- $this->assertTrue($this->request->is_secure());
+ $this->assertSame($expected, $this->request->is_secure());
}
public function test_variable_names()
diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php
index 4ef9b90ec4..b025cd21d5 100644
--- a/tests/template/template_includecss_test.php
+++ b/tests/template/template_includecss_test.php
@@ -55,13 +55,6 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
public function template_data()
{
- $url_base = explode('/', dirname(__FILE__));
- foreach ($url_base as &$dir)
- {
- $dir = rawurlencode($dir);
- }
- $url_base = implode('/', $url_base);
-
return array(
/*
array(
@@ -79,11 +72,11 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
),
array(
array('TEST' => 3),
- '<link href="' . $url_base . '/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" type="text/css" media="screen" />',
+ '<link href="tests/template/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" type="text/css" media="screen" />',
),
array(
array('TEST' => 4),
- '<link href="' . $url_base . '/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen" />',
+ '<link href="tests/template/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen" />',
),
);
}
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 5d643e43e2..3b5bab749e 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -85,11 +85,18 @@ class phpbb_database_test_connection_manager
break;
default:
- $dsn .= 'host=' . $this->config['dbhost'];
-
- if ($this->config['dbport'])
+ if (!empty($this->config['dbport']) && !is_numeric($this->config['dbport']) && $this->dbms['PDO'] != 'pgsql')
+ {
+ $dsn .= 'unix_socket=' . $this->config['dbport'];
+ }
+ else
{
- $dsn .= ';port=' . $this->config['dbport'];
+ $dsn .= 'host=' . $this->config['dbhost'];
+
+ if ($this->config['dbport'])
+ {
+ $dsn .= ';port=' . $this->config['dbport'];
+ }
}
if ($use_db)
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index d403831626..8107e45dc7 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -89,12 +89,13 @@ class phpbb_functional_test_case extends phpbb_test_case
// that were added in other tests are gone
$this->lang = array();
$this->add_lang('common');
- $this->purge_cache();
$db = $this->get_db();
foreach (static::setup_extensions() as $extension)
{
+ $this->purge_cache();
+
$sql = 'SELECT ext_active
FROM ' . EXT_TABLE . "
WHERE ext_name = '" . $db->sql_escape($extension). "'";
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index c8ac492e25..e8b230ecbe 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -11,6 +11,11 @@
*
*/
+use Facebook\WebDriver\WebDriverBy;
+use Facebook\WebDriver\Exception\WebDriverCurlException;
+use Facebook\WebDriver\Remote\RemoteWebDriver;
+use Facebook\WebDriver\Remote\DesiredCapabilities;
+
require_once __DIR__ . '/../../phpBB/includes/functions_install.php';
class phpbb_ui_test_case extends phpbb_test_case
@@ -19,13 +24,30 @@ class phpbb_ui_test_case extends phpbb_test_case
static protected $port = 8910;
/**
- * @var \RemoteWebDriver
+ * @var RemoteWebDriver
*/
static protected $webDriver;
static protected $config;
static protected $root_url;
static protected $already_installed = false;
+ static protected $install_success = false;
+
+ protected $cache = null;
+ protected $db = null;
+ protected $extension_manager = null;
+
+ /**
+ * Session ID for current test's session (each test makes its own)
+ * @var string
+ */
+ protected $sid;
+
+ /**
+ * Language array used by phpBB
+ * @var array
+ */
+ protected $lang = array();
static public function setUpBeforeClass()
{
@@ -35,7 +57,7 @@ class phpbb_ui_test_case extends phpbb_test_case
{
self::markTestSkipped('UI test case requires at least PHP 5.3.19.');
}
- else if (!class_exists('\RemoteWebDriver'))
+ else if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
{
self::markTestSkipped(
'Could not find RemoteWebDriver class. ' .
@@ -60,7 +82,7 @@ class phpbb_ui_test_case extends phpbb_test_case
if (!self::$webDriver)
{
try {
- $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox');
+ $capabilities = DesiredCapabilities::firefox();
self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
} catch (WebDriverCurlException $e) {
self::markTestSkipped('PhantomJS webserver is not running.');
@@ -74,6 +96,57 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
+ /**
+ * @return array List of extensions that should be set up
+ */
+ static protected function setup_extensions()
+ {
+ return array();
+ }
+
+ public function setUp()
+ {
+ if (!self::$install_success)
+ {
+ $this->fail('Installing phpBB has failed.');
+ }
+
+ // Clear the language array so that things
+ // that were added in other tests are gone
+ $this->lang = array();
+ $this->add_lang('common');
+
+ $db = $this->get_db();
+
+ foreach (static::setup_extensions() as $extension)
+ {
+ $this->purge_cache();
+
+ $sql = 'SELECT ext_active
+ FROM ' . EXT_TABLE . "
+ WHERE ext_name = '" . $db->sql_escape($extension). "'";
+ $result = $db->sql_query($sql);
+ $status = (bool) $db->sql_fetchfield('ext_active');
+ $db->sql_freeresult($result);
+
+ if (!$status)
+ {
+ $this->install_ext($extension);
+ }
+ }
+ }
+
+ protected function tearDown()
+ {
+ parent::tearDown();
+
+ if ($this->db instanceof \phpbb\db\driver\driver_interface)
+ {
+ // Close the database connections again this test
+ $this->db->sql_close();
+ }
+ }
+
static public function visit($path)
{
self::$webDriver->get(self::$root_url . $path);
@@ -96,9 +169,9 @@ class phpbb_ui_test_case extends phpbb_test_case
$element->click();
}
- static public function install_board()
+ static protected function install_board()
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $db;
self::recreate_database(self::$config);
@@ -200,5 +273,299 @@ class phpbb_ui_test_case extends phpbb_test_case
self::assertContains('You have successfully installed', self::find_element('id', 'main')->getText());
copy($config_file, $config_file_test);
+
+ self::$install_success = true;
+ }
+
+ public function install_ext($extension)
+ {
+ $this->login();
+ $this->admin_login();
+
+ $ext_path = str_replace('/', '%2F', $extension);
+
+ $this->visit('adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
+ $this->assertNotEmpty(count(self::find_element('cssSelector', '.submit-buttons')));
+
+ self::find_element('cssSelector', "input[value='Enable']")->submit();
+ $this->add_lang('acp/extensions');
+
+ try
+ {
+ $meta_refresh = self::find_element('cssSelector', 'meta[http-equiv="refresh"]');
+
+ // Wait for extension to be fully enabled
+ while (sizeof($meta_refresh))
+ {
+ preg_match('#url=.+/(adm+.+)#', $meta_refresh->getAttribute('content'), $match);
+ self::$webDriver->execute(array('method' => 'post', 'url' => $match[1]));
+ $meta_refresh = self::find_element('cssSelector', 'meta[http-equiv="refresh"]');
+ }
+ }
+ catch (\Facebook\WebDriver\Exception\NoSuchElementException $e)
+ {
+ // Probably no refresh triggered
+ }
+
+ $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', self::find_element('cssSelector', 'div.successbox')->getText());
+
+ $this->logout();
+ }
+
+ protected function get_cache_driver()
+ {
+ if (!$this->cache)
+ {
+ $this->cache = new \phpbb\cache\driver\file;
+ }
+
+ return $this->cache;
+ }
+
+ protected function purge_cache()
+ {
+ $cache = $this->get_cache_driver();
+
+ $cache->purge();
+ $cache->unload();
+ $cache->load();
+ }
+
+ protected function get_extension_manager()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $config = new \phpbb\config\config(array());
+ $db = $this->get_db();
+ $db_tools = new \phpbb\db\tools($db);
+
+ $container = new phpbb_mock_container_builder();
+ $migrator = new \phpbb\db\migrator(
+ $container,
+ $config,
+ $db,
+ $db_tools,
+ self::$config['table_prefix'] . 'migrations',
+ $phpbb_root_path,
+ $phpEx,
+ self::$config['table_prefix'],
+ array(),
+ new \phpbb\db\migration\helper()
+ );
+ $container->set('migrator', $migrator);
+ $container->set('dispatcher', new phpbb_mock_event_dispatcher());
+ $user = new \phpbb\user('\phpbb\datetime');
+
+ $extension_manager = new \phpbb\extension\manager(
+ $container,
+ $db,
+ $config,
+ new phpbb\filesystem(),
+ $user,
+ self::$config['table_prefix'] . 'ext',
+ dirname(__FILE__) . '/',
+ $phpEx,
+ $this->get_cache_driver()
+ );
+
+ return $extension_manager;
+ }
+
+ protected function get_db()
+ {
+ // so we don't reopen an open connection
+ if (!($this->db instanceof \phpbb\db\driver\driver_interface))
+ {
+ $dbms = self::$config['dbms'];
+ /** @var \phpbb\db\driver\driver_interface $db */
+ $db = new $dbms();
+ $db->sql_connect(self::$config['dbhost'], self::$config['dbuser'], self::$config['dbpasswd'], self::$config['dbname'], self::$config['dbport']);
+ $this->db = $db;
+ }
+ return $this->db;
+ }
+
+ protected function logout()
+ {
+ $this->add_lang('ucp');
+
+ if (empty($this->sid))
+ {
+ return;
+ }
+
+ $this->visit('ucp.php?sid=' . $this->sid . '&mode=logout');
+ $this->assertContains($this->lang('REGISTER'), self::$webDriver->getPageSource());
+ unset($this->sid);
+
+ }
+
+ /**
+ * Login to the ACP
+ * You must run login() before calling this.
+ */
+ protected function admin_login($username = 'admin')
+ {
+ $this->add_lang('acp/common');
+
+ // Requires login first!
+ if (empty($this->sid))
+ {
+ $this->fail('$this->sid is empty. Make sure you call login() before admin_login()');
+ return;
+ }
+
+ self::$webDriver->manage()->deleteAllCookies();
+
+ $this->visit('adm/index.php?sid=' . $this->sid);
+ $this->assertContains($this->lang('LOGIN_ADMIN_CONFIRM'), self::$webDriver->getPageSource());
+
+ self::find_element('cssSelector', 'input[name=username]')->clear()->sendKeys($username);
+ self::find_element('cssSelector', 'input[type=password]')->sendKeys($username . $username);
+ self::find_element('cssSelector', 'input[name=login]')->click();
+ $this->assertContains($this->lang('ADMIN_PANEL'), $this->find_element('cssSelector', 'h1')->getText());
+
+ $cookies = self::$webDriver->manage()->getCookies();
+
+ // 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['name'], -4) == '_sid')
+ {
+ $this->sid = $cookie['value'];
+
+ break;
+ }
+ }
+
+ $this->assertNotEmpty($this->sid);
+ }
+
+ protected function add_lang($lang_file)
+ {
+ if (is_array($lang_file))
+ {
+ foreach ($lang_file as $file)
+ {
+ $this->add_lang($file);
+ }
+ }
+
+ $lang_path = __DIR__ . "/../../phpBB/language/en/$lang_file.php";
+
+ $lang = array();
+
+ if (file_exists($lang_path))
+ {
+ include($lang_path);
+ }
+
+ $this->lang = array_merge($this->lang, $lang);
+ }
+
+ protected function add_lang_ext($ext_name, $lang_file)
+ {
+ if (is_array($lang_file))
+ {
+ foreach ($lang_file as $file)
+ {
+ $this->add_lang_ext($ext_name, $file);
+ }
+
+ return;
+ }
+
+ $lang_path = __DIR__ . "/../../phpBB/ext/{$ext_name}/language/en/$lang_file.php";
+
+ $lang = array();
+
+ if (file_exists($lang_path))
+ {
+ include($lang_path);
+ }
+
+ $this->lang = array_merge($this->lang, $lang);
+ }
+
+ protected function lang()
+ {
+ $args = func_get_args();
+ $key = $args[0];
+
+ if (empty($this->lang[$key]))
+ {
+ throw new RuntimeException('Language key "' . $key . '" could not be found.');
+ }
+
+ $args[0] = $this->lang[$key];
+
+ return call_user_func_array('sprintf', $args);
+ }
+
+ /**
+ * 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);
+ }
+
+ protected function login($username = 'admin')
+ {
+ $this->add_lang('ucp');
+
+ self::$webDriver->manage()->deleteAllCookies();
+
+ $this->visit('ucp.php');
+ $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), self::$webDriver->getPageSource());
+
+ self::$webDriver->manage()->deleteAllCookies();
+
+ self::find_element('cssSelector', 'input[name=username]')->sendKeys($username);
+ self::find_element('cssSelector', 'input[name=password]')->sendKeys($username . $username);
+ self::find_element('cssSelector', 'input[name=login]')->click();
+ $this->assertNotContains($this->lang('LOGIN'), $this->find_element('className', 'navbar')->getText());
+
+ $cookies = self::$webDriver->manage()->getCookies();
+
+ // 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['name'], -4) == '_sid')
+ {
+ $this->sid = $cookie['value'];
+ }
+ }
+
+ $this->assertNotEmpty($this->sid);
+ }
+
+ /**
+ * Take screenshot. Can be used for debug purposes.
+ *
+ * @throws Exception When screenshot can't be created
+ */
+ public function take_screenshot()
+ {
+ // Change the Path to your own settings
+ $screenshot = time() . ".png";
+
+ self::$webDriver->takeScreenshot($screenshot);
}
}
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
index c0defe44ef..d9544858b7 100755
--- a/travis/setup-php-extensions.sh
+++ b/travis/setup-php-extensions.sh
@@ -48,6 +48,9 @@ then
echo 'Enabling APC PHP extension'
register_php_extension 'apc' "$php_ini_file"
echo 'apc.enable_cli=1' >> "$php_ini_file"
+else
+ echo 'Disabling Opcache'
+ echo 'opcache.enable=0' >> "$php_ini_file"
fi
# redis
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
index 205f23b876..4daa754481 100755
--- a/travis/setup-phpbb.sh
+++ b/travis/setup-phpbb.sh
@@ -37,5 +37,10 @@ then
fi
cd phpBB
-php ../composer.phar install --dev --no-interaction --prefer-source
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.4', '<');"` == "1" ]
+then
+ php ../composer.phar config disable-tls true
+fi
+php ../composer.phar install --dev --no-interaction
+
cd ..