aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/images/bg_tabs1.gifbin2325 -> 0 bytes
-rw-r--r--phpBB/adm/images/bg_tabs2.gifbin541 -> 0 bytes
-rw-r--r--phpBB/adm/style/acp_attachments.html4
-rw-r--r--phpBB/adm/style/acp_avatar_options_local.html1
-rw-r--r--phpBB/adm/style/acp_contact.html76
-rw-r--r--phpBB/adm/style/acp_groups.html2
-rw-r--r--phpBB/adm/style/acp_posting_buttons.html70
-rw-r--r--phpBB/adm/style/acp_users_avatar.html2
-rw-r--r--phpBB/adm/style/acp_users_signature.html64
-rw-r--r--phpBB/adm/style/admin.css178
-rw-r--r--phpBB/adm/style/admin.js8
-rw-r--r--phpBB/adm/style/install_footer.html4
-rw-r--r--phpBB/adm/style/install_header.html2
-rw-r--r--phpBB/adm/style/overall_footer.html18
-rw-r--r--phpBB/adm/style/overall_header.html2
-rw-r--r--phpBB/adm/style/pagination.html2
-rw-r--r--phpBB/assets/javascript/core.js67
-rw-r--r--phpBB/assets/javascript/plupload.js5
-rw-r--r--phpBB/assets/plupload/plupload.full.min.js2
-rwxr-xr-xphpBB/bin/phpbbcli.php5
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock163
-rw-r--r--phpBB/config/auth_providers.yml3
-rw-r--r--phpBB/config/console.yml24
-rw-r--r--phpBB/config/passwords.yml66
-rw-r--r--phpBB/config/profilefields.yml9
-rw-r--r--phpBB/config/services.yml33
-rw-r--r--phpBB/cron.php66
-rw-r--r--phpBB/develop/create_schema_files.php197
-rw-r--r--phpBB/develop/migration_tips.php46
-rwxr-xr-xphpBB/develop/strip_icc_profiles.sh9
-rw-r--r--phpBB/docs/CHANGELOG.html283
-rw-r--r--phpBB/docs/CREDITS.txt4
-rw-r--r--phpBB/docs/INSTALL.html1
-rw-r--r--phpBB/docs/README.html2
-rw-r--r--phpBB/docs/coding-guidelines.html4
-rw-r--r--phpBB/docs/events.md96
-rw-r--r--phpBB/includes/acp/acp_contact.php134
-rw-r--r--phpBB/includes/acp/acp_database.php248
-rw-r--r--phpBB/includes/acp/acp_email.php2
-rw-r--r--phpBB/includes/acp/acp_extensions.php4
-rw-r--r--phpBB/includes/acp/acp_groups.php107
-rw-r--r--phpBB/includes/acp/acp_icons.php1
-rw-r--r--phpBB/includes/acp/acp_jabber.php14
-rw-r--r--phpBB/includes/acp/acp_logs.php26
-rw-r--r--phpBB/includes/acp/acp_main.php2
-rw-r--r--phpBB/includes/acp/acp_modules.php4
-rw-r--r--phpBB/includes/acp/acp_permissions.php24
-rw-r--r--phpBB/includes/acp/acp_php_info.php2
-rw-r--r--phpBB/includes/acp/acp_profile.php5
-rw-r--r--phpBB/includes/acp/acp_reasons.php1
-rw-r--r--phpBB/includes/acp/acp_styles.php4
-rw-r--r--phpBB/includes/acp/acp_users.php3
-rw-r--r--phpBB/includes/acp/auth.php2
-rw-r--r--phpBB/includes/acp/info/acp_contact.php30
-rw-r--r--phpBB/includes/captcha/plugins/captcha_abstract.php3
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php5
-rw-r--r--phpBB/includes/constants.php3
-rw-r--r--phpBB/includes/functions.php148
-rw-r--r--phpBB/includes/functions_acp.php31
-rw-r--r--phpBB/includes/functions_admin.php14
-rw-r--r--phpBB/includes/functions_content.php19
-rw-r--r--phpBB/includes/functions_convert.php9
-rw-r--r--phpBB/includes/functions_display.php225
-rw-r--r--phpBB/includes/functions_install.php91
-rw-r--r--phpBB/includes/functions_mcp.php666
-rw-r--r--phpBB/includes/functions_module.php20
-rw-r--r--phpBB/includes/functions_posting.php136
-rw-r--r--phpBB/includes/functions_privmsgs.php27
-rw-r--r--phpBB/includes/functions_upload.php41
-rw-r--r--phpBB/includes/functions_user.php97
-rw-r--r--phpBB/includes/mcp/mcp_ban.php2
-rw-r--r--phpBB/includes/mcp/mcp_forum.php26
-rw-r--r--phpBB/includes/mcp/mcp_logs.php32
-rw-r--r--phpBB/includes/mcp/mcp_main.php58
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php4
-rw-r--r--phpBB/includes/mcp/mcp_post.php6
-rw-r--r--phpBB/includes/mcp/mcp_queue.php24
-rw-r--r--phpBB/includes/mcp/mcp_reports.php14
-rw-r--r--phpBB/includes/mcp/mcp_topic.php42
-rw-r--r--phpBB/includes/message_parser.php15
-rw-r--r--phpBB/includes/startup.php6
-rw-r--r--phpBB/includes/ucp/ucp_activate.php1
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php3
-rw-r--r--phpBB/includes/ucp/ucp_profile.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php2
-rw-r--r--phpBB/includes/utf/utf_tools.php2
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php9
-rw-r--r--phpBB/install/database_update.php6
-rw-r--r--phpBB/install/index.php4
-rw-r--r--phpBB/install/install_convert.php17
-rw-r--r--phpBB/install/install_install.php24
-rw-r--r--phpBB/install/install_main.php2
-rw-r--r--phpBB/install/phpinfo.php11
-rw-r--r--phpBB/install/schemas/firebird_schema.sql5
-rw-r--r--phpBB/install/schemas/mssql_schema.sql8
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql5
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql5
-rw-r--r--phpBB/install/schemas/oracle_schema.sql8
-rw-r--r--phpBB/install/schemas/postgres_schema.sql7
-rw-r--r--phpBB/install/schemas/schema.json35
-rw-r--r--phpBB/install/schemas/schema_data.sql14
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql5
-rw-r--r--phpBB/language/en/acp/board.php21
-rw-r--r--phpBB/language/en/acp/common.php25
-rw-r--r--phpBB/language/en/acp/extensions.php3
-rw-r--r--phpBB/language/en/acp/profile.php3
-rw-r--r--phpBB/language/en/acp/styles.php4
-rw-r--r--phpBB/language/en/common.php56
-rw-r--r--phpBB/language/en/email/contact_admin.txt23
-rw-r--r--phpBB/language/en/install.php6
-rw-r--r--phpBB/language/en/memberlist.php12
-rw-r--r--phpBB/language/en/plupload.php2
-rw-r--r--phpBB/language/en/posting.php3
-rw-r--r--phpBB/language/en/ucp.php3
-rw-r--r--phpBB/mcp.php649
-rw-r--r--phpBB/memberlist.php443
-rw-r--r--phpBB/phpbb/auth/provider/db.php71
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php12
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/google.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/service_interface.php2
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php3
-rw-r--r--phpBB/phpbb/auth/provider/provider_interface.php2
-rw-r--r--phpBB/phpbb/auth/provider_collection.php65
-rw-r--r--phpBB/phpbb/avatar/driver/driver.php11
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php15
-rw-r--r--phpBB/phpbb/avatar/driver/local.php18
-rw-r--r--phpBB/phpbb/avatar/driver/remote.php8
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php14
-rw-r--r--phpBB/phpbb/cache/driver/driver_interface.php2
-rw-r--r--phpBB/phpbb/cache/driver/file.php4
-rw-r--r--phpBB/phpbb/cache/service.php7
-rw-r--r--phpBB/phpbb/config/config.php2
-rw-r--r--phpBB/phpbb/config/db_text.php4
-rw-r--r--phpBB/phpbb/console/application.php80
-rw-r--r--phpBB/phpbb/console/command/cache/purge.php24
-rw-r--r--phpBB/phpbb/console/command/config/delete.php15
-rw-r--r--phpBB/phpbb/console/command/config/get.php16
-rw-r--r--phpBB/phpbb/console/command/config/increment.php14
-rw-r--r--phpBB/phpbb/console/command/config/set.php14
-rw-r--r--phpBB/phpbb/console/command/config/set_atomic.php15
-rw-r--r--phpBB/phpbb/console/command/cron/cron_list.php115
-rw-r--r--phpBB/phpbb/console/command/cron/run.php175
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php2
-rw-r--r--phpBB/phpbb/console/command/dev/migration_tips.php64
-rw-r--r--phpBB/phpbb/content_visibility.php7
-rw-r--r--phpBB/phpbb/controller/helper.php6
-rw-r--r--phpBB/phpbb/controller/provider.php12
-rw-r--r--phpBB/phpbb/controller/resolver.php2
-rw-r--r--phpBB/phpbb/cron/manager.php14
-rw-r--r--phpBB/phpbb/cron/task/core/prune_shadow_topics.php1
-rw-r--r--phpBB/phpbb/datetime.php6
-rw-r--r--phpBB/phpbb/db/driver/firebird.php526
-rw-r--r--phpBB/phpbb/db/driver/mssql.php8
-rw-r--r--phpBB/phpbb/db/driver/mssql_odbc.php8
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php14
-rw-r--r--phpBB/phpbb/db/driver/mysql.php8
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php45
-rw-r--r--phpBB/phpbb/db/driver/oracle.php8
-rw-r--r--phpBB/phpbb/db/driver/postgres.php8
-rw-r--r--phpBB/phpbb/db/driver/sqlite.php8
-rw-r--r--phpBB/phpbb/db/driver/sqlite3.php8
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php11
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta4.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php31
-rw-r--r--phpBB/phpbb/db/migration/data/v310/contact_admin_form.php41
-rw-r--r--phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php10
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php84
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php49
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_skype.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc1.php39
-rw-r--r--phpBB/phpbb/db/migration/schema_generator.php2
-rw-r--r--phpBB/phpbb/db/migration/tool/config.php2
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php3
-rw-r--r--phpBB/phpbb/db/migration/tool/permission.php3
-rw-r--r--phpBB/phpbb/db/migrator.php12
-rw-r--r--phpBB/phpbb/db/tools.php173
-rw-r--r--phpBB/phpbb/di/extension/config.php6
-rw-r--r--phpBB/phpbb/di/extension/core.php2
-rw-r--r--phpBB/phpbb/di/extension/ext.php2
-rw-r--r--phpBB/phpbb/di/pass/kernel_pass.php1
-rw-r--r--phpBB/phpbb/di/service_collection.php40
-rw-r--r--phpBB/phpbb/di/service_collection_iterator.php46
-rw-r--r--phpBB/phpbb/event/md_exporter.php2
-rw-r--r--phpBB/phpbb/event/php_exporter.php2
-rw-r--r--phpBB/phpbb/event/recursive_event_filter_iterator.php3
-rw-r--r--phpBB/phpbb/extension/base.php6
-rw-r--r--phpBB/phpbb/extension/manager.php43
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php115
-rw-r--r--phpBB/phpbb/extension/provider.php2
-rw-r--r--phpBB/phpbb/feed/base.php21
-rw-r--r--phpBB/phpbb/feed/factory.php11
-rw-r--r--phpBB/phpbb/feed/helper.php2
-rw-r--r--phpBB/phpbb/feed/post_base.php4
-rw-r--r--phpBB/phpbb/feed/topic_base.php4
-rw-r--r--phpBB/phpbb/finder.php (renamed from phpBB/phpbb/extension/finder.php)175
-rw-r--r--phpBB/phpbb/groupposition/legend.php18
-rw-r--r--phpBB/phpbb/groupposition/teampage.php27
-rw-r--r--phpBB/phpbb/lock/db.php4
-rw-r--r--phpBB/phpbb/log/log.php128
-rw-r--r--phpBB/phpbb/log/log_interface.php12
-rw-r--r--phpBB/phpbb/log/null.php7
-rw-r--r--phpBB/phpbb/message/admin_form.php191
-rw-r--r--phpBB/phpbb/message/form.php175
-rw-r--r--phpBB/phpbb/message/message.php282
-rw-r--r--phpBB/phpbb/message/topic_form.php158
-rw-r--r--phpBB/phpbb/message/user_form.php136
-rw-r--r--phpBB/phpbb/mimetype/content_guesser.php4
-rw-r--r--phpBB/phpbb/mimetype/extension_guesser.php4
-rw-r--r--phpBB/phpbb/mimetype/guesser.php2
-rw-r--r--phpBB/phpbb/mimetype/guesser_base.php4
-rw-r--r--phpBB/phpbb/notification/manager.php61
-rw-r--r--phpBB/phpbb/notification/type/base.php49
-rw-r--r--phpBB/phpbb/notification/type/disapprove_post.php36
-rw-r--r--phpBB/phpbb/notification/type/disapprove_topic.php36
-rw-r--r--phpBB/phpbb/notification/type/pm.php15
-rw-r--r--phpBB/phpbb/notification/type/post.php14
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php48
-rw-r--r--phpBB/phpbb/notification/type/report_pm_closed.php14
-rw-r--r--phpBB/phpbb/notification/type/report_post.php48
-rw-r--r--phpBB/phpbb/notification/type/report_post_closed.php14
-rw-r--r--phpBB/phpbb/notification/type/topic.php28
-rw-r--r--phpBB/phpbb/notification/type/type_interface.php21
-rw-r--r--phpBB/phpbb/pagination.php6
-rw-r--r--phpBB/phpbb/passwords/driver/base.php22
-rw-r--r--phpBB/phpbb/passwords/driver/bcrypt.php10
-rw-r--r--phpBB/phpbb/passwords/driver/bcrypt_2y.php4
-rw-r--r--phpBB/phpbb/passwords/driver/bcrypt_wcf2.php84
-rw-r--r--phpBB/phpbb/passwords/driver/convert_password.php43
-rw-r--r--phpBB/phpbb/passwords/driver/driver_interface.php10
-rw-r--r--phpBB/phpbb/passwords/driver/helper.php4
-rw-r--r--phpBB/phpbb/passwords/driver/md5_mybb.php60
-rw-r--r--phpBB/phpbb/passwords/driver/md5_phpbb2.php118
-rw-r--r--phpBB/phpbb/passwords/driver/md5_vb.php60
-rw-r--r--phpBB/phpbb/passwords/driver/phpass.php2
-rw-r--r--phpBB/phpbb/passwords/driver/salted_md5.php18
-rw-r--r--phpBB/phpbb/passwords/driver/sha1.php52
-rw-r--r--phpBB/phpbb/passwords/driver/sha1_smf.php51
-rw-r--r--phpBB/phpbb/passwords/driver/sha1_wcf1.php60
-rw-r--r--phpBB/phpbb/passwords/driver/sha_xf1.php68
-rw-r--r--phpBB/phpbb/passwords/helper.php2
-rw-r--r--phpBB/phpbb/passwords/manager.php40
-rw-r--r--phpBB/phpbb/path_helper.php2
-rw-r--r--phpBB/phpbb/permissions.php1
-rw-r--r--phpBB/phpbb/plupload/plupload.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_base.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_bool.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_date.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_dropdown.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_googleplus.php58
-rw-r--r--phpBB/phpbb/profilefields/type/type_int.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_string.php1
-rw-r--r--phpBB/phpbb/profilefields/type/type_string_common.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_text.php1
-rw-r--r--phpBB/phpbb/search/fulltext_native.php1
-rw-r--r--phpBB/phpbb/search/fulltext_postgres.php4
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php4
-rw-r--r--phpBB/phpbb/session.php24
-rw-r--r--phpBB/phpbb/symfony_request.php2
-rw-r--r--phpBB/phpbb/template/context.php5
-rw-r--r--phpBB/phpbb/template/template.php1
-rw-r--r--phpBB/phpbb/template/twig/environment.php30
-rw-r--r--phpBB/phpbb/template/twig/extension.php2
-rw-r--r--phpBB/phpbb/template/twig/loader.php6
-rw-r--r--phpBB/phpbb/template/twig/node/definenode.php8
-rw-r--r--phpBB/phpbb/template/twig/node/event.php16
-rw-r--r--phpBB/phpbb/template/twig/node/includeasset.php12
-rw-r--r--phpBB/phpbb/template/twig/node/includenode.php8
-rw-r--r--phpBB/phpbb/template/twig/node/includephp.php10
-rw-r--r--phpBB/phpbb/template/twig/node/php.php10
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/defineparser.php22
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/event.php20
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includecss.php20
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includejs.php20
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includeparser.php20
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php20
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/php.php20
-rw-r--r--phpBB/phpbb/template/twig/twig.php6
-rw-r--r--phpBB/phpbb/tree/nestedset.php23
-rw-r--r--phpBB/phpbb/user.php2
-rw-r--r--phpBB/posting.php154
-rw-r--r--phpBB/search.php5
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/confirm_delete_body.html40
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js110
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html46
-rw-r--r--phpBB/styles/prosilver/template/mcp_header.html4
-rw-r--r--phpBB/styles/prosilver/template/mcp_logs.html31
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html30
-rw-r--r--phpBB/styles/prosilver/template/mcp_queue.html28
-rw-r--r--phpBB/styles/prosilver/template/mcp_reports.html29
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html38
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_list.html28
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html53
-rw-r--r--phpBB/styles/prosilver/template/memberlist_email.html44
-rw-r--r--phpBB/styles/prosilver/template/memberlist_search.html2
-rw-r--r--phpBB/styles/prosilver/template/navbar_footer.html5
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html29
-rw-r--r--phpBB/styles/prosilver/template/notification_dropdown.html13
-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.html48
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html18
-rw-r--r--phpBB/styles/prosilver/template/posting_layout.html1
-rw-r--r--phpBB/styles/prosilver/template/posting_smilies.html8
-rw-r--r--phpBB/styles/prosilver/template/search_results.html30
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html29
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_local.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_manage.html16
-rw-r--r--phpBB/styles/prosilver/template/ucp_header.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html18
-rw-r--r--phpBB/styles/prosilver/template/ucp_notifications.html41
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_message_header.html19
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html40
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html5
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html16
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html22
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html30
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html2
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css243
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css12
-rw-r--r--phpBB/styles/prosilver/theme/colours.css105
-rw-r--r--phpBB/styles/prosilver/theme/common.css173
-rw-r--r--phpBB/styles/prosilver/theme/content.css30
-rw-r--r--phpBB/styles/prosilver/theme/cp.css188
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_menu.gifbin354 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_menu_rtl.gifbin345 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_tabs1.gifbin1520 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/bg_tabs2.gifbin420 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left2.gifbin112 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right2.gifbin111 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icons_pagination.pngbin0 -> 1043 bytes
-rw-r--r--phpBB/styles/prosilver/theme/links.css7
-rw-r--r--phpBB/styles/prosilver/theme/responsive.css28
-rw-r--r--phpBB/styles/subsilver2/style.cfg4
-rw-r--r--phpBB/styles/subsilver2/template/breadcrumbs.html2
-rw-r--r--phpBB/styles/subsilver2/template/confirm_delete_body.html35
-rw-r--r--phpBB/styles/subsilver2/template/faq_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html6
-rw-r--r--phpBB/styles/subsilver2/template/mcp_post.html4
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_email.html26
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html19
-rw-r--r--phpBB/styles/subsilver2/template/pagination.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_review.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_smilies.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_topic_review.html2
-rw-r--r--phpBB/styles/subsilver2/template/search_results.html2
-rw-r--r--phpBB/styles/subsilver2/template/simple_header.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_local.html1
-rw-r--r--phpBB/styles/subsilver2/template/ucp_groups_manage.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_notifications.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_history.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_avatar.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_register.html6
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html9
-rw-r--r--phpBB/styles/subsilver2/theme/stylesheet.css29
-rw-r--r--phpBB/ucp.php20
-rw-r--r--phpBB/viewtopic.php6
370 files changed, 8119 insertions, 4661 deletions
diff --git a/phpBB/adm/images/bg_tabs1.gif b/phpBB/adm/images/bg_tabs1.gif
deleted file mode 100644
index d129365661..0000000000
--- a/phpBB/adm/images/bg_tabs1.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/bg_tabs2.gif b/phpBB/adm/images/bg_tabs2.gif
deleted file mode 100644
index 0aace9b6db..0000000000
--- a/phpBB/adm/images/bg_tabs2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 0e3b5ff3b2..59b10f597e 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -205,8 +205,8 @@
</dl>
<dl>
<dt><label for="allowed_forums">{L_ALLOWED_FORUMS}{L_COLON}</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
- <dd><label><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS}</label>
- <label><input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</label></dd>
+ <dd><label><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS}</label></dd>
+ <dd><label><input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</label></dd>
<dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
</dl>
diff --git a/phpBB/adm/style/acp_avatar_options_local.html b/phpBB/adm/style/acp_avatar_options_local.html
index 0cdb3644d7..8adafa1d99 100644
--- a/phpBB/adm/style/acp_avatar_options_local.html
+++ b/phpBB/adm/style/acp_avatar_options_local.html
@@ -1,7 +1,6 @@
<dl>
<dt><label for="category">{L_AVATAR_CATEGORY}{L_COLON}</label></dt>
<dd><select name="avatar_local_cat" id="category">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
<!-- BEGIN avatar_local_cats -->
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
<!-- END avatar_local_cats -->
diff --git a/phpBB/adm/style/acp_contact.html b/phpBB/adm/style/acp_contact.html
new file mode 100644
index 0000000000..828fd4b659
--- /dev/null
+++ b/phpBB/adm/style/acp_contact.html
@@ -0,0 +1,76 @@
+<!-- INCLUDE overall_header.html -->
+
+<script type="text/javascript">
+// <![CDATA[
+
+ var form_name = 'acp_contact';
+ var text_name = 'contact_admin_info';
+ var load_draft = false;
+ var upload = false;
+ var imageTag = false;
+
+// ]]>
+</script>
+
+<a id="maincontent"></a>
+
+<h1>{L_ACP_CONTACT_SETTINGS}</h1>
+
+<p>{L_ACP_CONTACT_SETTINGS_EXPLAIN}</p>
+
+<form id="acp_contact" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_GENERAL_OPTIONS}</legend>
+ <dl>
+ <dt><label for="contact_admin_form_enable">{L_CONTACT_US_ENABLE}{L_COLON}</label><br /><span>{L_CONTACT_US_ENABLE_EXPLAIN}</span></dt>
+ <dd>
+ <label><input type="radio" class="radio" id="contact_admin_form_enable" name="contact_admin_form_enable" value="1"<!-- IF CONTACT_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
+ <label><input type="radio" class="radio" name="contact_admin_form_enable" value="0"<!-- IF not CONTACT_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label>
+ </dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF CONTACT_US_INFO_PREVIEW -->
+ <fieldset>
+ <legend>{L_CONTACT_US_INFO_PREVIEW}</legend>
+ <p>{CONTACT_US_INFO_PREVIEW}</p>
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_CONTACT_US_INFO}</legend>
+ <p>{L_CONTACT_US_INFO_EXPLAIN}</p>
+
+ <!-- INCLUDE acp_posting_buttons.html -->
+
+ <dl class="responsive-columns">
+ <dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
+ </dt>
+
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;">
+ <textarea name="contact_admin_info" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{CONTACT_US_INFO}</textarea>
+ </dd>
+
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
+ <!-- IF S_BBCODE_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_bbcode"<!-- IF S_BBCODE_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_BBCODE}</label>
+ <!-- ENDIF -->
+ <!-- IF S_SMILIES_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_smilies"<!-- IF S_SMILIES_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_SMILIES}</label>
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <label><input type="checkbox" class="radio" name="disable_magic_url"<!-- IF S_MAGIC_URL_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_MAGIC_URL}</label>
+ <!-- ENDIF -->
+ </dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
+ </dl>
+ </fieldset>
+
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="submit" name="preview" value="{L_PREVIEW}" />
+ {S_FORM_TOKEN}
+ </fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index f9846ea7cd..6049673e0a 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -117,7 +117,7 @@
<dl>
<dt><label>{L_AVATAR_TYPE}{L_COLON}</label></dt>
<dd><select name="avatar_driver" id="avatar_driver" data-togglable-settings="true">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <option value="">{L_NO_AVATAR}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF --> data-toggle-setting="#avatar_option_{avatar_drivers.DRIVER}">{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
diff --git a/phpBB/adm/style/acp_posting_buttons.html b/phpBB/adm/style/acp_posting_buttons.html
new file mode 100644
index 0000000000..70b6259689
--- /dev/null
+++ b/phpBB/adm/style/acp_posting_buttons.html
@@ -0,0 +1,70 @@
+<script type="text/javascript">
+// <![CDATA[
+
+ // Define the bbCode tags
+ var bbcode = new Array();
+ var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
+
+ // Helpline messages
+ var help_line = {
+ b: '{LA_BBCODE_B_HELP}',
+ i: '{LA_BBCODE_I_HELP}',
+ u: '{LA_BBCODE_U_HELP}',
+ q: '{LA_BBCODE_Q_HELP}',
+ c: '{LA_BBCODE_C_HELP}',
+ l: '{LA_BBCODE_L_HELP}',
+ o: '{LA_BBCODE_O_HELP}',
+ p: '{LA_BBCODE_P_HELP}',
+ w: '{LA_BBCODE_W_HELP}',
+ a: '{LA_BBCODE_A_HELP}',
+ s: '{LA_BBCODE_S_HELP}',
+ f: '{LA_BBCODE_F_HELP}',
+ y: '{LA_BBCODE_Y_HELP}',
+ d: '{LA_BBCODE_D_HELP}'
+ <!-- BEGIN custom_tags -->
+ ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
+ <!-- END custom_tags -->
+ }
+
+// ]]>
+</script>
+
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
+
+<!-- EVENT acp_posting_buttons_before -->
+<div id="format-buttons">
+ <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
+ <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
+ <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
+ <!-- IF S_BBCODE_QUOTE -->
+ <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
+ <!-- ENDIF -->
+ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
+ <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
+ <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
+ <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
+ <!-- IF S_BBCODE_IMG -->
+ <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
+ <!-- ENDIF -->
+ <!-- IF S_LINKS_ALLOWED -->
+ <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
+ <!-- ENDIF -->
+ <!-- IF S_BBCODE_FLASH -->
+ <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
+ <!-- ENDIF -->
+ <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
+ <option value="50">{L_FONT_TINY}</option>
+ <option value="85">{L_FONT_SMALL}</option>
+ <option value="100" selected="selected">{L_FONT_NORMAL}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
+ <option value="150">{L_FONT_LARGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
+ <option value="200">{L_FONT_HUGE}</option>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </select>
+ <!-- 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 -->
+</div>
+<!-- EVENT acp_posting_buttons_after -->
diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html
index 0d06d088e8..8ad4ad710b 100644
--- a/phpBB/adm/style/acp_users_avatar.html
+++ b/phpBB/adm/style/acp_users_avatar.html
@@ -14,7 +14,7 @@
<dl>
<dt><label>{L_AVATAR_TYPE}</label></dt>
<dd><select name="avatar_driver" id="avatar_driver" data-togglable-settings="true">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <option value="">{L_NO_AVATAR}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF --> data-toggle-setting="#avatar_option_{avatar_drivers.DRIVER}">{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
index 5b5c3ecf7f..c7ec5cc0eb 100644
--- a/phpBB/adm/style/acp_users_signature.html
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -5,36 +5,10 @@
var text_name = 'signature';
var load_draft = false;
var upload = false;
-
- // Define the bbCode tags
- var bbcode = new Array();
- var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;
- // Helpline messages
- var help_line = {
- b: '{LA_BBCODE_B_HELP}',
- i: '{LA_BBCODE_I_HELP}',
- u: '{LA_BBCODE_U_HELP}',
- q: '{LA_BBCODE_Q_HELP}',
- c: '{LA_BBCODE_C_HELP}',
- l: '{LA_BBCODE_L_HELP}',
- o: '{LA_BBCODE_O_HELP}',
- p: '{LA_BBCODE_P_HELP}',
- w: '{LA_BBCODE_W_HELP}',
- a: '{LA_BBCODE_A_HELP}',
- s: '{LA_BBCODE_S_HELP}',
- f: '{LA_BBCODE_F_HELP}',
- y: '{LA_BBCODE_Y_HELP}',
- d: '{LA_BBCODE_D_HELP}'
- <!-- BEGIN custom_tags -->
- ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
- <!-- END custom_tags -->
- }
-
// ]]>
</script>
-<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<form id="user_signature" method="post" action="{U_ACTION}">
@@ -49,43 +23,7 @@
<legend>{L_SIGNATURE}</legend>
<p>{L_SIGNATURE_EXPLAIN}</p>
- <!-- EVENT acp_users_signature_editor_buttons_before -->
- <div id="format-buttons">
- <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
- <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
- <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
- <!-- IF S_BBCODE_QUOTE -->
- <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
- <!-- ENDIF -->
- <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
- <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
- <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
- <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
- <!-- IF S_BBCODE_IMG -->
- <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
- <!-- ENDIF -->
- <!-- IF S_LINKS_ALLOWED -->
- <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
- <!-- ENDIF -->
- <!-- IF S_BBCODE_FLASH -->
- <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
- <!-- ENDIF -->
- <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
- <option value="50">{L_FONT_TINY}</option>
- <option value="85">{L_FONT_SMALL}</option>
- <option value="100" selected="selected">{L_FONT_NORMAL}</option>
- <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
- <option value="150">{L_FONT_LARGE}</option>
- <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
- <option value="200">{L_FONT_HUGE}</option>
- <!-- ENDIF -->
- <!-- ENDIF -->
- </select>
- <!-- 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 -->
- </div>
- <!-- EVENT acp_users_signature_editor_buttons_after -->
+ <!-- INCLUDE acp_posting_buttons.html -->
<dl class="responsive-columns">
<dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index f23c720add..b8f55e66c5 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -209,6 +209,9 @@ li {
#page-footer {
clear: both;
+}
+
+.copyright {
font-size: 0.75em;
text-align: center;
}
@@ -317,176 +320,156 @@ li {
/* Tabbed menu
- Based on: http://www.alistapart.com/articles/slidingdoors2/
----------------------------------------*/
#tabs {
+ font-family: Arial, Helvetica, sans-serif;
line-height: normal;
margin: 0 7px;
- min-width: 600px;
position: relative;
z-index: 2;
}
-#tabs ul {
- margin:0;
- padding: 0;
+#tabs > ul {
list-style: none;
-}
-
-#tabs ul:after {
- content: '';
- display: block;
- clear: both;
-}
-
-#tabs li {
- display: block;
- float: left;
margin: 0;
padding: 0;
- font-size: 0.85em;
- font-weight: bold;
}
-#tabs li:after {
+#tabs > ul:after {
content: '';
display: block;
clear: both;
}
-#tabs a {
+#tabs .tab {
+ display: inline-block;
float: left;
- background:url("../images/bg_tabs1.gif") no-repeat 0% -34px;
- margin: 0 1px 0 0;
- padding: 0 0 0 7px;
- text-decoration: none;
- position: relative;
+ font-size: 0.85em;
+ font-weight: bold;
+ line-height: 14px;
}
-.rtl #tabs li {
+.rtl #tabs .tab {
float: right;
}
-#tabs a span {
- float: left;
- display: block;
- background: url("../images/bg_tabs2.gif") no-repeat 100% -34px;
- padding: 7px 10px 4px 4px;
- min-height: 14px;
+#tabs .tab > a {
+ background: #D4D6DA;
+ background: -moz-linear-gradient(top, #CACBCF 0%, #D4D6DA 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #CACBCF), color-stop(100%, #D4D6DA));
+ background: -webkit-linear-gradient(top, #CACBCF 0%, #D4D6DA 100%);
+ background: -o-linear-gradient(top, #CACBCF 0%, #D4D6DA 100%);
+ background: -ms-linear-gradient(top, #CACBCF 0%, #D4D6DA 100%);
+ background: linear-gradient(to bottom, #CACBCF 0%, #D4D6DA 100%);
+ border: 1px solid #BBB;
+ border-bottom-width: 0;
+ border-radius: 5px 5px 0 0;
color: #767676;
- white-space: nowrap;
- font-family: Arial, Helvetica, sans-serif;
- text-transform: uppercase;
+ display: block;
font-weight: bold;
+ margin: 1px 1px 2px 0;
+ padding: 6px 9px 4px;
+ position: relative;
+ text-decoration: none;
+ text-transform: uppercase;
+ white-space: nowrap;
+ cursor: pointer;
}
-.rtl #tabs a span {
- float: right;
-}
-
-/* Commented Backslash Hack hides rule from IE5-Mac \*/
-#tabs a span, .rtl #tabs a span { float:none;}
-/* End hack */
-
-#tabs a:hover span {
+#tabs .tab > a:hover {
+ background: #F1F1EE;
+ border-color: #C0BFBB;
color: #BC2A4D;
}
-#tabs a:hover {
- background-position: 0 -69px;
-}
-
-#tabs a:hover span {
- background-position: 100% -69px;
-}
-
-#tabs .activetab a {
- background-position: 0 0;
- border-bottom: 1px solid #DCDEE2;
-}
-
-#tabs .activetab a span {
- background-position: 100% 0;
- padding-bottom: 5px;
+#tabs .activetab > a,
+#tabs .activetab > a:hover {
+ background: #DCDEE2;
+ background: -moz-linear-gradient(top, #F2F2F2 0%, #DCDEE2 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #F2F2F2), color-stop(100%, #DCDEE2));
+ background: -webkit-linear-gradient(top, #F2F2F2 0%, #DCDEE2 100%);
+ background: -o-linear-gradient(top, #F2F2F2 0%, #DCDEE2 100%);
+ background: -ms-linear-gradient(top, #F2F2F2 0%, #DCDEE2 100%);
+ background: linear-gradient(to bottom, #F2F2F2 0%, #DCDEE2 100%);
+ border-color: #999;
+ border-bottom: 2px solid #DCDEE2;
+ box-shadow: 0 1px 1px #FFF inset;
color: #23649F;
+ margin: 0 1px 0 0;
+ padding: 7px 10px 4px;
}
-#tabs .activetab a:hover span {
+#tabs .activetab > a:hover {
color: #115098;
}
+/* Responsive tabs
+----------------------------------------*/
.responsive-tab {
position: relative;
}
-.responsive-tab .responsive-tab-link span {
- display: inline-block;
+.responsive-tab > a.responsive-tab-link {
+ display: block;
font-size: 16px;
position: relative;
width: 16px;
line-height: 14px;
text-decoration: none;
+ padding-left: 9px !important;
+ padding-right: 9px !important;
}
-.responsive-tab .responsive-tab-link span:before {
+.responsive-tab .responsive-tab-link:before {
content: '';
position: absolute;
- left: 5px;
- top: 8px;
+ left: 10px;
+ top: 7px;
height: .125em;
width: 14px;
border-bottom: 0.125em solid #767676;
border-top: 0.375em double #767676;
}
-.responsive-tab .responsive-tab-link:hover span:before {
+.responsive-tab .responsive-tab-link:hover:before {
border-color: #BC2A4D;
}
-.responsive-tab.activetab .responsive-tab-link span:before {
+.responsive-tab.activetab .responsive-tab-link:before {
border-color: #23649F;
}
-.responsive-tab.activetab .responsive-tab-link:hover span:before {
+.responsive-tab.activetab .responsive-tab-link:hover:before {
border-color: #115098;
}
-#tabs .dropdown {
- top: 18px;
- margin-right: -1px;
+#tabs .dropdown, #minitabs .dropdown {
+ top: 20px;
+ margin-right: -2px;
+ font-weight: normal;
}
#tabs .dropdown-right .dropdown {
margin-left: -2px;
}
-#tabs .dropdown li {
- display: block !important;
- float: none;
- background: transparent none;
- padding: 0;
+#tabs .dropdown-contents {
+ list-style: none;
+ margin: 0;
}
-#tabs .dropdown a, #tabs .dropdown a span {
- background: transparent;
- display: block;
- border-width: 0;
- float: none;
- margin: 0;
- padding: 0;
- text-align: right;
+#tabs .dropdown li {
+ border-bottom: 1px dotted #DCDCDC;
}
-#tabs .dropdown a span {
- padding: 4px 8px;
- color: inherit !important;
+#tabs .dropdown li:last-child {
+ border-bottom: none;
}
-@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
-{
- #tabs {
- min-width: 0;
- }
+#tabs .dropdown a {
+ display: block;
+ padding: 4px 8px;
+ text-align: right;
}
/* Main Panel
@@ -984,6 +967,10 @@ table.fixed-width-table {
margin-bottom: 1px;
}
+ .rtl table.responsive td {
+ text-align: right !important;
+ }
+
table.responsive td.empty {
display: none !important;
}
@@ -1004,6 +991,10 @@ table.fixed-width-table {
box-sizing: border-box;
}
+ .rtl table.responsive.two-columns td {
+ float: right;
+ }
+
table.responsive.two-columns td:nth-child(2n+1) {
clear: left;
}
@@ -1594,7 +1585,6 @@ input.button1:focus, input.button2:focus {
z-index: 50;
padding: 25px;
padding: 0 25px 20px 25px;
- text-align: left;
}
.phpbb_alert .alert_close {
diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js
index 7bda86e1e3..253fd46a62 100644
--- a/phpBB/adm/style/admin.js
+++ b/phpBB/adm/style/admin.js
@@ -75,7 +75,7 @@ function parse_document(container)
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
dfn = cell.attr('data-dfn'),
- text = dfn ? dfn : cell.text().trim();
+ text = dfn ? dfn : $.trim(cell.text());
if (text == '&nbsp;') text = '';
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
@@ -114,7 +114,7 @@ function parse_document(container)
cells.each(function() {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
- text = cell.text().trim();
+ text = $.trim(cell.text());
if (headersLength <= column) {
return;
@@ -169,7 +169,7 @@ function parse_document(container)
ul = $this.children(),
tabs = ul.children().not('[data-skip-responsive]'),
links = tabs.children('a'),
- item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
+ item = ul.append('<li class="tab responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link">&nbsp;</a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
menu = item.find('.dropdown-contents'),
maxHeight = 0,
lastWidth = false,
@@ -211,7 +211,7 @@ function parse_document(container)
for (i = total - 1; i >= 0; i --) {
tab = availableTabs.eq(i);
- menu.prepend(tab.clone(true));
+ menu.prepend(tab.clone(true).removeClass('tab'));
tab.hide();
if ($this.height() <= maxHeight) {
menu.find('a').click(function() { check(true); });
diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html
index 75ad3c39f4..a29fce6c5a 100644
--- a/phpBB/adm/style/install_footer.html
+++ b/phpBB/adm/style/install_footer.html
@@ -5,7 +5,9 @@
</div>
<div id="page-footer">
- Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited
+ <div class="copyright">
+ Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited
+ </div>
</div>
</div>
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
index a8f7009e4b..c818a4fc6d 100644
--- a/phpBB/adm/style/install_header.html
+++ b/phpBB/adm/style/install_header.html
@@ -29,7 +29,7 @@
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
- <li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <li class="tab<!-- IF t_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{t_block1.U_TITLE}">{t_block1.L_TITLE}</a></li>
<!-- END t_block1 -->
</ul>
</div>
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 0f4589f5d4..deb38c8691 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -5,15 +5,17 @@
</div>
<div id="page-footer">
- <!-- IF S_COPYRIGHT_HTML -->
- {CREDIT_LINE}
- <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
- <!-- ENDIF -->
+ <div class="copyright">
+ <!-- IF S_COPYRIGHT_HTML -->
+ {CREDIT_LINE}
+ <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- ENDIF -->
- <!-- IF DEBUG_OUTPUT -->
- <!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF -->
- {DEBUG_OUTPUT}
- <!-- ENDIF -->
+ <!-- IF DEBUG_OUTPUT -->
+ <!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF -->
+ {DEBUG_OUTPUT}
+ <!-- ENDIF -->
+ </div>
<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
<div id="darken">&nbsp;</div>
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 25a82a5faa..afd2b94924 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -106,7 +106,7 @@ function popup(url, width, height, name)
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
- <li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <li class="tab<!-- IF t_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{t_block1.U_TITLE}">{t_block1.L_TITLE}</a></li>
<!-- END t_block1 -->
</ul>
</div>
diff --git a/phpBB/adm/style/pagination.html b/phpBB/adm/style/pagination.html
index 7158f83fbc..5e755723e8 100644
--- a/phpBB/adm/style/pagination.html
+++ b/phpBB/adm/style/pagination.html
@@ -1,5 +1,5 @@
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull;
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE_CLICK}">{PAGE_NUMBER}</a> &bull;
<ul>
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV --><li><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a></li>
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 296c5b0ef9..785aa141f0 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -7,6 +7,7 @@ phpbb.alertTime = 100;
// define a couple constants for keydown functions.
var keymap = {
+ TAB: 9,
ENTER: 13,
ESC: 27
};
@@ -873,19 +874,6 @@ phpbb.timezonePreselectSelect = function(forceSelector) {
}
};
-// Toggle notification list
-$('#notification_list_button').click(function(e) {
- $('#notification_list').toggle();
- e.preventDefault();
-});
-$('#phpbb').click(function(e) {
- var target = $(e.target);
-
- if (!target.is('#notification_list, #notification_list_button') && !target.parents().is('#notification_list, #notification_list_button')) {
- $('#notification_list').hide();
- }
-});
-
phpbb.ajaxCallbacks = {};
/**
@@ -1201,7 +1189,11 @@ phpbb.applyCodeEditor = function(textarea) {
var key = event.keyCode || event.which;
// intercept tabs
- if (key == 9) {
+ if (key == keymap.TAB &&
+ !event.ctrlKey &&
+ !event.shiftKey &&
+ !event.altKey &&
+ !event.metaKey) {
if (inTag()) {
appendText("\t");
event.preventDefault();
@@ -1210,7 +1202,7 @@ phpbb.applyCodeEditor = function(textarea) {
}
// intercept new line characters
- if (key == 13) {
+ if (key == keymap.ENTER) {
if (inTag()) {
var lastLine = getLastLine(true),
code = '' + /^\s*/g.exec(lastLine);
@@ -1511,11 +1503,37 @@ phpbb.getFunctionByName = function (functionName) {
};
/**
-* Apply code editor to all textarea elements with data-bbcode attribute
+* Register page dropdowns.
*/
-$(document).ready(function() {
- $('textarea[data-bbcode]').each(function() {
- phpbb.applyCodeEditor(this);
+phpbb.registerPageDropdowns = function() {
+ $('body').find('.dropdown-container').each(function() {
+ var $this = $(this),
+ trigger = $this.find('.dropdown-trigger:first'),
+ contents = $this.find('.dropdown'),
+ options = {
+ direction: 'auto',
+ verticalDirection: 'auto'
+ },
+ data;
+
+ if (!trigger.length) {
+ data = $this.attr('data-dropdown-trigger');
+ trigger = data ? $this.children(data) : $this.children('a:first');
+ }
+
+ if (!contents.length) {
+ data = $this.attr('data-dropdown-contents');
+ contents = data ? $this.children(data) : $this.children('div:first');
+ }
+
+ if (!trigger.length || !contents.length) return;
+
+ if ($this.hasClass('dropdown-up')) options.verticalDirection = 'up';
+ if ($this.hasClass('dropdown-down')) options.verticalDirection = 'down';
+ if ($this.hasClass('dropdown-left')) options.direction = 'left';
+ if ($this.hasClass('dropdown-right')) options.direction = 'right';
+
+ phpbb.registerDropdown(trigger, contents, options);
});
// Hide active dropdowns when click event happens outside
@@ -1525,6 +1543,17 @@ $(document).ready(function() {
$(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
}
});
+}
+
+/**
+* Apply code editor to all textarea elements with data-bbcode attribute
+*/
+$(document).ready(function() {
+ $('textarea[data-bbcode]').each(function() {
+ phpbb.applyCodeEditor(this);
+ });
+
+ phpbb.registerPageDropdowns();
$('#color_palette_placeholder').each(function() {
phpbb.registerPalette($(this));
diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js
index 8ffd452a09..5445e83e15 100644
--- a/phpBB/assets/javascript/plupload.js
+++ b/phpBB/assets/javascript/plupload.js
@@ -586,6 +586,11 @@ uploader.bind('FilesAdded', function(up, files) {
return;
}
+ // Switch the active tab if the style supports it
+ if (typeof activateSubPanel == 'function') {
+ activateSubPanel('attach-panel');
+ }
+
// Show the file list if there aren't any files currently.
if (!$('#file-list-container').is(':visible')) {
$('#file-list-container').show(100);
diff --git a/phpBB/assets/plupload/plupload.full.min.js b/phpBB/assets/plupload/plupload.full.min.js
index caa9728156..ca6cdf82de 100644
--- a/phpBB/assets/plupload/plupload.full.min.js
+++ b/phpBB/assets/plupload/plupload.full.min.js
@@ -25,4 +25,4 @@
*
* Date: 2014-05-14
*/
-;(function(e,t,n){function s(e){function r(e,t,r){var i={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};i[e]?n[i[e]]=t:r||(n[e]=t)}var t=e.required_features,n={};if(typeof t=="string")o.each(t.split(/\s*,\s*/),function(e){r(e,!0)});else if(typeof t=="object")o.each(t,function(e,t){r(t,e)});else if(t===!0){e.chunk_size>0&&(n.slice_blob=!0);if(e.resize.enabled||!e.multipart)n.send_binary_string=!0;o.each(e,function(e,t){r(t,!!e,!0)})}return n}var r=e.setTimeout,i={},o={VERSION:"2.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,get:function(n){var r=[],i;t.typeOf(n)!=="array"&&(n=[n]);var s=n.length;while(s--)i=t.get(n[s]),i&&r.push(i);return r.length?r:null},each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(t=0;t<n.length;t+=2)e=e.replace(n[t],n[t+1]);return e=e.replace(/\s+/g,"_"),e=e.replace(/[^a-z0-9_\-\.]+/gi,""),e},buildUrl:function(e,t){var n="";return o.each(t,function(e,t){n+=(n?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),n&&(e+=(e.indexOf("?")>0?"&":"?")+n),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===n||/\D/.test(e))return o.translate("N/A");var r=Math.pow(1024,4);return e>r?t(e/r,1)+" "+o.translate("tb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("gb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("mb"):e>1024?Math.round(e/1024)+" "+o.translate("kb"):e+" "+o.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,n){var r,i;return r=new o.Uploader(e),i=t.Runtime.thatCan(r.getOption().required_features,n||e.runtimes),r.destroy(),i},addFileFilter:function(e,t){i[e]=t}};o.addFileFilter("mime_types",function(e,t,n){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:o.FILE_EXTENSION_ERROR,message:o.translate("File extension error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("max_file_size",function(e,t,n){var r;e=o.parseSize(e),t.size!==r&&e&&t.size>e?(this.trigger("Error",{code:o.FILE_SIZE_ERROR,message:o.translate("File size error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("prevent_duplicates",function(e,t,n){if(e){var r=this.files.length;while(r--)if(t.name===this.files[r].name&&t.size===this.files[r].size){this.trigger("Error",{code:o.FILE_DUPLICATE_ERROR,message:o.translate("Duplicate file error."),file:t}),n(!1);return}}n(!0)}),o.Uploader=function(e){function g(){var e,t=0,n;if(this.state==o.STARTED){for(n=0;n<f.length;n++)!e&&f[n].status==o.QUEUED?(e=f[n],this.trigger("BeforeUpload",e)&&(e.status=o.UPLOADING,this.trigger("UploadFile",e))):t++;t==f.length&&(this.state!==o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",f))}}function y(e){e.percent=e.size>0?Math.ceil(e.loaded/e.size*100):100,b()}function b(){var e,t;d.reset();for(e=0;e<f.length;e++)t=f[e],t.size!==n?(d.size+=t.origSize,d.loaded+=t.loaded*t.origSize/t.size):d.size=n,t.status==o.DONE?d.uploaded++:t.status==o.FAILED?d.failed++:d.queued++;d.size===n?d.percent=f.length>0?Math.ceil(d.uploaded/f.length*100):0:(d.bytesPerSec=Math.ceil(d.loaded/((+(new Date)-p||1)/1e3)),d.percent=d.size>0?Math.ceil(d.loaded/d.size*100):0)}function w(){var e=c[0]||h[0];return e?e.getRuntime().uid:!1}function E(e,n){if(e.ruid){var r=t.Runtime.getInfo(e.ruid);if(r)return r.can(n)}return!1}function S(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",O),this.bind("BeforeUpload",C),this.bind("UploadFile",k),this.bind("UploadProgress",L),this.bind("StateChanged",A),this.bind("QueueChanged",b),this.bind("Error",_),this.bind("FileUploaded",M),this.bind("Destroy",D)}function x(e,n){var r=this,i=0,s=[],u={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:l,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};o.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(u[t]=e[t])}),e.browse_button&&o.each(e.browse_button,function(n){s.push(function(s){var a=new t.FileInput(o.extend({},u,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:n}));a.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),i++,c.push(this),s()},a.onchange=function(){r.addFile(this.files)},a.bind("mouseenter mouseleave mousedown mouseup",function(r){v||(e.browse_button_hover&&("mouseenter"===r.type?t.addClass(n,e.browse_button_hover):"mouseleave"===r.type&&t.removeClass(n,e.browse_button_hover)),e.browse_button_active&&("mousedown"===r.type?t.addClass(n,e.browse_button_active):"mouseup"===r.type&&t.removeClass(n,e.browse_button_active)))}),a.bind("mousedown",function(){r.trigger("Browse")}),a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),e.drop_element&&o.each(e.drop_element,function(e){s.push(function(n){var s=new t.FileDrop(o.extend({},u,{drop_zone:e}));s.onready=function(){var e=t.Runtime.getInfo(this.ruid);r.features.dragdrop=e.can("drag_and_drop"),i++,h.push(this),n()},s.ondrop=function(){r.addFile(this.files)},s.bind("error runtimeerror",function(){s=null,n()}),s.init()})}),t.inSeries(s,function(){typeof n=="function"&&n(i)})}function T(e,r,i){var s=new t.Image;try{s.onload=function(){if(r.width>this.width&&r.height>this.height&&r.quality===n&&r.preserve_headers&&!r.crop)return this.destroy(),i(e);s.downsize(r.width,r.height,r.crop,r.preserve_headers)},s.onresize=function(){i(this.getAsBlob(e.type,r.quality)),this.destroy()},s.onerror=function(){i(e)},s.load(e)}catch(o){i(e)}}function N(e,n,r){function f(e,t,n){var r=a[e];switch(e){case"max_file_size":e==="max_file_size"&&(a.max_file_size=a.filters.max_file_size=t);break;case"chunk_size":if(t=o.parseSize(t))a[e]=t,a.send_file_name=!0;break;case"multipart":a[e]=t,t||(a.send_file_name=!0);break;case"unique_names":a[e]=t,t&&(a.send_file_name=!0);break;case"filters":o.typeOf(t)==="array"&&(t={mime_types:t}),n?o.extend(a.filters,t):a.filters=t,t.mime_types&&(a.filters.mime_types.regexp=function(e){var t=[];return o.each(e,function(e){o.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(a.filters.mime_types));break;case"resize":n?o.extend(a.resize,t,{enabled:!0}):a.resize=t;break;case"prevent_duplicates":a.prevent_duplicates=a.filters.prevent_duplicates=!!t;break;case"browse_button":case"drop_element":t=o.get(t);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":a[e]=t,n||(u=!0);break;default:a[e]=t}n||i.trigger("OptionChanged",e,t,r)}var i=this,u=!1;typeof e=="object"?o.each(e,function(e,t){f(t,e,r)}):f(e,n,r),r?(a.required_features=s(o.extend({},a)),l=s(o.extend({},a,{required_features:!0}))):u&&(i.trigger("Destroy"),x.call(i,a,function(e){e?(i.runtime=t.Runtime.getInfo(w()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})}))}function C(e,t){if(e.settings.unique_names){var n=t.name.match(/\.([^.]+)$/),r="part";n&&(r=n[1]),t.target_name=t.id+"."+r}}function k(e,n){function h(){u-->0?r(p,1e3):(n.loaded=f,e.trigger("Error",{code:o.HTTP_ERROR,message:o.translate("HTTP Error."),file:n,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}))}function p(){var d,v,g={},y;if(n.status!==o.UPLOADING||e.state===o.STOPPED)return;e.settings.send_file_name&&(g.name=n.target_name||n.name),s&&a.chunks&&c.size>s?(y=Math.min(s,c.size-f),d=c.slice(f,f+y)):(y=c.size,d=c),s&&a.chunks&&(e.settings.send_chunk_number?(g.chunk=Math.ceil(f/s),g.chunks=Math.ceil(c.size/s)):(g.offset=f,g.total=c.size)),m=new t.XMLHttpRequest,m.upload&&(m.upload.onprogress=function(t){n.loaded=Math.min(n.size,f+t.loaded),e.trigger("UploadProgress",n)}),m.onload=function(){if(m.status>=400){h();return}u=e.settings.max_retries,y<c.size?(d.destroy(),f+=y,n.loaded=Math.min(f,c.size),e.trigger("ChunkUploaded",n,{offset:n.loaded,total:c.size,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}),t.Env.browser==="Android Browser"&&e.trigger("UploadProgress",n)):n.loaded=n.size,d=v=null,!f||f>=c.size?(n.size!=n.origSize&&(c.destroy(),c=null),e.trigger("UploadProgress",n),n.status=o.DONE,e.trigger("FileUploaded",n,{response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()})):r(p,1)},m.onerror=function(){h()},m.onloadend=function(){this.destroy(),m=null},e.settings.multipart&&a.multipart?(m.open("post",i,!0),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),v=new t.FormData,o.each(o.extend(g,e.settings.multipart_params),function(e,t){v.append(t,e)}),v.append(e.settings.file_data_name,d),m.send(v,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})):(i=o.buildUrl(e.settings.url,o.extend(g,e.settings.multipart_params)),m.open("post",i,!0),m.setRequestHeader("Content-Type","application/octet-stream"),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),m.send(d,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url}))}var i=e.settings.url,s=e.settings.chunk_size,u=e.settings.max_retries,a=e.features,f=0,c;n.loaded&&(f=n.loaded=s?s*Math.floor(n.loaded/s):0),c=n.getSource(),e.settings.resize.enabled&&E(c,"send_binary_string")&&!!~t.inArray(c.type,["image/jpeg","image/png"])?T.call(this,c,e.settings.resize,function(e){c=e,n.size=e.size,p()}):p()}function L(e,t){y(t)}function A(e){if(e.state==o.STARTED)p=+(new Date);else if(e.state==o.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==o.UPLOADING&&(e.files[t].status=o.QUEUED,b())}function O(){m&&m.abort()}function M(e){b(),r(function(){g.call(e)},1)}function _(e,t){t.code===o.INIT_ERROR?e.destroy():t.file&&(t.file.status=o.FAILED,y(t.file),e.state==o.STARTED&&(e.trigger("CancelUpload"),r(function(){g.call(e)},1)))}function D(e){e.stop(),o.each(f,function(e){e.destroy()}),f=[],c.length&&(o.each(c,function(e){e.destroy()}),c=[]),h.length&&(o.each(h,function(e){e.destroy()}),h=[]),l={},v=!1,p=m=null,d.reset()}var u=o.guid(),a,f=[],l={},c=[],h=[],p,d,v=!1,m;a={runtimes:t.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},N.call(this,e,null,!0),d=new o.QueueProgress,o.extend(this,{id:u,uid:u,state:o.STOPPED,features:{},runtime:null,files:f,settings:a,total:d,init:function(){var e=this;typeof a.preinit=="function"?a.preinit(e):o.each(a.preinit,function(t,n){e.bind(n,t)}),S.call(this);if(!a.browse_button||!a.url){this.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")});return}x.call(this,a,function(n){typeof a.init=="function"?a.init(e):o.each(a.init,function(t,n){e.bind(n,t)}),n?(e.runtime=t.Runtime.getInfo(w()).type,e.trigger("Init",{runtime:e.runtime}),e.trigger("PostInit")):e.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})})},setOption:function(e,t){N.call(this,e,t,!this.runtime)},getOption:function(e){return e?a[e]:a},refresh:function(){c.length&&o.each(c,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=o.STARTED&&(this.state=o.STARTED,this.trigger("StateChanged"),g.call(this))},stop:function(){this.state!=o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){v=arguments[0]!==n?arguments[0]:!0,c.length&&o.each(c,function(e){e.disable(v)}),this.trigger("DisableBrowse",v)},getFile:function(e){var t;for(t=f.length-1;t>=0;t--)if(f[t].id===e)return f[t]},addFile:function(e,n){function l(e,n){var r=[];t.each(s.settings.filters,function(t,n){i[n]&&r.push(function(r){i[n].call(s,t,e,function(e){r(!e)})})}),t.inSeries(r,n)}function c(e){var i=t.typeOf(e);if(e instanceof t.File){if(!e.ruid&&!e.isDetached()){if(!a)return!1;e.ruid=a,e.connectRuntime(a)}c(new o.File(e))}else e instanceof t.Blob?(c(e.getSource()),e.destroy()):e instanceof o.File?(n&&(e.name=n),u.push(function(t){l(e,function(n){n||(f.push(e),s.trigger("FileFiltered",e)),r(t,1)})})):t.inArray(i,["file","blob"])!==-1?c(new t.File(null,e)):i==="node"&&t.typeOf(e.files)==="filelist"?t.each(e.files,c):i==="array"&&(n=null,t.each(e,c))}var s=this,u=[],a;a=w(),c(e),u.length&&t.inSeries(u,function(){f.length&&s.trigger("FilesAdded",f)})},removeFile:function(e){var t=typeof e=="string"?e:e.id;for(var n=f.length-1;n>=0;n--)if(f[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var r=f.splice(e===n?0:e,t===n?f.length:t),i=!1;return this.state==o.STARTED&&(o.each(r,function(e){if(e.status===o.UPLOADING)return i=!0,!1}),i&&this.stop()),this.trigger("FilesRemoved",r),o.each(r,function(e){e.destroy()}),i&&this.start(),r},bind:function(e,t,n){var r=this;o.Uploader.prototype.bind.call(this,e,function(){var e=[].slice.call(arguments);return e.splice(0,1,r),t.apply(this,e)},0,n)},destroy:function(){this.trigger("Destroy"),a=d=null,this.unbindAll()}})},o.Uploader.prototype=t.EventTarget.instance,o.File=function(){function n(n){o.extend(this,{id:o.guid(),name:n.name||n.fileName,type:n.type||"",size:n.size||n.fileSize,origSize:n.size||n.fileSize,loaded:0,percent:0,status:o.QUEUED,lastModifiedDate:n.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return t.inArray(t.typeOf(e),["blob","file"])!==-1?e:null},getSource:function(){return e[this.id]?e[this.id]:null},destroy:function(){var t=this.getSource();t&&(t.destroy(),delete e[this.id])}}),e[this.id]=n}var e={};return n}(),o.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=o})(window,mOxie); \ No newline at end of file
+;(function(e,t,n){function s(e){function r(e,t,r){var i={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",urlstream_upload:"send_binary_string",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};i[e]?n[i[e]]=t:r||(n[e]=t)}var t=e.required_features,n={};if(typeof t=="string")o.each(t.split(/\s*,\s*/),function(e){r(e,!0)});else if(typeof t=="object")o.each(t,function(e,t){r(t,e)});else if(t===!0){e.chunk_size>0&&(n.slice_blob=!0);if(e.resize.enabled||!e.multipart)n.send_binary_string=!0;o.each(e,function(e,t){r(t,!!e,!0)})}return n}var r=e.setTimeout,i={},o={VERSION:"2.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,get:function(n){var r=[],i;t.typeOf(n)!=="array"&&(n=[n]);var s=n.length;while(s--)i=t.get(n[s]),i&&r.push(i);return r.length?r:null},each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(t=0;t<n.length;t+=2)e=e.replace(n[t],n[t+1]);return e=e.replace(/\s+/g,"_"),e=e.replace(/[^a-z0-9_\-\.]+/gi,""),e},buildUrl:function(e,t){var n="";return o.each(t,function(e,t){n+=(n?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),n&&(e+=(e.indexOf("?")>0?"&":"?")+n),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===n||/\D/.test(e))return o.translate("N/A");var r=Math.pow(1024,4);return e>r?t(e/r,1)+" "+o.translate("tb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("gb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("mb"):e>1024?Math.round(e/1024)+" "+o.translate("kb"):e+" "+o.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,n){var r,i;return r=new o.Uploader(e),i=t.Runtime.thatCan(r.getOption().required_features,n||e.runtimes),r.destroy(),i},addFileFilter:function(e,t){i[e]=t}};o.addFileFilter("mime_types",function(e,t,n){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:o.FILE_EXTENSION_ERROR,message:o.translate("File extension error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("max_file_size",function(e,t,n){var r;e=o.parseSize(e),t.size!==r&&e&&t.size>e?(this.trigger("Error",{code:o.FILE_SIZE_ERROR,message:o.translate("File size error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("prevent_duplicates",function(e,t,n){if(e){var r=this.files.length;while(r--)if(t.name===this.files[r].name&&t.size===this.files[r].size){this.trigger("Error",{code:o.FILE_DUPLICATE_ERROR,message:o.translate("Duplicate file error."),file:t}),n(!1);return}}n(!0)}),o.Uploader=function(e){function g(){var e,t=0,n;if(this.state==o.STARTED){for(n=0;n<f.length;n++)!e&&f[n].status==o.QUEUED?(e=f[n],this.trigger("BeforeUpload",e)&&(e.status=o.UPLOADING,this.trigger("UploadFile",e))):t++;t==f.length&&(this.state!==o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",f))}}function y(e){e.percent=e.size>0?Math.ceil(e.loaded/e.size*100):100,b()}function b(){var e,t;d.reset();for(e=0;e<f.length;e++)t=f[e],t.size!==n?(d.size+=t.origSize,d.loaded+=t.loaded*t.origSize/t.size):d.size=n,t.status==o.DONE?d.uploaded++:t.status==o.FAILED?d.failed++:d.queued++;d.size===n?d.percent=f.length>0?Math.ceil(d.uploaded/f.length*100):0:(d.bytesPerSec=Math.ceil(d.loaded/((+(new Date)-p||1)/1e3)),d.percent=d.size>0?Math.ceil(d.loaded/d.size*100):0)}function w(){var e=c[0]||h[0];return e?e.getRuntime().uid:!1}function E(e,n){if(e.ruid){var r=t.Runtime.getInfo(e.ruid);if(r)return r.can(n)}return!1}function S(){this.bind("FilesAdded FilesRemoved",function(e){e.trigger("QueueChanged"),e.refresh()}),this.bind("CancelUpload",O),this.bind("BeforeUpload",C),this.bind("UploadFile",k),this.bind("UploadProgress",L),this.bind("StateChanged",A),this.bind("QueueChanged",b),this.bind("Error",_),this.bind("FileUploaded",M),this.bind("Destroy",D)}function x(e,n){var r=this,i=0,s=[],u={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:l,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};o.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(u[t]=e[t])}),e.browse_button&&o.each(e.browse_button,function(n){s.push(function(s){var a=new t.FileInput(o.extend({},u,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:n}));a.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),i++,c.push(this),s()},a.onchange=function(){r.addFile(this.files)},a.bind("mouseenter mouseleave mousedown mouseup",function(r){v||(e.browse_button_hover&&("mouseenter"===r.type?t.addClass(n,e.browse_button_hover):"mouseleave"===r.type&&t.removeClass(n,e.browse_button_hover)),e.browse_button_active&&("mousedown"===r.type?t.addClass(n,e.browse_button_active):"mouseup"===r.type&&t.removeClass(n,e.browse_button_active)))}),a.bind("mousedown",function(){r.trigger("Browse")}),a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),e.drop_element&&o.each(e.drop_element,function(e){s.push(function(n){var s=new t.FileDrop(o.extend({},u,{drop_zone:e}));s.onready=function(){var e=t.Runtime.getInfo(this.ruid);r.features.dragdrop=e.can("drag_and_drop"),i++,h.push(this),n()},s.ondrop=function(){r.addFile(this.files)},s.bind("error runtimeerror",function(){s=null,n()}),s.init()})}),t.inSeries(s,function(){typeof n=="function"&&n(i)})}function T(e,r,i){var s=new t.Image;try{s.onload=function(){if(r.width>this.width&&r.height>this.height&&r.quality===n&&r.preserve_headers&&!r.crop)return this.destroy(),i(e);s.downsize(r.width,r.height,r.crop,r.preserve_headers)},s.onresize=function(){i(this.getAsBlob(e.type,r.quality)),this.destroy()},s.onerror=function(){i(e)},s.load(e)}catch(o){i(e)}}function N(e,n,r){function f(e,t,n){var r=a[e];switch(e){case"max_file_size":e==="max_file_size"&&(a.max_file_size=a.filters.max_file_size=t);break;case"chunk_size":if(t=o.parseSize(t))a[e]=t,a.send_file_name=!0;break;case"multipart":a[e]=t,t||(a.send_file_name=!0);break;case"unique_names":a[e]=t,t&&(a.send_file_name=!0);break;case"filters":o.typeOf(t)==="array"&&(t={mime_types:t}),n?o.extend(a.filters,t):a.filters=t,t.mime_types&&(a.filters.mime_types.regexp=function(e){var t=[];return o.each(e,function(e){o.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(a.filters.mime_types));break;case"resize":n?o.extend(a.resize,t,{enabled:!0}):a.resize=t;break;case"prevent_duplicates":a.prevent_duplicates=a.filters.prevent_duplicates=!!t;break;case"browse_button":case"drop_element":t=o.get(t);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":a[e]=t,n||(u=!0);break;default:a[e]=t}n||i.trigger("OptionChanged",e,t,r)}var i=this,u=!1;typeof e=="object"?o.each(e,function(e,t){f(t,e,r)}):f(e,n,r),r?(a.required_features=s(o.extend({},a)),l=s(o.extend({},a,{required_features:!0}))):u&&(i.trigger("Destroy"),x.call(i,a,function(e){e?(i.runtime=t.Runtime.getInfo(w()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})}))}function C(e,t){if(e.settings.unique_names){var n=t.name.match(/\.([^.]+)$/),r="part";n&&(r=n[1]),t.target_name=t.id+"."+r}}function k(e,n){function h(){u-->0?r(p,1e3):(n.loaded=f,e.trigger("Error",{code:o.HTTP_ERROR,message:o.translate("HTTP Error."),file:n,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}))}function p(){var d,v,g={},y;if(n.status!==o.UPLOADING||e.state===o.STOPPED)return;e.settings.send_file_name&&(g.name=n.target_name||n.name),s&&a.chunks&&c.size>s?(y=Math.min(s,c.size-f),d=c.slice(f,f+y)):(y=c.size,d=c),s&&a.chunks&&(e.settings.send_chunk_number?(g.chunk=Math.ceil(f/s),g.chunks=Math.ceil(c.size/s)):(g.offset=f,g.total=c.size)),m=new t.XMLHttpRequest,m.upload&&(m.upload.onprogress=function(t){n.loaded=Math.min(n.size,f+t.loaded),e.trigger("UploadProgress",n)}),m.onload=function(){if(m.status>=400){h();return}u=e.settings.max_retries,y<c.size?(d.destroy(),f+=y,n.loaded=Math.min(f,c.size),e.trigger("ChunkUploaded",n,{offset:n.loaded,total:c.size,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}),t.Env.browser==="Android Browser"&&e.trigger("UploadProgress",n)):n.loaded=n.size,d=v=null,!f||f>=c.size?(n.size!=n.origSize&&(c.destroy(),c=null),e.trigger("UploadProgress",n),n.status=o.DONE,e.trigger("FileUploaded",n,{response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()})):r(p,1)},m.onerror=function(){h()},m.onloadend=function(){this.destroy(),m=null},e.settings.multipart&&a.multipart?(m.open("post",i,!0),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),v=new t.FormData,o.each(o.extend(g,e.settings.multipart_params),function(e,t){v.append(t,e)}),v.append(e.settings.file_data_name,d),m.send(v,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})):(i=o.buildUrl(e.settings.url,o.extend(g,e.settings.multipart_params)),m.open("post",i,!0),m.setRequestHeader("Content-Type","application/octet-stream"),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),m.send(d,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url}))}var i=e.settings.url,s=e.settings.chunk_size,u=e.settings.max_retries,a=e.features,f=0,c;n.loaded&&(f=n.loaded=s?s*Math.floor(n.loaded/s):0),c=n.getSource(),e.settings.resize.enabled&&E(c,"send_binary_string")&&!!~t.inArray(c.type,["image/jpeg","image/png"])?T.call(this,c,e.settings.resize,function(e){c=e,n.size=e.size,p()}):p()}function L(e,t){y(t)}function A(e){if(e.state==o.STARTED)p=+(new Date);else if(e.state==o.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==o.UPLOADING&&(e.files[t].status=o.QUEUED,b())}function O(){m&&m.abort()}function M(e){b(),r(function(){g.call(e)},1)}function _(e,t){t.code===o.INIT_ERROR?e.destroy():t.file&&(t.file.status=o.FAILED,y(t.file),e.state==o.STARTED&&(e.trigger("CancelUpload"),r(function(){g.call(e)},1)))}function D(e){e.stop(),o.each(f,function(e){e.destroy()}),f=[],c.length&&(o.each(c,function(e){e.destroy()}),c=[]),h.length&&(o.each(h,function(e){e.destroy()}),h=[]),l={},v=!1,p=m=null,d.reset()}var u=o.guid(),a,f=[],l={},c=[],h=[],p,d,v=!1,m;a={runtimes:t.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_file_name:!0,send_chunk_number:!0},N.call(this,e,null,!0),d=new o.QueueProgress,o.extend(this,{id:u,uid:u,state:o.STOPPED,features:{},runtime:null,files:f,settings:a,total:d,init:function(){var e=this;typeof a.preinit=="function"?a.preinit(e):o.each(a.preinit,function(t,n){e.bind(n,t)}),S.call(this);if(!a.browse_button||!a.url){this.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")});return}x.call(this,a,function(n){typeof a.init=="function"?a.init(e):o.each(a.init,function(t,n){e.bind(n,t)}),n?(e.runtime=t.Runtime.getInfo(w()).type,e.trigger("Init",{runtime:e.runtime}),e.trigger("PostInit")):e.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})})},setOption:function(e,t){N.call(this,e,t,!this.runtime)},getOption:function(e){return e?a[e]:a},refresh:function(){c.length&&o.each(c,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=o.STARTED&&(this.state=o.STARTED,this.trigger("StateChanged"),g.call(this))},stop:function(){this.state!=o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){v=arguments[0]!==n?arguments[0]:!0,c.length&&o.each(c,function(e){e.disable(v)}),this.trigger("DisableBrowse",v)},getFile:function(e){var t;for(t=f.length-1;t>=0;t--)if(f[t].id===e)return f[t]},addFile:function(e,n){function c(e,n){var r=[];t.each(s.settings.filters,function(t,n){i[n]&&r.push(function(r){i[n].call(s,t,e,function(e){r(!e)})})}),t.inSeries(r,n)}function h(e){var i=t.typeOf(e);if(e instanceof t.File){if(!e.ruid&&!e.isDetached()){if(!l)return!1;e.ruid=l,e.connectRuntime(l)}h(new o.File(e))}else e instanceof t.Blob?(h(e.getSource()),e.destroy()):e instanceof o.File?(n&&(e.name=n),u.push(function(t){c(e,function(n){n||(f.push(e),a.push(e),s.trigger("FileFiltered",e)),r(t,1)})})):t.inArray(i,["file","blob"])!==-1?h(new t.File(null,e)):i==="node"&&t.typeOf(e.files)==="filelist"?t.each(e.files,h):i==="array"&&(n=null,t.each(e,h))}var s=this,u=[],a=[],l;l=w(),h(e),u.length&&t.inSeries(u,function(){a.length&&s.trigger("FilesAdded",a)})},removeFile:function(e){var t=typeof e=="string"?e:e.id;for(var n=f.length-1;n>=0;n--)if(f[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var r=f.splice(e===n?0:e,t===n?f.length:t),i=!1;return this.state==o.STARTED&&(o.each(r,function(e){if(e.status===o.UPLOADING)return i=!0,!1}),i&&this.stop()),this.trigger("FilesRemoved",r),o.each(r,function(e){e.destroy()}),i&&this.start(),r},bind:function(e,t,n){var r=this;o.Uploader.prototype.bind.call(this,e,function(){var e=[].slice.call(arguments);return e.splice(0,1,r),t.apply(this,e)},0,n)},destroy:function(){this.trigger("Destroy"),a=d=null,this.unbindAll()}})},o.Uploader.prototype=t.EventTarget.instance,o.File=function(){function n(n){o.extend(this,{id:o.guid(),name:n.name||n.fileName,type:n.type||"",size:n.size||n.fileSize,origSize:n.size||n.fileSize,loaded:0,percent:0,status:o.QUEUED,lastModifiedDate:n.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return t.inArray(t.typeOf(e),["blob","file"])!==-1?e:null},getSource:function(){return e[this.id]?e[this.id]:null},destroy:function(){var t=this.getSource();t&&(t.destroy(),delete e[this.id])}}),e[this.id]=n}var e={};return n}(),o.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=o})(window,mOxie); \ No newline at end of file
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
index 63c8f2230b..8b8d8e43fd 100755
--- a/phpBB/bin/phpbbcli.php
+++ b/phpBB/bin/phpbbcli.php
@@ -39,6 +39,9 @@ $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$php
$phpbb_container->get('request')->enable_super_globals();
require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
-$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION);
+$user = $phpbb_container->get('user');
+$user->add_lang('acp/common');
+
+$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user);
$application->register_container_commands($phpbb_container);
$application->run();
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 435d6139e4..53d2f873f1 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -15,6 +15,8 @@
"twig/twig": "1.13.*"
},
"require-dev": {
+ "behat/mink": "1.4.*",
+ "behat/mink-goutte-driver": "1.0.*",
"fabpot/goutte": "1.0.*",
"phpunit/dbunit": "1.3.*",
"phpunit/phpunit": "4.1.*",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 2213c3789b..89973b93d4 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -3,7 +3,7 @@
"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": "be323c0a1b5baeb83934238033e079ec",
+ "hash": "300d29b350ca2d75b1fa169fe46470f0",
"packages": [
{
"name": "lusitanian/oauth",
@@ -723,6 +723,167 @@
],
"packages-dev": [
{
+ "name": "behat/mink",
+ "version": "v1.4.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Mink.git",
+ "reference": "0817070a6e2ec9f475fad9bfb81a962c462eb934"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Mink/zipball/0817070a6e2ec9f475fad9bfb81a962c462eb934",
+ "reference": "0817070a6e2ec9f475fad9bfb81a962c462eb934",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.1",
+ "symfony/css-selector": ">=2.0,<2.4-dev"
+ },
+ "suggest": {
+ "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)",
+ "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation",
+ "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)",
+ "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-develop": "1.4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Mink": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Web acceptance testing framework for PHP 5.3",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "browser",
+ "testing",
+ "web"
+ ],
+ "time": "2013-03-02 15:53:18"
+ },
+ {
+ "name": "behat/mink-browserkit-driver",
+ "version": "v1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/MinkBrowserKitDriver.git",
+ "reference": "f2771b5fc4dbc233859addf37a7d150852f78418"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/MinkBrowserKitDriver/zipball/f2771b5fc4dbc233859addf37a7d150852f78418",
+ "reference": "f2771b5fc4dbc233859addf37a7d150852f78418",
+ "shasum": ""
+ },
+ "require": {
+ "behat/mink": "~1.4.3",
+ "php": ">=5.3.1",
+ "symfony/browser-kit": "~2.0",
+ "symfony/dom-crawler": "~2.0"
+ },
+ "require-dev": {
+ "silex/silex": "@dev"
+ },
+ "type": "mink-driver",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Mink\\Driver": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Symfony2 BrowserKit driver for Mink framework",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "Mink",
+ "Symfony2",
+ "browser",
+ "testing"
+ ],
+ "time": "2013-04-13 12:17:15"
+ },
+ {
+ "name": "behat/mink-goutte-driver",
+ "version": "v1.0.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/MinkGoutteDriver.git",
+ "reference": "fa1b073b48761464feb0b05e6825da44b20118d8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/MinkGoutteDriver/zipball/fa1b073b48761464feb0b05e6825da44b20118d8",
+ "reference": "fa1b073b48761464feb0b05e6825da44b20118d8",
+ "shasum": ""
+ },
+ "require": {
+ "behat/mink-browserkit-driver": ">=1.0.5,<1.2.0",
+ "fabpot/goutte": "~1.0.1",
+ "php": ">=5.3.1"
+ },
+ "type": "mink-driver",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Mink\\Driver": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Goutte driver for Mink framework",
+ "homepage": "http://mink.behat.org/",
+ "keywords": [
+ "browser",
+ "goutte",
+ "headless",
+ "testing"
+ ],
+ "time": "2013-07-03 18:43:54"
+ },
+ {
"name": "fabpot/goutte",
"version": "v1.0.3",
"source": {
diff --git a/phpBB/config/auth_providers.yml b/phpBB/config/auth_providers.yml
index dac8b9d252..d2f22ec477 100644
--- a/phpBB/config/auth_providers.yml
+++ b/phpBB/config/auth_providers.yml
@@ -1,8 +1,9 @@
services:
auth.provider_collection:
- class: phpbb\di\service_collection
+ class: phpbb\auth\provider_collection
arguments:
- @service_container
+ - @config
tags:
- { name: service_collection, tag: auth.provider }
auth.provider.db:
diff --git a/phpBB/config/console.yml b/phpBB/config/console.yml
index 56bf99390a..00b8f9cec0 100644
--- a/phpBB/config/console.yml
+++ b/phpBB/config/console.yml
@@ -46,6 +46,23 @@ services:
tags:
- { name: console.command }
+ console.command.cron.list:
+ class: phpbb\console\command\cron\cron_list
+ arguments:
+ - @cron.manager
+ - @user
+ tags:
+ - { name: console.command }
+
+ console.command.cron.run:
+ class: phpbb\console\command\cron\run
+ arguments:
+ - @cron.manager
+ - @cron.lock_db
+ - @user
+ tags:
+ - { name: console.command }
+
console.command.db.migrate:
class: phpbb\console\command\db\migrate
arguments:
@@ -58,6 +75,13 @@ services:
tags:
- { name: console.command }
+ console.command.dev.migration_tips:
+ class: phpbb\console\command\dev\migration_tips
+ arguments:
+ - @ext.manager
+ tags:
+ - { name: console.command }
+
console.command.extension.disable:
class: phpbb\console\command\extension\disable
arguments:
diff --git a/phpBB/config/passwords.yml b/phpBB/config/passwords.yml
index 9e249a2c12..3dc217286f 100644
--- a/phpBB/config/passwords.yml
+++ b/phpBB/config/passwords.yml
@@ -22,6 +22,14 @@ services:
tags:
- { name: passwords.driver }
+ passwords.driver.bcrypt_wcf2:
+ class: phpbb\passwords\driver\bcrypt_wcf2
+ arguments:
+ - @passwords.driver.bcrypt
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
passwords.driver.salted_md5:
class: phpbb\passwords\driver\salted_md5
arguments:
@@ -38,6 +46,64 @@ services:
tags:
- { name: passwords.driver }
+ passwords.driver.convert_password:
+ class: phpbb\passwords\driver\convert_password
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.sha1_smf:
+ class: phpbb\passwords\driver\sha1_smf
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.sha1_wcf1:
+ class: phpbb\passwords\driver\sha1_wcf1
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.sha1:
+ class: phpbb\passwords\driver\sha1
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.md5_phpbb2:
+ class: phpbb\passwords\driver\md5_phpbb2
+ arguments:
+ - @request
+ - @passwords.driver.salted_md5
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.md5_mybb:
+ class: phpbb\passwords\driver\md5_mybb
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.md5_vb:
+ class: phpbb\passwords\driver\md5_vb
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
passwords.driver_collection:
class: phpbb\di\service_collection
arguments:
diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml
index 00f025e141..ce2a84b12b 100644
--- a/phpBB/config/profilefields.yml
+++ b/phpBB/config/profilefields.yml
@@ -55,6 +55,15 @@ services:
tags:
- { name: profilefield.type }
+ profilefields.type.googleplus:
+ class: phpbb\profilefields\type\type_googleplus
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
profilefields.type.int:
class: phpbb\profilefields\type\type_int
arguments:
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index 4de47f750f..3743daa075 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -170,6 +170,7 @@ services:
- @dbal.conn
- @config
- @filesystem
+ - @user
- %tables.ext%
- %core.root_path%
- %core.php_ext%
@@ -238,6 +239,38 @@ services:
- %core.php_ext%
- %tables.log%
+ message.form.admin:
+ class: phpbb\message\admin_form
+ arguments:
+ - @auth
+ - @config
+ - @config_text
+ - @dbal.conn
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+
+ message.form.topic:
+ class: phpbb\message\topic_form
+ arguments:
+ - @auth
+ - @config
+ - @config_text
+ - @dbal.conn
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+
+ message.form.user:
+ class: phpbb\message\user_form
+ arguments:
+ - @auth
+ - @config
+ - @dbal.conn
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+
notification_manager:
class: phpbb\notification\manager
arguments:
diff --git a/phpBB/cron.php b/phpBB/cron.php
index e070c8f5fb..8bb49bd5d2 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -37,73 +37,33 @@ function output_image()
flush();
}
-function do_cron($cron_lock, $run_tasks)
-{
- global $config;
-
- foreach ($run_tasks as $task)
- {
- if (defined('DEBUG') && $config['use_system_cron'])
- {
- echo "[phpBB cron] Running task '{$task->get_name()}'\n";
- }
-
- $task->run();
- }
-
- // Unloading cache and closing db after having done the dirty work.
- $cron_lock->release();
- garbage_collection();
-}
-
// Thanks to various fatal errors and lack of try/finally, it is quite easy to leave
// the cron lock locked, especially when working on cron-related code.
//
// Attempt to alleviate the problem by doing setup outside of the lock as much as possible.
-//
-// If DEBUG is defined and cron lock cannot be obtained, a message will be printed.
-if (!$config['use_system_cron'])
-{
- $cron_type = request_var('cron_type', '');
+$cron_type = request_var('cron_type', '');
- // Comment this line out for debugging so the page does not return an image.
- output_image();
-}
+// Comment this line out for debugging so the page does not return an image.
+output_image();
$cron_lock = $phpbb_container->get('cron.lock_db');
if ($cron_lock->acquire())
{
$cron = $phpbb_container->get('cron.manager');
- if ($config['use_system_cron'])
- {
- $run_tasks = $cron->find_all_ready_tasks();
- }
- else
+ $task = $cron->find_task($cron_type);
+ if ($task)
{
- // If invalid task is specified, empty $run_tasks is passed to do_cron which then does nothing
- $run_tasks = array();
- $task = $cron->find_task($cron_type);
- if ($task)
+ if ($task->is_parametrized())
{
- if ($task->is_parametrized())
- {
- $task->parse_parameters($request);
- }
- if ($task->is_ready())
- {
- $run_tasks = array($task);
- }
+ $task->parse_parameters($request);
+ }
+ if ($task->is_ready())
+ {
+ $task->run();
+ garbage_collection();
}
}
-
- do_cron($cron_lock, $run_tasks);
-}
-else
-{
- if (defined('DEBUG'))
- {
- echo "Could not obtain cron lock.\n";
- }
+ $cron_lock->release();
}
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 5490e45afa..b1e981795f 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -20,7 +20,6 @@
$schema_path = dirname(__FILE__) . '/../install/schemas/';
$supported_dbms = array(
- 'firebird',
'mssql',
'mysql_40',
'mysql_41',
@@ -44,17 +43,9 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
$phpbb_class_loader->register();
-class phpbb_extension_empty_manager extends \phpbb\extension\manager
-{
- public function __construct()
- {
- $this->extensions = array();
- }
-}
-
-$finder = new \phpbb\extension\finder(new \phpbb_extension_empty_manager(), new \phpbb\filesystem(), $phpbb_root_path);
+$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path);
$classes = $finder->core_path('phpbb/')
- ->directory('db/migration/data')
+ ->directory('/db/migration/data')
->get_classes();
$db = new \phpbb\db\driver\sqlite();
@@ -66,188 +57,4 @@ $fp = fopen($schema_path . 'schema.json', 'wb');
fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));
fclose($fp);
-foreach ($supported_dbms as $dbms)
-{
- $fp = fopen($schema_path . $dbms . '_schema.sql', 'wb');
-
- // Write Header
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- case 'firebird':
- case 'sqlite':
- case 'sqlite3':
- fwrite($fp, "# DO NOT EDIT THIS FILE, IT IS GENERATED\n");
- fwrite($fp, "#\n");
- fwrite($fp, "# To change the contents of this file, edit\n");
- fwrite($fp, "# phpBB/develop/create_schema_files.php and\n");
- fwrite($fp, "# run it.\n");
- break;
-
- case 'mssql':
- case 'oracle':
- case 'postgres':
- fwrite($fp, "/*\n");
- fwrite($fp, " * DO NOT EDIT THIS FILE, IT IS GENERATED\n");
- fwrite($fp, " *\n");
- fwrite($fp, " * To change the contents of this file, edit\n");
- fwrite($fp, " * phpBB/develop/create_schema_files.php and\n");
- fwrite($fp, " * run it.\n");
- fwrite($fp, " */\n\n");
- break;
- }
-
- $line = '';
- switch ($dbms)
- {
- case 'oracle':
- $line .= custom_data('oracle') . "\n";
- break;
-
- case 'postgres':
- $line .= "BEGIN;\n\n";
- $line .= custom_data('postgres') . "\n";
- $line .= "COMMIT;\n\n";
- break;
- }
-
- fwrite($fp, $line);
- fclose($fp);
-}
-
-/**
-* Data put into the header for various dbms
-*/
-function custom_data($dbms)
-{
- switch ($dbms)
- {
- case 'oracle':
- return <<<EOF
-/*
- This first section is optional, however its probably the best method
- of running phpBB on Oracle. If you already have a tablespace and user created
- for phpBB you can leave this section commented out!
-
- The first set of statements create a phpBB tablespace and a phpBB user,
- make sure you change the password of the phpBB user before you run this script!!
-*/
-
-/*
-CREATE TABLESPACE "PHPBB"
- LOGGING
- DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
- SIZE 10M
- AUTOEXTEND ON NEXT 10M
- MAXSIZE 100M;
-
-CREATE USER "PHPBB"
- PROFILE "DEFAULT"
- IDENTIFIED BY "phpbb_password"
- DEFAULT TABLESPACE "PHPBB"
- QUOTA UNLIMITED ON "PHPBB"
- ACCOUNT UNLOCK;
-
-GRANT ANALYZE ANY TO "PHPBB";
-GRANT CREATE SEQUENCE TO "PHPBB";
-GRANT CREATE SESSION TO "PHPBB";
-GRANT CREATE TABLE TO "PHPBB";
-GRANT CREATE TRIGGER TO "PHPBB";
-GRANT CREATE VIEW TO "PHPBB";
-GRANT "CONNECT" TO "PHPBB";
-
-COMMIT;
-DISCONNECT;
-
-CONNECT phpbb/phpbb_password;
-*/
-EOF;
-
- break;
-
- case 'postgres':
- return <<<EOF
-/*
- Domain definition
-*/
-CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
-
-/*
- Operation Functions
-*/
-CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
-CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
-CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
-CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
-CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
-CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
-
-/*
- Operators
-*/
-CREATE OPERATOR <(
- PROCEDURE = _varchar_ci_less_than,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = >,
- NEGATOR = >=,
- RESTRICT = scalarltsel,
- JOIN = scalarltjoinsel);
-
-CREATE OPERATOR <=(
- PROCEDURE = _varchar_ci_less_equal,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = >=,
- NEGATOR = >,
- RESTRICT = scalarltsel,
- JOIN = scalarltjoinsel);
-
-CREATE OPERATOR >(
- PROCEDURE = _varchar_ci_greater_than,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = <,
- NEGATOR = <=,
- RESTRICT = scalargtsel,
- JOIN = scalargtjoinsel);
-
-CREATE OPERATOR >=(
- PROCEDURE = _varchar_ci_greater_equals,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = <=,
- NEGATOR = <,
- RESTRICT = scalargtsel,
- JOIN = scalargtjoinsel);
-
-CREATE OPERATOR <>(
- PROCEDURE = _varchar_ci_not_equal,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = <>,
- NEGATOR = =,
- RESTRICT = neqsel,
- JOIN = neqjoinsel);
-
-CREATE OPERATOR =(
- PROCEDURE = _varchar_ci_equal,
- LEFTARG = varchar_ci,
- RIGHTARG = varchar_ci,
- COMMUTATOR = =,
- NEGATOR = <>,
- RESTRICT = eqsel,
- JOIN = eqjoinsel,
- HASHES,
- MERGES,
- SORT1= <);
-
-EOF;
- break;
- }
-
- return '';
-}
-
echo 'done';
diff --git a/phpBB/develop/migration_tips.php b/phpBB/develop/migration_tips.php
deleted file mode 100644
index fdb1e4544d..0000000000
--- a/phpBB/develop/migration_tips.php
+++ /dev/null
@@ -1,46 +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.
-*
-*/
-
-// This is to help with creating migration files for new versions
-// Use this to find what migrations are not depended on by any other migration
-// (the current migration tree tips)
-
-define('IN_PHPBB', true);
-$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.' . $phpEx);
-
-$phpbb_extension_manager = $phpbb_container->get('ext.manager');
-$finder = $phpbb_extension_manager->get_finder();
-
-$migrations = $finder
- ->core_path('phpbb/db/migration/data/')
- ->get_classes();
-$tips = $migrations;
-
-foreach ($migrations as $migration_class)
-{
- foreach ($migration_class::depends_on() as $dependency)
- {
- if (($tips_key = array_search($dependency, $tips)) !== false)
- {
- unset($tips[$tips_key]);
- }
- }
-}
-
-foreach ($tips as $migration)
-{
- echo "\t\t\t'{$migration}',\n";
-}
-
diff --git a/phpBB/develop/strip_icc_profiles.sh b/phpBB/develop/strip_icc_profiles.sh
index 779c7ffca7..b11a63616b 100755
--- a/phpBB/develop/strip_icc_profiles.sh
+++ b/phpBB/develop/strip_icc_profiles.sh
@@ -1,7 +1,12 @@
#!/bin/sh
#
-# @copyright (c) 2014 phpBB Group
-# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+# 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 [ "$#" -ne 1 ]
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 36d0ccf68d..2a824fa9b7 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -46,6 +46,8 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
+ <li><a href="#v310b3">Changes since 3.1.0-b4</a></li>
+ <li><a href="#v310b3">Changes since 3.1.0-b3</a></li>
<li><a href="#v310b2">Changes since 3.1.0-b2</a></li>
<li><a href="#v310b1">Changes since 3.1.0-b1</a></li>
<li><a href="#v310a3">Changes since 3.1.0-a3</a></li>
@@ -92,7 +94,234 @@
<div class="content">
- <a name="v310b2"></a><h3>1.i. Changes since 3.1.0-b2</h3>
+ <a name="v310b4"></a><h3>1.i. Changes since 3.1.0-b4</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8610">PHPBB3-8610</a>] - Splitting and merging topics does not handle subscriptions and bookmarks correctly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10899">PHPBB3-10899</a>] - Using Delete All in log viewer with keyword search</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11331">PHPBB3-11331</a>] - Inform admin of incorrect avatar path instead of stripping unexpected parts from destination path</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11445">PHPBB3-11445</a>] - Suboptimal number of query complexity in phpbb_notification_manager::get_global_subscriptions()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11467">PHPBB3-11467</a>] - phpbb_extension_metadata_manager uses hard coded language for exceptions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11659">PHPBB3-11659</a>] - Information about file_upload is missing from the requirement page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11942">PHPBB3-11942</a>] - Delete post/topic reason should be added to the generated log entry</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12109">PHPBB3-12109</a>] - Bug when setting users forum permissions with &quot;Select all users&quot; checkbox</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12209">PHPBB3-12209</a>] - OAuth Authentication in ACP does not explain that it allows regular login too</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12332">PHPBB3-12332</a>] - Attachments with long file names break the Uploader layout</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12352">PHPBB3-12352</a>] - The service definition &quot;auth.provider.smf&quot; does not exist.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12443">PHPBB3-12443</a>] - Responsive tabs broken in IE</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12457">PHPBB3-12457</a>] - Gallery avatar category &quot;Main&quot; is empty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12508">PHPBB3-12508</a>] - phpbb\finder (currently phpbb\extension\finder) should not depend on extension manager</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12521">PHPBB3-12521</a>] - When selecting the target to merge two topics, the last column is pushed on a new line</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12552">PHPBB3-12552</a>] - [RTL] - Forum list content forced into single char column when responsive</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12553">PHPBB3-12553</a>] - Right-to-left language bugs in prosilver</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12566">PHPBB3-12566</a>] - &quot;Private messages&quot; in viewtopic.php should be &quot;Send pivate message&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12589">PHPBB3-12589</a>] - The finder should search directly in $directory if it's an absolute sub-path</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12612">PHPBB3-12612</a>] - Front-facing files should not contain functions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12615">PHPBB3-12615</a>] - Improper clearing of .topic-actions leads to float problems</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12637">PHPBB3-12637</a>] - coding-guidelines.html contains invalid HTML</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12638">PHPBB3-12638</a>] - Call to undefined function phpbb\db\migration\data\v30x\phpbb_require_updated() when not using autoupdate package</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12639">PHPBB3-12639</a>] - Delete entry in admin-log leads to mysql-error</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12640">PHPBB3-12640</a>] - Posting editor tab &quot;attachments&quot; is unclicked in IE8</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12641">PHPBB3-12641</a>] - With IE8 logged in to ACP error message appears in the browser</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12643">PHPBB3-12643</a>] - Cannot convert SQLite DB from 3.0.12 to 3.1.0</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12652">PHPBB3-12652</a>] - Deleting marked log entries leads to MySQL Error</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12660">PHPBB3-12660</a>] - Undefined offset error when phpinfo() disabled and debug enabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12665">PHPBB3-12665</a>] - develop/migration_tips.php should not find extension tips</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12667">PHPBB3-12667</a>] - New posts in a topic cause undesirable results when clicking topic title or page button</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12672">PHPBB3-12672</a>] - Make &lt;Tab&gt; inside [code] - more user friendly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12673">PHPBB3-12673</a>] - PLUPLOAD fails due missing constant IMAGETYPE_SWC</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12675">PHPBB3-12675</a>] - Fix code sniffer complaints in 3.1.0-b5-dev code</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12682">PHPBB3-12682</a>] - Code Sniffer does not work correctly on Travis CI.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12688">PHPBB3-12688</a>] - Rank images do not work on routes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12694">PHPBB3-12694</a>] - Remove whitespace at end of line from acp_groups</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12697">PHPBB3-12697</a>] - Database Test Case Must Purge Extension Schema When Done</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12705">PHPBB3-12705</a>] - make_clickable is using static variables incorrectly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12707">PHPBB3-12707</a>] - \phpbb\db\driver\phpbb\db\driver\mysql is tried being loaded</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12708">PHPBB3-12708</a>] - [ROOT] -/install/install_main.php still uses docs/COPYING</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12709">PHPBB3-12709</a>] - Duplicate entries in the posting attachments tab</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12711">PHPBB3-12711</a>] - Contact form migration fails on MSSQL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12712">PHPBB3-12712</a>] - Password conversion migration fails on MSSQL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12715">PHPBB3-12715</a>] - Mistakes in the doc blocks</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12720">PHPBB3-12720</a>] - Git commit hook should not require commit message to start with a capital letter</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12728">PHPBB3-12728</a>] - Enforce box-model for image attachments</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12741">PHPBB3-12741</a>] - Functional tests on Travis fail since php update last night</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12746">PHPBB3-12746</a>] - Failing test: tests/content_visibility/delete_post_test.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12747">PHPBB3-12747</a>] - Drop Firebird support</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12750">PHPBB3-12750</a>] - Install/Update footer is not centered anymore</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12752">PHPBB3-12752</a>] - Cron list tests fail on windows with ansi support</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12753">PHPBB3-12753</a>] - FIELD_INVALID_CHARS_ALPHA_PUNCTUATION is not localized</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12755">PHPBB3-12755</a>] - Remote upload stuck in infinite loop if server sends keep-alive</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12756">PHPBB3-12756</a>] - Fatal error with mysqli_fetch_assoc on hhvm</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12761">PHPBB3-12761</a>] - Remove the execute bit from functions_user.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12762">PHPBB3-12762</a>] - Make ext.php optional for extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12763">PHPBB3-12763</a>] - Do not unnecessarily rewrite install/schemas/*_schema.sql when updating schema.json file</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11266">PHPBB3-11266</a>] - Use our own error message when composer is not set up</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12532">PHPBB3-12532</a>] - Add header_navbar_username_prepend/append template events.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12541">PHPBB3-12541</a>] - Activate attachments tab when files are dropped into textarea</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12563">PHPBB3-12563</a>] - Language key names in ACP styles are misleading</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12606">PHPBB3-12606</a>] - PHP events in /includes/acp/acp_groups.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12608">PHPBB3-12608</a>] - Improve notifications drop-down menu styling in header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12613">PHPBB3-12613</a>] - Improve pagination styling and jump-to-page dialog</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12646">PHPBB3-12646</a>] - Add data attribute to breadcrumb links</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12648">PHPBB3-12648</a>] - Improve UCP/MCP/Posting tabs styling &amp; problems</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12655">PHPBB3-12655</a>] - Allow the CLI to be used as a shell</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12664">PHPBB3-12664</a>] - Refactor develop/migration_tips.php into a console command</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12666">PHPBB3-12666</a>] - Use &quot;None&quot; for images in gallery avatar path root and rename lang key</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12668">PHPBB3-12668</a>] - Add ability to modify subforums template data for core.display_forums_modify_template_vars event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12669">PHPBB3-12669</a>] - Add core event to the function display_forums() for additional template data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12677">PHPBB3-12677</a>] - Remove comment about ‘threading’</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12687">PHPBB3-12687</a>] - Add a constant to dissociate the displaying of the load time from DEBUG</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12690">PHPBB3-12690</a>] - Add core.submit_pm_after event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12691">PHPBB3-12691</a>] - Add core.delete_pm to funtion delete_pm.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12704">PHPBB3-12704</a>] - Improve the load time information in the footer when enabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12706">PHPBB3-12706</a>] - Ignore additional languages and styles from git</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12714">PHPBB3-12714</a>] - Better align the description of radio buttons to avoid confusion with the forum list in attachments settings</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12740">PHPBB3-12740</a>] - Stop Using IDs as CSS selectors</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12758">PHPBB3-12758</a>] - Add 'show_results' mode var to event core.search_modify_rowset</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12597">PHPBB3-12597</a>] - Command for executing all available cron tasks</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12602">PHPBB3-12602</a>] - Add command to print the cron list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12607">PHPBB3-12607</a>] - CLI command for running a specific cron task</li>
+ </ul>
+ <h4>Sub-task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12575">PHPBB3-12575</a>] - Use a proxy pattern in \phpbb\di\service_collection</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12699">PHPBB3-12699</a>] - Replace instances in the message textarea keydown callback</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12721">PHPBB3-12721</a>] - Simple rules</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12722">PHPBB3-12722</a>] - Add rule Generic.Formatting.SpaceAfterCast</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12724">PHPBB3-12724</a>] - Add rule Squiz.PHP.Eval</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12729">PHPBB3-12729</a>] - Add Facebook profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12730">PHPBB3-12730</a>] - Add Google+ profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12731">PHPBB3-12731</a>] - Add YouTube profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12732">PHPBB3-12732</a>] - Add Skype profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12733">PHPBB3-12733</a>] - Add Twitter profile field</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11528">PHPBB3-11528</a>] - Use mink for acceptance tests involving javascript execution</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12514">PHPBB3-12514</a>] - Add additional tests for custom profile fields type</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12696">PHPBB3-12696</a>] - Add events to ucp_register.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12701">PHPBB3-12701</a>] - Add events to user_add function</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12723">PHPBB3-12723</a>] - Add Code Sniffer sniff ensuring PHP files use the correct file header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12726">PHPBB3-12726</a>] - Add Code Sniffer sniff ensuring PHP files do not contain any unused use statements</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12757">PHPBB3-12757</a>] - Add a Code Sniffer ruleset for PHP files of phpBB extensions</li>
+ </ul>
+
+
+ <a name="v310b3"></a><h3>1.ii. Changes since 3.1.0-b3</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10176">PHPBB3-10176</a>] - Imageset Appearance Problem with Google Chrome Browser. </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11226">PHPBB3-11226</a>] - filespec::move_file() from functions_upload.php does not error correctly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11232">PHPBB3-11232</a>] - prosilver ajax.js does not respect PHPBB_USE_BOARD_URL_PATH</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11366">PHPBB3-11366</a>] - Add &quot;MOD Version Check&quot; for extensions to the core</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11497">PHPBB3-11497</a>] - The extension finder keeps state, so should be instantiated on each container request, not reset manually</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12025">PHPBB3-12025</a>] - Post Preview no longer shows UNAUTHORISED_BBCODE warning for disallowed BBcodes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12074">PHPBB3-12074</a>] - Enabling/Disabling/Data deleting of an extension should generate a log entry</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12174">PHPBB3-12174</a>] - &quot;Download all attachments&quot; link displayed when the topic has attachments in hidden posts only</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12185">PHPBB3-12185</a>] - Topic header in viewforum too small for translation</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12270">PHPBB3-12270</a>] - Approving a topic triggers wrong notification</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12275">PHPBB3-12275</a>] - core.modify_username_string is not triggered everytime</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12332">PHPBB3-12332</a>] - Attachments with long file names break the Uploader layout</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12357">PHPBB3-12357</a>] - generate_smilies() does not work for routes</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12402">PHPBB3-12402</a>] - CAPTCHA plugin migration fails to detect missing plugins</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12415">PHPBB3-12415</a>] - Use private message instead of &quot;pm&quot; accronym in cpf visibility options</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12421">PHPBB3-12421</a>] - We try to display attachments in feed even for users who don't have the right to see them</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12428">PHPBB3-12428</a>] - Incorrect from version in database update log entry</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12434">PHPBB3-12434</a>] - No error message with Plupload except for files without extension</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12435">PHPBB3-12435</a>] - purge_notifications() fails for disabled extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12440">PHPBB3-12440</a>] - Change URL in browsers addressbar when a view=unread#unread link was used</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12451">PHPBB3-12451</a>] - posting.php TOO_FEW_CHARS_LIMIT should be split for plurals</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12459">PHPBB3-12459</a>] - Unapproved posts/topics are not correctly handled in feeds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12460">PHPBB3-12460</a>] - Soft deleted posts/topics are not correctly handled in feeds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12461">PHPBB3-12461</a>] - Statistics are wrong for topic's based feeds</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12476">PHPBB3-12476</a>] - purge_cache should increase asset version</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12486">PHPBB3-12486</a>] - &quot;Risky&quot; tests from phpunit 4.1</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12491">PHPBB3-12491</a>] - Conflict between USERNAME_FULL in functions.php and mcp_notes.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12493">PHPBB3-12493</a>] - User can not send PMs to users with PMs disabled, but PM button is visible on posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12498">PHPBB3-12498</a>] - IE8 displays avatar in header with wrong width</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12499">PHPBB3-12499</a>] - Incorrect call to phpbb\log\log::add() in db:migrate console command</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12500">PHPBB3-12500</a>] - user.img does not set a title attribute for resulting span</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12501">PHPBB3-12501</a>] - Weird post attachment behavior in MCP report details</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12503">PHPBB3-12503</a>] - All test cases should extend phpbb_test_case instead of PHPUnit_Framework_TestCase</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12504">PHPBB3-12504</a>] - Avatar manager test is using undefined variables</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12509">PHPBB3-12509</a>] - Extentions can't send email with new notification system</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12510">PHPBB3-12510</a>] - build_url() is not encoding url entities</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12511">PHPBB3-12511</a>] - Missing language strings in memberlist group view for mobile prosilver</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12513">PHPBB3-12513</a>] - simple_headers do not support extension loaded CSS stylesheets</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12517">PHPBB3-12517</a>] - Missing argument in call to log.add() in prune_shadow_topics.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12519">PHPBB3-12519</a>] - m_approve language update from soft delete patch got nucked by a merge conflict</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12520">PHPBB3-12520</a>] - Can not move text with the mouse anymore in post-box when attachments are allowed</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12522">PHPBB3-12522</a>] - Add parameter description in guesser_interface</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12525">PHPBB3-12525</a>] - CONTACT_USER used with username</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12526">PHPBB3-12526</a>] - &quot;Undefined index: filesize&quot; error thrown when editing a PM with attachments</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12527">PHPBB3-12527</a>] - Remove translation editor from ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12529">PHPBB3-12529</a>] - phpbb\controller\resolver::getController doesn't use $phpbb_root_path to check if the template dir exist</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12533">PHPBB3-12533</a>] - The notification link should fill the parent li-container in the notifications dialog</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12534">PHPBB3-12534</a>] - Enabling and disabling extensions should not abuse the red errorbox</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12536">PHPBB3-12536</a>] - Get Versions Should Not Require Both Stable and Unstable Branches</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12540">PHPBB3-12540</a>] - WRONG_FILESIZE contains broken placeholders</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12543">PHPBB3-12543</a>] - Enter key no longer works in posting when attachment error is triggered</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12547">PHPBB3-12547</a>] - Rename jquery.js to jquery.min.js in assets directory</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12548">PHPBB3-12548</a>] - [RTL] - Posting button icons should display on left side of text</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12549">PHPBB3-12549</a>] - [RTL] - Forumlist/topiclist &lt;dfn&gt; tags should not be visible</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12550">PHPBB3-12550</a>] - [RTL] - Last post column breaks into second line</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12551">PHPBB3-12551</a>] - [RTL] - Breadcrumb separator does not display correctly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12561">PHPBB3-12561</a>] - Create_schema_files.php should process colum &quot;after&quot; instead of adding it to the JSON</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12570">PHPBB3-12570</a>] - db_text throws an error, when set() is called with the current value</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12572">PHPBB3-12572</a>] - JavaScript console throws error when alert message title is not defined (core.js bug)</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12580">PHPBB3-12580</a>] - :link Pseudo causing over specificity issues in the theme</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12586">PHPBB3-12586</a>] - \phpbb\extension\manager::all_available() should only locate ext files two levels deep and ignore dot-files/folders</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12594">PHPBB3-12594</a>] - File headers, credit lines, etc. should reflect updated legal info</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12600">PHPBB3-12600</a>] - The cli command extension:show is broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12604">PHPBB3-12604</a>] - Notifications Dropdown Padding Broken When Empty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12611">PHPBB3-12611</a>] - phpBB Group copyright notice should be removed from all images</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12614">PHPBB3-12614</a>] - Do not hide post buttons before hovering over post</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12621">PHPBB3-12621</a>] - schema.json is not up to date with migration files</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9388">PHPBB3-9388</a>] - use DOM scripting to hide unnecessary input fields</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11163">PHPBB3-11163</a>] - Include ext/ directory in installation and update packages</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12155">PHPBB3-12155</a>] - Use CSS instead of translated images for the mini post buttons</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12407">PHPBB3-12407</a>] - Allow changing of post_data and other variables with core.posting_modify_template_vars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12431">PHPBB3-12431</a>] - Add has_poll icon to topiclists</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12433">PHPBB3-12433</a>] - QUOTE_DEPTH_EXCEEDED needs a different string for '1'</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12488">PHPBB3-12488</a>] - Add user warning indication to viewtopic posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12507">PHPBB3-12507</a>] - Add console command to purge the cache</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12518">PHPBB3-12518</a>] - Allow extensions to overwrite CANNOT_EDIT_* checks in posting.php and viewtopic.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12523">PHPBB3-12523</a>] - Add search_results.html template events search_results_topic_(before/after)</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12524">PHPBB3-12524</a>] - Add search.php core event to modify search results rowset</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12531">PHPBB3-12531</a>] - Restore default topic title links in subsilver2</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12555">PHPBB3-12555</a>] - Make use of canonical urls to avoid duplicate content</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12583">PHPBB3-12583</a>] - Add event core.mcp_warn_post_before/after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12584">PHPBB3-12584</a>] - Add event core.mcp_warn_user_before/after</li>
+ </ul>
+ <h4>Sub-task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12576">PHPBB3-12576</a>] - Remove cron from common.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12585">PHPBB3-12585</a>] - Don't check the cron on each page load</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10839">PHPBB3-10839</a>] - Remove phpunit.xml.functional and always include functional tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12384">PHPBB3-12384</a>] - Run Travis CI HHVM tests against MySQLi instead of MySQL</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12495">PHPBB3-12495</a>] - Add Sami to composer dependencies and build script</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12544">PHPBB3-12544</a>] - Update Plupload to 2.1.2</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12582">PHPBB3-12582</a>] - Strip away copyrighted ICC profile from images</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12592">PHPBB3-12592</a>] - Run mysql driver on Travis CI</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12603">PHPBB3-12603</a>] - Remove hook_system.html from docs</li>
+ </ul>
+
+
+ <a name="v310b2"></a><h3>1.iii. Changes since 3.1.0-b2</h3>
<h4>Bug</h4>
<ul>
@@ -257,7 +486,7 @@
</ul>
- <a name="v310b1"></a><h3>1.ii. Changes since 3.1.0-b1</h3>
+ <a name="v310b1"></a><h3>1.iv. Changes since 3.1.0-b1</h3>
<h4>Bug</h4>
<ul>
@@ -325,7 +554,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12302">PHPBB3-12302</a>] - Upgrade composer.phar to 1.0.0-alpha8</li>
</ul>
- <a name="v310a3"></a><h3>1.iii. Changes since 3.1.0-a3</h3>
+ <a name="v310a3"></a><h3>1.v. Changes since 3.1.0-a3</h3>
<h4>Bug</h4>
<ul>
@@ -472,7 +701,7 @@
</ul>
- <a name="v310a2"></a><h3>1.iv. Changes since 3.1.0-a2</h3>
+ <a name="v310a2"></a><h3>1.vi. Changes since 3.1.0-a2</h3>
<h4>Bug</h4>
<ul>
@@ -580,7 +809,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12147">PHPBB3-12147</a>] - Remove Travis CI notification configuration</li>
</ul>
- <a name="v310a1"></a><h3>1.v. Changes since 3.1.0-a1</h3>
+ <a name="v310a1"></a><h3>1.vii. Changes since 3.1.0-a1</h3>
<h4>Bug</h4>
<ul>
@@ -656,7 +885,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li>
</ul>
- <a name="v30x"></a><h3>1.vi. Changes since 3.0.x</h3>
+ <a name="v30x"></a><h3>1.viii. Changes since 3.0.x</h3>
<h4>Bug</h4>
<ul>
@@ -1337,7 +1566,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
</ul>
- <a name="v3011"></a><h3>1.vii. Changes since 3.0.11</h3>
+ <a name="v3011"></a><h3>1.ix. Changes since 3.0.11</h3>
<h4>Bug</h4>
<ul>
@@ -1492,7 +1721,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
</ul>
- <a name="v3010"></a><h3>1.viii. Changes since 3.0.10</h3>
+ <a name="v3010"></a><h3>1.x. Changes since 3.0.10</h3>
<h4>Bug</h4>
<ul>
@@ -1617,7 +1846,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
</ul>
- <a name="v309"></a><h3>1.ix. Changes since 3.0.9</h3>
+ <a name="v309"></a><h3>1.xi. Changes since 3.0.9</h3>
<h4>Bug</h4>
<ul>
@@ -1753,7 +1982,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
</ul>
- <a name="v308"></a><h3>1.x. Changes since 3.0.8</h3>
+ <a name="v308"></a><h3>1.xii. Changes since 3.0.8</h3>
<h4> Bug
</h4>
@@ -2121,7 +2350,7 @@
</ul>
- <a name="v307-PL1"></a><h3>1.xi. Changes since 3.0.7-PL1</h3>
+ <a name="v307-PL1"></a><h3>1.xiii. Changes since 3.0.7-PL1</h3>
<h4> Security
</h4>
<ul>
@@ -2579,13 +2808,13 @@
</ul>
- <a name="v307"></a><h3>1.xii. Changes since 3.0.7</h3>
+ <a name="v307"></a><h3>1.xiv. Changes since 3.0.7</h3>
<ul>
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
</ul>
- <a name="v306"></a><h3>1.xiii. Changes since 3.0.6</h3>
+ <a name="v306"></a><h3>1.xv. Changes since 3.0.6</h3>
<ul>
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
@@ -2689,7 +2918,7 @@
</ul>
- <a name="v305"></a><h3>1.xiv. Changes since 3.0.5</h3>
+ <a name="v305"></a><h3>1.xvi. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@@ -2911,7 +3140,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
- <a name="v304"></a><h3>1.xv. Changes since 3.0.4</h3>
+ <a name="v304"></a><h3>1.xvii. Changes since 3.0.4</h3>
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
@@ -3000,7 +3229,7 @@
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul>
- <a name="v303"></a><h3>1.xvi. Changes since 3.0.3</h3>
+ <a name="v303"></a><h3>1.xviii. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@@ -3032,7 +3261,7 @@
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul>
- <a name="v302"></a><h3>1.xvii. Changes since 3.0.2</h3>
+ <a name="v302"></a><h3>1.xix. Changes since 3.0.2</h3>
<ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
@@ -3131,7 +3360,7 @@
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
</ul>
- <a name="v301"></a><h3>1.xviii. Changes since 3.0.1</h3>
+ <a name="v301"></a><h3>1.xx. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@@ -3179,7 +3408,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
- <a name="v300"></a><h3>1.xix. Changes since 3.0.0</h3>
+ <a name="v300"></a><h3>1.xxi. Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@@ -3250,7 +3479,7 @@
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul>
- <a name="v30rc8"></a><h3>1.xx. Changes since 3.0.RC8</h3>
+ <a name="v30rc8"></a><h3>1.xxii. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@@ -3259,7 +3488,7 @@
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
- <a name="v30rc7"></a><h3>1.xxi. Changes since 3.0.RC7</h3>
+ <a name="v30rc7"></a><h3>1.xxiii. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@@ -3294,7 +3523,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
- <a name="v30rc6"></a><h3>1.xxii. Changes since 3.0.RC6</h3>
+ <a name="v30rc6"></a><h3>1.xxiv. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@@ -3304,7 +3533,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
- <a name="v30rc5"></a><h3>1.xxiii. Changes since 3.0.RC5</h3>
+ <a name="v30rc5"></a><h3>1.xxv. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@@ -3367,7 +3596,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
- <a name="v30rc4"></a><h3>1.xxiv. Changes since 3.0.RC4</h3>
+ <a name="v30rc4"></a><h3>1.xxvi. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -3418,7 +3647,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
- <a name="v30rc3"></a><h3>1.xxv. Changes since 3.0.RC3</h3>
+ <a name="v30rc3"></a><h3>1.xxvii. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@@ -3527,7 +3756,7 @@
</ul>
- <a name="v30rc2"></a><h3>1.xxvi. Changes since 3.0.RC2</h3>
+ <a name="v30rc2"></a><h3>1.xxviii. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@@ -3573,7 +3802,7 @@
</ul>
- <a name="v30rc1"></a><h3>1.xxvii. Changes since 3.0.RC1</h3>
+ <a name="v30rc1"></a><h3>1.xxix. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt
index 8c98843df5..a4ba4cb87c 100644
--- a/phpBB/docs/CREDITS.txt
+++ b/phpBB/docs/CREDITS.txt
@@ -3,7 +3,7 @@
* phpBB © Copyright phpBB Limited 2003-2014
* http://www.phpbb.com
*
-* phpBB is free software. You can redistribute it and/or modify it
+* phpBB is free software. You can redistribute it and/or modify it
* under the terms of the GNU General Public License, version 2 (GPL-2.0)
* as published by the Free Software Foundation.
*
@@ -63,7 +63,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
Major contributions by: leviatan21 (Gabriel Vazquez)
- Neothermic (Ashley Pinner)
+ NeoThermic (Ashley Pinner)
Raimon (Raimon Meuldijk)
Xore (Robert Hetzler)
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 0fce349974..a46cea47b1 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -136,7 +136,6 @@
<li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
- <li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
<li>Oracle</li>
</ul>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index b0fd86f959..e64d3dd8f2 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -323,7 +323,7 @@
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 43417d0078..98cfe0e717 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -127,7 +127,7 @@
*
* This file is part of the phpBB Forum Software package.
*
-* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @copyright (c) phpBB Limited &lt;https://www.phpbb.com&gt;
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
@@ -736,7 +736,7 @@ static private function f()
<a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3>
<h4>Common SQL Guidelines: </h4>
- <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (8.3+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
+ <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (8.3+), SQLite, Oracle8, ODBC (generalised if possible)).</p>
<p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
<h4>SQL code layout:</h4>
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 4dc55540f3..34f2c4b6ec 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -64,6 +64,20 @@ acp_overall_header_head_append
* Since: 3.1.0-a1
* Purpose: Add assets within the `<head>` tags in the ACP
+acp_posting_buttons_after
+===
+* Locations:
+ + adm/style/acp_posting_buttons.html
+* Since: 3.1.0-b4
+* Purpose: Add content after BBCode posting buttons in the ACP
+
+acp_posting_buttons_before
+===
+* Locations:
+ + adm/style/acp_posting_buttons.html
+* Since: 3.1.0-b4
+* Purpose: Add content before BBCode posting buttons in the ACP
+
acp_simple_footer_after
===
* Location: adm/style/simple_footer.html
@@ -136,20 +150,6 @@ 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_signature_editor_buttons_after
-===
-* Locations:
- + adm/style/acp_users_signature.html
-* Since: 3.1.0-a3
-* Purpose: Add content after BBCode posting buttons in the ACP user signature
-
-acp_users_signature_editor_buttons_before
-===
-* Locations:
- + adm/style/acp_users_signature.html
-* Since: 3.1.0-a3
-* Purpose: Add content before BBCode posting buttons in the ACP user signature
-
forumlist_body_category_header_after
===
* Locations:
@@ -344,6 +344,26 @@ memberlist_view_user_statistics_before
* Since: 3.1.0-a1
* Purpose: Add entries before the user statistics part of any user profile
+navbar_header_username_append
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-b4
+* Purpose: Add text and HTMl after the username shown in the navbar.
+
+navbar_header_logged_out_content
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-b4
+* Purpose: Add text and HTML in place of the username when not logged in.
+
+navbar_header_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-b4
+
overall_footer_after
===
* Locations:
@@ -767,7 +787,7 @@ ucp_prefs_view_radio_buttons_prepend
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
-* Purpose: Add options to the top of the radio buttons block of the Edit
+* Purpose: Add options to the top of the radio buttons block of the Edit
Display Options screen
ucp_prefs_view_radio_buttons_append
@@ -776,7 +796,7 @@ ucp_prefs_view_radio_buttons_append
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
-* Purpose: Add options to the bottom of the radio buttons block of the Edit
+* Purpose: Add options to the bottom of the radio buttons block of the Edit
Display Options screen
ucp_prefs_view_select_menu_prepend
@@ -785,7 +805,7 @@ ucp_prefs_view_select_menu_prepend
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
-* Purpose: Add options to the top of the drop-down lists block of the Edit
+* Purpose: Add options to the top of the drop-down lists block of the Edit
Display Options screen
ucp_prefs_view_select_menu_append
@@ -794,9 +814,49 @@ ucp_prefs_view_select_menu_append
+ styles/prosilver/template/ucp_prefs_view.html
+ styles/subsilver2/template/ucp_prefs_view.html
* Since: 3.1.0-a1
-* Purpose: Add options to the bottom of the drop-down lists block of the Edit
+* Purpose: Add options to the bottom of the drop-down lists block of the Edit
Display Options screen
+ucp_register_credentials_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+ + styles/subsilver2/template/ucp_register.html
+* Since: 3.1.0-b5
+* Purpose: Add options in registration page fieldset - before first field.
+
+ucp_register_profile_fields_after
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+ + styles/subsilver2/template/ucp_register.html
+* Since: 3.1.0-b5
+* Purpose: Add options in registration page fieldset - after last field.
+
+ucp_register_credentials_after
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+ + styles/subsilver2/template/ucp_register.html
+* Since: 3.1.0-b5
+* Purpose: Add options in registration page fieldset - after password field.
+
+ucp_register_options_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+ + styles/subsilver2/template/ucp_register.html
+* Since: 3.1.0-b5
+* Purpose: Add options in registration page fieldset - before language selector.
+
+ucp_register_profile_fields_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_register.html
+ + styles/subsilver2/template/ucp_register.html
+* Since: 3.1.0-b5
+* Purpose: Add options in registration page fieldset - before profile fields.
+
ucp_friend_list_before
===
* Locations:
diff --git a/phpBB/includes/acp/acp_contact.php b/phpBB/includes/acp/acp_contact.php
new file mode 100644
index 0000000000..4e46df21e0
--- /dev/null
+++ b/phpBB/includes/acp/acp_contact.php
@@ -0,0 +1,134 @@
+<?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.
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_contact
+{
+ public $u_action;
+
+ public function main($id, $mode)
+ {
+ global $user, $request, $template;
+ global $config, $phpbb_root_path, $phpEx, $phpbb_container;
+
+ $user->add_lang(array('acp/board', 'posting'));
+
+ $this->tpl_name = 'acp_contact';
+ $this->page_title = 'ACP_CONTACT_SETTINGS';
+ $form_name = 'acp_contact';
+ add_form_key($form_name);
+ $error = '';
+
+ if (!function_exists('display_custom_bbcodes'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+ if (!class_exists('parse_message'))
+ {
+ include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ }
+
+ $config_text = $phpbb_container->get('config_text');
+
+ $contact_admin_data = $config_text->get_array(array(
+ 'contact_admin_info',
+ 'contact_admin_info_uid',
+ 'contact_admin_info_bitfield',
+ 'contact_admin_info_flags',
+ ));
+
+ $contact_admin_info = $contact_admin_data['contact_admin_info'];
+ $contact_admin_info_uid = $contact_admin_data['contact_admin_info_uid'];
+ $contact_admin_info_bitfield= $contact_admin_data['contact_admin_info_bitfield'];
+ $contact_admin_info_flags = $contact_admin_data['contact_admin_info_flags'];
+
+ if ($request->is_set_post('submit') || $request->is_set_post('preview'))
+ {
+ if (!check_form_key($form_name))
+ {
+ $error = $user->lang('FORM_INVALID');
+ }
+
+ $contact_admin_info = $request->variable('contact_admin_info', '', true);
+
+ generate_text_for_storage(
+ $contact_admin_info,
+ $contact_admin_info_uid,
+ $contact_admin_info_bitfield,
+ $contact_admin_info_flags,
+ !$request->variable('disable_bbcode', false),
+ !$request->variable('disable_magic_url', false),
+ !$request->variable('disable_smilies', false)
+ );
+
+ if (empty($error) && $request->is_set_post('submit'))
+ {
+ $config->set('contact_admin_form_enable', $request->variable('contact_admin_form_enable', false));
+
+ $config_text->set_array(array(
+ 'contact_admin_info' => $contact_admin_info,
+ 'contact_admin_info_uid' => $contact_admin_info_uid,
+ 'contact_admin_info_bitfield' => $contact_admin_info_bitfield,
+ 'contact_admin_info_flags' => $contact_admin_info_flags,
+ ));
+
+ trigger_error($user->lang['CONTACT_US_INFO_UPDATED'] . adm_back_link($this->u_action));
+ }
+ }
+
+ $contact_admin_info_preview = '';
+ if ($request->is_set_post('preview'))
+ {
+ $contact_admin_info_preview = generate_text_for_display($contact_admin_info, $contact_admin_info_uid, $contact_admin_info_bitfield, $contact_admin_info_flags);
+ }
+
+ $contact_admin_edit = generate_text_for_edit($contact_admin_info, $contact_admin_info_uid, $contact_admin_info_flags);
+
+ $template->assign_vars(array(
+ 'ERRORS' => $error,
+ 'CONTACT_ENABLED' => $config['contact_admin_form_enable'],
+
+ 'CONTACT_US_INFO' => $contact_admin_edit['text'],
+ 'CONTACT_US_INFO_PREVIEW' => $contact_admin_info_preview,
+
+ 'S_BBCODE_DISABLE_CHECKED' => !$contact_admin_edit['allow_bbcode'],
+ 'S_SMILIES_DISABLE_CHECKED' => !$contact_admin_edit['allow_smilies'],
+ 'S_MAGIC_URL_DISABLE_CHECKED' => !$contact_admin_edit['allow_urls'],
+
+ 'BBCODE_STATUS' => $user->lang('BBCODE_IS_ON', '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
+ 'SMILIES_STATUS' => $user->lang['SMILIES_ARE_ON'],
+ 'IMG_STATUS' => $user->lang['IMAGES_ARE_ON'],
+ 'FLASH_STATUS' => $user->lang['FLASH_IS_ON'],
+ 'URL_STATUS' => $user->lang['URL_IS_ON'],
+
+ 'S_BBCODE_ALLOWED' => true,
+ 'S_SMILIES_ALLOWED' => true,
+ 'S_BBCODE_IMG' => true,
+ 'S_BBCODE_FLASH' => true,
+ 'S_LINKS_ALLOWED' => true,
+ ));
+
+ // Assigning custom bbcodes
+ display_custom_bbcodes();
+ }
+}
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 3ba1210b5c..76da43341d 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -119,10 +119,6 @@ class acp_database
case 'mssqlnative':
$extractor = new mssql_extractor($format, $filename, $time, $download, $store);
break;
-
- case 'firebird':
- $extractor = new firebird_extractor($format, $filename, $time, $download, $store);
- break;
}
$extractor->write_start($table_prefix);
@@ -141,7 +137,6 @@ class acp_database
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$extractor->flush('DELETE FROM ' . $table_name . ";\n");
break;
@@ -338,20 +333,6 @@ class acp_database
}
break;
- case 'firebird':
- $delim = ";\n";
- while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
- {
- $query = trim($sql);
- if (substr($query, 0, 8) === 'SET TERM')
- {
- $delim = $query[9] . "\n";
- continue;
- }
- $db->sql_query($query);
- }
- break;
-
case 'postgres':
$delim = ";\n";
while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
@@ -2110,235 +2091,6 @@ class oracle_extractor extends base_extractor
}
}
-class firebird_extractor extends base_extractor
-{
- function write_start($prefix)
- {
- $sql_data = "--\n";
- $sql_data .= "-- phpBB Backup Script\n";
- $sql_data .= "-- Dump of tables for $prefix\n";
- $sql_data .= "-- DATE : " . gmdate("d-m-Y H:i:s", $this->time) . " GMT\n";
- $sql_data .= "--\n";
- $this->flush($sql_data);
- }
-
- function write_data($table_name)
- {
- global $db;
- $ary_type = $ary_name = array();
-
- // Grab all of the data from current table.
- $sql = "SELECT *
- FROM $table_name";
- $result = $db->sql_query($sql);
-
- $i_num_fields = ibase_num_fields($result);
-
- for ($i = 0; $i < $i_num_fields; $i++)
- {
- $info = ibase_field_info($result, $i);
- $ary_type[$i] = $info['type'];
- $ary_name[$i] = $info['name'];
- }
-
- while ($row = $db->sql_fetchrow($result))
- {
- $schema_vals = $schema_fields = array();
-
- // Build the SQL statement to recreate the data.
- for ($i = 0; $i < $i_num_fields; $i++)
- {
- $str_val = $row[strtolower($ary_name[$i])];
-
- if (preg_match('#char|text|bool|varbinary|blob#i', $ary_type[$i]))
- {
- $str_quote = '';
- $str_empty = "''";
- $str_val = sanitize_data_generic(str_replace("'", "''", $str_val));
- }
- else if (preg_match('#date|timestamp#i', $ary_type[$i]))
- {
- if (empty($str_val))
- {
- $str_quote = '';
- }
- else
- {
- $str_quote = "'";
- }
- }
- else
- {
- $str_quote = '';
- $str_empty = 'NULL';
- }
-
- if (empty($str_val) && $str_val !== '0')
- {
- $str_val = $str_empty;
- }
-
- $schema_vals[$i] = $str_quote . $str_val . $str_quote;
- $schema_fields[$i] = '"' . $ary_name[$i] . '"';
- }
-
- // Take the ordered fields and their associated data and build it
- // into a valid sql statement to recreate that field in the data.
- $sql_data = "INSERT INTO $table_name (" . implode(', ', $schema_fields) . ') VALUES (' . implode(', ', $schema_vals) . ");\n";
-
- $this->flush($sql_data);
- }
- $db->sql_freeresult($result);
- }
-
- function write_table($table_name)
- {
- global $db;
-
- $sql_data = '-- Table: ' . $table_name . "\n";
- $sql_data .= "DROP TABLE $table_name;\n";
-
- $data_types = array(7 => 'SMALLINT', 8 => 'INTEGER', 10 => 'FLOAT', 12 => 'DATE', 13 => 'TIME', 14 => 'CHARACTER', 27 => 'DOUBLE PRECISION', 35 => 'TIMESTAMP', 37 => 'VARCHAR', 40 => 'CSTRING', 261 => 'BLOB', 701 => 'DECIMAL', 702 => 'NUMERIC');
-
- $sql_data .= "\nCREATE TABLE $table_name (\n";
-
- $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN
- FROM RDB$RELATION_FIELDS R
- JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME
- LEFT JOIN RDB$FIELD_DIMENSIONS D ON R.RDB$FIELD_SOURCE = D.RDB$FIELD_NAME
- WHERE F.RDB$SYSTEM_FLAG = 0
- AND R.RDB$RELATION_NAME = \''. $table_name . '\'
- ORDER BY R.RDB$FIELD_POSITION';
- $result = $db->sql_query($sql);
-
- $rows = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $line = "\t" . '"' . $row['fname'] . '" ' . $data_types[$row['ftype']];
-
- if ($row['ftype'] == 261 && $row['stype'] == 1)
- {
- $line .= ' SUB_TYPE TEXT';
- }
-
- if ($row['ftype'] == 37 || $row['ftype'] == 14)
- {
- $line .= ' (' . $row['flen'] . ')';
- }
-
- if (!empty($row['dsource']))
- {
- $line .= ' ' . $row['dsource'];
- }
-
- if (!empty($row['nflag']))
- {
- $line .= ' NOT NULL';
- }
- $rows[] = $line;
- }
- $db->sql_freeresult($result);
-
- $sql_data .= implode(",\n", $rows);
- $sql_data .= "\n);\n";
- $keys = array();
-
- $sql = 'SELECT I.RDB$FIELD_NAME as NAME
- FROM RDB$RELATION_CONSTRAINTS RC, RDB$INDEX_SEGMENTS I, RDB$INDICES IDX
- WHERE (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
- AND (IDX.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
- AND (RC.RDB$RELATION_NAME = \''. $table_name . '\')
- ORDER BY I.RDB$FIELD_POSITION';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $keys[] = $row['name'];
- }
-
- if (sizeof($keys))
- {
- $sql_data .= "\nALTER TABLE $table_name ADD PRIMARY KEY (" . implode(', ', $keys) . ');';
- }
-
- $db->sql_freeresult($result);
-
- $sql = 'SELECT I.RDB$INDEX_NAME as INAME, I.RDB$UNIQUE_FLAG as UFLAG, S.RDB$FIELD_NAME as FNAME
- FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON S.RDB$INDEX_NAME=I.RDB$INDEX_NAME
- WHERE (I.RDB$SYSTEM_FLAG IS NULL OR I.RDB$SYSTEM_FLAG=0)
- AND I.RDB$FOREIGN_KEY IS NULL
- AND I.RDB$RELATION_NAME = \''. $table_name . '\'
- AND I.RDB$INDEX_NAME NOT STARTING WITH \'RDB$\'
- ORDER BY S.RDB$FIELD_POSITION';
- $result = $db->sql_query($sql);
-
- $index = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $index[$row['iname']]['unique'] = !empty($row['uflag']);
- $index[$row['iname']]['values'][] = $row['fname'];
- }
-
- foreach ($index as $index_name => $data)
- {
- $sql_data .= "\nCREATE ";
- if ($data['unique'])
- {
- $sql_data .= 'UNIQUE ';
- }
- $sql_data .= "INDEX $index_name ON $table_name(" . implode(', ', $data['values']) . ");";
- }
- $sql_data .= "\n";
-
- $db->sql_freeresult($result);
-
- $sql = 'SELECT D1.RDB$DEPENDENT_NAME as DNAME, D1.RDB$FIELD_NAME as FNAME, D1.RDB$DEPENDENT_TYPE, R1.RDB$RELATION_NAME
- FROM RDB$DEPENDENCIES D1
- LEFT JOIN RDB$RELATIONS R1 ON ((D1.RDB$DEPENDENT_NAME = R1.RDB$RELATION_NAME) AND (NOT (R1.RDB$VIEW_BLR IS NULL)))
- WHERE (D1.RDB$DEPENDED_ON_TYPE = 0)
- AND (D1.RDB$DEPENDENT_TYPE <> 3)
- AND (D1.RDB$DEPENDED_ON_NAME = \'' . $table_name . '\')
- UNION SELECT DISTINCT F2.RDB$RELATION_NAME, D2.RDB$FIELD_NAME, D2.RDB$DEPENDENT_TYPE, R2.RDB$RELATION_NAME FROM RDB$DEPENDENCIES D2, RDB$RELATION_FIELDS F2
- LEFT JOIN RDB$RELATIONS R2 ON ((F2.RDB$RELATION_NAME = R2.RDB$RELATION_NAME) AND (NOT (R2.RDB$VIEW_BLR IS NULL)))
- WHERE (D2.RDB$DEPENDENT_TYPE = 3)
- AND (D2.RDB$DEPENDENT_NAME = F2.RDB$FIELD_SOURCE)
- AND (D2.RDB$DEPENDED_ON_NAME = \'' . $table_name . '\')
- ORDER BY 1, 2';
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $sql = 'SELECT T1.RDB$DEPENDED_ON_NAME as GEN, T1.RDB$FIELD_NAME, T1.RDB$DEPENDED_ON_TYPE
- FROM RDB$DEPENDENCIES T1
- WHERE (T1.RDB$DEPENDENT_NAME = \'' . $row['dname'] . '\')
- AND (T1.RDB$DEPENDENT_TYPE = 2 AND T1.RDB$DEPENDED_ON_TYPE = 14)
- UNION ALL SELECT DISTINCT D.RDB$DEPENDED_ON_NAME, D.RDB$FIELD_NAME, D.RDB$DEPENDED_ON_TYPE
- FROM RDB$DEPENDENCIES D, RDB$RELATION_FIELDS F
- WHERE (D.RDB$DEPENDENT_TYPE = 3)
- AND (D.RDB$DEPENDENT_NAME = F.RDB$FIELD_SOURCE)
- AND (F.RDB$RELATION_NAME = \'' . $row['dname'] . '\')
- ORDER BY 1,2';
- $result2 = $db->sql_query($sql);
- $row2 = $db->sql_fetchrow($result2);
- $db->sql_freeresult($result2);
- $gen_name = $row2['gen'];
-
- $sql_data .= "\nDROP GENERATOR " . $gen_name . ";";
- $sql_data .= "\nSET TERM ^ ;";
- $sql_data .= "\nCREATE GENERATOR " . $gen_name . "^";
- $sql_data .= "\nSET GENERATOR " . $gen_name . " TO 0^\n";
- $sql_data .= "\nCREATE TRIGGER {$row['dname']} FOR $table_name";
- $sql_data .= "\nBEFORE INSERT\nAS\nBEGIN";
- $sql_data .= "\n NEW.{$row['fname']} = GEN_ID(" . $gen_name . ", 1);";
- $sql_data .= "\nEND^\n";
- $sql_data .= "\nSET TERM ; ^\n";
- }
-
- $this->flush($sql_data);
-
- $db->sql_freeresult($result);
- }
-}
-
// get how much space we allow for a chunk of data, very similar to phpMyAdmin's way of doing things ;-) (hey, we only do this for MySQL anyway :P)
function get_usable_memory()
{
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 63bfa3ac53..fe55b36e67 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -201,7 +201,7 @@ class acp_email
$messenger->set_mail_priority($priority);
$messenger->assign_vars(array(
- 'CONTACT_EMAIL' => $config['board_contact'],
+ 'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
'MESSAGE' => htmlspecialchars_decode($message))
);
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 88b6a9c270..b2a6820461 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -70,7 +70,7 @@ class acp_extensions
// If they've specified an extension, let's load the metadata manager and validate it.
if ($ext_name)
{
- $md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
+ $md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $user, $phpbb_root_path);
try
{
@@ -527,7 +527,7 @@ class acp_extensions
$version_helper = new \phpbb\version_helper($this->cache, $this->config, $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']);
$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_groups.php b/phpBB/includes/acp/acp_groups.php
index f4013a9bf2..f10f0b1015 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -27,7 +27,7 @@ class acp_groups
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
- global $request, $phpbb_container;
+ global $request, $phpbb_container, $phpbb_dispatcher;
$user->add_lang('acp/groups');
$this->tpl_name = 'acp_groups';
@@ -410,6 +410,42 @@ class acp_groups
'colour' => array('hex_colour', true),
);
+ /**
+ * Request group data and operate on it
+ *
+ * @event core.acp_manage_group_request_data
+ * @var string action Type of the action: add|edit
+ * @var int group_id The group id
+ * @var array group_row Array with new group data
+ * @var array error Array of errors, if you add errors
+ * ensure to update the template variables
+ * S_ERROR and ERROR_MSG to display it
+ * @var string group_name The group name
+ * @var string group_desc The group description
+ * @var int group_type The group type
+ * @var bool allow_desc_bbcode Allow bbcode in group description: true|false
+ * @var bool allow_desc_urls Allow urls in group description: true|false
+ * @var bool allow_desc_smilies Allow smiles in group description: true|false
+ * @var array submit_ary Array with new group data
+ * @var array validation_checks Array with validation data
+ * @since 3.1.0-b5
+ */
+ $vars = array(
+ 'action',
+ 'group_id',
+ 'group_row',
+ 'error',
+ 'group_name',
+ 'group_desc',
+ 'group_type',
+ 'allow_desc_bbcode',
+ 'allow_desc_urls',
+ 'allow_desc_smilies',
+ 'submit_ary',
+ 'validation_checks',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_group_request_data', compact($vars)));
+
if ($validation_error = validate_data($submit_ary, $validation_checks))
{
// Replace "error" string with its real, localised form
@@ -442,6 +478,42 @@ class acp_groups
'skip_auth' => 'int',
);
+ /**
+ * Initialise data before we display the add/edit form
+ *
+ * @event core.acp_manage_group_initialise_data
+ * @var string action Type of the action: add|edit
+ * @var int group_id The group id
+ * @var array group_row Array with new group data
+ * @var array error Array of errors, if you add errors
+ * ensure to update the template variables
+ * S_ERROR and ERROR_MSG to display it
+ * @var string group_name The group name
+ * @var string group_desc The group description
+ * @var int group_type The group type
+ * @var bool allow_desc_bbcode Allow bbcode in group description: true|false
+ * @var bool allow_desc_urls Allow urls in group description: true|false
+ * @var bool allow_desc_smilies Allow smiles in group description: true|false
+ * @var array submit_ary Array with new group data
+ * @var array test_variables Array with variables for test
+ * @since 3.1.0-b5
+ */
+ $vars = array(
+ 'action',
+ 'group_id',
+ 'group_row',
+ 'error',
+ 'group_name',
+ 'group_desc',
+ 'group_type',
+ 'allow_desc_bbcode',
+ 'allow_desc_urls',
+ 'allow_desc_smilies',
+ 'submit_ary',
+ 'test_variables',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_group_initialise_data', compact($vars)));
+
foreach ($test_variables as $test => $type)
{
if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0 || in_array($test, $set_attributes)))
@@ -664,6 +736,39 @@ class acp_groups
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
+ /**
+ * Modify group template data before we display the form
+ *
+ * @event core.acp_manage_group_display_form
+ * @var string action Type of the action: add|edit
+ * @var bool update Do we display the form only
+ * or did the user press submit
+ * @var int group_id The group id
+ * @var array group_row Array with new group data
+ * @var string group_name The group name
+ * @var int group_type The group type
+ * @var array group_desc_data The group description data
+ * @var string group_rank The group rank
+ * @var string rank_options The rank options
+ * @var array error Array of errors, if you add errors
+ * ensure to update the template variables
+ * S_ERROR and ERROR_MSG to display it
+ * @since 3.1.0-b5
+ */
+ $vars = array(
+ 'action',
+ 'update',
+ 'group_id',
+ 'group_row',
+ 'group_desc_data',
+ 'group_name',
+ 'group_type',
+ 'group_rank',
+ 'rank_options',
+ 'error',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_group_display_form', compact($vars)));
+
return;
break;
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 259b9845a3..b9a6ef17ce 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -542,7 +542,6 @@ class acp_icons
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query('DELETE FROM ' . $table);
break;
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 5b88035fa4..8d2e9d41a3 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -47,13 +47,13 @@ class acp_jabber
$this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS';
- $jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
- $jab_host = request_var('jab_host', (string) $config['jab_host']);
- $jab_port = request_var('jab_port', (int) $config['jab_port']);
- $jab_username = request_var('jab_username', (string) $config['jab_username']);
- $jab_password = request_var('jab_password', (string) $config['jab_password']);
- $jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
- $jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
+ $jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
+ $jab_host = request_var('jab_host', (string) $config['jab_host']);
+ $jab_port = request_var('jab_port', (int) $config['jab_port']);
+ $jab_username = request_var('jab_username', (string) $config['jab_username']);
+ $jab_password = request_var('jab_password', (string) $config['jab_password']);
+ $jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
+ $jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
$form_name = 'acp_jabber';
add_form_key($form_name);
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 4322cd006d..80dee1d620 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -54,28 +54,26 @@ class acp_logs
{
if (confirm_box(true))
{
- $where_sql = '';
+ $conditions = array();
if ($deletemark && sizeof($marked))
{
- $sql_in = array();
- foreach ($marked as $mark)
- {
- $sql_in[] = $mark;
- }
- $where_sql = ' AND ' . $db->sql_in_set('log_id', $sql_in);
- unset($sql_in);
+ $conditions['log_id'] = array('IN' => $marked);
}
- if ($where_sql || $deleteall)
+ if ($deleteall)
{
- $sql = 'DELETE FROM ' . LOG_TABLE . "
- WHERE log_type = {$this->log_type}
- $where_sql";
- $db->sql_query($sql);
+ if ($sort_days)
+ {
+ $conditions['log_time'] = array('>=', time() - ($sort_days * 86400));
+ }
- add_log('admin', 'LOG_CLEAR_' . strtoupper($mode));
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $conditions['keywords'] = $keywords;
}
+
+ $phpbb_log = $phpbb_container->get('log');
+ $phpbb_log->delete($mode, $conditions);
}
else
{
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 3acefebedc..247460ec8e 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -273,7 +273,6 @@ class acp_main
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
@@ -379,7 +378,6 @@ class acp_main
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query("DELETE FROM $table");
break;
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 61bae18557..5932f4cddd 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -561,14 +561,14 @@ class acp_modules
$directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
$fileinfo = array();
- $finder = $phpbb_extension_manager->get_finder();
+ $finder = $phpbb_extension_manager->get_finder($use_all_available);
$modules = $finder
->extension_suffix('_module')
->extension_directory("/$module_class")
->core_path("includes/$module_class/info/")
->core_prefix($module_class . '_')
- ->get_classes(true, $use_all_available);
+ ->get_classes(true);
foreach ($modules as $cur_module)
{
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index b11a083923..6540173433 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -331,14 +331,6 @@ class acp_permissions
}
}
- // Setting permissions screen
- $s_hidden_fields = build_hidden_fields(array(
- 'user_id' => $user_id,
- 'group_id' => $group_id,
- 'forum_id' => $forum_id,
- 'type' => $permission_type)
- );
-
// Go through the screens/options needed and present them in correct order
foreach ($permission_victim as $victim)
{
@@ -471,6 +463,14 @@ class acp_permissions
// If there are more than 5 forums selected the admin is not able to select all users/groups too.
// We need to see if the number of forums can be increased or need to be decreased.
+ // Setting permissions screen
+ $s_hidden_fields = build_hidden_fields(array(
+ 'user_id' => $user_id,
+ 'group_id' => $group_id,
+ 'forum_id' => $forum_id,
+ 'type' => $permission_type,
+ ));
+
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'ANONYMOUS_USER_ID' => ANONYMOUS,
@@ -507,6 +507,14 @@ class acp_permissions
return;
}
+ // Setting permissions screen
+ $s_hidden_fields = build_hidden_fields(array(
+ 'user_id' => $user_id,
+ 'group_id' => $group_id,
+ 'forum_id' => $forum_id,
+ 'type' => $permission_type,
+ ));
+
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
{
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 0e06c94869..810a111edb 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -47,7 +47,7 @@ class acp_php_info
// for this was nabbed from the PHP annotated manual
preg_match_all('#<body[^>]*>(.*)</body>#si', $phpinfo, $output);
- if (empty($phpinfo) || empty($output))
+ if (empty($phpinfo) || empty($output[1][0]))
{
trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
}
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index b7f0df4614..c291ee43c8 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -1267,11 +1267,6 @@ class acp_profile
break;
- case 'firebird':
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ' . $sql_type;
-
- break;
-
case 'oracle':
$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident " . $sql_type;
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index c5e8f1e2d0..9cb5efdbe0 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -252,7 +252,6 @@ class acp_reasons
// Teh standard
case 'postgres':
case 'oracle':
- case 'firebird':
case 'sqlite':
case 'sqlite3':
// Change the reports using this reason to 'other'
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 3d0d27e8c9..4cc93e5670 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -209,8 +209,8 @@ class acp_styles
trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$message = implode('<br />', $messages);
- $message .= '<br /><br />' . sprintf($this->user->lang['STYLE_INSTALLED_RETURN_STYLES'], $this->u_base_action . '&amp;mode=style');
- $message .= '<br /><br />' . sprintf($this->user->lang['STYLE_INSTALLED_RETURN_UNINSTALLED'], $this->u_base_action . '&amp;mode=install');
+ $message .= '<br /><br /><a href="' . $this->u_base_action . '&amp;mode=style' . '">&laquo; ' . $this->user->lang('STYLE_INSTALLED_RETURN_INSTALLED_STYLES') . '</a>';
+ $message .= '<br /><br /><a href="' . $this->u_base_action . '&amp;mode=install' . '">&raquo; ' . $this->user->lang('STYLE_INSTALLED_RETURN_UNINSTALLED_STYLES') . '</a>';
trigger_error($message, E_USER_NOTICE);
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index b653ddd13b..d07120a65f 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -814,7 +814,7 @@ class acp_users
$check_ary += array(
'email' => array(
array('string', false, 6, 60),
- array('email', $user_row['user_email'])
+ array('user_email', $user_row['user_email']),
),
);
}
@@ -922,7 +922,6 @@ class acp_users
$sql_ary += array(
'user_password' => $passwords_manager->hash($data['new_password']),
'user_passchg' => time(),
- 'user_pass_convert' => 0,
);
$user->reset_login_keys($user_id);
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 8fa9dba57b..7bb8e824d6 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -835,7 +835,7 @@ class auth_admin extends \phpbb\auth\auth
}
// Remove current auth options...
- $auth_option_ids = array((int)$any_option_id);
+ $auth_option_ids = array((int) $any_option_id);
foreach ($auth as $auth_option => $auth_setting)
{
$auth_option_ids[] = (int) $this->acl_options['id'][$auth_option];
diff --git a/phpBB/includes/acp/info/acp_contact.php b/phpBB/includes/acp/info/acp_contact.php
new file mode 100644
index 0000000000..548eb52816
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_contact.php
@@ -0,0 +1,30 @@
+<?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.
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_contact_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'acp_contact',
+ 'title' => 'ACP_CONTACT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'contact' => array('title' => 'ACP_CONTACT_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ ),
+ );
+ }
+}
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php
index dde3f9d4c9..8e1e61bdb7 100644
--- a/phpBB/includes/captcha/plugins/captcha_abstract.php
+++ b/phpBB/includes/captcha/plugins/captcha_abstract.php
@@ -96,7 +96,8 @@ class phpbb_captcha_plugins_captcha_abstract
else
{
$link = append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=confirm&amp;confirm_id=' . $this->confirm_id . '&amp;type=' . $this->type);
- $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ $contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx);
+ $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . $contact_link . '">', '</a>');
$template->assign_vars(array(
'CONFIRM_IMAGE_LINK' => $link,
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index 0568cb7c51..12cc49ef9b 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -150,7 +150,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
function get_template()
{
- global $config, $user, $template;
+ global $config, $user, $template, $phpbb_root_path, $phpEx;
if ($this->is_solved())
{
@@ -158,7 +158,8 @@ class phpbb_recaptcha extends phpbb_default_captcha
}
else
{
- $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ $contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx);
+ $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . $contact_link . '">', '</a>');
$template->assign_vars(array(
'RECAPTCHA_SERVER' => $this->recaptcha_server,
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 602067a0e7..2287639aee 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.0-b4-dev');
+define('PHPBB_VERSION', '3.1.0-RC2-dev');
// QA-related
// define('PHPBB_QA', 1);
@@ -233,6 +233,7 @@ define('BBCODES_TABLE', $table_prefix . 'bbcodes');
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
define('BOTS_TABLE', $table_prefix . 'bots');
define('CONFIG_TABLE', $table_prefix . 'config');
+define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text');
define('CONFIRM_TABLE', $table_prefix . 'confirm');
define('DISALLOW_TABLE', $table_prefix . 'disallow');
define('DRAFTS_TABLE', $table_prefix . 'drafts');
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c423e29d9d..32acb0c9ff 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2818,8 +2818,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$user->lang[$result['error_msg']],
($config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '',
($config['email_enable']) ? '</a>' : '',
- ($config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '',
- ($config['board_contact']) ? '</a>' : ''
+ '<a href="' . phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx) . '">',
+ '</a>'
);
break;
@@ -2830,7 +2830,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
// Assign admin contact to some error messages
if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
{
- $err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ $err = sprintf($user->lang[$result['error_msg']], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</a>');
}
break;
@@ -2854,7 +2854,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$s_hidden_fields['credential'] = $credential;
}
- $auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
+ $provider_collection = $phpbb_container->get('auth.provider_collection');
+ $auth_provider = $provider_collection->get_provider();
$auth_provider_data = $auth_provider->get_login_data();
if ($auth_provider_data)
@@ -4922,6 +4923,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'),
'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
+ 'U_CONTACT_US' => ($config['contact_admin_form_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') : '',
'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
@@ -5029,6 +5031,72 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
/**
+* Check and display the SQL report if requested.
+*
+* @param \phpbb\request\request_interface $request Request object
+* @param \phpbb\auth\auth $auth Auth object
+* @param \phpbb\db\driver\driver_interface $db Database connection
+*/
+function phpbb_check_and_display_sql_report(\phpbb\request\request_interface $request, \phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db)
+{
+ if ($request->variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG'))
+ {
+ $db->sql_report('display');
+ }
+}
+
+/**
+* Generate the debug output string
+*
+* @param \phpbb\db\driver\driver_interface $db Database connection
+* @param \phpbb\config\config $config Config object
+* @param \phpbb\auth\auth $auth Auth object
+* @param \phpbb\user $user User object
+* @return string
+*/
+function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\auth\auth $auth, \phpbb\user $user)
+{
+ $debug_info = array();
+
+ // Output page creation time
+ if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ if (isset($GLOBALS['starttime']))
+ {
+ $totaltime = microtime(true) - $GLOBALS['starttime'];
+ $debug_info[] = sprintf('<abbr title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</abbr>', $db->sql_time, ($totaltime - $db->sql_time), $totaltime);
+ }
+
+ $debug_info[] = sprintf('<abbr title="Cached: %d">Queries: %d</abbr>', $db->sql_num_queries(true), $db->sql_num_queries());
+
+ $memory_usage = memory_get_peak_usage();
+ if ($memory_usage)
+ {
+ $memory_usage = get_formatted_filesize($memory_usage);
+
+ $debug_info[] = 'Peak Memory Usage: ' . $memory_usage;
+ }
+ }
+
+ if (defined('DEBUG'))
+ {
+ $debug_info[] = 'GZIP: ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off');
+
+ if ($user->load)
+ {
+ $debug_info[] = 'Load: ' . $user->load;
+ }
+
+ if ($auth->acl_get('a_'))
+ {
+ $debug_info[] = '<a href="' . build_url() . '&amp;explain=1">SQL Explain</a>';
+ }
+ }
+
+ return implode(' | ', $debug_info);
+}
+
+/**
* Generate page footer
*
* @param bool $run_cron Whether or not to run the cron
@@ -5060,37 +5128,10 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
return;
}
- // Output page creation time
- if (defined('DEBUG'))
- {
- $mtime = explode(' ', microtime());
- $totaltime = $mtime[0] + $mtime[1] - $starttime;
-
- if ($request->variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG') && method_exists($db, 'sql_report'))
- {
- $db->sql_report('display');
- }
-
- $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
-
- if ($auth->acl_get('a_') && defined('DEBUG'))
- {
- if (function_exists('memory_get_peak_usage'))
- {
- if ($memory_usage = memory_get_peak_usage())
- {
- $memory_usage = get_formatted_filesize($memory_usage);
-
- $debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
- }
- }
-
- $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
- }
- }
+ phpbb_check_and_display_sql_report($request, $auth, $db);
$template->assign_vars(array(
- 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'DEBUG_OUTPUT' => phpbb_generate_debug_output($db, $config, $auth, $user),
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited'),
@@ -5270,7 +5311,7 @@ function phpbb_convert_30_dbms_to_31($dbms)
// true for mysqli class.
// However, per the docblock any valid 3.1 driver name should be
// recognized by this function, and have priority over 3.0 dbms.
- if (class_exists('phpbb\db\driver\\' . $dbms))
+ if (strpos($dbms, 'phpbb\db\driver') === false && class_exists('phpbb\db\driver\\' . $dbms))
{
return 'phpbb\db\driver\\' . $dbms;
}
@@ -5298,3 +5339,42 @@ function phpbb_convert_30_dbms_to_31($dbms)
throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
}
+
+/**
+* Get the board contact details (e.g. for emails)
+*
+* @param \phpbb\config\config $config
+* @param string $phpEx
+* @return string
+*/
+function phpbb_get_board_contact(\phpbb\config\config $config, $phpEx)
+{
+ if ($config['contact_admin_form_enable'])
+ {
+ return generate_board_url() . '/memberlist.' . $phpEx . '?mode=contactadmin';
+ }
+ else
+ {
+ return $config['board_contact'];
+ }
+}
+
+/**
+* Get a clickable board contact details link
+*
+* @param \phpbb\config\config $config
+* @param string $phpbb_root_path
+* @param string $phpEx
+* @return string
+*/
+function phpbb_get_board_contact_link(\phpbb\config\config $config, $phpbb_root_path, $phpEx)
+{
+ if ($config['contact_admin_form_enable'])
+ {
+ return append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin');
+ }
+ else
+ {
+ return 'mailto:' . htmlspecialchars($config['board_contact']);
+ }
+}
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 373eb57934..8453da6e6e 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -146,37 +146,10 @@ function adm_page_footer($copyright_html = true)
return;
}
- // Output page creation time
- if (defined('DEBUG'))
- {
- $mtime = explode(' ', microtime());
- $totaltime = $mtime[0] + $mtime[1] - $starttime;
-
- if ($request->variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG') && method_exists($db, 'sql_report'))
- {
- $db->sql_report('display');
- }
-
- $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
-
- if ($auth->acl_get('a_') && defined('DEBUG'))
- {
- if (function_exists('memory_get_peak_usage'))
- {
- if ($memory_usage = memory_get_peak_usage())
- {
- $memory_usage = get_formatted_filesize($memory_usage);
-
- $debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
- }
- }
-
- $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
- }
- }
+ phpbb_check_and_display_sql_report($request, $auth, $db);
$template->assign_vars(array(
- 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'DEBUG_OUTPUT' => phpbb_generate_debug_output($db, $config, $auth, $user),
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited'),
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3000a18668..6bf8ce2c81 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2445,7 +2445,6 @@ function phpbb_cache_moderators($db, $cache, $auth)
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);
break;
@@ -2900,17 +2899,6 @@ function get_database_size()
}
break;
- case 'firebird':
- global $dbname;
-
- // if it on the local machine, we can get lucky
- if (file_exists($dbname))
- {
- $database_size = filesize($dbname);
- }
-
- break;
-
case 'sqlite':
case 'sqlite3':
global $dbhost;
@@ -3030,7 +3018,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
}
else if (stripos($line, '404 not found') !== false)
{
- $errstr = $user->lang('FILE_NOT_FOUND', $filename);
+ $errstr = $user->lang('FILE_NOT_FOUND', $filename);
return false;
}
}
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index f988d009ad..74b3e0c70f 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -773,44 +773,47 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
static $static_class;
static $magic_url_match_args;
- if (!is_array($magic_url_match_args) || $static_class != $class)
+ if (!isset($magic_url_match_args[$server_url]) || $static_class != $class)
{
$static_class = $class;
$class = ($static_class) ? ' class="' . $static_class . '"' : '';
$local_class = ($static_class) ? ' class="' . $static_class . '-local"' : '';
- $magic_url_match_args = array();
+ if (!is_array($magic_url_match_args))
+ {
+ $magic_url_match_args = array();
+ }
// relative urls for this board
- $magic_url_match_args[] = array(
+ $magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',
MAGIC_URL_LOCAL,
$local_class,
);
// matches a xxxx://aaaaa.bbb.cccc. ...
- $magic_url_match_args[] = array(
+ $magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',
MAGIC_URL_FULL,
$class,
);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
- $magic_url_match_args[] = array(
+ $magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',
MAGIC_URL_WWW,
$class,
);
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
- $magic_url_match_args[] = array(
+ $magic_url_match_args[$server_url][] = array(
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',
MAGIC_URL_EMAIL,
'',
);
}
- foreach ($magic_url_match_args as $magic_args)
+ foreach ($magic_url_match_args[$server_url] as $magic_args)
{
if (preg_match($magic_args[0], $text, $matches))
{
@@ -1401,7 +1404,7 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// no break;
}
-
+
if (!isset($username_string))
{
if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index e68e770b3a..864a43c6e7 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1007,8 +1007,8 @@ function get_remote_avatar_dim($src, $axis)
{
$bigger = ($remote_avatar_cache[$src][0] > $remote_avatar_cache[$src][1]) ? 0 : 1;
$ratio = $default[$bigger] / $remote_avatar_cache[$src][$bigger];
- $remote_avatar_cache[$src][0] = (int)($remote_avatar_cache[$src][0] * $ratio);
- $remote_avatar_cache[$src][1] = (int)($remote_avatar_cache[$src][1] * $ratio);
+ $remote_avatar_cache[$src][0] = (int) ($remote_avatar_cache[$src][0] * $ratio);
+ $remote_avatar_cache[$src][1] = (int) ($remote_avatar_cache[$src][1] * $ratio);
}
}
@@ -1287,7 +1287,9 @@ function restore_config($schema)
{
$var = (empty($m[2]) || empty($convert_config[$m[2]])) ? "''" : "'" . addslashes($convert_config[$m[2]]) . "'";
$exec = '$config_value = ' . $m[1] . '(' . $var . ');';
+ // @codingStandardsIgnoreStart
eval($exec);
+ // @codingStandardsIgnoreEnd
}
else
{
@@ -2043,7 +2045,6 @@ function update_topics_posted()
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
@@ -2295,7 +2296,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
$message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message);
$message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message);
- for ($i = sizeof($size); $i; )
+ for ($i = sizeof($size); $i;)
{
$i--;
$message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message);
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ea5ff08c01..68b1356297 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -497,10 +497,15 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$l_post_click_count = ($row['forum_type'] == FORUM_LINK) ? 'CLICKS' : 'POSTS';
$post_click_count = ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? $row['forum_posts'] : '';
- $s_subforums_list = array();
+ $s_subforums_list = $subforums_row = array();
foreach ($subforums_list as $subforum)
{
$s_subforums_list[] = '<a href="' . $subforum['link'] . '" class="subforum ' . (($subforum['unread']) ? 'unread' : 'read') . '" title="' . (($subforum['unread']) ? $user->lang['UNREAD_POSTS'] : $user->lang['NO_UNREAD_POSTS']) . '">' . $subforum['name'] . '</a>';
+ $subforums_row[] = array(
+ 'U_SUBFORUM' => $subforum['link'],
+ 'SUBFORUM_NAME' => $subforum['name'],
+ 'S_UNREAD' => $subforum['unread'],
+ );
}
$s_subforums_list = (string) implode($user->lang['COMMA_SEPARATOR'], $s_subforums_list);
$catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false;
@@ -572,22 +577,41 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
* @event core.display_forums_modify_template_vars
* @var array forum_row Template data of the forum
* @var array row The data of the forum
+ * @var array subforums_row Template data of subforums
* @since 3.1.0-a1
+ * @change 3.1.0-b5 Added var subforums_row
*/
- $vars = array('forum_row', 'row');
+ $vars = array('forum_row', 'row', 'subforums_row');
extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_template_vars', compact($vars)));
$template->assign_block_vars('forumrow', $forum_row);
// Assign subforums loop for style authors
- foreach ($subforums_list as $subforum)
- {
- $template->assign_block_vars('forumrow.subforum', array(
- 'U_SUBFORUM' => $subforum['link'],
- 'SUBFORUM_NAME' => $subforum['name'],
- 'S_UNREAD' => $subforum['unread'])
- );
- }
+ $template->assign_block_vars_array('forumrow.subforum', $subforums_row);
+
+ /**
+ * Modify and/or assign additional template data for the forum
+ * after forumrow loop has been assigned. This can be used
+ * to create additional forumrow subloops in extensions.
+ *
+ * This event is triggered once per forum
+ *
+ * @event core.display_forums_add_template_data
+ * @var array forum_row Template data of the forum
+ * @var array row The data of the forum
+ * @var array subforums_list The data of subforums
+ * @var array subforums_row Template data of subforums
+ * @var bool catless The flag indicating whether a forum has a parent category
+ * @since 3.1.0-b5
+ */
+ $vars = array(
+ 'forum_row',
+ 'row',
+ 'subforums_list',
+ 'subforums_row',
+ 'catless',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_add_template_data', compact($vars)));
$last_catless = $catless;
}
@@ -598,7 +622,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
- 'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'),
+ 'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED_FORUM'),
));
if ($return_moderators)
@@ -650,6 +674,8 @@ function generate_forum_nav(&$forum_data)
// Get forum parents
$forum_parents = get_forum_parents($forum_data);
+ $microdata_attr = 'data-forum-id';
+
// Build navigation links
if (!empty($forum_parents))
{
@@ -669,6 +695,7 @@ function generate_forum_nav(&$forum_data)
'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false,
'FORUM_NAME' => $parent_name,
'FORUM_ID' => $parent_forum_id,
+ 'MICRODATA' => $microdata_attr . '="' . $parent_forum_id . '"',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
);
}
@@ -680,6 +707,7 @@ function generate_forum_nav(&$forum_data)
'S_IS_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_ID' => $forum_data['forum_id'],
+ 'MICRODATA' => $microdata_attr . '="' . $forum_data['forum_id'] . '"',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']))
);
@@ -1157,7 +1185,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$u_url .= ($mode == 'forum') ? '&amp;f' : '&amp;f=' . $forum_id . '&amp;t';
$is_watching = 0;
- // Is user watching this thread?
+ // Is user watching this topic?
if ($user_id != ANONYMOUS)
{
$can_watch = true;
@@ -1347,7 +1375,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
*/
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
{
- global $ranks, $config, $phpbb_root_path;
+ global $ranks, $config, $phpbb_root_path, $phpbb_path_helper;
if (empty($ranks))
{
@@ -1358,8 +1386,8 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
if (!empty($user_rank))
{
$rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
- $rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
- $rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] : '';
+ $rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image']) : '';
+ $rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
}
else if ($user_posts !== false)
{
@@ -1370,8 +1398,8 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
if ($user_posts >= $rank['rank_min'])
{
$rank_title = $rank['rank_title'];
- $rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
- $rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image'] : '';
+ $rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image']) : '';
+ $rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
break;
}
}
@@ -1416,3 +1444,166 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php
return $links;
}
+
+/**
+* Prepare profile data
+*/
+function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
+{
+ global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
+
+ $username = $data['username'];
+ $user_id = $data['user_id'];
+
+ $rank_title = $rank_img = $rank_img_src = '';
+ get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
+
+ if ((!empty($data['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_user'))
+ {
+ $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_user')) ? '' : 'mailto:' . $data['user_email']);
+ }
+ else
+ {
+ $email = '';
+ }
+
+ if ($config['load_onlinetrack'])
+ {
+ $update_time = $config['load_online_time'] * 60;
+ $online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
+ }
+ else
+ {
+ $online = false;
+ }
+
+ if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
+ {
+ $last_active = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
+ }
+ else
+ {
+ $last_active = '';
+ }
+
+ $age = '';
+
+ if ($config['allow_birthdays'] && $data['user_birthday'])
+ {
+ list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday']));
+
+ if ($bday_year)
+ {
+ $now = $user->create_datetime();
+ $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
+
+ $diff = $now['mon'] - $bday_month;
+ if ($diff == 0)
+ {
+ $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
+ }
+ else
+ {
+ $diff = ($diff < 0) ? 1 : 0;
+ }
+
+ $age = max(0, (int) ($now['year'] - $bday_year - $diff));
+ }
+ }
+
+ if (!function_exists('phpbb_get_banned_user_ids'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ // Can this user receive a Private Message?
+ $can_receive_pm = (
+ // They must be a "normal" user
+ $data['user_type'] != USER_IGNORE &&
+
+ // They must not be deactivated by the administrator
+ ($data['user_type'] != USER_INACTIVE || $data['user_inactive_reason'] != INACTIVE_MANUAL) &&
+
+ // They must be able to read PMs
+ sizeof($auth->acl_get_list($user_id, 'u_readpm')) &&
+
+ // They must not be permanently banned
+ !sizeof(phpbb_get_banned_user_ids($user_id, false)) &&
+
+ // They must allow users to contact via PM
+ (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm'])
+ );
+
+ // Dump it out to the template
+ $template_data = array(
+ 'AGE' => $age,
+ 'RANK_TITLE' => $rank_title,
+ 'JOINED' => $user->format_date($data['user_regdate']),
+ 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
+ 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
+ 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
+
+ 'USERNAME_FULL' => get_username_string('full', $user_id, $username, $data['user_colour']),
+ 'USERNAME' => get_username_string('username', $user_id, $username, $data['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']),
+
+ 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])),
+
+ 'AVATAR_IMG' => phpbb_get_user_avatar($data),
+ 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
+ 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+ 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
+
+ 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
+
+ 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '',
+ 'U_NOTES' => ($user_notes_enabled && $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
+ 'U_EMAIL' => $email,
+ 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
+
+ 'USER_JABBER' => $data['user_jabber'],
+ 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
+
+ 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
+ 'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
+ 'L_VIEWING_PROFILE' => $user->lang('VIEWING_PROFILE', $username),
+ );
+
+ /**
+ * Preparing a user's data before displaying it in profile and memberlist
+ *
+ * @event core.memberlist_prepare_profile_data
+ * @var array data Array with user's data
+ * @var array template_data Template array with user's data
+ * @since 3.1.0-a1
+ */
+ $vars = array('data', 'template_data');
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_prepare_profile_data', compact($vars)));
+
+ return $template_data;
+}
+
+function phpbb_sort_last_active($first, $second)
+{
+ global $id_cache, $sort_dir;
+
+ $lesser_than = ($sort_dir === 'd') ? -1 : 1;
+
+ if (isset($id_cache[$first]['group_leader']) && $id_cache[$first]['group_leader'] && (!isset($id_cache[$second]['group_leader']) || !$id_cache[$second]['group_leader']))
+ {
+ return -1;
+ }
+ else if (isset($id_cache[$second]['group_leader']) && (!isset($id_cache[$first]['group_leader']) || !$id_cache[$first]['group_leader']) && $id_cache[$second]['group_leader'])
+ {
+ return 1;
+ }
+ else
+ {
+ return $lesser_than * (int) ($id_cache[$first]['last_visit'] - $id_cache[$second]['last_visit']);
+ }
+}
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 1c66489c31..b5d1573d12 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -27,15 +27,6 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
{
global $lang;
$available_dbms = array(
- 'firebird' => array(
- 'LABEL' => 'FireBird',
- 'SCHEMA' => 'firebird',
- 'MODULE' => 'interbase',
- 'DELIM' => ';;',
- 'DRIVER' => 'phpbb\db\driver\firebird',
- 'AVAILABLE' => true,
- '2.0.x' => false,
- ),
// Note: php 5.5 alpha 2 deprecated mysql.
// Keep mysqli before mysql in this list.
'mysqli' => array(
@@ -260,7 +251,6 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
$prefix_length = 200;
break;
- case 'phpbb\db\driver\firebird':
case 'phpbb\db\driver\oracle':
$prefix_length = 6;
break;
@@ -321,87 +311,6 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
break;
- case 'phpbb\db\driver\firebird':
- // check the version of FB, use some hackery if we can't get access to the server info
- if ($db->service_handle !== false && function_exists('ibase_server_info'))
- {
- $val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION);
- preg_match('#V([\d.]+)#', $val, $match);
- if ($match[1] < 2)
- {
- $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
- }
- $db_info = @ibase_db_info($db->service_handle, $dbname, IBASE_STS_HDR_PAGES);
-
- preg_match('/^\\s*Page size\\s*(\\d+)/m', $db_info, $regs);
- $page_size = intval($regs[1]);
- if ($page_size < 8192)
- {
- $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
- }
- }
- else
- {
- $sql = "SELECT *
- FROM RDB$FUNCTIONS
- WHERE RDB$SYSTEM_FLAG IS NULL
- AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // if its a UDF, its too old
- if ($row)
- {
- $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
- }
- else
- {
- $sql = 'SELECT 1 FROM RDB$DATABASE
- WHERE BIN_AND(10, 1) = 0';
- $result = $db->sql_query($sql);
- if (!$result) // This can only fail if BIN_AND is not defined
- {
- $error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
- }
- $db->sql_freeresult($result);
- }
-
- // Setup the stuff for our random table
- $char_array = array_merge(range('A', 'Z'), range('0', '9'));
- $char_len = mt_rand(7, 9);
- $char_array_len = sizeof($char_array) - 1;
-
- $final = '';
-
- for ($i = 0; $i < $char_len; $i++)
- {
- $final .= $char_array[mt_rand(0, $char_array_len)];
- }
-
- // Create some random table
- $sql = 'CREATE TABLE ' . $final . " (
- FIELD1 VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- FIELD2 INTEGER DEFAULT 0 NOT NULL);";
- $db->sql_query($sql);
-
- // Create an index that should fail if the page size is less than 8192
- $sql = 'CREATE INDEX ' . $final . ' ON ' . $final . '(FIELD1, FIELD2);';
- $db->sql_query($sql);
-
- if (ibase_errmsg() !== false)
- {
- $error[] = $lang['INST_ERR_DB_NO_FIREBIRD_PS'];
- }
- else
- {
- // Kill the old table
- $db->sql_query('DROP TABLE ' . $final . ';');
- }
- unset($final);
- }
- break;
-
case 'phpbb\db\driver\oracle':
if ($unicode_check)
{
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
new file mode 100644
index 0000000000..7593f08f4d
--- /dev/null
+++ b/phpBB/includes/functions_mcp.php
@@ -0,0 +1,666 @@
+<?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.
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Functions used to generate additional URL paramters
+*/
+function phpbb_module__url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_module_notes_url($mode, &$module_row)
+{
+ if ($mode == 'front')
+ {
+ return '';
+ }
+
+ global $user_id;
+ return ($user_id) ? "&amp;u=$user_id" : '';
+}
+
+function phpbb_module_warn_url($mode, &$module_row)
+{
+ if ($mode == 'front' || $mode == 'list')
+ {
+ global $forum_id;
+
+ return ($forum_id) ? "&amp;f=$forum_id" : '';
+ }
+
+ if ($mode == 'warn_post')
+ {
+ global $forum_id, $post_id;
+
+ $url_extra = ($forum_id) ? "&amp;f=$forum_id" : '';
+ $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
+
+ return $url_extra;
+ }
+ else
+ {
+ global $user_id;
+
+ return ($user_id) ? "&amp;u=$user_id" : '';
+ }
+}
+
+function phpbb_module_main_url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_module_logs_url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_module_ban_url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_module_queue_url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_module_reports_url($mode, &$module_row)
+{
+ return phpbb_extra_url();
+}
+
+function phpbb_extra_url()
+{
+ global $forum_id, $topic_id, $post_id, $report_id, $user_id;
+
+ $url_extra = '';
+ $url_extra .= ($forum_id) ? "&amp;f=$forum_id" : '';
+ $url_extra .= ($topic_id) ? "&amp;t=$topic_id" : '';
+ $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
+ $url_extra .= ($user_id) ? "&amp;u=$user_id" : '';
+ $url_extra .= ($report_id) ? "&amp;r=$report_id" : '';
+
+ return $url_extra;
+}
+
+/**
+* Get simple topic data
+*/
+function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
+{
+ global $auth, $db, $config, $user;
+ static $rowset = array();
+
+ $topics = array();
+
+ if (!sizeof($topic_ids))
+ {
+ return array();
+ }
+
+ // cache might not contain read tracking info, so we can't use it if read
+ // tracking information is requested
+ if (!$read_tracking)
+ {
+ $cache_topic_ids = array_intersect($topic_ids, array_keys($rowset));
+ $topic_ids = array_diff($topic_ids, array_keys($rowset));
+ }
+ else
+ {
+ $cache_topic_ids = array();
+ }
+
+ if (sizeof($topic_ids))
+ {
+ $sql_array = array(
+ 'SELECT' => 't.*, f.*',
+
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = t.forum_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('t.topic_id', $topic_ids)
+ );
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
+ );
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
+ );
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['topic_id']] = $row;
+
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ $topics[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ foreach ($cache_topic_ids as $id)
+ {
+ if (!$acl_list || $auth->acl_gets($acl_list, $rowset[$id]['forum_id']))
+ {
+ $topics[$id] = $rowset[$id];
+ }
+ }
+
+ return $topics;
+}
+
+/**
+* Get simple post data
+*/
+function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false)
+{
+ global $db, $auth, $config, $user;
+
+ $rowset = array();
+
+ if (!sizeof($post_ids))
+ {
+ return array();
+ }
+
+ $sql_array = array(
+ 'SELECT' => 'p.*, u.*, t.*, f.*',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ POSTS_TABLE => 'p',
+ TOPICS_TABLE => 't',
+ ),
+
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = t.forum_id'
+ )
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
+ AND u.user_id = p.poster_id
+ AND t.topic_id = p.topic_id',
+ );
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
+ 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
+ );
+
+ $sql_array['LEFT_JOIN'][] = array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
+ );
+ }
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ unset($sql_array);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ {
+ // Moderators without the permission to approve post should at least not see them. ;)
+ continue;
+ }
+
+ $rowset[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* Get simple forum data
+*/
+function phpbb_get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
+{
+ global $auth, $db, $user, $config, $phpbb_container;
+
+ $rowset = array();
+
+ if (!is_array($forum_id))
+ {
+ $forum_id = array($forum_id);
+ }
+
+ if (!sizeof($forum_id))
+ {
+ return array();
+ }
+
+ if ($read_tracking && $config['load_db_lastread'])
+ {
+ $read_tracking_join = ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
+ AND ft.forum_id = f.forum_id)';
+ $read_tracking_select = ', ft.mark_time';
+ }
+ else
+ {
+ $read_tracking_join = $read_tracking_select = '';
+ }
+
+ $sql = "SELECT f.* $read_tracking_select
+ FROM " . FORUMS_TABLE . " f$read_tracking_join
+ WHERE " . $db->sql_in_set('f.forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ $row['forum_topics_approved'] = $phpbb_content_visibility->get_count('forum_topics', $row, $row['forum_id']);
+
+ $rowset[$row['forum_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* Get simple pm data
+*/
+function phpbb_get_pm_data($pm_ids)
+{
+ global $db;
+
+ $rowset = array();
+
+ if (!sizeof($pm_ids))
+ {
+ return array();
+ }
+
+ $sql_array = array(
+ 'SELECT' => 'p.*, u.*',
+
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ PRIVMSGS_TABLE => 'p',
+ ),
+
+ 'WHERE' => $db->sql_in_set('p.msg_id', $pm_ids) . '
+ AND u.user_id = p.author_id',
+ );
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ unset($sql_array);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['msg_id']] = $row;
+ }
+ $db->sql_freeresult($result);
+
+ return $rowset;
+}
+
+/**
+* sorting in mcp
+*
+* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
+*
+* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
+* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
+*/
+function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
+{
+ global $db, $user, $auth, $template;
+
+ $sort_days = request_var('st', 0);
+ $min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
+
+ switch ($mode)
+ {
+ case 'viewforum':
+ $type = 'topics';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(topic_id) AS total
+ FROM ' . TOPICS_TABLE . "
+ $where_sql forum_id = $forum_id
+ AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
+ AND topic_last_post_time >= $min_time";
+
+ if (!$auth->acl_get('m_approve', $forum_id))
+ {
+ $sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
+ }
+ break;
+
+ case 'viewtopic':
+ $type = 'posts';
+ $default_key = 't';
+ $default_dir = 'a';
+
+ $sql = 'SELECT COUNT(post_id) AS total
+ FROM ' . POSTS_TABLE . "
+ $where_sql topic_id = $topic_id
+ AND post_time >= $min_time";
+
+ if (!$auth->acl_get('m_approve', $forum_id))
+ {
+ $sql .= 'AND post_visibility = ' . ITEM_APPROVED;
+ }
+ break;
+
+ case 'unapproved_posts':
+ case 'deleted_posts':
+ $visibility_const = ($mode == 'unapproved_posts') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
+ $type = 'posts';
+ $default_key = 't';
+ $default_dir = 'd';
+ $where_sql .= ($topic_id) ? ' p.topic_id = ' . $topic_id . ' AND' : '';
+
+ $sql = 'SELECT COUNT(p.post_id) AS total
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
+ $where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
+ AND ' . $db->sql_in_set('p.post_visibility', $visibility_const) .'
+ AND t.topic_id = p.topic_id
+ AND t.topic_visibility <> p.post_visibility';
+
+ if ($min_time)
+ {
+ $sql .= ' AND post_time >= ' . $min_time;
+ }
+ break;
+
+ case 'unapproved_topics':
+ case 'deleted_topics':
+ $visibility_const = ($mode == 'unapproved_topics') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
+ $type = 'topics';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(topic_id) AS total
+ FROM ' . TOPICS_TABLE . "
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
+ AND ' . $db->sql_in_set('topic_visibility', $visibility_const);
+
+ if ($min_time)
+ {
+ $sql .= ' AND topic_time >= ' . $min_time;
+ }
+ break;
+
+ case 'pm_reports':
+ case 'pm_reports_closed':
+ case 'reports':
+ case 'reports_closed':
+ $pm = (strpos($mode, 'pm_') === 0) ? true : false;
+
+ $type = ($pm) ? 'pm_reports' : 'reports';
+ $default_key = 't';
+ $default_dir = 'd';
+ $limit_time_sql = ($min_time) ? "AND r.report_time >= $min_time" : '';
+
+ if ($topic_id)
+ {
+ $where_sql .= ' p.topic_id = ' . $topic_id . ' AND ';
+ }
+ else if ($forum_id)
+ {
+ $where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
+ }
+ else if (!$pm)
+ {
+ $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true) . ' AND ';
+ }
+
+ if ($mode == 'reports' || $mode == 'pm_reports')
+ {
+ $where_sql .= ' r.report_closed = 0 AND ';
+ }
+ else
+ {
+ $where_sql .= ' r.report_closed = 1 AND ';
+ }
+
+ if ($pm)
+ {
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . " p
+ $where_sql r.post_id = 0
+ AND p.msg_id = r.pm_id
+ $limit_time_sql";
+ }
+ else
+ {
+ $sql = 'SELECT COUNT(r.report_id) AS total
+ FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . " p
+ $where_sql r.pm_id = 0
+ AND p.post_id = r.post_id
+ $limit_time_sql";
+ }
+ break;
+
+ case 'viewlogs':
+ $type = 'logs';
+ $default_key = 't';
+ $default_dir = 'd';
+
+ $sql = 'SELECT COUNT(log_id) AS total
+ FROM ' . LOG_TABLE . "
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_'))) . '
+ AND log_time >= ' . $min_time . '
+ AND log_type = ' . LOG_MOD;
+ break;
+ }
+
+ $sort_key = request_var('sk', $default_key);
+ $sort_dir = request_var('sd', $default_dir);
+ $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
+
+ switch ($type)
+ {
+ case 'topics':
+ $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'tt' => $user->lang['TOPIC_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
+
+ $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 't.topic_title', 'v' => 't.topic_views');
+ $limit_time_sql = ($min_time) ? "AND t.topic_last_post_time >= $min_time" : '';
+ break;
+
+ case 'posts':
+ $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
+ $limit_time_sql = ($min_time) ? "AND p.post_time >= $min_time" : '';
+ break;
+
+ case 'reports':
+ $limit_days = array(0 => $user->lang['ALL_REPORTS'], 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'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject');
+ break;
+
+ case 'pm_reports':
+ $limit_days = array(0 => $user->lang['ALL_REPORTS'], 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'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
+ $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.message_time', 't' => 'r.report_time', 's' => 'p.message_subject');
+ break;
+
+ case 'logs':
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
+
+ $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
+ $limit_time_sql = ($min_time) ? "AND l.log_time >= $min_time" : '';
+ break;
+ }
+
+ if (!isset($sort_by_sql[$sort_key]))
+ {
+ $sort_key = $default_key;
+ }
+
+ $sort_order_sql = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $sort_url = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $sort_url);
+
+ $template->assign_vars(array(
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days)
+ );
+
+ if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts', 'deleted_topics', 'deleted_posts')) || $where_sql != 'WHERE')
+ {
+ $result = $db->sql_query($sql);
+ $total = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total = -1;
+ }
+}
+
+/**
+* Validate ids
+*
+* @param array &$ids The relevant ids to check
+* @param string $table The table to find the ids in
+* @param string $sql_id The ids relevant column name
+* @param array $acl_list A list of permissions the user need to have
+* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
+*
+* @return mixed False if no ids were able to be retrieved, true if at least one id left.
+* Additionally, this value can be the forum_id assigned if $single_forum was set.
+* Therefore checking the result for with !== false is the best method.
+*/
+function phpbb_check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false)
+{
+ global $db, $auth;
+
+ if (!is_array($ids) || empty($ids))
+ {
+ return false;
+ }
+
+ $sql = "SELECT $sql_id, forum_id FROM $table
+ WHERE " . $db->sql_in_set($sql_id, $ids);
+ $result = $db->sql_query($sql);
+
+ $ids = array();
+ $forum_id = false;
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id']))
+ {
+ continue;
+ }
+
+ if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list))
+ {
+ continue;
+ }
+
+ // Limit forum? If not, just assign the id.
+ if ($single_forum === false)
+ {
+ $ids[] = $row[$sql_id];
+ continue;
+ }
+
+ // Limit forum to a specific forum id?
+ // This can get really tricky, because we do not want to create a failure on global topics. :)
+ if ($row['forum_id'])
+ {
+ if ($single_forum !== true && $row['forum_id'] == (int) $single_forum)
+ {
+ $forum_id = (int) $single_forum;
+ }
+ else if ($forum_id === false)
+ {
+ $forum_id = $row['forum_id'];
+ }
+
+ if ($row['forum_id'] == $forum_id)
+ {
+ $ids[] = $row[$sql_id];
+ }
+ }
+ else
+ {
+ // Always add a global topic
+ $ids[] = $row[$sql_id];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (!sizeof($ids))
+ {
+ return false;
+ }
+
+ // If forum id is false and ids populated we may have only global announcements selected (returning 0 because of (int) $forum_id)
+
+ return ($single_forum === false) ? true : (int) $forum_id;
+}
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 51284af233..86439ea03f 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -250,13 +250,25 @@ class p_master
// Function for building 'url_extra'
$short_name = $this->get_short_name($row['module_basename']);
- $url_func = '_module_' . $short_name . '_url';
+ $url_func = 'phpbb_module_' . $short_name . '_url';
+ if (!function_exists($url_func))
+ {
+ $url_func = '_module_' . $short_name . '_url';
+ }
// Function for building the language name
- $lang_func = '_module_' . $short_name . '_lang';
+ $lang_func = 'phpbb_module_' . $short_name . '_lang';
+ if (!function_exists($lang_func))
+ {
+ $lang_func = '_module_' . $short_name . '_lang';
+ }
// Custom function for calling parameters on module init (for example assigning template variables)
- $custom_func = '_module_' . $short_name;
+ $custom_func = 'phpbb_module_' . $short_name;
+ if (!function_exists($custom_func))
+ {
+ $custom_func = '_module_' . $short_name;
+ }
$names[$row['module_basename'] . '_' . $row['module_mode']][] = true;
@@ -456,7 +468,9 @@ class p_master
);
$is_auth = false;
+ // @codingStandardsIgnoreStart
eval('$is_auth = (int) (' . $module_auth . ');');
+ // @codingStandardsIgnoreEnd
return $is_auth;
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e157a2bd0f..0b37af0ee0 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1657,7 +1657,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if ($user->data['user_id'] != $poster_id)
{
$log_subject = ($subject) ? $subject : $data['topic_title'];
- add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']);
+ add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST'], $data['post_edit_reason']);
}
if (!isset($sql_data[POSTS_TABLE]['sql']))
@@ -2485,3 +2485,137 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
return $url;
}
+
+/**
+* Show upload popup (progress bar)
+*/
+function phpbb_upload_popup($forum_style = 0)
+{
+ global $template, $user;
+
+ ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting');
+
+ page_header($user->lang['PROGRESS_BAR']);
+
+ $template->set_filenames(array(
+ 'popup' => 'posting_progress_bar.html')
+ );
+
+ $template->assign_vars(array(
+ 'PROGRESS_BAR' => $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS']))
+ );
+
+ $template->display('popup');
+
+ garbage_collection();
+ exit_handler();
+}
+
+/**
+* Do the various checks required for removing posts as well as removing it
+*/
+function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $soft_delete_reason = '')
+{
+ global $user, $auth, $config, $request;
+ global $phpbb_root_path, $phpEx;
+
+ $perm_check = ($is_soft) ? 'softdelete' : 'delete';
+
+ // If moderator removing post or user itself removing post, present a confirmation screen
+ if ($auth->acl_get("m_$perm_check", $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get("f_$perm_check", $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
+ {
+ $s_hidden_fields = array(
+ 'p' => $post_id,
+ 'f' => $forum_id,
+ 'mode' => ($is_soft) ? 'soft_delete' : 'delete',
+ );
+
+ if (confirm_box(true))
+ {
+ $data = array(
+ 'topic_first_post_id' => $post_data['topic_first_post_id'],
+ 'topic_last_post_id' => $post_data['topic_last_post_id'],
+ 'topic_posts_approved' => $post_data['topic_posts_approved'],
+ 'topic_posts_unapproved' => $post_data['topic_posts_unapproved'],
+ 'topic_posts_softdeleted' => $post_data['topic_posts_softdeleted'],
+ 'topic_visibility' => $post_data['topic_visibility'],
+ 'topic_type' => $post_data['topic_type'],
+ 'post_visibility' => $post_data['post_visibility'],
+ 'post_reported' => $post_data['post_reported'],
+ 'post_time' => $post_data['post_time'],
+ 'poster_id' => $post_data['poster_id'],
+ 'post_postcount' => $post_data['post_postcount'],
+ );
+
+ $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $soft_delete_reason);
+ $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
+
+ if ($next_post_id === false)
+ {
+ add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username, $soft_delete_reason);
+
+ $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
+ $message = $user->lang['POST_DELETED'];
+ }
+ else
+ {
+ add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username, $soft_delete_reason);
+
+ $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
+ $message = $user->lang['POST_DELETED'];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $meta_info . '">', '</a>');
+ }
+ }
+
+ meta_refresh(3, $meta_info);
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ }
+ trigger_error($message);
+ }
+ else
+ {
+ global $user, $template, $request;
+
+ $can_delete = $auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id));
+ $can_softdelete = $auth->acl_get('m_softdelete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_softdelete', $forum_id));
+
+ $template->assign_vars(array(
+ 'S_SOFTDELETED' => $post_data['post_visibility'] == ITEM_DELETED,
+ 'S_CHECKED_PERMANENT' => $request->is_set_post('delete_permanent') ? ' checked="checked"' : '',
+ 'S_ALLOWED_DELETE' => $can_delete,
+ 'S_ALLOWED_SOFTDELETE' => $can_softdelete,
+ ));
+
+ $l_confirm = 'DELETE_POST';
+ if ($post_data['post_visibility'] == ITEM_DELETED)
+ {
+ $l_confirm .= '_PERMANENTLY';
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+ else if (!$can_softdelete)
+ {
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+
+ confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
+ }
+ }
+
+ // If we are here the user is not able to delete - present the correct error message
+ if ($post_data['poster_id'] != $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id))
+ {
+ trigger_error('DELETE_OWN_POSTS');
+ }
+
+ if ($post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && $post_id != $post_data['topic_last_post_id'])
+ {
+ trigger_error('CANNOT_DELETE_REPLIED');
+ }
+
+ trigger_error('USER_CANNOT_DELETE');
+}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 92655cd035..e60311f8ab 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -988,7 +988,7 @@ function handle_mark_actions($user_id, $mark_action)
*/
function delete_pm($user_id, $msg_ids, $folder_id)
{
- global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
+ global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
$user_id = (int) $user_id;
$folder_id = (int) $folder_id;
@@ -1012,6 +1012,18 @@ function delete_pm($user_id, $msg_ids, $folder_id)
return false;
}
+ /**
+ * Get all info for PM(s) before they are deleted
+ *
+ * @event core.delete_pm_before
+ * @var int user_id ID of the user requested the message delete
+ * @var array msg_ids array of all messages to be deleted
+ * @var int folder_id ID of the user folder where the messages are stored
+ * @since 3.1.0-b5
+ */
+ $vars = array('user_id', 'msg_ids', 'folder_id');
+ extract($phpbb_dispatcher->trigger_event('core.delete_pm_before', compact($vars)));
+
// Get PM Information for later deleting
$sql = 'SELECT msg_id, pm_unread, pm_new
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -1906,6 +1918,19 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
$phpbb_notifications->add_notifications('pm', $pm_data);
}
+ /**
+ * Get PM message ID after submission to DB
+ *
+ * @event core.submit_pm_after
+ * @var string mode PM Post mode - post|reply|quote|quotepost|forward|edit
+ * @var string subject Subject of the private message
+ * @var array data The whole row data of the PM.
+ * @var array pm_data The data sent to notification class
+ * @since 3.1.0-b5
+ */
+ $vars = array('mode', 'subject', 'data', 'pm_data');
+ extract($phpbb_dispatcher->trigger_event('core.submit_pm_after', compact($vars)));
+
return $data['msg_id'];
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 94eef89c05..0847c3a550 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -485,6 +485,9 @@ class fileupload
var $max_height = 0;
var $error_prefix = '';
+ /** @var int Timeout for remote upload */
+ var $upload_timeout = 6;
+
/**
* Init file upload class.
*
@@ -828,13 +831,28 @@ class fileupload
fputs($fsock, "HOST: " . $host . "\r\n");
fputs($fsock, "Connection: close\r\n\r\n");
+ // Set a proper timeout for the socket
+ socket_set_timeout($fsock, $this->upload_timeout);
+
$get_info = false;
$data = '';
- while (!@feof($fsock))
+ $length = false;
+ $timer_stop = time() + $this->upload_timeout;
+
+ while ((!$length || $filesize < $length) && !@feof($fsock))
{
if ($get_info)
{
- $block = @fread($fsock, 1024);
+ if ($length)
+ {
+ // Don't attempt to read past end of file if server indicated length
+ $block = @fread($fsock, min($length - $filesize, 1024));
+ }
+ else
+ {
+ $block = @fread($fsock, 1024);
+ }
+
$filesize += strlen($block);
if ($remote_max_filesize && $filesize > $remote_max_filesize)
@@ -880,6 +898,15 @@ class fileupload
}
}
}
+
+ $stream_meta_data = stream_get_meta_data($fsock);
+
+ // Cancel upload if we exceed timeout
+ if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
+ {
+ $file = new fileerror($user->lang[$this->error_prefix . 'REMOTE_UPLOAD_TIMEOUT']);
+ return $file;
+ }
}
@fclose($fsock);
@@ -1051,7 +1078,7 @@ class fileupload
*/
static public function image_types()
{
- return array(
+ $result = array(
IMAGETYPE_GIF => array('gif'),
IMAGETYPE_JPEG => array('jpg', 'jpeg'),
IMAGETYPE_PNG => array('png'),
@@ -1064,10 +1091,16 @@ class fileupload
IMAGETYPE_JP2 => array('jpg', 'jpeg'),
IMAGETYPE_JPX => array('jpg', 'jpeg'),
IMAGETYPE_JB2 => array('jpg', 'jpeg'),
- IMAGETYPE_SWC => array('swc'),
IMAGETYPE_IFF => array('iff'),
IMAGETYPE_WBMP => array('wbmp'),
IMAGETYPE_XBM => array('xbm'),
);
+
+ if (defined('IMAGETYPE_SWC'))
+ {
+ $result[IMAGETYPE_SWC] = array('swc');
+ }
+
+ return $result;
}
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 3dcb32350e..d11193e4b0 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -184,7 +184,6 @@ function user_add($user_row, $cp_data = false)
'username' => $user_row['username'],
'username_clean' => $username_clean,
'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '',
- 'user_pass_convert' => 0,
'user_email' => strtolower($user_row['user_email']),
'user_email_hash' => phpbb_email_hash($user_row['user_email']),
'group_id' => $user_row['group_id'],
@@ -262,10 +261,13 @@ function user_add($user_row, $cp_data = false)
* Use this event to modify the values to be inserted when a user is added
*
* @event core.user_add_modify_data
+ * @var array user_row Array of user details submited to user_add
+ * @var array cp_data Array of Custom profile fields submited to user_add
* @var array sql_ary Array of data to be inserted when a user is added
* @since 3.1.0-a1
+ * @change 3.1.0-b5
*/
- $vars = array('sql_ary');
+ $vars = array('user_row', 'cp_data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.user_add_modify_data', compact($vars)));
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
@@ -345,6 +347,18 @@ function user_add($user_row, $cp_data = false)
set_config('newest_user_colour', $row['group_colour'], true);
}
+ /**
+ * Event that returns user id, user detals and user CPF of newly registared user
+ *
+ * @event core.user_add_after
+ * @var int user_id User id of newly registared user
+ * @var array user_row Array of user details submited to user_add
+ * @var array cp_data Array of Custom profile fields submited to user_add
+ * @since 3.1.0-b5
+ */
+ $vars = array('user_id', 'user_row', 'cp_data');
+ extract($phpbb_dispatcher->trigger_event('core.user_add_after', compact($vars)));
+
return $user_id;
}
@@ -756,7 +770,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
else
{
$ban_other = explode('-', $ban_len_other);
- if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) &&
+ if (sizeof($ban_other) == 3 && ((int) $ban_other[0] < 9999) &&
(strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2))
{
$ban_end = max($current_time, $user->create_datetime()
@@ -1746,25 +1760,21 @@ function validate_password($password)
}
/**
-* Check to see if email address is banned or already present in the DB
+* Check to see if email address is a valid address and contains a MX record
*
* @param string $email The email to check
-* @param string $allowed_email An allowed email, default being $user->data['user_email']
*
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/
-function validate_email($email, $allowed_email = false)
+function phpbb_validate_email($email, $config = null)
{
- global $config, $db, $user;
-
- $email = strtolower($email);
- $allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email);
-
- if ($allowed_email == $email)
+ if ($config === null)
{
- return false;
+ global $config;
}
+ $email = strtolower($email);
+
if (!preg_match('/^' . get_preg_expression('email') . '$/i', $email))
{
return 'EMAIL_INVALID';
@@ -1782,6 +1792,35 @@ function validate_email($email, $allowed_email = false)
}
}
+ return false;
+}
+
+/**
+* Check to see if email address is banned or already present in the DB
+*
+* @param string $email The email to check
+* @param string $allowed_email An allowed email, default being $user->data['user_email']
+*
+* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_user_email($email, $allowed_email = false)
+{
+ global $config, $db, $user;
+
+ $email = strtolower($email);
+ $allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email);
+
+ if ($allowed_email == $email)
+ {
+ return false;
+ }
+
+ $validate_email = phpbb_validate_email($email, $config);
+ if ($validate_email)
+ {
+ return $validate_email;
+ }
+
if (($ban_reason = $user->check_ban(false, false, $email, true)) !== false)
{
return ($ban_reason === true) ? 'EMAIL_BANNED' : $ban_reason;
@@ -2062,7 +2101,7 @@ function avatar_delete($mode, $row, $clean_db = false)
// Check if the users avatar is actually *not* a group avatar
if ($mode == 'user')
{
- if (strpos($row['user_avatar'], 'g') === 0 || (((int)$row['user_avatar'] !== 0) && ((int)$row['user_avatar'] !== (int)$row['user_id'])))
+ if (strpos($row['user_avatar'], 'g') === 0 || (((int) $row['user_avatar'] !== 0) && ((int) $row['user_avatar'] !== (int) $row['user_id'])))
{
return false;
}
@@ -2395,7 +2434,7 @@ function group_correct_avatar($group_id, $old_entry)
{
global $config, $db, $phpbb_root_path;
- $group_id = (int)$group_id;
+ $group_id = (int) $group_id;
$ext = substr(strrchr($old_entry, '.'), 1);
$old_filename = get_avatar_filename($old_entry);
$new_filename = $config['avatar_salt'] . "_g$group_id.$ext";
@@ -2820,7 +2859,7 @@ function remove_default_avatar($group_id, $user_ids)
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . '
- WHERE group_id = ' . (int)$group_id;
+ WHERE group_id = ' . (int) $group_id;
$result = $db->sql_query($sql);
if (!$row = $db->sql_fetchrow($result))
{
@@ -2861,7 +2900,7 @@ function remove_default_rank($group_id, $user_ids)
$sql = 'SELECT *
FROM ' . GROUPS_TABLE . '
- WHERE group_id = ' . (int)$group_id;
+ WHERE group_id = ' . (int) $group_id;
$result = $db->sql_query($sql);
if (!$row = $db->sql_fetchrow($result))
{
@@ -2872,9 +2911,9 @@ function remove_default_rank($group_id, $user_ids)
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_rank = 0
- WHERE group_id = ' . (int)$group_id . '
+ WHERE group_id = ' . (int) $group_id . '
AND user_rank <> 0
- AND user_rank = ' . (int)$row['group_rank'] . '
+ AND user_rank = ' . (int) $row['group_rank'] . '
AND ' . $db->sql_in_set('user_id', $user_ids);
$db->sql_query($sql);
}
@@ -3506,3 +3545,23 @@ function phpbb_get_banned_user_ids($user_ids = array(), $ban_end = true)
return $banned_ids_list;
}
+
+/**
+* Function for assigning a template var if the zebra module got included
+*/
+function phpbb_module_zebra($mode, &$module_row)
+{
+ global $template;
+
+ $template->assign_var('S_ZEBRA_ENABLED', true);
+
+ if ($mode == 'friends')
+ {
+ $template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
+ }
+
+ if ($mode == 'foes')
+ {
+ $template->assign_var('S_ZEBRA_FOES_ENABLED', true);
+ }
+}
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
index d9ee53fe30..e6fac3b80c 100644
--- a/phpBB/includes/mcp/mcp_ban.php
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -185,7 +185,7 @@ class mcp_ban
}
else if ($post_id)
{
- $post_info = get_post_data($post_id, 'm_ban');
+ $post_info = phpbb_get_post_data($post_id, 'm_ban');
if (sizeof($post_info) && !empty($post_info[$post_id]))
{
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 8d2d70bd3b..0c6acaa908 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -102,7 +102,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
+ phpbb_mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -328,7 +328,7 @@ function mcp_resync_topics($topic_ids)
trigger_error('NO_TOPIC_SELECTED');
}
- if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
+ if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
return;
}
@@ -378,14 +378,22 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
return;
}
- $topic_data = get_topic_data(array($to_topic_id), 'm_merge');
+ $sync_topics = array_merge($topic_ids, array($to_topic_id));
- if (!sizeof($topic_data))
+ $topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
+
+ if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
return;
}
+ $sync_forums = array();
+ foreach ($topic_data as $data)
+ {
+ $sync_forums[$data['forum_id']] = $data['forum_id'];
+ }
+
$topic_data = $topic_data[$to_topic_id];
$post_id_list = request_var('post_id_list', array(0));
@@ -412,7 +420,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
return;
}
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
{
return;
}
@@ -436,7 +444,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
{
$to_forum_id = $topic_data['forum_id'];
- move_posts($post_id_list, $to_topic_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']);
// Message and return links
@@ -453,6 +461,12 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
// Update the bookmarks table.
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_ids, $to_topic_id);
+ // Re-sync the topics and forums because the auto-sync was deactivated in the call of move_posts()
+ sync('topic_reported', 'topic_id', $sync_topics);
+ sync('topic_attachment', 'topic_id', $sync_topics);
+ sync('topic', 'topic_id', $sync_topics, true);
+ sync('forum', 'forum_id', $sync_forums, true, true);
+
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index c55f56ae0c..2945e1ec8a 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -36,7 +36,7 @@ class mcp_logs
function main($id, $mode)
{
global $auth, $db, $user, $template;
- global $config, $phpbb_root_path, $phpEx, $phpbb_container;
+ global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_log;
$user->add_lang('acp/common');
@@ -114,27 +114,33 @@ class mcp_logs
{
if ($deletemark && sizeof($marked))
{
- $sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE log_type = ' . LOG_MOD . '
- AND ' . $db->sql_in_set('forum_id', $forum_list) . '
- AND ' . $db->sql_in_set('log_id', $marked);
- $db->sql_query($sql);
+ $conditions = array(
+ 'forum_id' => $forum_list,
+ 'log_id' => array('IN' => $marked),
+ );
- add_log('admin', 'LOG_CLEAR_MOD');
+ $phpbb_log->delete('mod', $conditions);
}
else if ($deleteall)
{
- $sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE log_type = ' . LOG_MOD . '
- AND ' . $db->sql_in_set('forum_id', $forum_list);
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+
+ $conditions = array(
+ 'forum_id' => $forum_list,
+ 'keywords' => $keywords,
+ );
+
+ if ($sort_days)
+ {
+ $conditions['log_time'] = array('>=', time() - ($sort_days * 86400));
+ }
if ($mode == 'topic_logs')
{
- $sql .= ' AND topic_id = ' . $topic_id;
+ $conditions['topic_logs'] = $topic_id;
}
- $db->sql_query($sql);
- add_log('admin', 'LOG_CLEAR_MOD');
+ $phpbb_log->delete('mod', $conditions);
}
}
else
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index c504da0aeb..9f6125f256 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -123,7 +123,7 @@ class mcp_main
trigger_error('NO_TOPIC_SELECTED');
}
- mcp_delete_topic($topic_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
+ mcp_delete_topic($topic_ids, $soft_delete, $request->variable('delete_reason', '', true));
break;
case 'delete_post':
@@ -140,7 +140,7 @@ class mcp_main
trigger_error('NO_POST_SELECTED');
}
- mcp_delete_post($post_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
+ mcp_delete_post($post_ids, $soft_delete, $request->variable('delete_reason', '', true));
break;
case 'restore_topic':
@@ -187,7 +187,7 @@ class mcp_main
$forum_id = request_var('f', 0);
- $forum_info = get_forum_data($forum_id, 'm_', true);
+ $forum_info = phpbb_get_forum_data($forum_id, 'm_', true);
if (!sizeof($forum_info))
{
@@ -252,7 +252,7 @@ function lock_unlock($action, $ids)
$orig_ids = $ids;
- if (!check_ids($ids, $table, $sql_id, array('m_lock')))
+ if (!phpbb_check_ids($ids, $table, $sql_id, array('m_lock')))
{
// Make sure that for f_user_lock only the lock action is triggered.
if ($action != 'lock')
@@ -262,7 +262,7 @@ function lock_unlock($action, $ids)
$ids = $orig_ids;
- if (!check_ids($ids, $table, $sql_id, array('f_user_lock')))
+ if (!phpbb_check_ids($ids, $table, $sql_id, array('f_user_lock')))
{
return;
}
@@ -286,7 +286,7 @@ function lock_unlock($action, $ids)
WHERE ' . $db->sql_in_set($sql_id, $ids);
$db->sql_query($sql);
- $data = ($action == 'lock' || $action == 'unlock') ? get_topic_data($ids) : get_post_data($ids);
+ $data = ($action == 'lock' || $action == 'unlock') ? phpbb_get_topic_data($ids) : phpbb_get_post_data($ids);
foreach ($data as $id => $row)
{
@@ -346,7 +346,7 @@ function change_topic_type($action, $topic_ids)
break;
}
- $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
+ $forum_id = phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
if ($forum_id === false)
{
@@ -388,7 +388,7 @@ function change_topic_type($action, $topic_ids)
if (sizeof($topic_ids))
{
- $data = get_topic_data($topic_ids);
+ $data = phpbb_get_topic_data($topic_ids);
foreach ($data as $topic_id => $row)
{
@@ -422,7 +422,7 @@ function mcp_move_topic($topic_ids)
global $phpEx, $phpbb_root_path;
// Here we limit the operation to one forum only
- $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
+ $forum_id = phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
if ($forum_id === false)
{
@@ -442,7 +442,7 @@ function mcp_move_topic($topic_ids)
if ($to_forum_id)
{
- $forum_data = get_forum_data($to_forum_id, 'f_post');
+ $forum_data = phpbb_get_forum_data($to_forum_id, 'f_post');
if (!sizeof($forum_data))
{
@@ -479,7 +479,7 @@ function mcp_move_topic($topic_ids)
if (confirm_box(true))
{
- $topic_data = get_topic_data($topic_ids);
+ $topic_data = phpbb_get_topic_data($topic_ids);
$leave_shadow = (isset($_POST['move_leave_shadow'])) ? true : false;
$forum_sync_data = array();
@@ -496,11 +496,11 @@ function mcp_move_topic($topic_ids)
{
$topics_moved++;
}
- elseif ($topic_info['topic_visibility'] == ITEM_UNAPPROVED || $topic_info['topic_visibility'] == ITEM_REAPPROVE)
+ else if ($topic_info['topic_visibility'] == ITEM_UNAPPROVED || $topic_info['topic_visibility'] == ITEM_REAPPROVE)
{
$topics_moved_unapproved++;
}
- elseif ($topic_info['topic_visibility'] == ITEM_DELETED)
+ else if ($topic_info['topic_visibility'] == ITEM_DELETED)
{
$topics_moved_softdeleted++;
}
@@ -567,7 +567,7 @@ function mcp_move_topic($topic_ids)
'topic_last_poster_id' => (int) $row['topic_last_poster_id'],
'topic_last_poster_colour'=>(string) $row['topic_last_poster_colour'],
'topic_last_poster_name'=> (string) $row['topic_last_poster_name'],
- 'topic_last_post_subject'=> (string) $row['topic_last_post_subject'],
+ 'topic_last_post_subject'=> (string) $row['topic_last_post_subject'],
'topic_last_post_time' => (int) $row['topic_last_post_time'],
'topic_last_view_time' => (int) $row['topic_last_view_time'],
'topic_moved_id' => (int) $row['topic_id'],
@@ -677,7 +677,7 @@ function mcp_restore_topic($topic_ids)
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
+ if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
return;
}
@@ -697,7 +697,7 @@ function mcp_restore_topic($topic_ids)
{
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_RESTORED_SUCCESS' : 'TOPICS_RESTORED_SUCCESS';
- $data = get_topic_data($topic_ids);
+ $data = phpbb_get_topic_data($topic_ids);
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
foreach ($data as $topic_id => $row)
@@ -750,7 +750,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
+ if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
{
return;
}
@@ -770,7 +770,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
{
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_DELETED_SUCCESS' : 'TOPICS_DELETED_SUCCESS';
- $data = get_topic_data($topic_ids);
+ $data = phpbb_get_topic_data($topic_ids);
foreach ($data as $topic_id => $row)
{
@@ -787,12 +787,12 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
$return = $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), $soft_delete_reason);
if (!empty($return))
{
- add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name'], $soft_delete_reason);
}
}
else
{
- add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name'], $soft_delete_reason);
}
}
}
@@ -826,7 +826,6 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
'S_TOPIC_MODE' => true,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
- 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
));
$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
@@ -879,7 +878,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
+ if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
{
return;
}
@@ -897,7 +896,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
if (confirm_box(true) && $is_soft)
{
- $post_info = get_post_data($post_ids);
+ $post_info = phpbb_get_post_data($post_ids);
$topic_info = $approve_log = array();
@@ -947,7 +946,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
foreach ($approve_log as $row)
{
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
- add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username);
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username, $soft_delete_reason);
}
$topic_id = $request->variable('t', 0);
@@ -985,12 +984,12 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
$affected_topics = sizeof($topic_id_list);
$db->sql_freeresult($result);
- $post_data = get_post_data($post_ids);
+ $post_data = phpbb_get_post_data($post_ids);
foreach ($post_data as $id => $row)
{
$post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
- add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username);
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username, $soft_delete_reason);
}
// Now delete the posts, topics and forums are automatically resync'ed
@@ -1063,7 +1062,6 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
'S_SOFTDELETED' => $only_softdeleted,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
- 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
));
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
@@ -1107,7 +1105,7 @@ function mcp_fork_topic($topic_ids)
global $auth, $user, $db, $template, $config;
global $phpEx, $phpbb_root_path;
- if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
+ if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
return;
}
@@ -1126,7 +1124,7 @@ function mcp_fork_topic($topic_ids)
if ($to_forum_id)
{
- $forum_data = get_forum_data($to_forum_id, 'f_post');
+ $forum_data = phpbb_get_forum_data($to_forum_id, 'f_post');
if (!sizeof($topic_ids))
{
@@ -1163,7 +1161,7 @@ function mcp_fork_topic($topic_ids)
if (confirm_box(true))
{
- $topic_data = get_topic_data($topic_ids, 'f_post');
+ $topic_data = phpbb_get_topic_data($topic_ids, 'f_post');
$total_topics = $total_topics_unapproved = $total_topics_softdeleted = 0;
$total_posts = $total_posts_unapproved = $total_posts_softdeleted = 0;
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index 7e39c157c1..03e4ed4722 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -100,7 +100,7 @@ class mcp_pm_reports
$pm_id = $report['pm_id'];
$report_id = $report['report_id'];
- $pm_info = get_pm_data(array($pm_id));
+ $pm_info = phpbb_get_pm_data(array($pm_id));
if (!sizeof($pm_info))
{
@@ -216,7 +216,7 @@ class mcp_pm_reports
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total);
+ phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total);
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index d2cc5d285e..e81abd0c8e 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -33,7 +33,7 @@ function mcp_post_details($id, $mode, $action)
$start = request_var('start', 0);
// Get post data
- $post_info = get_post_data(array($post_id), false, true);
+ $post_info = phpbb_get_post_data(array($post_id), false, true);
add_form_key('mcp_post_details');
@@ -43,7 +43,7 @@ function mcp_post_details($id, $mode, $action)
}
$post_info = $post_info[$post_id];
- $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
+ $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
switch ($action)
{
@@ -508,7 +508,7 @@ function change_poster(&$post_info, $userdata)
$to_username = $userdata['username'];
// Renew post info
- $post_info = get_post_data(array($post_id), false, true);
+ $post_info = phpbb_get_post_data(array($post_id), false, true);
if (!sizeof($post_info))
{
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 5dd39dbf0f..37ce3c6fc3 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -159,7 +159,7 @@ class mcp_queue
if ($topic_id)
{
- $topic_info = get_topic_data(array($topic_id), 'm_approve');
+ $topic_info = phpbb_get_topic_data(array($topic_id), 'm_approve');
if (isset($topic_info[$topic_id]['topic_first_post_id']))
{
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
@@ -174,7 +174,7 @@ class mcp_queue
$phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
- $post_info = get_post_data(array($post_id), 'm_approve', true);
+ $post_info = phpbb_get_post_data(array($post_id), 'm_approve', true);
if (!sizeof($post_info))
{
@@ -343,7 +343,7 @@ class mcp_queue
if ($topic_id)
{
- $topic_info = get_topic_data(array($topic_id));
+ $topic_info = phpbb_get_topic_data(array($topic_id));
if (!sizeof($topic_info))
{
@@ -389,7 +389,7 @@ class mcp_queue
}
else
{
- $forum_info = get_forum_data(array($forum_id), $m_perm);
+ $forum_info = phpbb_get_forum_data(array($forum_id), $m_perm);
if (!sizeof($forum_info))
{
@@ -409,7 +409,7 @@ class mcp_queue
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+ phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -572,7 +572,7 @@ class mcp_queue
global $db, $template, $user, $config, $request, $phpbb_container;
global $phpEx, $phpbb_root_path;
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}
@@ -591,7 +591,7 @@ class mcp_queue
'redirect' => $redirect,
));
- $post_info = get_post_data($post_id_list, 'm_approve');
+ $post_info = phpbb_get_post_data($post_id_list, 'm_approve');
if (confirm_box(true))
{
@@ -655,7 +655,7 @@ class mcp_queue
if (!$post_data['topic_posts_approved'])
{
$phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
-
+
if ($post_data['post_visibility'] == ITEM_UNAPPROVED)
{
$phpbb_notifications->add_notifications(array('topic'), $post_data);
@@ -795,7 +795,7 @@ class mcp_queue
global $db, $template, $user, $config;
global $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
+ if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}
@@ -813,7 +813,7 @@ class mcp_queue
'redirect' => $redirect,
));
- $topic_info = get_topic_data($topic_id_list, 'm_approve');
+ $topic_info = phpbb_get_topic_data($topic_id_list, 'm_approve');
if (confirm_box(true))
{
@@ -964,7 +964,7 @@ class mcp_queue
global $db, $template, $user, $config, $phpbb_container;
global $phpEx, $phpbb_root_path, $request;
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}
@@ -1016,7 +1016,7 @@ class mcp_queue
}
}
- $post_info = get_post_data($post_id_list, 'm_approve');
+ $post_info = phpbb_get_post_data($post_id_list, 'm_approve');
$is_disapproving = false;
foreach ($post_info as $post_id => $post_data)
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index f045fd018f..a7d8bf18d6 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -106,7 +106,7 @@ class mcp_reports
$parse_post_flags += $report['reported_post_enable_smilies'] ? OPTION_FLAG_SMILIES : 0;
$parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
- $post_info = get_post_data(array($post_id), 'm_report', true);
+ $post_info = phpbb_get_post_data(array($post_id), 'm_report', true);
if (!sizeof($post_info))
{
@@ -269,7 +269,7 @@ class mcp_reports
if ($topic_id)
{
- $topic_info = get_topic_data(array($topic_id));
+ $topic_info = phpbb_get_topic_data(array($topic_id));
if (!sizeof($topic_info))
{
@@ -312,7 +312,7 @@ class mcp_reports
}
else
{
- $forum_info = get_forum_data(array($forum_id), 'm_report');
+ $forum_info = phpbb_get_forum_data(array($forum_id), 'm_report');
if (!sizeof($forum_info))
{
@@ -338,7 +338,7 @@ class mcp_reports
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+ phpbb_mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -479,7 +479,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
}
else
{
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
{
trigger_error('NOT_AUTHORISED');
}
@@ -489,7 +489,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
{
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&amp;mode=reports');
}
- elseif ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
+ else if ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
{
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&amp;mode=pm_reports');
}
@@ -515,7 +515,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
if (confirm_box(true))
{
- $post_info = ($pm) ? get_pm_data($post_id_list) : get_post_data($post_id_list, 'm_report');
+ $post_info = ($pm) ? phpbb_get_pm_data($post_id_list) : phpbb_get_post_data($post_id_list, 'm_report');
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
FROM " . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 51802f1e4d..1698b080c9 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -27,13 +27,13 @@ function mcp_topic_view($id, $mode, $action)
global $phpEx, $phpbb_root_path, $config;
global $template, $db, $user, $auth, $cache, $phpbb_container;
- $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
+ $url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
$user->add_lang('viewtopic');
$pagination = $phpbb_container->get('pagination');
$topic_id = request_var('t', 0);
- $topic_info = get_topic_data(array($topic_id), false, true);
+ $topic_info = phpbb_get_topic_data(array($topic_id), false, true);
if (!sizeof($topic_info))
{
@@ -114,7 +114,7 @@ function mcp_topic_view($id, $mode, $action)
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
+ phpbb_mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
@@ -278,7 +278,7 @@ function mcp_topic_view($id, $mode, $action)
// Has the user selected a topic for merge?
if ($to_topic_id)
{
- $to_topic_info = get_topic_data(array($to_topic_id), 'm_merge');
+ $to_topic_info = phpbb_get_topic_data(array($to_topic_id), 'm_merge');
if (!sizeof($to_topic_info))
{
@@ -368,13 +368,13 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
return;
}
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
{
return;
}
$post_id = $post_id_list[0];
- $post_info = get_post_data(array($post_id));
+ $post_info = phpbb_get_post_data(array($post_id));
if (!sizeof($post_info))
{
@@ -398,7 +398,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
return;
}
- $forum_info = get_forum_data(array($to_forum_id), 'f_post');
+ $forum_info = phpbb_get_forum_data(array($to_forum_id), 'f_post');
if (!sizeof($forum_info))
{
@@ -438,7 +438,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
+ phpbb_mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -505,7 +505,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$to_topic_id = $db->sql_nextid();
move_posts($post_id_list, $to_topic_id);
- $topic_info = get_topic_data(array($topic_id));
+ $topic_info = phpbb_get_topic_data(array($topic_id));
$topic_info = $topic_info[$topic_id];
add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject);
@@ -592,14 +592,22 @@ function merge_posts($topic_id, $to_topic_id)
return;
}
- $topic_data = get_topic_data(array($to_topic_id), 'm_merge');
+ $sync_topics = array($topic_id, $to_topic_id);
- if (!sizeof($topic_data))
+ $topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
+
+ if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
{
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
return;
}
+ $sync_forums = array();
+ foreach ($topic_data as $data)
+ {
+ $sync_forums[$data['forum_id']] = $data['forum_id'];
+ }
+
$topic_data = $topic_data[$to_topic_id];
$post_id_list = request_var('post_id_list', array(0));
@@ -611,7 +619,7 @@ function merge_posts($topic_id, $to_topic_id)
return;
}
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
+ if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
{
return;
}
@@ -634,7 +642,7 @@ function merge_posts($topic_id, $to_topic_id)
{
$to_forum_id = $topic_data['forum_id'];
- move_posts($post_id_list, $to_topic_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']);
// Message and return links
@@ -642,7 +650,7 @@ function merge_posts($topic_id, $to_topic_id)
// Does the original topic still exist? If yes, link back to it
$sql = 'SELECT forum_id
- FROM ' . TOPICS_TABLE . '
+ FROM ' . POSTS_TABLE . '
WHERE topic_id = ' . $topic_id;
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
@@ -666,6 +674,12 @@ function merge_posts($topic_id, $to_topic_id)
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id);
}
+ // Re-sync the topics and forums because the auto-sync was deactivated in the call of move_posts()
+ sync('topic_reported', 'topic_id', $sync_topics);
+ sync('topic_attachment', 'topic_id', $sync_topics);
+ sync('topic', 'topic_id', $sync_topics, true);
+ sync('forum', 'forum_id', $sync_forums, true, true);
+
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 6d3907880e..8d926ec70a 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1194,6 +1194,15 @@ class parse_message extends bbcode_firstpass
}
}
+ // Check for out-of-bounds characters that are currently
+ // not supported by utf8_bin in MySQL
+ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $this->message, $matches))
+ {
+ $character_list = implode('<br />', $matches[0]);
+ $this->warn_msg[] = $user->lang('UNSUPPORTED_CHARACTERS_MESSAGE', $character_list);
+ return $update_this_message ? $this->warn_msg : $return_message;
+ }
+
// Check for "empty" message. We do not check here for maximum length, because bbcode, smilies, etc. can add to the length.
// The maximum length check happened before any parsings.
if ($mode === 'post' && utf8_clean_string($this->message) === '')
@@ -1351,12 +1360,6 @@ class parse_message extends bbcode_firstpass
ORDER BY LEN(code) DESC';
break;
- case 'firebird':
- $sql = 'SELECT *
- FROM ' . SMILIES_TABLE . '
- ORDER BY CHAR_LENGTH(code) DESC';
- break;
-
// LENGTH supported by MySQL, IBM DB2, Oracle and Access for sure...
default:
$sql = 'SELECT *
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index 65a193193a..50fcd11bee 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -177,7 +177,11 @@ else
{
if (!file_exists($phpbb_root_path . 'vendor/autoload.php'))
{
- trigger_error('You have not set up composer dependencies. See http://getcomposer.org/.', E_USER_ERROR);
+ trigger_error(
+ 'Composer dependencies have not been set up yet, run ' .
+ "'php ../composer.phar install' from the phpBB directory to do so.",
+ E_USER_ERROR
+ );
}
require($phpbb_root_path . 'vendor/autoload.php');
}
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 06326e57e6..53dec89aad 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -78,7 +78,6 @@ class ucp_activate
'user_actkey' => '',
'user_password' => $user_row['user_newpasswd'],
'user_newpasswd' => '',
- 'user_pass_convert' => 0,
'user_login_attempts' => 0,
);
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 53c69ceeb7..f42200d249 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -204,6 +204,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']),
'AUTHOR_POSTS' => (int) $user_info['user_posts'],
+ 'CONTACT_USER' => $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])),
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),
'S_ONLINE' => (!$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false),
@@ -283,7 +284,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$contact_fields = array(
array(
'ID' => 'pm',
- 'NAME' => $user->lang['PRIVATE_MESSAGE'],
+ 'NAME' => $user->lang['SEND_PRIVATE_MESSAGE'],
'U_CONTACT' => $u_pm,
),
array(
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index c7ed12f4ee..5ba5f1e830 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -66,7 +66,7 @@ class ucp_profile
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
- array('email')),
+ array('user_email')),
);
if ($auth->acl_get('u_chgname') && $config['allow_namechange'])
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index cdd5532429..97934fc32d 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -211,7 +211,7 @@ class ucp_register
'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
- array('email')),
+ array('user_email')),
'tz' => array('timezone'),
'lang' => array('language_iso_name'),
));
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 958291fa06..e60a40a195 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -534,7 +534,7 @@ else
return '';
}
- $lx = (int)((-$length) / 65535);
+ $lx = (int) ((-$length) / 65535);
$ly = (-$length) % 65535;
// negative length requires ... capture everything
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 0c2d4ebf74..6b6eabe57d 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -37,7 +37,7 @@ $dbms = phpbb_convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.1.0-b3',
+ 'phpbb_version' => '3.1.0-RC1',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index ff20154d03..84e9e8c462 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -223,7 +223,7 @@ function phpbb_insert_forums()
'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'),
'forum_type' => FORUM_POST,
'forum_status' => is_item_locked($row['forum_status']),
- 'enable_prune' => ($prune_enabled) ? (int)$row['prune_enable'] : 0,
+ 'enable_prune' => ($prune_enabled) ? (int) $row['prune_enable'] : 0,
'prune_next' => (int) null_to_zero($row['prune_next']),
'prune_days' => (int) null_to_zero($row['prune_days']),
'prune_viewed' => 0,
@@ -1804,13 +1804,6 @@ function phpbb_create_userconv_table()
$drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
switch ($map_dbms)
{
- case 'firebird':
- $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
- user_id INTEGER NOT NULL,
- username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE
- )';
- break;
-
case 'mssql':
$create_sql = 'CREATE TABLE [' . USERCONV_TABLE . '] (
[user_id] [int] NOT NULL ,
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 44dbe43cf8..c349d71563 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -41,7 +41,9 @@ function phpbb_end_update($cache, $config)
</div>
<div id="page-footer">
- Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited
+ <div class="copyright">
+ Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited
+ </div>
</div>
</div>
</body>
@@ -182,7 +184,7 @@ header('Content-type: text/html; charset=UTF-8');
define('IN_DB_UPDATE', true);
/**
-* @todo firebird/mysql update?
+* @todo mysql update?
*/
// End startup code
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 43970029cb..bff7b75b18 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -752,12 +752,16 @@ class module
break;
case 'select':
+ // @codingStandardsIgnoreStart
eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';');
+ // @codingStandardsIgnoreEnd
$tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>';
break;
case 'custom':
+ // @codingStandardsIgnoreStart
eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';');
+ // @codingStandardsIgnoreEnd
break;
default:
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 674a1f7dd3..a0d5e802e6 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -252,7 +252,6 @@ class install_convert extends module
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE);
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
break;
@@ -700,7 +699,6 @@ class install_convert extends module
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$convert->src_truncate_statement = 'DELETE FROM ';
break;
@@ -733,7 +731,6 @@ class install_convert extends module
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$convert->truncate_statement = 'DELETE FROM ';
break;
@@ -1021,7 +1018,9 @@ class install_convert extends module
// Now process queries and execute functions that have to be executed prior to the conversion
if (!empty($convert->convertor['execute_first']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_first']);
+ // @codingStandardsIgnoreEnd
}
if (!empty($convert->convertor['query_first']))
@@ -1091,7 +1090,9 @@ class install_convert extends module
// process execute_first and query_first for this table...
if (!empty($schema['execute_first']))
{
+ // @codingStandardsIgnoreStart
eval($schema['execute_first']);
+ // @codingStandardsIgnoreEnd
}
if (!empty($schema['query_first']))
@@ -1156,7 +1157,9 @@ class install_convert extends module
// it gets split because of time restrictions
if (!empty($schema['execute_always']))
{
+ // @codingStandardsIgnoreStart
eval($schema['execute_always']);
+ // @codingStandardsIgnoreEnd
}
//
@@ -1667,13 +1670,17 @@ class install_convert extends module
{
if (!is_array($convert->convertor['execute_last']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_last']);
+ // @codingStandardsIgnoreEnd
}
else
{
while ($last_statement < sizeof($convert->convertor['execute_last']))
{
+ // @codingStandardsIgnoreStart
eval($convert->convertor['execute_last'][$last_statement]);
+ // @codingStandardsIgnoreEnd
$template->assign_block_vars('checks', array(
'TITLE' => $convert->convertor['execute_last'][$last_statement],
@@ -2035,7 +2042,9 @@ class install_convert extends module
$execution = str_replace('{RESULT}', '$value', $execution);
$execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
eval($execution);
+ // @codingStandardsIgnoreEnd
}
}
}
@@ -2082,7 +2091,9 @@ class install_convert extends module
$execution = str_replace('{RESULT}', '$value', $execution);
$execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
eval($execution);
+ // @codingStandardsIgnoreEnd
}
}
}
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 576cbba3ca..5f8c0c277c 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1153,21 +1153,25 @@ class install_install extends module
// How should we treat this schema?
$delimiter = $available_dbms[$data['dbms']]['DELIM'];
- $sql_query = @file_get_contents($dbms_schema);
- $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
- $sql_query = phpbb_remove_comments($sql_query);
- $sql_query = split_sql_file($sql_query, $delimiter);
- foreach ($sql_query as $sql)
+ if (file_exists($dbms_schema))
{
- //$sql = trim(str_replace('|', ';', $sql));
- if (!$db->sql_query($sql))
+ $sql_query = @file_get_contents($dbms_schema);
+ $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
+ $sql_query = phpbb_remove_comments($sql_query);
+ $sql_query = split_sql_file($sql_query, $delimiter);
+
+ foreach ($sql_query as $sql)
{
- $error = $db->sql_error();
- $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ //$sql = trim(str_replace('|', ';', $sql));
+ if (!$db->sql_query($sql))
+ {
+ $error = $db->sql_error();
+ $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
+ }
}
+ unset($sql_query);
}
- unset($sql_query);
// Ok we have the db info go ahead and work on building the table
$db_table_schema = @file_get_contents('schemas/schema.json');
diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php
index 2f37fc3237..d5874dac83 100644
--- a/phpBB/install/install_main.php
+++ b/phpBB/install/install_main.php
@@ -56,7 +56,7 @@ class install_main extends module
case 'license' :
$title = $lang['GPL'];
- $body = implode("<br/>\n", file('../docs/COPYING'));
+ $body = implode("<br/>\n", file(__DIR__ . '/../docs/LICENSE.txt'));
break;
case 'support' :
diff --git a/phpBB/install/phpinfo.php b/phpBB/install/phpinfo.php
index 83f154933a..1512b00563 100644
--- a/phpBB/install/phpinfo.php
+++ b/phpBB/install/phpinfo.php
@@ -1,3 +1,14 @@
<?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.
+*
+*/
phpinfo();
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/firebird_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
deleted file mode 100644
index f88513cf0e..0000000000
--- a/phpBB/install/schemas/mssql_schema.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE, IT IS GENERATED
- *
- * To change the contents of this file, edit
- * phpBB/develop/create_schema_files.php and
- * run it.
- */
-
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 61f5d5f961..2473d31aab 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1,12 +1,4 @@
/*
- * DO NOT EDIT THIS FILE, IT IS GENERATED
- *
- * To change the contents of this file, edit
- * phpBB/develop/create_schema_files.php and
- * run it.
- */
-
-/*
This first section is optional, however its probably the best method
of running phpBB on Oracle. If you already have a tablespace and user created
for phpBB you can leave this section commented out!
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 3fc8589844..65caba8d1c 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -1,10 +1,3 @@
-/*
- * DO NOT EDIT THIS FILE, IT IS GENERATED
- *
- * To change the contents of this file, edit
- * phpBB/develop/create_schema_files.php and
- * run it.
- */
BEGIN;
diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json
index 176691f1a6..a3ffd923a1 100644
--- a/phpBB/install/schemas/schema.json
+++ b/phpBB/install/schemas/schema.json
@@ -942,6 +942,10 @@
"BOOL",
0
],
+ "group_skip_auth": [
+ "BOOL",
+ 0
+ ],
"group_name": [
"VCHAR_CI",
""
@@ -1009,12 +1013,7 @@
"group_max_recipients": [
"UINT",
0
- ],
- "group_skip_auth": {
- "0": "BOOL",
- "1": 0,
- "after": "group_founder_manage"
- }
+ ]
},
"PRIMARY_KEY": "group_id",
"KEYS": {
@@ -2089,6 +2088,26 @@
"UINT",
0
],
+ "pf_phpbb_skype": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_twitter": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_youtube": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_facebook": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_googleplus": [
+ "VCHAR",
+ ""
+ ],
"pf_phpbb_interests": [
"MTEXT",
""
@@ -3024,10 +3043,6 @@
"TIMESTAMP",
0
],
- "user_pass_convert": [
- "BOOL",
- 0
- ],
"user_email": [
"VCHAR_UNI:100",
""
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 7afed448ad..572720ff95 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -82,6 +82,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('confirm_refresh',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_attachment_content', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('contact_admin_form_enable', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path', '/');
@@ -272,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.0-b4-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC2-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
@@ -299,6 +300,12 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('sessio
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('upload_dir_size', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('warnings_last_gc', '0', 1);
+# Config text
+INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info', '');
+INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_uid', '');
+INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_bitfield', '');
+INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_flags', '7');
+
# -- Forum related auth options
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_announce', 1);
@@ -799,6 +806,11 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_wlm', 'profilefields.type.string', 'phpbb_wlm', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 7, 1, '', '');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'http://edit.yahoo.com/config/send_webmesg?.target=%s&amp;.src=pg');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'http://facebook.com/%s/');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_twitter', 'profilefields.type.string', 'phpbb_twitter', '20', '1', '15', '', '', '[\w_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 10, 1, 'VIEW_TWITTER_PROFILE', 'http://twitter.com/%s');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_skype', 'profilefields.type.string', 'phpbb_skype', '20', '6', '32', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 11, 1, 'VIEW_SKYPE_PROFILE', 'skype:%s?userinfo');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_youtube', 'profilefields.type.string', 'phpbb_youtube', '20', '3', '60', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 12, 1, 'VIEW_YOUTUBE_CHANNEL', 'http://youtube.com/user/%s');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_googleplus', 'profilefields.type.googleplus', 'phpbb_googleplus', '20', '3', '255', '', '', '[\w]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 13, 1, 'VIEW_GOOGLEPLUS_PROFILE', 'http://plus.google.com/%s');
# User Notification Options (for first user)
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, '');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
deleted file mode 100644
index 28649dc54c..0000000000
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# DO NOT EDIT THIS FILE, IT IS GENERATED
-#
-# To change the contents of this file, edit
-# phpBB/develop/create_schema_files.php and
-# run it.
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index e2f89839c5..638e9907ac 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -111,9 +111,9 @@ $lang = array_merge($lang, array(
'ALLOW_REMOTE_UPLOAD_EXPLAIN' => 'Allow uploading of avatars from another website.',
'ALLOW_UPLOAD' => 'Enable avatar uploading',
'AVATAR_GALLERY_PATH' => 'Avatar gallery path',
- 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.',
+ 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.<br />Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
'AVATAR_STORAGE_PATH' => 'Avatar storage path',
- 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.<br />Avatar uploading <strong>will not be available</strong> if this path is not writable.',
+ 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.<br />Avatar uploading <strong>will not be available</strong> if this path is not writable.<br />Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions',
'MAX_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.',
'MAX_FILESIZE' => 'Maximum avatar file size',
@@ -352,6 +352,19 @@ $lang = array_merge($lang, array(
'SESSION_LENGTH_EXPLAIN' => 'Sessions will expire after this time, in seconds.',
));
+// Contact Settings
+$lang = array_merge($lang, array(
+ 'ACP_CONTACT_SETTINGS_EXPLAIN' => 'Here you can enable and disable the contact page and also add a text that is displayed on the page.',
+
+ 'CONTACT_US_ENABLE' => 'Enable contact page',
+ 'CONTACT_US_ENABLE_EXPLAIN' => 'This page allows users to send emails to board administrators',
+
+ 'CONTACT_US_INFO' => 'Contact information',
+ 'CONTACT_US_INFO_EXPLAIN' => 'The message is displayed on the contact page',
+ 'CONTACT_US_INFO_PREVIEW' => 'Contact page information - Preview',
+ 'CONTACT_US_INFO_UPDATED' => 'Contact page information has been updated.',
+));
+
// Load Settings
$lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
@@ -401,7 +414,7 @@ $lang = array_merge($lang, array(
'AUTH_METHOD' => 'Select an authentication method',
'AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING' => 'Both the key and secret of each enabled OAuth service provider must be provided. Only one was provided for an OAuth service provider.',
- 'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server.<br />These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br />Any service that does not have both a key and a secret entered here will not be available for use by the forum users.',
+ 'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server. These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br />Any service that does not have both a key and a secret entered here will not be available for use by the forum users. Also note, that user can still register and login using the DB authentication plug-in.',
'AUTH_PROVIDER_OAUTH_KEY' => 'Key',
'AUTH_PROVIDER_OAUTH_TITLE' => 'OAuth',
'AUTH_PROVIDER_OAUTH_SECRET' => 'Secret',
@@ -461,7 +474,7 @@ $lang = array_merge($lang, array(
'UPLOAD_ICONS_PATH' => 'Extension group icons storage path',
'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/upload_icons</samp>.',
'USE_SYSTEM_CRON' => 'Run periodic tasks from system cron',
- 'USE_SYSTEM_CRON_EXPLAIN' => 'When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for <code>cron.php</code> to be invoked by the system cron facility at regular intervals (e.g. every 5 minutes).',
+ 'USE_SYSTEM_CRON_EXPLAIN' => 'When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for <code>bin/phpbbcli.php cron:run</code> to be run by the system cron facility at regular intervals (e.g. every 5 minutes).',
));
// Security Settings
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index d340e467be..8470014161 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -75,6 +75,8 @@ $lang = array_merge($lang, array(
'ACP_CAT_USERS' => 'Users',
'ACP_CLIENT_COMMUNICATION' => 'Client communication',
'ACP_COOKIE_SETTINGS' => 'Cookie settings',
+ 'ACP_CONTACT' => 'Contact page',
+ 'ACP_CONTACT_SETTINGS' => 'Contact page settings',
'ACP_CRITICAL_LOGS' => 'Error log',
'ACP_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
@@ -223,8 +225,18 @@ $lang = array_merge($lang, array(
'BACK' => 'Back',
+ 'CLI_DESCRIPTION_CRON_LIST' => 'Prints a list of ready and unready cron jobs.',
+ 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.',
+ 'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run',
+
+ 'CLI_DESCRIPTION_OPTION_SHELL' => 'Launch the shell.',
+
'COLOUR_SWATCH' => 'Web-safe colour swatch',
'CONFIG_UPDATED' => 'Configuration updated successfully.',
+ 'CRON_LOCK_ERROR' => 'Could not obtain cron lock.',
+ 'CRON_NO_SUCH_TASK' => 'Could not find cron task “%s”.',
+ 'CRON_NO_TASK' => 'No cron tasks need to be run right now.',
+ 'CRON_NO_TASKS' => 'No cron tasks could be found.',
'DEACTIVATE' => 'Deactivate',
'DIRECTORY_DOES_NOT_EXIST' => 'The entered path “%s” does not exist.',
@@ -285,6 +297,7 @@ $lang = array_merge($lang, array(
'REMIND' => 'Remind',
'RESYNC' => 'Resynchronise',
+ 'RUNNING_TASK' => 'Running task: %s.',
'SELECT_ANONYMOUS' => 'Select anonymous user',
'SELECT_OPTION' => 'Select option',
@@ -295,6 +308,8 @@ $lang = array_merge($lang, array(
'SHOW_ALL_OPERATIONS' => 'Show all operations',
+ 'TASKS_NOT_READY' => 'Not ready tasks:',
+ 'TASKS_READY' => 'Ready tasks:',
'TOTAL_SIZE' => 'Total size',
'UCP' => 'User Control Panel',
@@ -541,9 +556,9 @@ $lang = array_merge($lang, array(
'LOG_APPROVE_TOPIC' => '<strong>Approved topic</strong><br />» %s',
'LOG_BUMP_TOPIC' => '<strong>User bumped topic</strong><br />» %s',
- 'LOG_DELETE_POST' => '<strong>Deleted post “%1$s” written by</strong><br />» %2$s',
+ 'LOG_DELETE_POST' => '<strong>Deleted post “%1$s” written by “%2$s” for the following reason</strong><br />» %3$s',
'LOG_DELETE_SHADOW_TOPIC' => '<strong>Deleted shadow topic</strong><br />» %s',
- 'LOG_DELETE_TOPIC' => '<strong>Deleted topic “%1$s” written by</strong><br />» %2$s',
+ 'LOG_DELETE_TOPIC' => '<strong>Deleted topic “%1$s” written by “%2$s” for the following reason</strong><br />» %3$s',
'LOG_FORK' => '<strong>Copied topic</strong><br />» from %s',
'LOG_LOCK' => '<strong>Locked topic</strong><br />» %s',
'LOG_LOCK_POST' => '<strong>Locked post</strong><br />» %s',
@@ -553,13 +568,13 @@ $lang = array_merge($lang, array(
'LOG_PM_REPORT_DELETED' => '<strong>Deleted PM report</strong><br />» %s',
'LOG_POST_APPROVED' => '<strong>Approved post</strong><br />» %s',
'LOG_POST_DISAPPROVED' => '<strong>Disapproved post “%1$s” written by “%3$s” for the following reason</strong><br />» %2$s',
- 'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by</strong><br />» %2$s',
+ 'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by “%2$s” for the following reason</strong><br />» %3$s',
'LOG_POST_RESTORED' => '<strong>Restored post</strong><br />» %s',
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
'LOG_RESTORE_TOPIC' => '<strong>Restored topic “%1$s” written by</strong><br />» %2$s',
- 'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by</strong><br />» %2$s',
- 'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by</strong><br />» %2$s',
+ 'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by “%2$s” for the following reason</strong><br />» %3$s',
+ 'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by “%2$s” for the following reason</strong><br />» %3$s',
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
index e9f1c3ac5c..6ec722bb78 100644
--- a/phpBB/language/en/acp/extensions.php
+++ b/phpBB/language/en/acp/extensions.php
@@ -117,4 +117,7 @@ $lang = array_merge($lang, array(
'VERSIONCHECK_FORCE_UPDATE_ALL' => 'Re-Check all versions',
'FORCE_UNSTABLE' => 'Always check for unstable versions',
'EXTENSIONS_VERSION_CHECK_SETTINGS' => 'Version check settings',
+
+ 'META_FIELD_NOT_SET' => 'Required meta field %s has not been set.',
+ 'META_FIELD_INVALID' => 'Meta field %s is invalid.',
));
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index 7336031218..67813bcba4 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -39,9 +39,11 @@ if (empty($lang) || !is_array($lang))
// Custom profile fields
$lang = array_merge($lang, array(
'ADDED_PROFILE_FIELD' => 'Successfully added custom profile field.',
+ 'ALPHA_DOTS' => 'Alphanumeric and dots (periods)',
'ALPHA_ONLY' => 'Alphanumeric only',
'ALPHA_SPACERS' => 'Alphanumeric and spacers',
'ALPHA_UNDERSCORE' => 'Alphanumeric and underscores',
+ 'ALPHA_PUNCTUATION' => 'Alphanumeric with comma, dots, underscore and dashes beginning with a letter',
'ALWAYS_TODAY' => 'Always the current date',
'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now',
@@ -91,6 +93,7 @@ $lang = array_merge($lang, array(
'FIELD_DESCRIPTION' => 'Field description',
'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.',
'FIELD_DROPDOWN' => 'Dropdown box',
+ 'FIELD_GOOGLEPLUS' => 'Google+',
'FIELD_IDENT' => 'Field identification',
'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.',
'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.',
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index c2a3f777c2..506d569d56 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -71,8 +71,8 @@ $lang = array_merge($lang, array(
'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists.',
'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style.',
'STYLE_INSTALLED' => 'Style "%s" has been installed.',
- 'STYLE_INSTALLED_RETURN_STYLES' => '<a href="%s">Click here</a> to return to installed styles list.',
- 'STYLE_INSTALLED_RETURN_UNINSTALLED' => '<a href="%s">Click here</a> to install more styles.',
+ 'STYLE_INSTALLED_RETURN_INSTALLED_STYLES' => 'Return to installed styles list',
+ 'STYLE_INSTALLED_RETURN_UNINSTALLED_STYLES' => 'Install more styles',
'STYLE_NAME' => 'Style name',
'STYLE_NOT_INSTALLED' => 'Style "%s" was not installed.',
'STYLE_PATH' => 'Style path',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 5e524a6164..61baef663b 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -109,6 +109,7 @@ $lang = array_merge($lang, array(
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
+ 'AVATAR_REMOTE_UPLOAD_TIMEOUT' => 'The specified avatar could not be uploaded because the request timed out.',
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1$d %2$s.',
@@ -171,6 +172,7 @@ $lang = array_merge($lang, array(
'CONNECTION_SUCCESS' => 'Connection was successful!',
'CONTACT' => 'Contact',
'CONTACT_USER' => 'Contact %s',
+ 'CONTACT_US' => 'Contact us',
'COOKIES_DELETED' => 'All board cookies successfully deleted.',
'CURRENT_TIME' => 'It is currently %s',
@@ -225,12 +227,15 @@ $lang = array_merge($lang, array(
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.',
'EXTENSION_DOES_NOT_EXIST' => 'The extension <strong>%s</strong> does not exist.',
+ 'FACEBOOK' => 'Facebook',
'FAQ' => 'FAQ',
'FAQ_EXPLAIN' => 'Frequently Asked Questions',
'FILENAME' => 'Filename',
'FILESIZE' => 'File size',
'FILEDATE' => 'File date',
'FILE_COMMENT' => 'File comment',
+ 'FILE_CONTENT_ERR' => 'Could not read the contents of file: %s',
+ 'FILE_JSON_DECODE_ERR' => 'Failed to decode json file: %s',
'FILE_NOT_FOUND' => 'The requested file could not be found: %s',
'FIND_USERNAME' => 'Find a member',
'FOLDER' => 'Folder',
@@ -280,6 +285,7 @@ $lang = array_merge($lang, array(
'GB' => 'GB',
'GIB' => 'GiB',
'GO' => 'Go',
+ 'GOOGLEPLUS' => 'Google+',
'GOTO_FIRST_POST' => 'Go to first post',
'GOTO_LAST_POST' => 'Go to last post',
'GOTO_PAGE' => 'Go to page',
@@ -338,7 +344,8 @@ $lang = array_merge($lang, array(
'JOINED' => 'Joined',
'JUMP_PAGE' => 'Enter the page number you wish to go to',
'JUMP_TO' => 'Jump to',
- 'JUMP_TO_PAGE' => 'Click to jump to page…',
+ 'JUMP_TO_PAGE' => 'Jump to page',
+ 'JUMP_TO_PAGE_CLICK' => 'Click to jump to page…',
'KB' => 'KB',
'KIB' => 'KiB',
@@ -436,29 +443,32 @@ $lang = array_merge($lang, array(
// A, B, C and 2 others replied...
// A, B, C and others replied...
'NOTIFICATION_BOOKMARK' => array(
- 1 => '%1$s replied to the topic “%2$s” you have bookmarked.',
+ 1 => '<strong>Reply</strong> from %1$s in bookmarked topic:',
),
- 'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.',
- 'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.',
- 'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
+ 'NOTIFICATION_FORUM' => '<em>Forum:</em> %1$s',
+ 'NOTIFICATION_GROUP_REQUEST' => '<strong>Group request</strong> from %1$s to join the group %2$s.',
+ 'NOTIFICATION_GROUP_REQUEST_APPROVED' => '<strong>Group request approved</strong> to join the group %1$s.',
+ 'NOTIFICATION_PM' => '<strong>Private Message</strong> from %1$s:',
'NOTIFICATION_POST' => array(
- 1 => '%1$s replied to the topic “%2$s”.',
+ 1 => '<strong>Reply</strong> from %1$s in topic:',
),
- 'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".',
- 'NOTIFICATION_POST_DISAPPROVED' => 'Your post "%1$s" was disapproved for reason: "%2$s".',
- 'NOTIFICATION_POST_IN_QUEUE' => 'A new post titled "%2$s" was posted by %1$s and needs approval.',
+ 'NOTIFICATION_POST_APPROVED' => '<strong>Post approved</strong>:',
+ 'NOTIFICATION_POST_DISAPPROVED' => '<strong>Post disapproved</strong>:',
+ 'NOTIFICATION_POST_IN_QUEUE' => '<strong>Post approval</strong> request by %1$s:',
'NOTIFICATION_QUOTE' => array(
- 1 => '%1$s quoted you in the post “%2$s”.',
+ 1 => '<strong>Quoted</strong> by %1$s in:',
),
- 'NOTIFICATION_REPORT_PM' => '%1$s reported a Private Message "%2$s" for reason: "%3$s".',
- 'NOTIFICATION_REPORT_POST' => '%1$s reported a post "%2$s" for reason: "%3$s".',
- 'NOTIFICATION_REPORT_CLOSED' => '%1$s closed the report you made for "%2$s".',
- 'NOTIFICATION_TOPIC' => '%1$s posted a new topic "%2$s" in the forum "%3$s".',
- 'NOTIFICATION_TOPIC_APPROVED' => 'Your topic "%2$s" in the forum "%3$s" was approved.',
- 'NOTIFICATION_TOPIC_DISAPPROVED' => 'Your topic "%1$s" was disapproved for reason: "%2$s".',
- 'NOTIFICATION_TOPIC_IN_QUEUE' => 'A new topic titled "%2$s" was posted by %1$s and needs approval.',
+ 'NOTIFICATION_REFERENCE' => '"%1$s"',
+ 'NOTIFICATION_REASON' => '<em>Reason:</em> %1$s.',
+ 'NOTIFICATION_REPORT_PM' => '<strong>Private Message reported</strong> by %1$s:',
+ 'NOTIFICATION_REPORT_POST' => '<strong>Post reported</strong> by %1$s:',
+ 'NOTIFICATION_REPORT_CLOSED' => '<strong>Report closed</strong> by %1$s for:',
+ 'NOTIFICATION_TOPIC' => '<strong>New topic</strong> by %1$s:',
+ 'NOTIFICATION_TOPIC_APPROVED' => '<strong>Topic approved</strong>:',
+ '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' => 'The user “%1$s” is newly registered and requires activation.',
+ 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for newly registered user: “%1$s”',
// Used in conjuction with NOTIFICATION_BOOKMARK and NOTIFICATION_POST.
'NOTIFICATION_MANY_OTHERS' => 'others',
'NOTIFICATION_X_OTHERS' => array(
@@ -554,6 +564,7 @@ $lang = array_merge($lang, array(
'POSTED_ON_DATE' => 'on',
'POSTS' => 'Posts',
'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.',
+ 'POSTS_UNAPPROVED_FORUM'=> 'At least one post in this forum has not been approved.',
'POST_BY_AUTHOR' => 'by',
'POST_BY_FOE' => '<strong>%1$s</strong>, who is currently on your ignore list, made this post.',
'POST_DISPLAY' => '%1$sDisplay this post%2$s.',
@@ -666,12 +677,13 @@ $lang = array_merge($lang, array(
'SELECT_ALL_CODE' => 'Select all',
'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
'SELECT_FORUM' => 'Select a forum',
- 'SEND_EMAIL' => 'Email', // Used for submit buttons
- 'SEND_EMAIL_USER' => 'Email %s',
+ 'SEND_EMAIL' => 'Send email', // Used for submit buttons
+ 'SEND_EMAIL_USER' => 'Send email to %s',
'SEND_PRIVATE_MESSAGE' => 'Send private message',
'SETTINGS' => 'Settings',
'SIGNATURE' => 'Signature',
'SKIP' => 'Skip to content',
+ 'SKYPE' => 'Skype',
'SMTP_NO_AUTH_SUPPORT' => 'SMTP server does not support authentication.',
'SORRY_AUTH_READ' => 'You are not authorised to read this forum.',
'SORRY_AUTH_VIEW_ATTACH' => 'You are not authorised to download this attachment.',
@@ -730,7 +742,7 @@ $lang = array_merge($lang, array(
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
'TOO_SHORT_USERNAME' => 'The username you entered is too short.',
'TOO_SHORT_EMAIL' => 'The email address you entered is too short.',
-
+ 'TOO_SHORT_EMAIL_CONFIRM' => 'The email address confirmation you entered is too short.',
'TOO_SMALL' => 'The value you entered is too small.',
'TOO_SMALL_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too small.',
@@ -767,6 +779,7 @@ $lang = array_merge($lang, array(
2 => 'Total members <strong>%d</strong>',
),
'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
+ 'TWITTER' => 'Twitter',
'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image. Please verify that the URL you entered is correct.',
'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.',
@@ -853,6 +866,7 @@ $lang = array_merge($lang, array(
'WROTE' => 'wrote',
'YAHOO' => 'Yahoo Messenger',
+ 'YOUTUBE' => 'YouTube',
'YEAR' => 'Year',
'YEAR_MONTH_DAY' => '(YYYY-MM-DD)',
'YES' => 'Yes',
diff --git a/phpBB/language/en/email/contact_admin.txt b/phpBB/language/en/email/contact_admin.txt
new file mode 100644
index 0000000000..c895c4d687
--- /dev/null
+++ b/phpBB/language/en/email/contact_admin.txt
@@ -0,0 +1,23 @@
+
+Hello {TO_USERNAME},
+
+The following is an e-mail sent to you through the administration contact page on "{SITENAME}".
+
+<!-- IF S_IS_REGISTERED -->
+The message has been sent from an account on the site.
+Username: {FROM_USERNAME}
+E-mail address: {FROM_EMAIL_ADDRESS}
+IP Address: {FROM_IP_ADDRESS}
+Profile: {U_FROM_PROFILE}
+<!-- ELSE -->
+The message was sent from a guest who specified the following contact information:
+Name: {FROM_USERNAME}
+E-mail address: {FROM_EMAIL_ADDRESS}
+IP Address: {FROM_IP_ADDRESS}
+<!-- ENDIF -->
+
+
+Message sent to you follows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+{MESSAGE}
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 7235e51a94..2b7f377f5b 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -142,7 +142,6 @@ $lang = array_merge($lang, array(
'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source board to allow the path to it to be verified.',
'DIRECTORIES_AND_FILES' => 'Directory and file setup',
'DISABLE_KEYS' => 'Disabling keys',
- 'DLL_FIREBIRD' => 'Firebird',
'DLL_FTP' => 'Remote FTP support [ Installation ]',
'DLL_GD' => 'GD graphics support [ Visual Confirmation ]',
'DLL_MBSTRING' => 'Multi-byte character support',
@@ -171,8 +170,6 @@ $lang = array_merge($lang, array(
'FILLING_TABLE' => 'Filling table <strong>%s</strong>',
'FILLING_TABLES' => 'Filling tables',
- 'FIREBIRD_DBMS_UPDATE_REQUIRED' => 'phpBB no longer supports Firebird/Interbase prior to Version 2.1. Please update your Firebird installation to at least 2.1.0 before proceeding with the update.',
-
'FINAL_STEP' => 'Process final step',
'FORUM_ADDRESS' => 'Board address',
'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example <samp>http://www.example.com/phpBB2/</samp>. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.',
@@ -216,7 +213,6 @@ $lang = array_merge($lang, array(
<li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
- <li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
<li>MS SQL Server 2005 or above (native)</li>
<li>Oracle</li>
@@ -241,8 +237,6 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.',
'INST_ERR_DB_NO_SQLITE3' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 3.6.15.',
'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.',
- 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.1, please upgrade to a newer version.',
- 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.',
'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
'INST_ERR_DB_NO_NAME' => 'No database name specified.',
'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid.',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index 7b6838e6d9..c1bb25e7fb 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -49,6 +49,7 @@ $lang = array_merge($lang, array(
'BEFORE' => 'Before',
'CC_EMAIL' => 'Send a copy of this email to yourself.',
+ 'CONTACT_ADMIN' => 'Contact a Board Administrator',
'DEST_LANG' => 'Language',
'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.',
@@ -61,6 +62,8 @@ $lang = array_merge($lang, array(
'EMPTY_MESSAGE_EMAIL' => 'You must enter a message to be emailed.',
'EMPTY_MESSAGE_IM' => 'You must enter a message to be send.',
'EMPTY_NAME_EMAIL' => 'You must enter the real name of the recipient.',
+ 'EMPTY_SENDER_EMAIL' => 'You must provide a valid email address.',
+ 'EMPTY_SENDER_NAME' => 'You must provide a name.',
'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the email.',
'EQUAL_TO' => 'Equal to',
@@ -98,6 +101,8 @@ $lang = array_merge($lang, array(
'MORE_THAN' => 'More than',
+ 'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.',
+ 'NO_CONTACT_PAGE' => 'The board administrator contact page has been disabled.',
'NO_EMAIL' => 'You are not permitted to send email to this user.',
'NO_VIEW_USERS' => 'You are not authorised to view the member list or profiles.',
@@ -113,6 +118,8 @@ $lang = array_merge($lang, array(
'SELECT_MARKED' => 'Select marked',
'SELECT_SORT_METHOD' => 'Select sort method',
+ 'SENDER_EMAIL_ADDRESS' => 'Your email address',
+ 'SENDER_NAME' => 'Your name',
'SEND_ICQ_MESSAGE' => 'Send ICQ message',
'SEND_IM' => 'Instant messaging',
'SEND_JABBER_MESSAGE' => 'Send Jabber message',
@@ -136,4 +143,9 @@ $lang = array_merge($lang, array(
'USERS_PER_PAGE' => 'Users per page',
'VIEWING_PROFILE' => 'Viewing profile - %s',
+ 'VIEW_FACEBOOK_PROFILE' => 'View Facebook Profile',
+ 'VIEW_SKYPE_PROFILE' => 'View Skype Profile',
+ 'VIEW_TWITTER_PROFILE' => 'View Twitter Profile',
+ 'VIEW_YOUTUBE_CHANNEL' => 'View YouTube Channel',
+ 'VIEW_GOOGLEPLUS_PROFILE' => 'View Google+ Profile',
));
diff --git a/phpBB/language/en/plupload.php b/phpBB/language/en/plupload.php
index c4a8d770a0..15c3955a1a 100644
--- a/phpBB/language/en/plupload.php
+++ b/phpBB/language/en/plupload.php
@@ -3,8 +3,8 @@
*
* This file is part of the phpBB Forum Software package.
*
-* @copyright (c) 2010-2013 Moxiecode Systems AB
* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @copyright (c) 2010-2013 Moxiecode Systems AB
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 20377287fd..31d49e8bdf 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -225,6 +225,7 @@ $lang = array_merge($lang, array(
),
'QUOTE_NO_NESTING' => 'You may not embed quotes within each other.',
+ 'REMOTE_UPLOAD_TIMEOUT' => 'The specified file could not be uploaded because the request timed out.',
'SAVE' => 'Save',
'SAVE_DATE' => 'Saved at',
'SAVE_DRAFT' => 'Save draft',
@@ -256,6 +257,8 @@ $lang = array_merge($lang, array(
'UNAUTHORISED_BBCODE' => 'You cannot use certain BBCodes: %s.',
'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you wish this topic to be displayed.',
+ 'UNSUPPORTED_CHARACTERS_MESSAGE' => 'Your message contains the following unsupported characters:<br />%s',
+ 'UNSUPPORTED_CHARACTERS_SUBJECT' => 'Your subject contains the following unsupported characters:<br />%s',
'UPDATE_COMMENT' => 'Update comment',
'URL_INVALID' => 'The URL you specified is invalid.',
'URL_NOT_FOUND' => 'The file specified could not be found.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index c3ace160e9..c4328aa3a6 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -209,7 +209,9 @@ $lang = array_merge($lang, array(
'FIELD_TOO_LARGE' => 'The value of “%2$s” is too large, a maximum value of %1$d is allowed.',
'FIELD_INVALID_CHARS_INVALID' => 'The field “%s” has invalid characters.',
'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_DOTS' => 'The field “%s” has invalid characters, only alphanumeric or . characters are allowed.',
'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_PUNCTUATION' => 'The field “%s” has invalid characters, only alphanumeric or _,-. characters are allowed and the first character must be alphabetic.',
'FIELD_INVALID_CHARS_ALPHA_SPACERS' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
'FIELD_INVALID_CHARS_ALPHA_UNDERSCORE' => 'The field “%s” has invalid characters, only alphanumeric or _ characters are allowed.',
'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.',
@@ -357,6 +359,7 @@ $lang = array_merge($lang, array(
),
'NO_ACTION_MODE' => 'No message action specified.',
'NO_AUTHOR' => 'No author defined for this message',
+ 'NO_AVATAR' => 'No avatar selected',
'NO_AVATAR_CATEGORY' => 'None',
'NO_AUTH_DELETE_MESSAGE' => 'You are not authorised to delete private messages.',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 9354eef8fd..25765b1af7 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -19,6 +19,7 @@ $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_mcp.' . $phpEx);
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
// Start session management
@@ -117,7 +118,7 @@ if (!$auth->acl_getf_global('m_'))
$allow_user = false;
if ($quickmod && isset($user_quickmod_actions[$action]) && $user->data['is_registered'] && $auth->acl_gets($user_quickmod_actions[$action], $forum_id))
{
- $topic_info = get_topic_data(array($topic_id));
+ $topic_info = phpbb_get_topic_data(array($topic_id));
if ($topic_info[$topic_id]['topic_poster'] == $user->data['user_id'])
{
$allow_user = true;
@@ -299,649 +300,3 @@ $template->assign_vars(array(
// Generate the page, do not display/query online list
$module->display($module->get_page_title());
-
-/**
-* Functions used to generate additional URL paramters
-*/
-function _module__url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function _module_notes_url($mode, &$module_row)
-{
- if ($mode == 'front')
- {
- return '';
- }
-
- global $user_id;
- return ($user_id) ? "&amp;u=$user_id" : '';
-}
-
-function _module_warn_url($mode, &$module_row)
-{
- if ($mode == 'front' || $mode == 'list')
- {
- global $forum_id;
-
- return ($forum_id) ? "&amp;f=$forum_id" : '';
- }
-
- if ($mode == 'warn_post')
- {
- global $forum_id, $post_id;
-
- $url_extra = ($forum_id) ? "&amp;f=$forum_id" : '';
- $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
-
- return $url_extra;
- }
- else
- {
- global $user_id;
-
- return ($user_id) ? "&amp;u=$user_id" : '';
- }
-}
-
-function _module_main_url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function _module_logs_url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function _module_ban_url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function _module_queue_url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function _module_reports_url($mode, &$module_row)
-{
- return extra_url();
-}
-
-function extra_url()
-{
- global $forum_id, $topic_id, $post_id, $report_id, $user_id;
-
- $url_extra = '';
- $url_extra .= ($forum_id) ? "&amp;f=$forum_id" : '';
- $url_extra .= ($topic_id) ? "&amp;t=$topic_id" : '';
- $url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
- $url_extra .= ($user_id) ? "&amp;u=$user_id" : '';
- $url_extra .= ($report_id) ? "&amp;r=$report_id" : '';
-
- return $url_extra;
-}
-
-/**
-* Get simple topic data
-*/
-function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
-{
- global $auth, $db, $config, $user;
- static $rowset = array();
-
- $topics = array();
-
- if (!sizeof($topic_ids))
- {
- return array();
- }
-
- // cache might not contain read tracking info, so we can't use it if read
- // tracking information is requested
- if (!$read_tracking)
- {
- $cache_topic_ids = array_intersect($topic_ids, array_keys($rowset));
- $topic_ids = array_diff($topic_ids, array_keys($rowset));
- }
- else
- {
- $cache_topic_ids = array();
- }
-
- if (sizeof($topic_ids))
- {
- $sql_array = array(
- 'SELECT' => 't.*, f.*',
-
- 'FROM' => array(
- TOPICS_TABLE => 't',
- ),
-
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'f.forum_id = t.forum_id'
- )
- ),
-
- 'WHERE' => $db->sql_in_set('t.topic_id', $topic_ids)
- );
-
- if ($read_tracking && $config['load_db_lastread'])
- {
- $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
-
- $sql_array['LEFT_JOIN'][] = array(
- 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
- 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
- );
-
- $sql_array['LEFT_JOIN'][] = array(
- 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
- 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
- );
- }
-
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $rowset[$row['topic_id']] = $row;
-
- if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
- {
- continue;
- }
-
- $topics[$row['topic_id']] = $row;
- }
- $db->sql_freeresult($result);
- }
-
- foreach ($cache_topic_ids as $id)
- {
- if (!$acl_list || $auth->acl_gets($acl_list, $rowset[$id]['forum_id']))
- {
- $topics[$id] = $rowset[$id];
- }
- }
-
- return $topics;
-}
-
-/**
-* Get simple post data
-*/
-function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
-{
- global $db, $auth, $config, $user;
-
- $rowset = array();
-
- if (!sizeof($post_ids))
- {
- return array();
- }
-
- $sql_array = array(
- 'SELECT' => 'p.*, u.*, t.*, f.*',
-
- 'FROM' => array(
- USERS_TABLE => 'u',
- POSTS_TABLE => 'p',
- TOPICS_TABLE => 't',
- ),
-
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'f.forum_id = t.forum_id'
- )
- ),
-
- 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
- AND u.user_id = p.poster_id
- AND t.topic_id = p.topic_id',
- );
-
- if ($read_tracking && $config['load_db_lastread'])
- {
- $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time as forum_mark_time';
-
- $sql_array['LEFT_JOIN'][] = array(
- 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'),
- 'ON' => 'tt.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
- );
-
- $sql_array['LEFT_JOIN'][] = array(
- 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
- 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
- );
- }
-
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
- unset($sql_array);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
- {
- continue;
- }
-
- if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
- {
- // Moderators without the permission to approve post should at least not see them. ;)
- continue;
- }
-
- $rowset[$row['post_id']] = $row;
- }
- $db->sql_freeresult($result);
-
- return $rowset;
-}
-
-/**
-* Get simple forum data
-*/
-function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
-{
- global $auth, $db, $user, $config, $phpbb_container;
-
- $rowset = array();
-
- if (!is_array($forum_id))
- {
- $forum_id = array($forum_id);
- }
-
- if (!sizeof($forum_id))
- {
- return array();
- }
-
- if ($read_tracking && $config['load_db_lastread'])
- {
- $read_tracking_join = ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
- AND ft.forum_id = f.forum_id)';
- $read_tracking_select = ', ft.mark_time';
- }
- else
- {
- $read_tracking_join = $read_tracking_select = '';
- }
-
- $sql = "SELECT f.* $read_tracking_select
- FROM " . FORUMS_TABLE . " f$read_tracking_join
- WHERE " . $db->sql_in_set('f.forum_id', $forum_id);
- $result = $db->sql_query($sql);
-
- $phpbb_content_visibility = $phpbb_container->get('content.visibility');
-
- while ($row = $db->sql_fetchrow($result))
- {
- if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
- {
- continue;
- }
-
- $row['forum_topics_approved'] = $phpbb_content_visibility->get_count('forum_topics', $row, $row['forum_id']);
-
- $rowset[$row['forum_id']] = $row;
- }
- $db->sql_freeresult($result);
-
- return $rowset;
-}
-
-/**
-* Get simple pm data
-*/
-function get_pm_data($pm_ids)
-{
- global $db, $auth, $config, $user;
-
- $rowset = array();
-
- if (!sizeof($pm_ids))
- {
- return array();
- }
-
- $sql_array = array(
- 'SELECT' => 'p.*, u.*',
-
- 'FROM' => array(
- USERS_TABLE => 'u',
- PRIVMSGS_TABLE => 'p',
- ),
-
- 'WHERE' => $db->sql_in_set('p.msg_id', $pm_ids) . '
- AND u.user_id = p.author_id',
- );
-
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
- unset($sql_array);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $rowset[$row['msg_id']] = $row;
- }
- $db->sql_freeresult($result);
-
- return $rowset;
-}
-
-/**
-* sorting in mcp
-*
-* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
-*
-* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
-* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
-*/
-function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
-{
- global $db, $user, $auth, $template;
-
- $sort_days = request_var('st', 0);
- $min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
-
- switch ($mode)
- {
- case 'viewforum':
- $type = 'topics';
- $default_key = 't';
- $default_dir = 'd';
-
- $sql = 'SELECT COUNT(topic_id) AS total
- FROM ' . TOPICS_TABLE . "
- $where_sql forum_id = $forum_id
- AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
- AND topic_last_post_time >= $min_time";
-
- if (!$auth->acl_get('m_approve', $forum_id))
- {
- $sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
- }
- break;
-
- case 'viewtopic':
- $type = 'posts';
- $default_key = 't';
- $default_dir = 'a';
-
- $sql = 'SELECT COUNT(post_id) AS total
- FROM ' . POSTS_TABLE . "
- $where_sql topic_id = $topic_id
- AND post_time >= $min_time";
-
- if (!$auth->acl_get('m_approve', $forum_id))
- {
- $sql .= 'AND post_visibility = ' . ITEM_APPROVED;
- }
- break;
-
- case 'unapproved_posts':
- case 'deleted_posts':
- $visibility_const = ($mode == 'unapproved_posts') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
- $type = 'posts';
- $default_key = 't';
- $default_dir = 'd';
- $where_sql .= ($topic_id) ? ' p.topic_id = ' . $topic_id . ' AND' : '';
-
- $sql = 'SELECT COUNT(p.post_id) AS total
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
- $where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND ' . $db->sql_in_set('p.post_visibility', $visibility_const) .'
- AND t.topic_id = p.topic_id
- AND t.topic_visibility <> p.post_visibility';
-
- if ($min_time)
- {
- $sql .= ' AND post_time >= ' . $min_time;
- }
- break;
-
- case 'unapproved_topics':
- case 'deleted_topics':
- $visibility_const = ($mode == 'unapproved_topics') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
- $type = 'topics';
- $default_key = 't';
- $default_dir = 'd';
-
- $sql = 'SELECT COUNT(topic_id) AS total
- FROM ' . TOPICS_TABLE . "
- $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND ' . $db->sql_in_set('topic_visibility', $visibility_const);
-
- if ($min_time)
- {
- $sql .= ' AND topic_time >= ' . $min_time;
- }
- break;
-
- case 'pm_reports':
- case 'pm_reports_closed':
- case 'reports':
- case 'reports_closed':
- $pm = (strpos($mode, 'pm_') === 0) ? true : false;
-
- $type = ($pm) ? 'pm_reports' : 'reports';
- $default_key = 't';
- $default_dir = 'd';
- $limit_time_sql = ($min_time) ? "AND r.report_time >= $min_time" : '';
-
- if ($topic_id)
- {
- $where_sql .= ' p.topic_id = ' . $topic_id . ' AND ';
- }
- else if ($forum_id)
- {
- $where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
- }
- else if (!$pm)
- {
- $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true) . ' AND ';
- }
-
- if ($mode == 'reports' || $mode == 'pm_reports')
- {
- $where_sql .= ' r.report_closed = 0 AND ';
- }
- else
- {
- $where_sql .= ' r.report_closed = 1 AND ';
- }
-
- if ($pm)
- {
- $sql = 'SELECT COUNT(r.report_id) AS total
- FROM ' . REPORTS_TABLE . ' r, ' . PRIVMSGS_TABLE . " p
- $where_sql r.post_id = 0
- AND p.msg_id = r.pm_id
- $limit_time_sql";
- }
- else
- {
- $sql = 'SELECT COUNT(r.report_id) AS total
- FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . " p
- $where_sql r.pm_id = 0
- AND p.post_id = r.post_id
- $limit_time_sql";
- }
- break;
-
- case 'viewlogs':
- $type = 'logs';
- $default_key = 't';
- $default_dir = 'd';
-
- $sql = 'SELECT COUNT(log_id) AS total
- FROM ' . LOG_TABLE . "
- $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_'))) . '
- AND log_time >= ' . $min_time . '
- AND log_type = ' . LOG_MOD;
- break;
- }
-
- $sort_key = request_var('sk', $default_key);
- $sort_dir = request_var('sd', $default_dir);
- $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
-
- switch ($type)
- {
- case 'topics':
- $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
- $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'tt' => $user->lang['TOPIC_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
-
- $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 't.topic_title', 'v' => 't.topic_views');
- $limit_time_sql = ($min_time) ? "AND t.topic_last_post_time >= $min_time" : '';
- break;
-
- case 'posts':
- $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
- $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
- $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject');
- $limit_time_sql = ($min_time) ? "AND p.post_time >= $min_time" : '';
- break;
-
- case 'reports':
- $limit_days = array(0 => $user->lang['ALL_REPORTS'], 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'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
- $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject');
- break;
-
- case 'pm_reports':
- $limit_days = array(0 => $user->lang['ALL_REPORTS'], 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'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
- $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.message_time', 't' => 'r.report_time', 's' => 'p.message_subject');
- break;
-
- case 'logs':
- $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
- $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);
-
- $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation');
- $limit_time_sql = ($min_time) ? "AND l.log_time >= $min_time" : '';
- break;
- }
-
- if (!isset($sort_by_sql[$sort_key]))
- {
- $sort_key = $default_key;
- }
-
- $sort_order_sql = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
-
- $s_limit_days = $s_sort_key = $s_sort_dir = $sort_url = '';
- gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $sort_url);
-
- $template->assign_vars(array(
- 'S_SELECT_SORT_DIR' => $s_sort_dir,
- 'S_SELECT_SORT_KEY' => $s_sort_key,
- 'S_SELECT_SORT_DAYS' => $s_limit_days)
- );
-
- if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts', 'deleted_topics', 'deleted_posts')) || $where_sql != 'WHERE')
- {
- $result = $db->sql_query($sql);
- $total = (int) $db->sql_fetchfield('total');
- $db->sql_freeresult($result);
- }
- else
- {
- $total = -1;
- }
-}
-
-/**
-* Validate ids
-*
-* @param array &$ids The relevant ids to check
-* @param string $table The table to find the ids in
-* @param string $sql_id The ids relevant column name
-* @param array $acl_list A list of permissions the user need to have
-* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
-*
-* @return mixed False if no ids were able to be retrieved, true if at least one id left.
-* Additionally, this value can be the forum_id assigned if $single_forum was set.
-* Therefore checking the result for with !== false is the best method.
-*/
-function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false)
-{
- global $db, $auth;
-
- if (!is_array($ids) || empty($ids))
- {
- return false;
- }
-
- $sql = "SELECT $sql_id, forum_id FROM $table
- WHERE " . $db->sql_in_set($sql_id, $ids);
- $result = $db->sql_query($sql);
-
- $ids = array();
- $forum_id = false;
-
- while ($row = $db->sql_fetchrow($result))
- {
- if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id']))
- {
- continue;
- }
-
- if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list))
- {
- continue;
- }
-
- // Limit forum? If not, just assign the id.
- if ($single_forum === false)
- {
- $ids[] = $row[$sql_id];
- continue;
- }
-
- // Limit forum to a specific forum id?
- // This can get really tricky, because we do not want to create a failure on global topics. :)
- if ($row['forum_id'])
- {
- if ($single_forum !== true && $row['forum_id'] == (int) $single_forum)
- {
- $forum_id = (int) $single_forum;
- }
- else if ($forum_id === false)
- {
- $forum_id = $row['forum_id'];
- }
-
- if ($row['forum_id'] == $forum_id)
- {
- $ids[] = $row[$sql_id];
- }
- }
- else
- {
- // Always add a global topic
- $ids[] = $row[$sql_id];
- }
- }
- $db->sql_freeresult($result);
-
- if (!sizeof($ids))
- {
- return false;
- }
-
- // If forum id is false and ids populated we may have only global announcements selected (returning 0 because of (int) $forum_id)
-
- return ($single_forum === false) ? true : (int) $forum_id;
-}
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 187b4b1cd9..63541dbee6 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -20,6 +20,14 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+$mode = request_var('mode', '');
+
+if ($mode === 'contactadmin')
+{
+ define('SKIP_CHECK_BAN', true);
+ define('SKIP_CHECK_DISABLED', true);
+}
+
// Start session management
$user->session_begin();
$auth->acl($user->data);
@@ -29,7 +37,6 @@ $user->setup(array('memberlist', 'groups'));
$template->assign_var('S_IN_MEMBERLIST', true);
// Grab data
-$mode = request_var('mode', '');
$action = request_var('action', '');
$user_id = request_var('u', ANONYMOUS);
$username = request_var('un', '', true);
@@ -44,7 +51,7 @@ if ($mode == 'leaders')
}
// Check our mode...
-if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team', 'livesearch')))
+if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'contactadmin', 'searchuser', 'team', 'livesearch')))
{
trigger_error('NO_MODE');
}
@@ -52,6 +59,7 @@ if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'sear
switch ($mode)
{
case 'email':
+ case 'contactadmin':
break;
case 'livesearch':
@@ -386,7 +394,7 @@ switch ($mode)
$messenger->set_addresses($row);
$messenger->assign_vars(array(
- 'BOARD_CONTACT' => $config['board_contact'],
+ 'BOARD_CONTACT' => phpbb_get_board_contact($config, $phpEx),
'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
'TO_USERNAME' => htmlspecialchars_decode($row['username']),
'MESSAGE' => htmlspecialchars_decode($message))
@@ -632,7 +640,7 @@ switch ($mode)
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_view_profile', compact($vars)));
- $template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
+ $template->assign_vars(phpbb_show_profile($member, $user_notes_enabled, $warn_user_enabled));
// If the user has m_approve permission or a_user permission, then list then display unapproved posts
if ($auth->acl_getf_global('m_approve') || $auth->acl_get('a_user'))
@@ -660,6 +668,7 @@ switch ($mode)
'POSTS_IN_QUEUE'=> $member['posts_in_queue'],
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
+ 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $member['username']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
@@ -736,265 +745,50 @@ switch ($mode)
break;
+ case 'contactadmin':
case 'email':
-
- // Send an email
- $page_title = $user->lang['SEND_EMAIL'];
- $template_html = 'memberlist_email.html';
-
- add_form_key('memberlist_email');
-
- if (!$config['email_enable'])
- {
- trigger_error('EMAIL_DISABLED');
- }
-
- if (!$auth->acl_get('u_sendemail'))
- {
- trigger_error('NO_EMAIL');
- }
-
- // Are we trying to abuse the facility?
- if (time() - $user->data['user_emailtime'] < $config['flood_interval'])
+ if (!class_exists('messenger'))
{
- trigger_error('FLOOD_EMAIL_LIMIT');
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
}
- // Determine action...
- $user_id = request_var('u', 0);
- $topic_id = request_var('t', 0);
+ $user_id = request_var('u', 0);
+ $topic_id = request_var('t', 0);
- // Send email to user...
if ($user_id)
{
- if ($user_id == ANONYMOUS || !$config['board_email_form'])
- {
- trigger_error('NO_EMAIL');
- }
-
- // Get the appropriate username, etc.
- $sql = 'SELECT username, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_type
- FROM ' . USERS_TABLE . "
- WHERE user_id = $user_id
- AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- trigger_error('NO_USER');
- }
-
- // Can we send email to this user?
- if (!$row['user_allow_viewemail'] && !$auth->acl_get('a_user'))
- {
- trigger_error('NO_EMAIL');
- }
+ $form_name = 'user';
}
else if ($topic_id)
{
- // Send topic heads-up to email address
- $sql = 'SELECT forum_id, topic_title
- FROM ' . TOPICS_TABLE . "
- WHERE topic_id = $topic_id";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- trigger_error('NO_TOPIC');
- }
-
- if ($row['forum_id'])
- {
- if (!$auth->acl_get('f_read', $row['forum_id']))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- if (!$auth->acl_get('f_email', $row['forum_id']))
- {
- trigger_error('NO_EMAIL');
- }
- }
- else
- {
- // If global announcement, we need to check if the user is able to at least read and email in one forum...
- if (!$auth->acl_getf_global('f_read'))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- if (!$auth->acl_getf_global('f_email'))
- {
- trigger_error('NO_EMAIL');
- }
- }
+ $form_name = 'topic';
+ }
+ else if ($mode === 'contactadmin')
+ {
+ $form_name = 'admin';
}
else
{
trigger_error('NO_EMAIL');
}
+ $form = $phpbb_container->get('message.form.' . $form_name);
- $error = array();
-
- $name = utf8_normalize_nfc(request_var('name', '', true));
- $email = request_var('email', '');
- $email_lang = request_var('lang', $config['default_lang']);
- $subject = utf8_normalize_nfc(request_var('subject', '', true));
- $message = utf8_normalize_nfc(request_var('message', '', true));
- $cc = (isset($_POST['cc_email'])) ? true : false;
- $submit = (isset($_POST['submit'])) ? true : false;
-
- if ($submit)
+ $form->bind($request);
+ $error = $form->check_allow();
+ if ($error)
{
- if (!check_form_key('memberlist_email'))
- {
- $error[] = 'FORM_INVALID';
- }
- if ($user_id)
- {
- if (!$subject)
- {
- $error[] = $user->lang['EMPTY_SUBJECT_EMAIL'];
- }
-
- if (!$message)
- {
- $error[] = $user->lang['EMPTY_MESSAGE_EMAIL'];
- }
-
- $name = $row['username'];
- $email_lang = $row['user_lang'];
- $email = $row['user_email'];
- }
- else
- {
- if (!$email || !preg_match('/^' . get_preg_expression('email') . '$/i', $email))
- {
- $error[] = $user->lang['EMPTY_ADDRESS_EMAIL'];
- }
-
- if (!$name)
- {
- $error[] = $user->lang['EMPTY_NAME_EMAIL'];
- }
- }
-
- if (!sizeof($error))
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_emailtime = ' . time() . '
- WHERE user_id = ' . $user->data['user_id'];
- $result = $db->sql_query($sql);
-
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $messenger = new messenger(false);
- $email_tpl = ($user_id) ? 'profile_send_email' : 'email_notify';
-
- $mail_to_users = array();
-
- $mail_to_users[] = array(
- 'email_lang' => $email_lang,
- 'email' => $email,
- 'name' => $name,
- 'username' => ($user_id) ? $row['username'] : '',
- 'to_name' => $name,
- 'user_jabber' => ($user_id) ? $row['user_jabber'] : '',
- 'user_notify_type' => ($user_id) ? $row['user_notify_type'] : NOTIFY_EMAIL,
- 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
- 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
- );
-
- // Ok, now the same email if CC specified, but without exposing the users email address
- if ($cc)
- {
- $mail_to_users[] = array(
- 'email_lang' => $user->data['user_lang'],
- 'email' => $user->data['user_email'],
- 'name' => $user->data['username'],
- 'username' => $user->data['username'],
- 'to_name' => $name,
- 'user_jabber' => $user->data['user_jabber'],
- 'user_notify_type' => ($user_id) ? $user->data['user_notify_type'] : NOTIFY_EMAIL,
- 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
- 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
- );
- }
-
- foreach ($mail_to_users as $row)
- {
- $messenger->template($email_tpl, $row['email_lang']);
- $messenger->replyto($user->data['user_email']);
- $messenger->to($row['email'], $row['name']);
-
- if ($user_id)
- {
- $messenger->subject(htmlspecialchars_decode($subject));
- $messenger->im($row['user_jabber'], $row['username']);
- $notify_type = $row['user_notify_type'];
- }
- else
- {
- $notify_type = NOTIFY_EMAIL;
- }
-
- $messenger->anti_abuse_headers($config, $user);
-
- $messenger->assign_vars(array(
- 'BOARD_CONTACT' => $config['board_contact'],
- 'TO_USERNAME' => htmlspecialchars_decode($row['to_name']),
- 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']),
- 'MESSAGE' => htmlspecialchars_decode($message))
- );
-
- if ($topic_id)
- {
- $messenger->assign_vars(array(
- 'TOPIC_NAME' => htmlspecialchars_decode($row['topic_title']),
- 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=" . $row['forum_id'] . "&t=$topic_id")
- );
- }
-
- $messenger->send($notify_type);
- }
-
- meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
- $message = ($user_id) ? sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>') : sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$row['forum_id']}&amp;t=$topic_id") . '">', '</a>');
- trigger_error($user->lang['EMAIL_SENT'] . '<br /><br />' . $message);
- }
+ trigger_error($error);
}
- if ($user_id)
- {
- $template->assign_vars(array(
- 'S_SEND_USER' => true,
- 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $row['username']),
-
- 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'],
- 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id))
- );
- }
- else
+ if ($request->is_set_post('submit'))
{
- $template->assign_vars(array(
- 'EMAIL' => $email,
- 'NAME' => $name,
- 'S_LANG_OPTIONS' => language_select($email_lang),
-
- 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_TOPIC_EXPLAIN'],
- 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;t=' . $topic_id))
- );
+ $messenger = new messenger(false);
+ $form->submit($messenger);
}
- $template->assign_vars(array(
- 'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'SUBJECT' => $subject,
- 'MESSAGE' => $message,
- )
- );
+ $page_title = $form->get_page_title();
+ $template_html = $form->get_template_file();
+ $form->render($template);
break;
@@ -1606,7 +1400,7 @@ switch ($mode)
if ($sort_key == 'l')
{
// uasort($id_cache, create_function('$first, $second', "return (\$first['last_visit'] == \$second['last_visit']) ? 0 : ((\$first['last_visit'] < \$second['last_visit']) ? $lesser_than : ($lesser_than * -1));"));
- usort($user_list, '_sort_last_active');
+ usort($user_list, 'phpbb_sort_last_active');
}
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
@@ -1622,7 +1416,7 @@ switch ($mode)
$cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
}
- $memberrow = array_merge(show_profile($row), array(
+ $memberrow = array_merge(phpbb_show_profile($row), array(
'ROW_NUMBER' => $i + ($start + 1),
'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
@@ -1691,166 +1485,3 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
-
-/**
-* Prepare profile data
-*/
-function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
-{
- global $config, $auth, $template, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
-
- $username = $data['username'];
- $user_id = $data['user_id'];
-
- $rank_title = $rank_img = $rank_img_src = '';
- get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
-
- if ((!empty($data['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_user'))
- {
- $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_user')) ? '' : 'mailto:' . $data['user_email']);
- }
- else
- {
- $email = '';
- }
-
- if ($config['load_onlinetrack'])
- {
- $update_time = $config['load_online_time'] * 60;
- $online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
- }
- else
- {
- $online = false;
- }
-
- if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
- {
- $last_active = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
- }
- else
- {
- $last_active = '';
- }
-
- $age = '';
-
- if ($config['allow_birthdays'] && $data['user_birthday'])
- {
- list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday']));
-
- if ($bday_year)
- {
- $now = $user->create_datetime();
- $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
-
- $diff = $now['mon'] - $bday_month;
- if ($diff == 0)
- {
- $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
- }
- else
- {
- $diff = ($diff < 0) ? 1 : 0;
- }
-
- $age = max(0, (int) ($now['year'] - $bday_year - $diff));
- }
- }
-
- if (!function_exists('phpbb_get_banned_user_ids'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
-
- // Can this user receive a Private Message?
- $can_receive_pm = (
- // They must be a "normal" user
- $data['user_type'] != USER_IGNORE &&
-
- // They must not be deactivated by the administrator
- ($data['user_type'] != USER_INACTIVE || $data['user_inactive_reason'] != INACTIVE_MANUAL) &&
-
- // They must be able to read PMs
- sizeof($auth->acl_get_list($user_id, 'u_readpm')) &&
-
- // They must not be permanently banned
- !sizeof(phpbb_get_banned_user_ids($user_id, false)) &&
-
- // They must allow users to contact via PM
- (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm'])
- );
-
- // Dump it out to the template
- $template_data = array(
- 'AGE' => $age,
- 'RANK_TITLE' => $rank_title,
- 'JOINED' => $user->format_date($data['user_regdate']),
- 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
- 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
- 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
-
- 'USERNAME_FULL' => get_username_string('full', $user_id, $username, $data['user_colour']),
- 'USERNAME' => get_username_string('username', $user_id, $username, $data['user_colour']),
- 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']),
- 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']),
-
- 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])),
-
- 'AVATAR_IMG' => phpbb_get_user_avatar($data),
- 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
- 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
- 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
-
- 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
-
- 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '',
- 'U_NOTES' => ($user_notes_enabled && $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
- 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
- 'U_EMAIL' => $email,
- 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
-
- 'USER_JABBER' => $data['user_jabber'],
- 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
-
- 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
- 'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
- 'L_VIEWING_PROFILE' => $user->lang('VIEWING_PROFILE', $username),
- );
-
- /**
- * Preparing a user's data before displaying it in profile and memberlist
- *
- * @event core.memberlist_prepare_profile_data
- * @var array data Array with user's data
- * @var array template_data Template array with user's data
- * @since 3.1.0-a1
- */
- $vars = array('data', 'template_data');
- extract($phpbb_dispatcher->trigger_event('core.memberlist_prepare_profile_data', compact($vars)));
-
- return $template_data;
-}
-
-function _sort_last_active($first, $second)
-{
- global $id_cache, $sort_dir;
-
- $lesser_than = ($sort_dir === 'd') ? -1 : 1;
-
- if (isset($id_cache[$first]['group_leader']) && $id_cache[$first]['group_leader'] && (!isset($id_cache[$second]['group_leader']) || !$id_cache[$second]['group_leader']))
- {
- return -1;
- }
- else if (isset($id_cache[$second]['group_leader']) && (!isset($id_cache[$first]['group_leader']) || !$id_cache[$first]['group_leader']) && $id_cache[$second]['group_leader'])
- {
- return 1;
- }
- else
- {
- return $lesser_than * (int) ($id_cache[$first]['last_visit'] - $id_cache[$second]['last_visit']);
- }
-}
diff --git a/phpBB/phpbb/auth/provider/db.php b/phpBB/phpbb/auth/provider/db.php
index 3be1d3873f..142a47247f 100644
--- a/phpBB/phpbb/auth/provider/db.php
+++ b/phpBB/phpbb/auth/provider/db.php
@@ -78,7 +78,7 @@ class db extends \phpbb\auth\provider\base
$username_clean = utf8_clean_string($username);
- $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts
FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $this->db->sql_escape($username_clean) . "'";
$result = $this->db->sql_query($sql);
@@ -170,72 +170,8 @@ class db extends \phpbb\auth\provider\base
}
- // If the password convert flag is set we need to convert it
- if ($row['user_pass_convert'])
- {
- // enable super globals to get literal value
- // this is needed to prevent unicode normalization
- $super_globals_disabled = $this->request->super_globals_disabled();
- if ($super_globals_disabled)
- {
- $this->request->enable_super_globals();
- }
-
- // in phpBB2 passwords were used exactly as they were sent, with addslashes applied
- $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
- $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
- $password_new_format = $this->request->variable('password', '', true);
-
- if ($super_globals_disabled)
- {
- $this->request->disable_super_globals();
- }
-
- if ($password == $password_new_format)
- {
- if (!function_exists('utf8_to_cp1252'))
- {
- include($this->phpbb_root_path . 'includes/utf/data/recode_basic.' . $this->php_ext);
- }
-
- // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding
- // plain md5 support left in for conversions from other systems.
- if ((strlen($row['user_password']) == 34 && ($this->passwords_manager->check(md5($password_old_format), $row['user_password']) || $this->passwords_manager->check(md5(utf8_to_cp1252($password_old_format)), $row['user_password'])))
- || (strlen($row['user_password']) == 32 && (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])))
- {
- $hash = $this->passwords_manager->hash($password_new_format);
-
- // Update the password in the users table to the new format and remove user_pass_convert flag
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_password = \'' . $this->db->sql_escape($hash) . '\',
- user_pass_convert = 0
- WHERE user_id = ' . $row['user_id'];
- $this->db->sql_query($sql);
-
- $row['user_pass_convert'] = 0;
- $row['user_password'] = $hash;
- }
- else
- {
- // Although we weren't able to convert this password we have to
- // increase login attempt count to make sure this cannot be exploited
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_login_attempts = user_login_attempts + 1
- WHERE user_id = ' . (int) $row['user_id'] . '
- AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
- $this->db->sql_query($sql);
-
- return array(
- 'status' => LOGIN_ERROR_PASSWORD_CONVERT,
- 'error_msg' => 'LOGIN_ERROR_PASSWORD_CONVERT',
- 'user_row' => $row,
- );
- }
- }
- }
-
// Check password ...
- if (!$row['user_pass_convert'] && $this->passwords_manager->check($password, $row['user_password']))
+ if ($this->passwords_manager->check($password, $row['user_password']))
{
// Check for old password hash...
if ($this->passwords_manager->convert_flag || strlen($row['user_password']) == 32)
@@ -244,8 +180,7 @@ class db extends \phpbb\auth\provider\base
// Update the password in the users table to the new format
$sql = 'UPDATE ' . USERS_TABLE . "
- SET user_password = '" . $this->db->sql_escape($hash) . "',
- user_pass_convert = 0
+ SET user_password = '" . $this->db->sql_escape($hash) . "'
WHERE user_id = {$row['user_id']}";
$this->db->sql_query($sql);
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 2230ce15d1..7b71e3c844 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -14,7 +14,6 @@
namespace phpbb\auth\provider\oauth;
use OAuth\Common\Consumer\Credentials;
-use OAuth\Common\Http\Uri\Uri;
/**
* OAuth authentication provider for phpBB3
@@ -215,7 +214,7 @@ class oauth extends \phpbb\auth\provider\base
}
// Retrieve the user's account
- $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts
FROM ' . $this->users_table . '
WHERE user_id = ' . (int) $row['user_id'];
$result = $this->db->sql_query($sql);
@@ -224,7 +223,7 @@ class oauth extends \phpbb\auth\provider\base
if (!$row)
{
- throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
+ throw new \Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
}
// Update token storage to store the user_id
@@ -278,9 +277,10 @@ class oauth extends \phpbb\auth\provider\base
* @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
* @param string $query The query string of the
* current_uri used in redirection
- * @param array $scope The scope of the request against
+ * @param array $scopes The scope of the request against
* the api.
* @return \OAuth\Common\Service\ServiceInterface
+ * @throws \Exception
*/
protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array())
{
@@ -298,7 +298,7 @@ class oauth extends \phpbb\auth\provider\base
if (!$service)
{
- throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED');
+ throw new \Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED');
}
return $service;
@@ -617,7 +617,5 @@ class oauth extends \phpbb\auth\provider\base
$service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
$storage->clearToken($service_name);
-
- return;
}
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
index 31060c4ac4..bb98835e07 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -21,22 +21,22 @@ class facebook extends base
/**
* phpBB config
*
- * @var phpbb\config\config
+ * @var \phpbb\config\config
*/
protected $config;
/**
* phpBB request
*
- * @var phpbb\request\request_interface
+ * @var \phpbb\request\request_interface
*/
protected $request;
/**
* Constructor
*
- * @param phpbb\config\config $config
- * @param phpbb\request\request_interface $request
+ * @param \phpbb\config\config $config
+ * @param \phpbb\request\request_interface $request
*/
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
{
diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php
index c2d9e1f798..cb9f83a94f 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/google.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/google.php
@@ -21,22 +21,22 @@ class google extends base
/**
* phpBB config
*
- * @var phpbb\config\config
+ * @var \phpbb\config\config
*/
protected $config;
/**
* phpBB request
*
- * @var phpbb\request\request_interface
+ * @var \phpbb\request\request_interface
*/
protected $request;
/**
* Constructor
*
- * @param phpbb\config\config $config
- * @param phpbb\request\request_interface $request
+ * @param \phpbb\config\config $config
+ * @param \phpbb\request\request_interface $request
*/
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
{
diff --git a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
index 3744582b95..e84eb247b6 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
@@ -67,7 +67,7 @@ interface service_interface
/**
* Sets the external library service provider
*
- * @param \OAuth\Common\Service\ServiceInterface $service
+ * @param \OAuth\Common\Service\ServiceInterface $service_provider
*/
public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider);
}
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index b7d32bf246..fe1a376cfe 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -17,7 +17,6 @@ namespace phpbb\auth\provider\oauth;
use OAuth\OAuth1\Token\StdOAuth1Token;
use OAuth\Common\Token\TokenInterface;
use OAuth\Common\Storage\TokenStorageInterface;
-use OAuth\Common\Storage\Exception\StorageException;
use OAuth\Common\Storage\Exception\TokenNotFoundException;
/**
@@ -198,6 +197,7 @@ class token_storage implements TokenStorageInterface
/**
* Checks to see if an access token exists solely by the session_id of the user
*
+ * @param string $service The name of the OAuth service
* @return bool true if they have token, false if they don't
*/
public function has_access_token_by_session($service)
@@ -250,6 +250,7 @@ class token_storage implements TokenStorageInterface
*
* @param array $data
* @return mixed
+ * @throws \OAuth\Common\Storage\Exception\TokenNotFoundException
*/
protected function _retrieve_access_token($data)
{
diff --git a/phpBB/phpbb/auth/provider/provider_interface.php b/phpBB/phpbb/auth/provider/provider_interface.php
index 140353c88b..613297cefc 100644
--- a/phpBB/phpbb/auth/provider/provider_interface.php
+++ b/phpBB/phpbb/auth/provider/provider_interface.php
@@ -148,7 +148,7 @@ interface provider_interface
* user_id of an account needed to successfully link an external account to
* a forum account.
*
- * @param array $link_data Any data needed to link a phpBB account to
+ * @param array $login_link_data Any data needed to link a phpBB account to
* an external account.
* @return string|null Returns a string with a language constant if there
* is data missing or null if there is no error.
diff --git a/phpBB/phpbb/auth/provider_collection.php b/phpBB/phpbb/auth/provider_collection.php
new file mode 100644
index 0000000000..a74a2135dc
--- /dev/null
+++ b/phpBB/phpbb/auth/provider_collection.php
@@ -0,0 +1,65 @@
+<?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\auth;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+* Collection of auth providers to be configured at container compile time.
+*/
+class provider_collection extends \phpbb\di\service_collection
+{
+ /** @var \phpbb\config\config phpBB Config */
+ protected $config;
+
+ /**
+ * Constructor
+ *
+ * @param ContainerInterface $container Container object
+ * @param \phpbb\config\config $config phpBB config
+ */
+ public function __construct(ContainerInterface $container, \phpbb\config\config $config)
+ {
+ $this->container = $container;
+ $this->config = $config;
+ }
+
+ /**
+ * Get an auth provider.
+ *
+ * @return object Default auth provider selected in config if it
+ * does exist. Otherwise the standard db auth
+ * provider.
+ * @throws \RuntimeException If neither the auth provider that
+ * is specified by the phpBB config nor the db
+ * auth provider exist. The db auth provider
+ * should always exist in a phpBB installation.
+ */
+ public function get_provider()
+ {
+ if ($this->offsetExists('auth.provider.' . basename(trim($this->config['auth_method']))))
+ {
+ return $this->offsetGet('auth.provider.' . basename(trim($this->config['auth_method'])));
+ }
+ // Revert to db auth provider if selected method does not exist
+ else if ($this->offsetExists('auth.provider.db'))
+ {
+ return $this->offsetGet('auth.provider.db');
+ }
+ else
+ {
+ throw new \RuntimeException(sprintf('The authentication provider for the authentication method "%1$s" does not exist. It was not possible to recover from this by reverting to the database authentication provider.', $this->config['auth_method']));
+ }
+ }
+}
diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php
index 9c769071d4..b3ced7edf7 100644
--- a/phpBB/phpbb/avatar/driver/driver.php
+++ b/phpBB/phpbb/avatar/driver/driver.php
@@ -73,10 +73,9 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
* Construct a driver object
*
* @param \phpbb\config\config $config phpBB configuration
- * @param \phpbb\request\request $request Request object
* @param string $phpbb_root_path Path to the phpBB root
* @param string $php_ext PHP file extension
- * @param \phpbb_path_helper $path_helper phpBB path helper
+ * @param \phpbb\path_helper $path_helper phpBB path helper
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
*/
public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
@@ -89,7 +88,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_custom_html($user, $row, $alt = '')
{
@@ -97,7 +96,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form_acp($user)
{
@@ -105,7 +104,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function delete($row)
{
@@ -113,7 +112,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_name()
{
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
index 34b894c2a7..4aa7445d20 100644
--- a/phpBB/phpbb/avatar/driver/gravatar.php
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -24,7 +24,7 @@ class gravatar extends \phpbb\avatar\driver\driver
const GRAVATAR_URL = '//secure.gravatar.com/avatar/';
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_data($row)
{
@@ -36,7 +36,7 @@ class gravatar extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_custom_html($user, $row, $alt = '')
{
@@ -47,7 +47,7 @@ class gravatar extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form($request, $template, $user, $row, &$error)
{
@@ -61,7 +61,7 @@ class gravatar extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function process_form($request, $template, $user, $row, &$error)
{
@@ -81,7 +81,8 @@ class gravatar extends \phpbb\avatar\driver\driver
array(
'email' => array(
array('string', false, 6, 60),
- array('email'))
+ array('email'),
+ ),
)
);
@@ -150,7 +151,7 @@ class gravatar extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_template_name()
{
@@ -160,6 +161,8 @@ class gravatar extends \phpbb\avatar\driver\driver
/**
* Build gravatar URL for output on page
*
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
* @return string Gravatar URL
*/
protected function get_gravatar_url($row)
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index 00e519e3f2..ff1996854b 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -19,7 +19,7 @@ namespace phpbb\avatar\driver;
class local extends \phpbb\avatar\driver\driver
{
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_data($row)
{
@@ -31,12 +31,12 @@ class local extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form($request, $template, $user, $row, &$error)
{
$avatar_list = $this->get_avatar_list($user);
- $category = $request->variable('avatar_local_cat', '');
+ $category = $request->variable('avatar_local_cat', key($avatar_list));
foreach ($avatar_list as $cat => $null)
{
@@ -99,7 +99,7 @@ class local extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form_acp($user)
{
@@ -109,7 +109,7 @@ class local extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function process_form($request, $template, $user, $row, &$error)
{
@@ -131,14 +131,14 @@ class local extends \phpbb\avatar\driver\driver
}
return array(
- 'avatar' => ($category != $user->lang['MAIN']) ? $category . '/' . $file : $file,
+ 'avatar' => ($category != $user->lang['NO_AVATAR_CATEGORY']) ? $category . '/' . $file : $file,
'avatar_width' => $avatar_list[$category][urldecode($file)]['width'],
'avatar_height' => $avatar_list[$category][urldecode($file)]['height'],
);
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_template_name()
{
@@ -179,9 +179,9 @@ class local extends \phpbb\avatar\driver\driver
{
$dims = array(0, 0);
}
- $cat = ($path == $file_path) ? $user->lang['MAIN'] : str_replace("$path/", '', $file_path);
+ $cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path);
$avatar_list[$cat][$image] = array(
- 'file' => ($cat != $user->lang['MAIN']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
+ 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? 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 d97093ae24..455ddebf62 100644
--- a/phpBB/phpbb/avatar/driver/remote.php
+++ b/phpBB/phpbb/avatar/driver/remote.php
@@ -19,7 +19,7 @@ namespace phpbb\avatar\driver;
class remote extends \phpbb\avatar\driver\driver
{
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_data($row)
{
@@ -31,7 +31,7 @@ class remote extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form($request, $template, $user, $row, &$error)
{
@@ -45,7 +45,7 @@ class remote extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function process_form($request, $template, $user, $row, &$error)
{
@@ -191,7 +191,7 @@ class remote extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_template_name()
{
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index bef75d61c1..c43004f340 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -19,7 +19,7 @@ namespace phpbb\avatar\driver;
class upload extends \phpbb\avatar\driver\driver
{
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_data($row, $ignore_config = false)
{
@@ -31,7 +31,7 @@ class upload extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form($request, $template, $user, $row, &$error)
{
@@ -49,7 +49,7 @@ class upload extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function process_form($request, $template, $user, $row, &$error)
{
@@ -72,7 +72,7 @@ class upload extends \phpbb\avatar\driver\driver
{
$file = $upload->form_upload('avatar_upload_file');
}
- elseif (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
+ else if (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
{
if (!preg_match('#^(http|https|ftp)://#i', $url))
{
@@ -143,7 +143,7 @@ class upload extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function prepare_form_acp($user)
{
@@ -155,7 +155,7 @@ class upload extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function delete($row)
{
@@ -171,7 +171,7 @@ class upload extends \phpbb\avatar\driver\driver
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_template_name()
{
diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php
index 7d08362ed8..9ac9ca0c59 100644
--- a/phpBB/phpbb/cache/driver/driver_interface.php
+++ b/phpBB/phpbb/cache/driver/driver_interface.php
@@ -142,7 +142,7 @@ interface driver_interface
* Fetch a field from the current row of a cached database result (database)
*
* @param int $query_id
- * @param $field The name of the column.
+ * @param string $field The name of the column.
* @return string|bool The field of the query result if found in the cache,
* otherwise false.
*/
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index 57890cc3a2..b32af32d25 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -28,6 +28,8 @@ class file extends \phpbb\cache\driver\base
/**
* Set cache path
+ *
+ * @param string $cache_dir Define the path to the cache directory (default: $phpbb_root_path . 'cache/')
*/
function __construct($cache_dir = null)
{
@@ -222,7 +224,7 @@ class file extends \phpbb\cache\driver\base
{
$this->remove_dir($fileInfo->getPathname());
}
- elseif (strpos($filename, 'container_') === 0 ||
+ else if (strpos($filename, 'container_') === 0 ||
strpos($filename, 'url_matcher') === 0 ||
strpos($filename, 'sql_') === 0 ||
strpos($filename, 'data_') === 0)
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index c9aa6525c0..e47177758a 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -316,13 +316,6 @@ class service
ORDER BY LEN(bot_agent) DESC';
break;
- case 'firebird':
- $sql = 'SELECT user_id, bot_agent, bot_ip
- FROM ' . BOTS_TABLE . '
- WHERE bot_active = 1
- ORDER BY CHAR_LENGTH(bot_agent) DESC';
- break;
-
// LENGTH supported by MySQL, IBM DB2 and Oracle for sure...
default:
$sql = 'SELECT user_id, bot_agent, bot_ip
diff --git a/phpBB/phpbb/config/config.php b/phpBB/phpbb/config/config.php
index 8cbe1e1e2d..aaad333006 100644
--- a/phpBB/phpbb/config/config.php
+++ b/phpBB/phpbb/config/config.php
@@ -37,7 +37,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
/**
* Retrieves an ArrayIterator over the configuration values.
*
- * @return ArrayIterator An iterator over all config data
+ * @return \ArrayIterator An iterator over all config data
*/
public function getIterator()
{
diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php
index fb8588334e..b1e3ef5da4 100644
--- a/phpBB/phpbb/config/db_text.php
+++ b/phpBB/phpbb/config/db_text.php
@@ -105,8 +105,8 @@ class db_text
if (!$this->db->sql_affectedrows($result))
{
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
- 'config_name' => $key,
- 'config_value' => $value,
+ 'config_name' => (string) $key,
+ 'config_value' => (string) $value,
));
$this->db->sql_query($sql);
}
diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php
index da2bfbb49a..b1f0635913 100644
--- a/phpBB/phpbb/console/application.php
+++ b/phpBB/phpbb/console/application.php
@@ -13,15 +13,93 @@
namespace phpbb\console;
+use Symfony\Component\Console\Shell;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\TaggedContainerInterface;
class application extends \Symfony\Component\Console\Application
{
- function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command')
+ /**
+ * @var bool Indicates whether or not we are in a shell
+ */
+ protected $in_shell = false;
+
+ /**
+ * @var \phpbb\user User object
+ */
+ protected $user;
+
+ /**
+ * @param string $name The name of the application
+ * @param string $version The version of the application
+ * @param \phpbb\user $user The user which runs the application (used for translation)
+ */
+ public function __construct($name, $version, \phpbb\user $user)
+ {
+ parent::__construct($name, $version);
+
+ $this->user = $user;
+ }
+
+ /**
+ * Gets the help message.
+ *
+ * It's a hack of the default help message to display the --shell
+ * option only for the application and not for all the commands.
+ *
+ * @return string A help message.
+ */
+ public function getHelp()
+ {
+ // If we are already in a shell
+ // we do not want to have the --shell option available
+ if ($this->in_shell)
+ {
+ return parent::getHelp();
+ }
+
+ $this->getDefinition()->addOption(new InputOption(
+ '--shell',
+ '-s',
+ InputOption::VALUE_NONE,
+ $this->user->lang('CLI_DESCRIPTION_OPTION_SHELL')
+ ));
+
+ return parent::getHelp();
+ }
+
+ /**
+ * Register a set of commands from the container
+ *
+ * @param TaggedContainerInterface $container The container
+ * @param string $tag The tag used to register the commands
+ */
+ public function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command')
{
foreach($container->findTaggedServiceIds($tag) as $id => $void)
{
$this->add($container->get($id));
}
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function doRun(InputInterface $input, OutputInterface $output)
+ {
+ // Run a shell if the --shell (or -s) option is set and if no command name is specified
+ // Also, we do not want to have the --shell option available if we are already in a shell
+ if (!$this->in_shell && $this->getCommandName($input) === null && $input->hasParameterOption(array('--shell', '-s')))
+ {
+ $shell = new Shell($this);
+ $this->in_shell = true;
+ $shell->run();
+
+ return 0;
+ }
+
+ return parent::doRun($input, $output);
+ }
}
diff --git a/phpBB/phpbb/console/command/cache/purge.php b/phpBB/phpbb/console/command/cache/purge.php
index 1e2adaeb4d..379d2aa1ca 100644
--- a/phpBB/phpbb/console/command/cache/purge.php
+++ b/phpBB/phpbb/console/command/cache/purge.php
@@ -35,6 +35,16 @@ class purge extends \phpbb\console\command\command
/** @var \phpbb\config\config */
protected $config;
+ /**
+ * Constructor
+ *
+ * @param \phpbb\cache\driver\driver_interface $cache Cache instance
+ * @param \phpbb\db\driver\driver_interface $db Database connection
+ * @param \phpbb\auth\auth $auth Auth instance
+ * @param \phpbb\log\log $log Logger instance
+ * @param \phpbb\user $user User instance
+ * @param \phpbb\config\config $config Config instance
+ */
public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\auth\auth $auth, \phpbb\log\log $log, \phpbb\user $user, \phpbb\config\config $config)
{
$this->cache = $cache;
@@ -43,10 +53,12 @@ class purge extends \phpbb\console\command\command
$this->log = $log;
$this->user = $user;
$this->config = $config;
- $this->user->add_lang(array('acp/common'));
parent::__construct();
}
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -55,6 +67,16 @@ class purge extends \phpbb\console\command\command
;
}
+ /**
+ * Executes the command cache:purge.
+ *
+ * Purge the cache (including permissions) and increment the asset_version number
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->config->increment('assets_version', 1);
diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php
index e29afdbf82..1310bb18b4 100644
--- a/phpBB/phpbb/console/command/config/delete.php
+++ b/phpBB/phpbb/console/command/config/delete.php
@@ -14,11 +14,13 @@ namespace phpbb\console\command\config;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class delete extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -32,6 +34,17 @@ class delete extends command
;
}
+ /**
+ * Executes the command config:delete.
+ *
+ * Removes a configuration option
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::delete()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php
index 0ed2a12608..ee8c65110e 100644
--- a/phpBB/phpbb/console/command/config/get.php
+++ b/phpBB/phpbb/console/command/config/get.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class get extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -38,6 +41,17 @@ class get extends command
;
}
+ /**
+ * Executes the command config:get.
+ *
+ * Retrieves a configuration value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::offsetGet()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
@@ -46,7 +60,7 @@ class get extends command
{
$output->write($this->config[$key]);
}
- elseif (isset($this->config[$key]))
+ else if (isset($this->config[$key]))
{
$output->writeln($this->config[$key]);
}
diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php
index 64b5d42b9d..21f0660e61 100644
--- a/phpBB/phpbb/console/command/config/increment.php
+++ b/phpBB/phpbb/console/command/config/increment.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class increment extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -43,6 +46,17 @@ class increment extends command
;
}
+ /**
+ * Executes the command config:increment.
+ *
+ * Increments an integer configuration value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::increment()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php
index fce1edb93e..587b7fb0de 100644
--- a/phpBB/phpbb/console/command/config/set.php
+++ b/phpBB/phpbb/console/command/config/set.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class set extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -43,6 +46,17 @@ class set extends command
;
}
+ /**
+ * Executes the command config:set.
+ *
+ * Sets a configuration option's value.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ * @see \phpbb\config\config::set()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php
index 4df2d90722..a7a52155f9 100644
--- a/phpBB/phpbb/console/command/config/set_atomic.php
+++ b/phpBB/phpbb/console/command/config/set_atomic.php
@@ -19,6 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
class set_atomic extends command
{
+ /**
+ * {@inheritdoc}
+ */
protected function configure()
{
$this
@@ -48,6 +51,18 @@ class set_atomic extends command
;
}
+ /**
+ * Executes the command config:set-atomic.
+ *
+ * Sets a configuration option's value only if the old_value matches the
+ * current configuration value or the configuration value does not exist yet.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return bool True if the value was changed, false otherwise.
+ * @see \phpbb\config\config::set_atomic()
+ */
protected function execute(InputInterface $input, OutputInterface $output)
{
$key = $input->getArgument('key');
diff --git a/phpBB/phpbb/console/command/cron/cron_list.php b/phpBB/phpbb/console/command/cron/cron_list.php
new file mode 100644
index 0000000000..4f4228d9b3
--- /dev/null
+++ b/phpBB/phpbb/console/command/cron/cron_list.php
@@ -0,0 +1,115 @@
+<?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\console\command\cron;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class cron_list extends \phpbb\console\command\command
+{
+ /** @var \phpbb\cron\manager */
+ protected $cron_manager;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\cron\manager $cron_manager Cron manager
+ * @param \phpbb\user $user User instance
+ */
+ public function __construct(\phpbb\cron\manager $cron_manager, \phpbb\user $user)
+ {
+ $this->cron_manager = $cron_manager;
+ $this->user = $user;
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure()
+ {
+ $this
+ ->setName('cron:list')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_CRON_LIST'))
+ ;
+ }
+
+ /**
+ * Executes the command cron:list.
+ *
+ * Prints a list of ready and unready cron jobs.
+ *
+ * @param InputInterface $input An InputInterface instance
+ * @param OutputInterface $output An OutputInterface instance
+ *
+ * @return null
+ */
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $tasks = $this->cron_manager->get_tasks();
+
+ if (empty($tasks))
+ {
+ $output->writeln($this->user->lang('CRON_NO_TASKS'));
+ return;
+ }
+
+ $ready_tasks = array();
+ $not_ready_tasks = array();
+ foreach ($tasks as $task)
+ {
+ if ($task->is_ready())
+ {
+ $ready_tasks[] = $task;
+ }
+ else
+ {
+ $not_ready_tasks[] = $task;
+ }
+ }
+
+ if (!empty($ready_tasks))
+ {
+ $output->writeln('<info>' . $this->user->lang('TASKS_READY') . '</info>');
+ $this->print_tasks_names($ready_tasks, $output);
+ }
+
+ if (!empty($ready_tasks) && !empty($not_ready_tasks))
+ {
+ $output->writeln('');
+ }
+
+ if (!empty($not_ready_tasks))
+ {
+ $output->writeln('<info>' . $this->user->lang('TASKS_NOT_READY') . '</info>');
+ $this->print_tasks_names($not_ready_tasks, $output);
+ }
+ }
+
+ /**
+ * Print a list of cron jobs
+ *
+ * @param array $tasks A list of task to display
+ * @param OutputInterface $output An OutputInterface instance
+ */
+ protected function print_tasks_names(array $tasks, OutputInterface $output)
+ {
+ foreach ($tasks as $task)
+ {
+ $output->writeln($task->get_name());
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
new file mode 100644
index 0000000000..0b365ece67
--- /dev/null
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -0,0 +1,175 @@
+<?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\console\command\cron;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class run extends \phpbb\console\command\command
+{
+ /** @var \phpbb\cron\manager */
+ protected $cron_manager;
+
+ /** @var \phpbb\lock\db */
+ protected $lock_db;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /**
+ * Construct method
+ *
+ * @param \phpbb\cron\manager $cron_manager The cron manager containing
+ * the cron tasks to be executed.
+ * @param \phpbb\lock\db $lock_db The lock for accessing database.
+ * @param \phpbb\user $user The user object (used to get language information)
+ */
+ public function __construct(\phpbb\cron\manager $cron_manager, \phpbb\lock\db $lock_db, \phpbb\user $user)
+ {
+ $this->cron_manager = $cron_manager;
+ $this->lock_db = $lock_db;
+ $this->user = $user;
+ parent::__construct();
+ }
+
+ /**
+ * Sets the command name and description
+ *
+ * @return null
+ */
+ protected function configure()
+ {
+ $this
+ ->setName('cron:run')
+ ->setDescription($this->user->lang('CLI_DESCRIPTION_CRON_RUN'))
+ ->addArgument('name', InputArgument::OPTIONAL, $this->user->lang('CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1'))
+ ;
+ }
+
+ /**
+ * Executes the command cron:run.
+ *
+ * Tries to acquire the cron lock, then if no argument has been given runs all ready cron tasks.
+ * If the cron lock can not be obtained, an error message is printed
+ * and the exit status is set to 1.
+ * If the verbose option is specified, each start of a task is printed.
+ * Otherwise there is no output.
+ * If an argument is given to the command, only the task whose name matches the
+ * argument will be started. If verbose option is specified,
+ * an info message containing the name of the task is printed.
+ * If no task matches the argument given, an error message is printed
+ * and the exit status is set to 2.
+ *
+ * @param InputInterface $input The input stream used to get the argument and verboe option.
+ * @param OutputInterface $output The output stream, used for printing verbose-mode and error information.
+ *
+ * @return int 0 if all is ok, 1 if a lock error occured and 2 if no task matching the argument was found.
+ */
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ if ($this->lock_db->acquire())
+ {
+ $task_name = $input->getArgument('name');
+ if ($task_name)
+ {
+ $exit_status = $this->run_one($input, $output, $task_name);
+ }
+ else
+ {
+ $exit_status = $this->run_all($input, $output);
+ }
+
+ $this->lock_db->release();
+ return $exit_status;
+ }
+ else
+ {
+ $output->writeln('<error>' . $this->user->lang('CRON_LOCK_ERROR') . '</error>');
+ return 1;
+ }
+ }
+
+ /**
+ * Executes all ready cron tasks.
+ *
+ * If verbose mode is set, an info message will be printed if there is no task to
+ * be run, or else for each starting task.
+ *
+ * @see execute
+ * @param InputInterface $input The input stream used to get the argument and verbose option.
+ * @param OutputInterface $output The output stream, used for printing verbose-mode and error information.
+ * @return int 0
+ */
+ protected function run_all(InputInterface $input, OutputInterface $output)
+ {
+ $run_tasks = $this->cron_manager->find_all_ready_tasks();
+
+ if ($run_tasks)
+ {
+ foreach ($run_tasks as $task)
+ {
+ if ($input->getOption('verbose'))
+ {
+ $output->writeln('<info>' . $this->user->lang('RUNNING_TASK', $task->get_name()) . '</info>');
+ }
+
+ $task->run();
+ }
+ }
+ else
+ {
+ if ($input->getOption('verbose'))
+ {
+ $output->writeln('<info>' . $this->user->lang('CRON_NO_TASK') . '</info>');
+ }
+ }
+
+ return 0;
+ }
+
+ /**
+ * Executes a given cron task, if it is ready.
+ *
+ * If there is a task whose name matches $task_name, it is run and 0 is returned.
+ * and if verbose mode is set, print an info message with the name of the task.
+ * If there is no task matching $task_name, the function prints an error message
+ * and returns with status 2.
+ *
+ * @see execute
+ * @param string $task_name The name of the task that should be run.
+ * @param InputInterface $input The input stream used to get the argument and verbose option.
+ * @param OutputInterface $output The output stream, used for printing verbose-mode and error information.
+ * @return int 0 if all is well, 2 if no task matches $task_name.
+ */
+ protected function run_one(InputInterface $input, OutputInterface $output, $task_name)
+ {
+ $task = $this->cron_manager->find_task($task_name);
+ if ($task)
+ {
+ if ($input->getOption('verbose'))
+ {
+ $output->writeln('<info>' . $this->user->lang('RUNNING_TASK', $task_name) . '</info>');
+ }
+
+ $task->run();
+ return 0;
+ }
+ else
+ {
+ $output->writeln('<error>' . $this->user->lang('CRON_NO_SUCH_TASK', $task_name) . '</error>');
+ return 2;
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index 0f74664095..2abeaf5268 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -43,7 +43,7 @@ class migrate extends \phpbb\console\command\command
$this->cache = $cache;
$this->log = $log;
$this->user = $user;
- $this->user->add_lang(array('common', 'acp/common', 'install', 'migrator'));
+ $this->user->add_lang(array('common', 'install', 'migrator'));
parent::__construct();
}
diff --git a/phpBB/phpbb/console/command/dev/migration_tips.php b/phpBB/phpbb/console/command/dev/migration_tips.php
new file mode 100644
index 0000000000..c2f61568ea
--- /dev/null
+++ b/phpBB/phpbb/console/command/dev/migration_tips.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\console\command\dev;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class migration_tips extends \phpbb\console\command\command
+{
+ /** @var \phpbb\extension\manager */
+ protected $extension_manager;
+
+ function __construct(\phpbb\extension\manager $extension_manager)
+ {
+ $this->extension_manager = $extension_manager;
+ parent::__construct();
+ }
+
+ protected function configure()
+ {
+ $this
+ ->setName('dev:migration-tips')
+ ->setDescription('Finds migrations that are not depended on.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $migrations = $this->extension_manager->get_finder()
+ ->set_extensions(array())
+ ->core_path('phpbb/db/migration/data/')
+ ->get_classes();
+ $tips = $migrations;
+
+ foreach ($migrations as $migration_class)
+ {
+ foreach ($migration_class::depends_on() as $dependency)
+ {
+ $tips_key = array_search($dependency, $tips);
+ if ($tips_key !== false)
+ {
+ unset($tips[$tips_key]);
+ }
+ }
+ }
+
+ $output->writeln("\t\tarray(");
+ foreach ($tips as $migration)
+ {
+ $output->writeln("\t\t\t'{$migration}',");
+ }
+ $output->writeln("\t\t);");
+ }
+}
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 380a479e4a..1f50032f26 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -54,10 +54,13 @@ class content_visibility
*
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\db\driver\driver_interface $db Database object
- * @param \phpbb\user $user User object
+ * @param \phpbb\user $user User object
* @param string $phpbb_root_path Root path
* @param string $php_ext PHP Extension
- * @return null
+ * @param string $forums_table Forums table name
+ * @param string $posts_table Posts table name
+ * @param string $topics_table Topics table name
+ * @param string $users_table Users table name
*/
public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table)
{
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index 7b232294f0..930bc42a98 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -101,7 +101,7 @@ class helper
* @param string $route Name of the route to travel
* @param array $params String or array of additional url parameters
* @param bool $is_amp Is url using &amp; (true) or & (false)
- * @param string $session_id Possibility to use a custom session id instead of the global one
+ * @param string|bool $session_id Possibility to use a custom session id instead of the global one
* @return string The URL already passed through append_sid()
*/
public function route($route, array $params = array(), $is_amp = true, $session_id = false)
@@ -139,8 +139,8 @@ class helper
* Output an error, effectively the same thing as trigger_error
*
* @param string $message The error message
- * @param string $code The error code (e.g. 404, 500, 503, etc.)
- * @return Response A Reponse instance
+ * @param int $code The error code (e.g. 404, 500, 503, etc.)
+ * @return Response A Response instance
*/
public function error($message, $code = 500)
{
diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php
index 91f3a07fb1..fffd4f0428 100644
--- a/phpBB/phpbb/controller/provider.php
+++ b/phpBB/phpbb/controller/provider.php
@@ -37,7 +37,7 @@ class provider
/**
* Construct method
*
- * @param array() $routing_files Array of strings containing paths
+ * @param array $routing_files Array of strings containing paths
* to YAML files holding route information
*/
public function __construct($routing_files = array())
@@ -46,10 +46,12 @@ class provider
}
/**
- * @param \phpbb\extension\finder $finder
+ * Find the list of routing files
+ *
+ * @param \phpbb\finder $finder
* @return null
*/
- public function find_routing_files(\phpbb\extension\finder $finder)
+ public function find_routing_files(\phpbb\finder $finder)
{
// We hardcode the path to the core config directory
// because the finder cannot find it
@@ -61,10 +63,10 @@ class provider
}
/**
- * Find a list of controllers and return it
+ * Find a list of controllers
*
* @param string $base_path Base path to prepend to file paths
- * @return null
+ * @return provider
*/
public function find($base_path = '')
{
diff --git a/phpBB/phpbb/controller/resolver.php b/phpBB/phpbb/controller/resolver.php
index 77532767fc..efab34b701 100644
--- a/phpBB/phpbb/controller/resolver.php
+++ b/phpBB/phpbb/controller/resolver.php
@@ -122,7 +122,7 @@ class resolver implements ControllerResolverInterface
*
* @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object
* @param mixed $controller A callable (controller class, method)
- * @return bool False
+ * @return array An array of arguments to pass to the controller
* @throws \phpbb\controller\exception
*/
public function getArguments(Request $request, $controller)
diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
index 1eb8edf033..b0601e641a 100644
--- a/phpBB/phpbb/cron/manager.php
+++ b/phpBB/phpbb/cron/manager.php
@@ -34,7 +34,7 @@ class manager
/**
* Constructor. Loads all available tasks.
*
- * @param array|Traversable $tasks Provides an iterable set of task names
+ * @param array|\Traversable $tasks Provides an iterable set of task names
*/
public function __construct($tasks, $phpbb_root_path, $php_ext)
{
@@ -48,7 +48,7 @@ class manager
* Loads tasks given by name, wraps them
* and puts them into $this->tasks.
*
- * @param array|Traversable $tasks Array of instances of \phpbb\cron\task\task
+ * @param array|\Traversable $tasks Array of instances of \phpbb\cron\task\task
*
* @return null
*/
@@ -122,6 +122,16 @@ class manager
}
/**
+ * Find all tasks and return them.
+ *
+ * @return array List of all tasks.
+ */
+ public function get_tasks()
+ {
+ return $this->tasks;
+ }
+
+ /**
* Wraps a task inside an instance of \phpbb\cron\task\wrapper.
*
* @param \phpbb\cron\task\task $task The task.
diff --git a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
index ca5044343f..381483c798 100644
--- a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
+++ b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
@@ -164,6 +164,7 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
* @param int $forum_id Forum ID of forum that should be pruned
* @param string $prune_mode Prune mode
* @param int $prune_flags Prune flags
+ * @param int $prune_days Prune date in days
* @param int $prune_freq Prune frequency
* @return null
*/
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
index 47f742f802..9c9292a8e4 100644
--- a/phpBB/phpbb/datetime.php
+++ b/phpBB/phpbb/datetime.php
@@ -39,8 +39,8 @@ class datetime extends \DateTime
* the user context and modify the timezone to the users selected timezone if one is not set.
*
* @param string $time String in a format accepted by strtotime().
- * @param DateTimeZone $timezone Time zone of the time.
- * @param user User object for context.
+ * @param \DateTimeZone $timezone Time zone of the time.
+ * @param user $user object for context.
*/
public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
{
@@ -120,7 +120,7 @@ class datetime extends \DateTime
/**
* Magic method to convert DateTime object to string
*
- * @return Formatted date time, according to the users default settings.
+ * @return string Formatted date time, according to the users default settings.
*/
public function __toString()
{
diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php
deleted file mode 100644
index c7b185a577..0000000000
--- a/phpBB/phpbb/db/driver/firebird.php
+++ /dev/null
@@ -1,526 +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.
-*
-*/
-
-namespace phpbb\db\driver;
-
-/**
-* Firebird/Interbase Database Abstraction Layer
-* Minimum Requirement is Firebird 2.1
-*/
-class firebird extends \phpbb\db\driver\driver
-{
- var $last_query_text = '';
- var $service_handle = false;
- var $affected_rows = 0;
- var $connect_error = '';
-
- /**
- * {@inheritDoc}
- */
- function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
- {
- $this->persistency = $persistency;
- $this->user = $sqluser;
- $this->server = $sqlserver . (($port) ? ':' . $port : '');
- $this->dbname = str_replace('\\', '/', $database);
-
- // There are three possibilities to connect to an interbase db
- if (!$this->server)
- {
- $use_database = $this->dbname;
- }
- else if (strpos($this->server, '//') === 0)
- {
- $use_database = $this->server . $this->dbname;
- }
- else
- {
- $use_database = $this->server . ':' . $this->dbname;
- }
-
- if ($this->persistency)
- {
- if (!function_exists('ibase_pconnect'))
- {
- $this->connect_error = 'ibase_pconnect function does not exist, is interbase extension installed?';
- return $this->sql_error('');
- }
- $this->db_connect_id = @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3);
- }
- else
- {
- if (!function_exists('ibase_connect'))
- {
- $this->connect_error = 'ibase_connect function does not exist, is interbase extension installed?';
- return $this->sql_error('');
- }
- $this->db_connect_id = @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
- }
-
- // Do not call ibase_service_attach if connection failed,
- // otherwise error message from ibase_(p)connect call will be clobbered.
- if ($this->db_connect_id && function_exists('ibase_service_attach') && $this->server)
- {
- $this->service_handle = @ibase_service_attach($this->server, $this->user, $sqlpassword);
- }
- else
- {
- $this->service_handle = false;
- }
-
- return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_server_info($raw = false, $use_cache = true)
- {
- /**
- * force $use_cache false. I didn't research why the caching code there is no caching code
- * but I assume its because the IB extension provides a direct method to access it
- * without a query.
- */
-
- $use_cache = false;
-
- if ($this->service_handle !== false && function_exists('ibase_server_info'))
- {
- return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION);
- }
-
- return ($raw) ? '2.1' : 'Firebird/Interbase';
- }
-
- /**
- * SQL Transaction
- * @access private
- */
- function _sql_transaction($status = 'begin')
- {
- switch ($status)
- {
- case 'begin':
- return true;
- break;
-
- case 'commit':
- return @ibase_commit();
- break;
-
- case 'rollback':
- return @ibase_rollback();
- break;
- }
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_query($query = '', $cache_ttl = 0)
- {
- if ($query != '')
- {
- global $cache;
-
- // EXPLAIN only in extra debug mode
- if (defined('DEBUG'))
- {
- $this->sql_report('start', $query);
- }
-
- $this->last_query_text = $query;
- $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
- $this->sql_add_num_queries($this->query_result);
-
- if ($this->query_result === false)
- {
- $array = array();
- // We overcome Firebird's 32767 char limit by binding vars
- if (strlen($query) > 32767)
- {
- if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs))
- {
- if (strlen($regs[3]) > 32767)
- {
- preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
-
- $inserts = $vals[0];
- unset($vals);
-
- foreach ($inserts as $key => $value)
- {
- if (!empty($value) && $value[0] === "'" && strlen($value) > 32769) // check to see if this thing is greater than the max + 'x2
- {
- $inserts[$key] = '?';
- $array[] = str_replace("''", "'", substr($value, 1, -1));
- }
- }
-
- $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')';
- }
- }
- else if (preg_match('/^(UPDATE ([\\w_]++)\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|\\d+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+)\\s+(WHERE.*)$/s', $query, $data))
- {
- if (strlen($data[3]) > 32767)
- {
- $update = $data[1];
- $where = $data[4];
- preg_match_all('/(\\w++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|[\d-.]++)/', $data[3], $temp, PREG_SET_ORDER);
- unset($data);
-
- $cols = array();
- foreach ($temp as $value)
- {
- if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 32769) // check to see if this thing is greater than the max + 'x2
- {
- $array[] = str_replace("''", "'", substr($value[2], 1, -1));
- $cols[] = $value[1] . '=?';
- }
- else
- {
- $cols[] = $value[1] . '=' . $value[2];
- }
- }
-
- $query = $update . implode(', ', $cols) . ' ' . $where;
- unset($cols);
- }
- }
- }
-
- if (!function_exists('ibase_affected_rows') && (preg_match('/^UPDATE ([\w_]++)\s+SET [\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\s*[\w_]++\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+\s+(WHERE.*)?$/s', $query, $regs) || preg_match('/^DELETE FROM ([\w_]++)\s*(WHERE\s*.*)?$/s', $query, $regs)))
- {
- $affected_sql = 'SELECT COUNT(*) as num_rows_affected FROM ' . $regs[1];
- if (!empty($regs[2]))
- {
- $affected_sql .= ' ' . $regs[2];
- }
-
- if (!($temp_q_id = @ibase_query($this->db_connect_id, $affected_sql)))
- {
- return false;
- }
-
- $temp_result = @ibase_fetch_assoc($temp_q_id);
- @ibase_free_result($temp_q_id);
-
- $this->affected_rows = ($temp_result) ? $temp_result['NUM_ROWS_AFFECTED'] : false;
- }
-
- if (sizeof($array))
- {
- $p_query = @ibase_prepare($this->db_connect_id, $query);
- array_unshift($array, $p_query);
- $this->query_result = call_user_func_array('ibase_execute', $array);
- unset($array);
-
- if ($this->query_result === false)
- {
- $this->sql_error($query);
- }
- }
- else if (($this->query_result = @ibase_query($this->db_connect_id, $query)) === false)
- {
- $this->sql_error($query);
- }
-
- if (defined('DEBUG'))
- {
- $this->sql_report('stop', $query);
- }
-
- if (!$this->transaction)
- {
- if (function_exists('ibase_commit_ret'))
- {
- @ibase_commit_ret();
- }
- else
- {
- // way cooler than ibase_commit_ret :D
- @ibase_query('COMMIT RETAIN;');
- }
- }
-
- if ($cache && $cache_ttl)
- {
- $this->open_queries[(int) $this->query_result] = $this->query_result;
- $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
- }
- else if (strpos($query, 'SELECT') === 0 && $this->query_result)
- {
- $this->open_queries[(int) $this->query_result] = $this->query_result;
- }
- }
- else if (defined('DEBUG'))
- {
- $this->sql_report('fromcache', $query);
- }
- }
- else
- {
- return false;
- }
-
- return $this->query_result;
- }
-
- /**
- * Build LIMIT query
- */
- function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
- {
- $this->query_result = false;
-
- $query = 'SELECT FIRST ' . $total . ((!empty($offset)) ? ' SKIP ' . $offset : '') . substr($query, 6);
-
- return $this->sql_query($query, $cache_ttl);
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_affectedrows()
- {
- // PHP 5+ function
- if (function_exists('ibase_affected_rows'))
- {
- return ($this->db_connect_id) ? @ibase_affected_rows($this->db_connect_id) : false;
- }
- else
- {
- return $this->affected_rows;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_fetchrow($query_id = false)
- {
- global $cache;
-
- if ($query_id === false)
- {
- $query_id = $this->query_result;
- }
-
- if ($cache && $cache->sql_exists($query_id))
- {
- return $cache->sql_fetchrow($query_id);
- }
-
- if ($query_id === false)
- {
- return false;
- }
-
- $row = array();
- $cur_row = @ibase_fetch_object($query_id, IBASE_TEXT);
-
- if (!$cur_row)
- {
- return false;
- }
-
- foreach (get_object_vars($cur_row) as $key => $value)
- {
- $row[strtolower($key)] = (is_string($value)) ? trim(str_replace(array("\\0", "\\n"), array("\0", "\n"), $value)) : $value;
- }
-
- return (sizeof($row)) ? $row : false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_nextid()
- {
- $query_id = $this->query_result;
-
- if ($query_id !== false && $this->last_query_text != '')
- {
- if ($this->query_result && preg_match('#^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)#i', $this->last_query_text, $tablename))
- {
- $sql = 'SELECT GEN_ID(' . $tablename[1] . '_gen, 0) AS new_id FROM RDB$DATABASE';
-
- if (!($temp_q_id = @ibase_query($this->db_connect_id, $sql)))
- {
- return false;
- }
-
- $temp_result = @ibase_fetch_assoc($temp_q_id);
- @ibase_free_result($temp_q_id);
-
- return ($temp_result) ? $temp_result['NEW_ID'] : false;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_freeresult($query_id = false)
- {
- global $cache;
-
- if ($query_id === false)
- {
- $query_id = $this->query_result;
- }
-
- if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
- {
- return $cache->sql_freeresult($query_id);
- }
-
- if (isset($this->open_queries[(int) $query_id]))
- {
- unset($this->open_queries[(int) $query_id]);
- return @ibase_free_result($query_id);
- }
-
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_escape($msg)
- {
- return str_replace(array("'", "\0"), array("''", ''), $msg);
- }
-
- /**
- * Build LIKE expression
- * @access private
- */
- function _sql_like_expression($expression)
- {
- return $expression . " ESCAPE '\\'";
- }
-
- /**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- return $data;
- }
-
- function _sql_bit_and($column_name, $bit, $compare = '')
- {
- return 'BIN_AND(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
- }
-
- function _sql_bit_or($column_name, $bit, $compare = '')
- {
- return 'BIN_OR(' . $column_name . ', ' . (1 << $bit) . ')' . (($compare) ? ' ' . $compare : '');
- }
-
- /**
- * {@inheritDoc}
- */
- function cast_expr_to_bigint($expression)
- {
- // Precision must be from 1 to 18
- return 'CAST(' . $expression . ' as DECIMAL(18, 0))';
- }
-
- /**
- * {@inheritDoc}
- */
- function cast_expr_to_string($expression)
- {
- return 'CAST(' . $expression . ' as VARCHAR(255))';
- }
-
- /**
- * return sql error array
- * @access private
- */
- function _sql_error()
- {
- // Need special handling here because ibase_errmsg returns
- // connection errors, however if the interbase extension
- // is not installed then ibase_errmsg does not exist and
- // we cannot call it.
- if (function_exists('ibase_errmsg'))
- {
- $msg = @ibase_errmsg();
- if (!$msg)
- {
- $msg = $this->connect_error;
- }
- }
- else
- {
- $msg = $this->connect_error;
- }
- return array(
- 'message' => $msg,
- 'code' => (@function_exists('ibase_errcode') ? @ibase_errcode() : '')
- );
- }
-
- /**
- * Close sql connection
- * @access private
- */
- function _sql_close()
- {
- if ($this->service_handle !== false)
- {
- @ibase_service_detach($this->service_handle);
- }
-
- return @ibase_close($this->db_connect_id);
- }
-
- /**
- * Build db-specific report
- * @access private
- */
- function _sql_report($mode, $query = '')
- {
- switch ($mode)
- {
- case 'start':
- break;
-
- case 'fromcache':
- $endtime = explode(' ', microtime());
- $endtime = $endtime[0] + $endtime[1];
-
- $result = @ibase_query($this->db_connect_id, $query);
- while ($void = @ibase_fetch_object($result, IBASE_TEXT))
- {
- // Take the time spent on parsing rows into account
- }
- @ibase_free_result($result);
-
- $splittime = explode(' ', microtime());
- $splittime = $splittime[0] + $splittime[1];
-
- $this->sql_report('record_fromcache', $query, $endtime, $splittime);
-
- break;
- }
- }
-}
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index 2e56638617..268463a151 100644
--- a/phpBB/phpbb/db/driver/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -137,6 +137,10 @@ class mssql extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -152,6 +156,10 @@ class mssql extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php
index de90d878e7..8e5d4c7a4c 100644
--- a/phpBB/phpbb/db/driver/mssql_odbc.php
+++ b/phpBB/phpbb/db/driver/mssql_odbc.php
@@ -156,6 +156,10 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -172,6 +176,10 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index 9639bfa988..46a9b3a477 100644
--- a/phpBB/phpbb/db/driver/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -127,6 +127,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -145,6 +149,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
@@ -319,10 +327,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
foreach ($errors as $error)
{
- $error_message .= "SQLSTATE: " . $error[ 'SQLSTATE'] . "\n";
- $error_message .= "code: " . $error[ 'code'] . "\n";
+ $error_message .= "SQLSTATE: " . $error['SQLSTATE'] . "\n";
+ $error_message .= "code: " . $error['code'] . "\n";
$code = $error['code'];
- $error_message .= "message: " . $error[ 'message'] . "\n";
+ $error_message .= "message: " . $error['message'] . "\n";
}
$this->last_error_result = $error_message;
$error = $this->last_error_result;
diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php
index 569bd4f10a..e93c7239e8 100644
--- a/phpBB/phpbb/db/driver/mysql.php
+++ b/phpBB/phpbb/db/driver/mysql.php
@@ -166,6 +166,10 @@ class mysql extends \phpbb\db\driver\mysql_base
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -181,6 +185,10 @@ class mysql extends \phpbb\db\driver\mysql_base
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 58361ff0f8..8fc306b2cc 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -71,10 +71,17 @@ class mysqli extends \phpbb\db\driver\mysql_base
if (version_compare($this->sql_server_info(true), '5.0.2', '>='))
{
$result = @mysqli_query($this->db_connect_id, 'SELECT @@session.sql_mode AS sql_mode');
- $row = @mysqli_fetch_assoc($result);
- @mysqli_free_result($result);
+ if ($result !== null)
+ {
+ $row = @mysqli_fetch_assoc($result);
- $modes = array_map('trim', explode(',', $row['sql_mode']));
+ $modes = array_map('trim', explode(',', $row['sql_mode']));
+ }
+ else
+ {
+ $modes = array();
+ }
+ @mysqli_free_result($result);
// TRADITIONAL includes STRICT_ALL_TABLES and STRICT_TRANS_TABLES
if (!in_array('TRADITIONAL', $modes))
@@ -109,15 +116,18 @@ class mysqli extends \phpbb\db\driver\mysql_base
if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)
{
$result = @mysqli_query($this->db_connect_id, 'SELECT VERSION() AS version');
- $row = @mysqli_fetch_assoc($result);
- @mysqli_free_result($result);
+ if ($result !== null)
+ {
+ $row = @mysqli_fetch_assoc($result);
- $this->sql_server_version = $row['version'];
+ $this->sql_server_version = $row['version'];
- if (!empty($cache) && $use_cache)
- {
- $cache->put('mysqli_version', $this->sql_server_version);
+ if (!empty($cache) && $use_cache)
+ {
+ $cache->put('mysqli_version', $this->sql_server_version);
+ }
}
+ @mysqli_free_result($result);
}
return ($raw) ? $this->sql_server_version : 'MySQL(i) ' . $this->sql_server_version;
@@ -165,6 +175,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -180,6 +194,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
@@ -224,7 +242,7 @@ class mysqli extends \phpbb\db\driver\mysql_base
return $cache->sql_fetchrow($query_id);
}
- if ($query_id !== false)
+ if ($query_id !== false && $query_id !== null)
{
$result = @mysqli_fetch_assoc($query_id);
return $result !== null ? $result : false;
@@ -434,9 +452,12 @@ class mysqli extends \phpbb\db\driver\mysql_base
$endtime = $endtime[0] + $endtime[1];
$result = @mysqli_query($this->db_connect_id, $query);
- while ($void = @mysqli_fetch_assoc($result))
+ if ($result !== null)
{
- // Take the time spent on parsing rows into account
+ while ($void = @mysqli_fetch_assoc($result))
+ {
+ // Take the time spent on parsing rows into account
+ }
}
@mysqli_free_result($result);
diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php
index bfc5373e35..d1a186f1ba 100644
--- a/phpBB/phpbb/db/driver/oracle.php
+++ b/phpBB/phpbb/db/driver/oracle.php
@@ -253,6 +253,10 @@ class oracle extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -430,6 +434,10 @@ class oracle extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php
index a4aa9497ed..a67cd9f7c2 100644
--- a/phpBB/phpbb/db/driver/postgres.php
+++ b/phpBB/phpbb/db/driver/postgres.php
@@ -179,6 +179,10 @@ class postgres extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -195,6 +199,10 @@ class postgres extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php
index f4c5e240fc..2112e5ba2f 100644
--- a/phpBB/phpbb/db/driver/sqlite.php
+++ b/phpBB/phpbb/db/driver/sqlite.php
@@ -121,6 +121,10 @@ class sqlite extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -136,6 +140,10 @@ class sqlite extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php
index 2c6bf99497..6511c755a0 100644
--- a/phpBB/phpbb/db/driver/sqlite3.php
+++ b/phpBB/phpbb/db/driver/sqlite3.php
@@ -121,6 +121,10 @@ class sqlite3 extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -137,6 +141,10 @@ class sqlite3 extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{
diff --git a/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
index 139dc95b28..edcc69e1bf 100644
--- a/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
+++ b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
@@ -44,9 +44,16 @@ class local_url_bbcode extends \phpbb\db\migration\migration
{
if (!class_exists('acp_bbcodes'))
{
- global $phpEx;
- phpbb_require_updated('includes/acp/acp_bbcodes.' . $phpEx);
+ if (function_exists('phpbb_require_updated'))
+ {
+ phpbb_require_updated('includes/acp/acp_bbcodes.' . $this->php_ext);
+ }
+ else
+ {
+ require($this->phpbb_root_path . 'includes/acp/acp_bbcodes.' . $this->php_ext);
+ }
}
+
$bbcode_match = $row['bbcode_match'];
$bbcode_tpl = $row['bbcode_tpl'];
diff --git a/phpBB/phpbb/db/migration/data/v310/beta4.php b/phpBB/phpbb/db/migration/data/v310/beta4.php
new file mode 100644
index 0000000000..3e91d95178
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/beta4.php
@@ -0,0 +1,33 @@
+<?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\v310;
+
+class beta4 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\beta3',
+ '\phpbb\db\migration\data\v310\extensions_version_check_force_unstable',
+ '\phpbb\db\migration\data\v310\reset_missing_captcha_plugin',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-b4')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php
new file mode 100644
index 0000000000..20bd547ac3
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php
@@ -0,0 +1,31 @@
+<?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\v310;
+
+class contact_admin_acp_module extends \phpbb\db\migration\migration
+{
+ public function update_data()
+ {
+ return array(
+ array('module.add', array(
+ 'acp',
+ 'ACP_BOARD_CONFIGURATION',
+ array(
+ 'module_basename' => 'acp_contact',
+ 'modes' => array('contact'),
+ ),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php
new file mode 100644
index 0000000000..c2dd09ddf6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php
@@ -0,0 +1,41 @@
+<?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\v310;
+
+class contact_admin_form extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['contact_admin_form_enable']);
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('contact_admin_form_enable', 1)),
+ array('custom', array(array($this, 'contact_admin_info'))),
+ );
+ }
+
+ public function contact_admin_info()
+ {
+ $text_config = new \phpbb\config\db_text($this->db, $this->table_prefix . 'config_text');
+ $text_config->set_array(array(
+ 'contact_admin_info' => '',
+ 'contact_admin_info_uid' => '',
+ 'contact_admin_info_bitfield' => '',
+ 'contact_admin_info_flags' => OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS,
+ ));
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php b/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php
index 5941c3aa54..1d6276f484 100644
--- a/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php
+++ b/phpBB/phpbb/db/migration/data/v310/extensions_version_check_force_unstable.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package migration
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* 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.
*
*/
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
new file mode 100644
index 0000000000..aad8e44681
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p1.php
@@ -0,0 +1,84 @@
+<?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\v310;
+
+class passwords_convert_p1 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\passwords_p2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_passwords'))),
+ );
+ }
+
+ public function update_passwords($start)
+ {
+ // Nothing to do if user_pass_convert column doesn't exist
+ if (!$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_pass_convert'))
+ {
+ return;
+ }
+
+ $start = (int) $start;
+ $limit = 1000;
+ $converted_users = 0;
+
+ $sql = 'SELECT user_password, user_id
+ FROM ' . $this->table_prefix . 'users
+ WHERE user_pass_convert = 1
+ ORDER BY user_id';
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ $update_users = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $converted_users++;
+
+ $user_id = (int) $row['user_id'];
+ // Only prefix passwords without proper prefix
+ if (!isset($update_users[$user_id]) && !preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $row['user_password']))
+ {
+ // 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,
+ );
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ foreach ($update_users as $user_id => $user_data)
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . 'users
+ SET ' . $this->db->sql_build_array('UPDATE', $user_data) . '
+ WHERE user_id = ' . $user_id;
+ $this->sql_query($sql);
+ }
+
+ if ($converted_users < $limit)
+ {
+ // There are no more users to be converted
+ return;
+ }
+
+ // There are still more users to query, return the next start value
+ return $start + $limit;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php
new file mode 100644
index 0000000000..26a99184a6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/passwords_convert_p2.php
@@ -0,0 +1,49 @@
+<?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\v310;
+
+class passwords_convert_p2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_pass_convert');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\passwords_convert_p1');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_pass_convert',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_pass_convert' => array('BOOL', 0, 'after' => 'user_passchg'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php
new file mode 100644
index 0000000000..5964e7a997
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_facebook.php
@@ -0,0 +1,60 @@
+<?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\v310;
+
+class profilefield_facebook extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_facebook';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_facebook',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_facebook',
+ 'field_length' => '20',
+ 'field_minlen' => '5',
+ 'field_maxlen' => '50',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[\w.]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VIEW_FACEBOOK_PROFILE',
+ 'field_contact_url' => 'http://facebook.com/%s/',
+ );
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php
new file mode 100644
index 0000000000..9bef0a4c0b
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_googleplus.php
@@ -0,0 +1,60 @@
+<?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\v310;
+
+class profilefield_googleplus extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_googleplus';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_googleplus',
+ 'field_type' => 'profilefields.type.googleplus',
+ 'field_ident' => 'phpbb_googleplus',
+ 'field_length' => '20',
+ 'field_minlen' => '3',
+ 'field_maxlen' => '255',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[\w]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VIEW_GOOGLEPLUS_PROFILE',
+ 'field_contact_url' => 'http://plus.google.com/%s',
+ );
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php b/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php
new file mode 100644
index 0000000000..9a5de9d0eb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_skype.php
@@ -0,0 +1,60 @@
+<?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\v310;
+
+class profilefield_skype extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_skype';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_skype',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_skype',
+ 'field_length' => '20',
+ 'field_minlen' => '6',
+ 'field_maxlen' => '32',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[a-zA-Z][\w\.,\-_]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VIEW_SKYPE_PROFILE',
+ 'field_contact_url' => 'skype:%s?userinfo',
+ );
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php b/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php
new file mode 100644
index 0000000000..68d038f609
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_twitter.php
@@ -0,0 +1,60 @@
+<?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\v310;
+
+class profilefield_twitter extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_twitter';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_twitter',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_twitter',
+ 'field_length' => '20',
+ 'field_minlen' => '1',
+ 'field_maxlen' => '15',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[\w_]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VIEW_TWITTER_PROFILE',
+ 'field_contact_url' => 'http://twitter.com/%s',
+ );
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php b/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php
new file mode 100644
index 0000000000..bb90c0aa5c
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_youtube.php
@@ -0,0 +1,60 @@
+<?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\v310;
+
+class profilefield_youtube extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_youtube';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_youtube',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_youtube',
+ 'field_length' => '20',
+ 'field_minlen' => '3',
+ 'field_maxlen' => '60',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[a-zA-Z][\w\.,\-_]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VIEW_YOUTUBE_CHANNEL',
+ 'field_contact_url' => 'http://youtube.com/user/%s',
+ );
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/rc1.php b/phpBB/phpbb/db/migration/data/v310/rc1.php
new file mode 100644
index 0000000000..10ba7fefff
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/rc1.php
@@ -0,0 +1,39 @@
+<?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\v310;
+
+class rc1 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\beta4',
+ '\phpbb\db\migration\data\v310\contact_admin_acp_module',
+ '\phpbb\db\migration\data\v310\contact_admin_form',
+ '\phpbb\db\migration\data\v310\passwords_convert_p2',
+ '\phpbb\db\migration\data\v310\profilefield_facebook',
+ '\phpbb\db\migration\data\v310\profilefield_googleplus',
+ '\phpbb\db\migration\data\v310\profilefield_skype',
+ '\phpbb\db\migration\data\v310\profilefield_twitter',
+ '\phpbb\db\migration\data\v310\profilefield_youtube',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php
index 818e27a362..91d8307d91 100644
--- a/phpBB/phpbb/db/migration/schema_generator.php
+++ b/phpBB/phpbb/db/migration/schema_generator.php
@@ -217,7 +217,7 @@ class schema_generator
* Check if one of the migrations files' dependencies can't be resolved
* by the supplied list of migrations
*
- * @throws UnexpectedValueException If a dependency can't be resolved
+ * @throws \UnexpectedValueException If a dependency can't be resolved
*/
protected function check_dependencies()
{
diff --git a/phpBB/phpbb/db/migration/tool/config.php b/phpBB/phpbb/db/migration/tool/config.php
index 1027b425ff..f93e7118c4 100644
--- a/phpBB/phpbb/db/migration/tool/config.php
+++ b/phpBB/phpbb/db/migration/tool/config.php
@@ -66,6 +66,7 @@ class config implements \phpbb\db\migration\tool\tool_interface
* like to update
* @param mixed $config_value The value of the config setting
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function update($config_name, $config_value)
{
@@ -87,6 +88,7 @@ class config implements \phpbb\db\migration\tool\tool_interface
* like to update
* @param mixed $config_value The value of the config setting
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function update_if_equals($compare, $config_name, $config_value)
{
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 17deb1b19c..db43046a95 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -167,6 +167,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
* modules in that info file.
* path, specify that here
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function add($class, $parent = 0, $data = array())
{
@@ -331,6 +332,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
* @param int|string $module The module id|module_langname
* specify that here
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function remove($class, $parent = 0, $module = '')
{
@@ -466,6 +468,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
* @param string $class Module Class
* @param string $basename Module Basename
* @return array Module Information
+ * @throws \phpbb\db\migration\exception
*/
protected function get_module_info($class, $basename)
{
diff --git a/phpBB/phpbb/db/migration/tool/permission.php b/phpBB/phpbb/db/migration/tool/permission.php
index ba856fbeda..d2df27613a 100644
--- a/phpBB/phpbb/db/migration/tool/permission.php
+++ b/phpBB/phpbb/db/migration/tool/permission.php
@@ -283,6 +283,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
* @param string $old_role_name The old role name
* @param string $new_role_name The new role name
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function role_update($old_role_name, $new_role_name)
{
@@ -345,6 +346,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
* @param bool $has_permission True if you want to give them permission,
* false if you want to deny them permission
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function permission_set($name, $auth_option, $type = 'role', $has_permission = true)
{
@@ -490,6 +492,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
* auth_options you would like to set
* @param string $type The type (role|group)
* @return null
+ * @throws \phpbb\db\migration\exception
*/
public function permission_unset($name, $auth_option, $type = 'role')
{
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 9b9532a7ad..c2f7b5ab23 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -167,8 +167,9 @@ class migrator
/**
* Attempts to apply a step of the given migration or one of its dependencies
*
- * @param string The class name of the migration
+ * @param string $name The class name of the migration
* @return bool Whether any update step was successfully run
+ * @throws \phpbb\db\migration\exception
*/
protected function try_apply($name)
{
@@ -302,7 +303,7 @@ class migrator
/**
* Attempts to revert a step of the given migration or one of its dependencies
*
- * @param string The class name of the migration
+ * @param string $name The class name of the migration
* @return bool Whether any update step was successfully run
*/
protected function try_revert($name)
@@ -368,6 +369,7 @@ class migrator
* @param bool|string $state Current state of the migration
* @param bool $revert true to revert a data step
* @return bool|string migration state. True if completed, serialized array if not finished
+ * @throws \phpbb\db\migration\exception
*/
protected function process_data_step($steps, $state, $revert = false)
{
@@ -464,6 +466,7 @@ class migrator
* @param mixed $last_result Result to pass to the callable (only for 'custom' method)
* @param bool $reverse False to install, True to attempt uninstallation by reversing the call
* @return array Array with parameters for call_user_func_array(), 0 is the callable, 1 is parameters
+ * @throws \phpbb\db\migration\exception
*/
protected function get_callable_from_step(array $step, $last_result = 0, $reverse = false)
{
@@ -714,7 +717,7 @@ class migrator
/**
* Load migration data files from a directory
*
- * @param \phpbb\extension\finder $finder
+ * @param \phpbb\finder $finder
* @param string $path Path to migration data files
* @param bool $check_fulfillable If TRUE (default), we will check
* if all of the migrations are fulfillable after loading them.
@@ -722,8 +725,9 @@ class migrator
* to prevent errors (if including multiple directories, check
* with the last call to prevent throwing errors unnecessarily).
* @return array Array of migration names
+ * @throws \phpbb\db\migration\exception
*/
- public function load_migrations(\phpbb\extension\finder $finder, $path, $check_fulfillable = true)
+ public function load_migrations(\phpbb\finder $finder, $path, $check_fulfillable = true)
{
if (!is_dir($path))
{
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 3d065ede8e..2ec46ed239 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -109,36 +109,6 @@ class tools
'VARBINARY' => 'varbinary(255)',
),
- 'firebird' => array(
- 'INT:' => 'INTEGER',
- 'BINT' => 'DOUBLE PRECISION',
- 'UINT' => 'INTEGER',
- 'UINT:' => 'INTEGER',
- 'TINT:' => 'INTEGER',
- 'USINT' => 'INTEGER',
- 'BOOL' => 'INTEGER',
- 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
- 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
- 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
- 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
- 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'TIMESTAMP' => 'INTEGER',
- 'DECIMAL' => 'DOUBLE PRECISION',
- 'DECIMAL:' => 'DOUBLE PRECISION',
- 'PDECIMAL' => 'DOUBLE PRECISION',
- 'PDECIMAL:' => 'DOUBLE PRECISION',
- 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
- 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
- ),
-
'mssql' => array(
'INT:' => '[int]',
'BINT' => '[float]',
@@ -331,7 +301,7 @@ class tools
* A list of supported DBMS. We change this class to support more DBMS, the DBMS itself only need to follow some rules.
* @var array
*/
- var $supported_dbms = array('firebird', 'mssql', 'mssqlnative', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite', 'sqlite3');
+ var $supported_dbms = array('mssql', 'mssqlnative', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite', 'sqlite3');
/**
* This is set to true if user only wants to return the 'to-be-executed' SQL statement(s) (as an array).
@@ -441,13 +411,6 @@ class tools
FROM pg_stat_user_tables';
break;
- case 'firebird':
- $sql = 'SELECT rdb$relation_name
- FROM rdb$relations
- WHERE rdb$view_source is null
- AND rdb$system_flag = 0';
- break;
-
case 'oracle':
$sql = 'SELECT table_name
FROM USER_TABLES';
@@ -580,7 +543,6 @@ class tools
// Close the table for two DBMS and add to the statements
switch ($this->sql_layer)
{
- case 'firebird':
case 'mssql':
case 'mssqlnative':
$table_sql .= "\n);";
@@ -610,7 +572,6 @@ class tools
$table_sql .= ",\n\t PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
break;
- case 'firebird':
case 'mssql':
case 'mssqlnative':
// We need the data here
@@ -685,19 +646,6 @@ class tools
$statements[] = $trigger;
}
break;
-
- case 'firebird':
- if ($create_sequence)
- {
- $statements[] = "CREATE GENERATOR {$table_name}_gen;";
- $statements[] = "SET GENERATOR {$table_name}_gen TO 0;";
-
- $trigger = "CREATE TRIGGER t_$table_name FOR $table_name\n";
- $trigger .= "BEFORE INSERT\nAS\nBEGIN\n";
- $trigger .= "\tNEW.{$create_sequence} = GEN_ID({$table_name}_gen, 1);\nEND;";
- $statements[] = $trigger;
- }
- break;
}
// Write Keys
@@ -1174,12 +1122,6 @@ class tools
WHERE LOWER(table_name) = '" . strtolower($table) . "'";
break;
- case 'firebird':
- $sql = "SELECT RDB\$FIELD_NAME as FNAME
- FROM RDB\$RELATION_FIELDS
- WHERE RDB\$RELATION_NAME = '" . strtoupper($table) . "'";
- break;
-
case 'sqlite':
case 'sqlite3':
$sql = "SELECT sql
@@ -1278,15 +1220,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
- FROM RDB\$INDICES
- WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
- AND RDB\$UNIQUE_FLAG IS NULL
- AND RDB\$FOREIGN_KEY IS NULL";
- $col = 'index_name';
- break;
-
case 'postgres':
$sql = "SELECT ic.relname as index_name
FROM pg_class bc, pg_class ic, pg_index i
@@ -1332,7 +1265,6 @@ class tools
// These DBMS prefix index name with the table name
switch ($this->sql_layer)
{
- case 'firebird':
case 'oracle':
case 'postgres':
case 'sqlite':
@@ -1385,15 +1317,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
- FROM RDB\$INDICES
- WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
- AND RDB\$UNIQUE_FLAG IS NOT NULL
- AND RDB\$FOREIGN_KEY IS NULL";
- $col = 'index_name';
- break;
-
case 'postgres':
$sql = "SELECT ic.relname as index_name, i.indisunique
FROM pg_class bc, pg_class ic, pg_index i
@@ -1460,7 +1383,6 @@ class tools
}
break;
- case 'firebird':
case 'postgres':
case 'sqlite':
case 'sqlite3':
@@ -1536,32 +1458,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- $sql .= " {$column_type} ";
- $return_array['column_type_sql_type'] = " {$column_type} ";
-
- if (!is_null($column_data[1]))
- {
- $sql .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
- $return_array['column_type_sql_default'] = ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
- }
-
- $sql .= 'NOT NULL';
-
- // This is a UNICODE column and thus should be given it's fair share
- if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
- {
- $sql .= ' COLLATE UNICODE';
- }
-
- $return_array['auto_increment'] = false;
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $return_array['auto_increment'] = true;
- }
-
- break;
-
case 'mssql':
case 'mssqlnative':
$sql .= " {$column_type} ";
@@ -1772,11 +1668,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- // Does not support AFTER statement, only POSITION (and there you need the column position)
- $statements[] = 'ALTER TABLE ' . $table_name . ' ADD "' . strtoupper($column_name) . '" ' . $column_data['column_type_sql'];
- break;
-
case 'mssql':
case 'mssqlnative':
// Does not support AFTER, only through temporary table
@@ -1894,10 +1785,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- $statements[] = 'ALTER TABLE ' . $table_name . ' DROP "' . strtoupper($column_name) . '"';
- break;
-
case 'mssql':
case 'mssqlnative':
// We need the data here
@@ -1996,7 +1883,7 @@ class tools
$columns = implode(',', $column_list);
- $new_table_cols = trim(preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols));
+ $new_table_cols = trim(preg_replace('/' . $column_name . '\b[^,]+(?:,|$)/m', '', $new_table_cols));
if (substr($new_table_cols, -1) === ',')
{
// Remove the comma from the last entry again
@@ -2036,7 +1923,6 @@ class tools
$statements[] = 'DROP INDEX ' . $index_name . ' ON ' . $table_name;
break;
- case 'firebird':
case 'oracle':
case 'postgres':
case 'sqlite':
@@ -2065,21 +1951,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- $sql = 'SELECT RDB$GENERATOR_NAME as gen
- FROM RDB$GENERATORS
- WHERE RDB$SYSTEM_FLAG = 0
- AND RDB$GENERATOR_NAME = \'' . strtoupper($table_name) . "_GEN'";
- $result = $this->db->sql_query($sql);
-
- // does a generator exist?
- if ($row = $this->db->sql_fetchrow($result))
- {
- $statements[] = "DROP GENERATOR {$row['gen']};";
- }
- $this->db->sql_freeresult($result);
- break;
-
case 'oracle':
$sql = 'SELECT A.REFERENCED_NAME
FROM USER_DEPENDENCIES A, USER_TRIGGERS B
@@ -2125,7 +1996,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
case 'postgres':
case 'mysql_40':
case 'mysql_41':
@@ -2217,7 +2087,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
case 'postgres':
case 'oracle':
case 'sqlite':
@@ -2261,7 +2130,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
case 'postgres':
case 'oracle':
case 'sqlite':
@@ -2320,15 +2188,6 @@ class tools
{
switch ($this->sql_layer)
{
- case 'firebird':
- $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name
- FROM RDB\$INDICES
- WHERE RDB\$RELATION_NAME = '" . strtoupper($table_name) . "'
- AND RDB\$UNIQUE_FLAG IS NULL
- AND RDB\$FOREIGN_KEY IS NULL";
- $col = 'index_name';
- break;
-
case 'postgres':
$sql = "SELECT ic.relname as index_name
FROM pg_class bc, pg_class ic, pg_index i
@@ -2373,7 +2232,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
case 'oracle':
case 'postgres':
case 'sqlite':
@@ -2400,20 +2258,6 @@ class tools
switch ($this->sql_layer)
{
- case 'firebird':
- // Change type...
- if (!empty($column_data['column_type_sql_default']))
- {
- $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
- $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" SET DEFAULT ' . ' ' . $column_data['column_type_sql_default'];
- }
- else
- {
- // TODO: try to change pkey without removing trigger, generator or constraints. ATM this query may fail.
- $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
- }
- break;
-
case 'mssql':
case 'mssqlnative':
// We need the data here
@@ -2561,7 +2405,18 @@ class tools
foreach ($old_table_cols as $key => $declaration)
{
- $entities = preg_split('#\s+#', trim($declaration));
+ $declaration = trim($declaration);
+
+ // Check for the beginning of the constraint section and stop
+ if (preg_match('/[^\(]*\s*PRIMARY KEY\s+\(/', $declaration) ||
+ preg_match('/[^\(]*\s*UNIQUE\s+\(/', $declaration) ||
+ preg_match('/[^\(]*\s*FOREIGN KEY\s+\(/', $declaration) ||
+ preg_match('/[^\(]*\s*CHECK\s+\(/', $declaration))
+ {
+ break;
+ }
+
+ $entities = preg_split('#\s+#', $declaration);
$column_list[] = $entities[0];
if ($entities[0] == $column_name)
{
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
index 403c9d50e7..a7d7284f85 100644
--- a/phpBB/phpbb/di/extension/config.php
+++ b/phpBB/phpbb/di/extension/config.php
@@ -15,8 +15,6 @@ namespace phpbb\di\extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
-use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
-use Symfony\Component\Config\FileLocator;
/**
* Container config extension
@@ -34,7 +32,7 @@ class config extends Extension
* @param array $config An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
- * @throws InvalidArgumentException When provided tag is not defined in this extension
+ * @throws \InvalidArgumentException When provided tag is not defined in this extension
*/
public function load(array $config, ContainerBuilder $container)
{
@@ -68,7 +66,7 @@ class config extends Extension
* Convert 3.0 ACM type to 3.1 cache driver class name
*
* @param string $acm_type ACM type
- * @return cache driver class
+ * @return string cache driver class
*/
protected function convert_30_acm_type($acm_type)
{
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 72026f3b54..ca4fa5c082 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -45,7 +45,7 @@ class core extends Extension
* @param array $config An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
- * @throws InvalidArgumentException When provided tag is not defined in this extension
+ * @throws \InvalidArgumentException When provided tag is not defined in this extension
*/
public function load(array $config, ContainerBuilder $container)
{
diff --git a/phpBB/phpbb/di/extension/ext.php b/phpBB/phpbb/di/extension/ext.php
index 1205dffb53..718c992d2e 100644
--- a/phpBB/phpbb/di/extension/ext.php
+++ b/phpBB/phpbb/di/extension/ext.php
@@ -39,7 +39,7 @@ class ext extends Extension
* @param array $config An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
- * @throws InvalidArgumentException When provided tag is not defined in this extension
+ * @throws \InvalidArgumentException When provided tag is not defined in this extension
*/
public function load(array $config, ContainerBuilder $container)
{
diff --git a/phpBB/phpbb/di/pass/kernel_pass.php b/phpBB/phpbb/di/pass/kernel_pass.php
index 44d4fcd07f..c154c7532d 100644
--- a/phpBB/phpbb/di/pass/kernel_pass.php
+++ b/phpBB/phpbb/di/pass/kernel_pass.php
@@ -23,6 +23,7 @@ class kernel_pass implements CompilerPassInterface
*
* @param ContainerBuilder $container ContainerBuilder object
* @return null
+ * @throws \InvalidArgumentException
*/
public function process(ContainerBuilder $container)
{
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
index 3a18644891..82ca9bf679 100644
--- a/phpBB/phpbb/di/service_collection.php
+++ b/phpBB/phpbb/di/service_collection.php
@@ -21,6 +21,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class service_collection extends \ArrayObject
{
/**
+ * @var \Symfony\Component\DependencyInjection\ContainerInterface
+ */
+ protected $container;
+
+ /**
* Constructor
*
* @param ContainerInterface $container Container object
@@ -31,6 +36,37 @@ class service_collection extends \ArrayObject
}
/**
+ * {@inheritdoc}
+ */
+ public function getIterator()
+ {
+ return new service_collection_iterator($this);
+ }
+
+ // Because of a PHP issue we have to redefine offsetExists
+ // (even with a call to the parent):
+ // https://bugs.php.net/bug.php?id=66834
+ // https://bugs.php.net/bug.php?id=67067
+ // But it triggers a sniffer issue that we have to skip
+ // @codingStandardsIgnoreStart
+ /**
+ * {@inheritdoc}
+ */
+ public function offsetExists($index)
+ {
+ return parent::offsetExists($index);
+ }
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * {@inheritdoc}
+ */
+ public function offsetGet($index)
+ {
+ return $this->container->get($index);
+ }
+
+ /**
* Add a service to the collection
*
* @param string $name The service name
@@ -38,8 +74,6 @@ class service_collection extends \ArrayObject
*/
public function add($name)
{
- $task = $this->container->get($name);
-
- $this->offsetSet($name, $task);
+ $this->offsetSet($name, null);
}
}
diff --git a/phpBB/phpbb/di/service_collection_iterator.php b/phpBB/phpbb/di/service_collection_iterator.php
new file mode 100644
index 0000000000..0d031ab52d
--- /dev/null
+++ b/phpBB/phpbb/di/service_collection_iterator.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\di;
+
+/**
+* Iterator which loads the services when they are requested
+*/
+class service_collection_iterator extends \ArrayIterator
+{
+ /**
+ * @var \phpbb\di\service_collection
+ */
+ protected $collection;
+
+ /**
+ * Construct an ArrayIterator for service_collection
+ *
+ * @param \phpbb\di\service_collection $collection The collection to iterate over
+ * @param int $flags Flags to control the behaviour of the ArrayObject object.
+ * @see ArrayObject::setFlags()
+ */
+ public function __construct(service_collection $collection, $flags = 0)
+ {
+ parent::__construct($collection, $flags);
+ $this->collection = $collection;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function current()
+ {
+ return $this->collection->offsetGet($this->key());
+ }
+}
diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php
index a11c2a457f..f7021875f3 100644
--- a/phpBB/phpbb/event/md_exporter.php
+++ b/phpBB/phpbb/event/md_exporter.php
@@ -227,7 +227,7 @@ class md_exporter
*/
public function validate_since($since)
{
- if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?$#', $since))
+ if (!preg_match('#^\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?$#', $since))
{
throw new \LogicException("Invalid since information found for event '{$this->current_event}'");
}
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php
index 3d2819a3a1..badbbb48fd 100644
--- a/phpBB/phpbb/event/php_exporter.php
+++ b/phpBB/phpbb/event/php_exporter.php
@@ -550,7 +550,7 @@ class php_exporter
public function validate_since($line)
{
$match = array();
- preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|rc|pl)\d+)?)$#', ltrim($line, "\t"), $match);
+ preg_match('#^\* @since (\d+\.\d+\.\d+(?:-(?:a|b|RC|pl)\d+)?)$#', ltrim($line, "\t"), $match);
if (!isset($match[1]))
{
throw new \LogicException("Invalid '@since' information for event "
diff --git a/phpBB/phpbb/event/recursive_event_filter_iterator.php b/phpBB/phpbb/event/recursive_event_filter_iterator.php
index f65feff448..64e2e56f6a 100644
--- a/phpBB/phpbb/event/recursive_event_filter_iterator.php
+++ b/phpBB/phpbb/event/recursive_event_filter_iterator.php
@@ -39,7 +39,8 @@ class recursive_event_filter_iterator extends \RecursiveFilterIterator
*
* @return recursive_event_filter_iterator
*/
- public function getChildren() {
+ public function getChildren()
+ {
return new self($this->getInnerIterator()->getChildren(), $this->root_path);
}
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index eb306aeb72..cbbd7bc622 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -23,7 +23,7 @@ class base implements \phpbb\extension\extension_interface
/** @var ContainerInterface */
protected $container;
- /** @var \phpbb\extension\finder */
+ /** @var \phpbb\finder */
protected $finder;
/** @var \phpbb\db\migrator */
@@ -39,11 +39,11 @@ class base implements \phpbb\extension\extension_interface
* Constructor
*
* @param ContainerInterface $container Container object
- * @param \phpbb\extension\finder $extension_finder
+ * @param \phpbb\finder $extension_finder
* @param string $extension_name Name of this extension (from ext.manager)
* @param string $extension_path Relative path to this extension
*/
- public function __construct(ContainerInterface $container, \phpbb\extension\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
+ public function __construct(ContainerInterface $container, \phpbb\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
{
$this->container = $container;
$this->extension_finder = $extension_finder;
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index 0bfec23573..4130e8455a 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -26,6 +26,7 @@ class manager
protected $db;
protected $config;
protected $cache;
+ protected $user;
protected $php_ext;
protected $extensions;
protected $extension_table;
@@ -37,25 +38,27 @@ class manager
*
* @param ContainerInterface $container A container
* @param \phpbb\db\driver\driver_interface $db A database connection
- * @param \phpbb\config\config $config \phpbb\config\config
+ * @param \phpbb\config\config $config Config object
* @param \phpbb\filesystem $filesystem
+ * @param \phpbb\user $user User object
* @param string $extension_table The name of the table holding extensions
* @param string $phpbb_root_path Path to the phpbb includes directory.
- * @param string $php_ext php file extension
+ * @param string $php_ext php file extension, defaults to php
* @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
* @param string $cache_name The name of the cache variable, defaults to _ext
*/
- public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext')
+ public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, \phpbb\user $user, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext')
{
+ $this->cache = $cache;
+ $this->cache_name = $cache_name;
+ $this->config = $config;
$this->container = $container;
- $this->phpbb_root_path = $phpbb_root_path;
$this->db = $db;
- $this->config = $config;
- $this->cache = $cache;
+ $this->extension_table = $extension_table;
$this->filesystem = $filesystem;
+ $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
- $this->extension_table = $extension_table;
- $this->cache_name = $cache_name;
+ $this->user = $user;
$this->extensions = ($this->cache) ? $this->cache->get($this->cache_name) : false;
@@ -145,12 +148,12 @@ class manager
* Instantiates the metadata manager for the extension with the given name
*
* @param string $name The extension name
- * @param string $template The template manager
+ * @param \phpbb\template\template $template The template manager
* @return \phpbb\extension\metadata_manager Instance of the metadata manager
*/
public function create_extension_metadata_manager($name, \phpbb\template\template $template)
{
- return new \phpbb\extension\metadata_manager($name, $this->config, $this, $template, $this->phpbb_root_path);
+ return new \phpbb\extension\metadata_manager($name, $this->config, $this, $template, $this->user, $this->phpbb_root_path);
}
/**
@@ -420,7 +423,7 @@ class manager
foreach ($iterator as $file_info)
{
- if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)
+ if ($file_info->isFile() && $file_info->getFilename() == 'composer.json')
{
$ext_name = $iterator->getInnerIterator()->getSubPath();
$composer_file = $iterator->getPath() . '/composer.json';
@@ -529,12 +532,22 @@ class manager
}
/**
- * Instantiates a \phpbb\extension\finder.
+ * Instantiates a \phpbb\finder.
*
- * @return \phpbb\extension\finder An extension finder instance
+ * @param bool $use_all_available Should we load all extensions, or just enabled ones
+ * @return \phpbb\finder An extension finder instance
*/
- public function get_finder()
+ public function get_finder($use_all_available = false)
{
- return new \phpbb\extension\finder($this, $this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder');
+ $finder = new \phpbb\finder($this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder');
+ if ($use_all_available)
+ {
+ $finder->set_extensions(array_keys($this->all_available()));
+ }
+ else
+ {
+ $finder->set_extensions(array_keys($this->all_enabled()));
+ }
+ return $finder;
}
}
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
index 047f0ca54c..014d8c79c7 100644
--- a/phpBB/phpbb/extension/metadata_manager.php
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -37,6 +37,12 @@ class metadata_manager
protected $template;
/**
+ * phpBB User instance
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
* phpBB root path
* @var string
*/
@@ -65,15 +71,17 @@ class metadata_manager
*
* @param string $ext_name Name (including vendor) of the extension
* @param \phpbb\config\config $config phpBB Config instance
- * @param \phpbb\extension\manager $extension_manager An instance of the phpBBb extension manager
- * @param \phpbb\template\template $template phpBB Template instance
+ * @param \phpbb\extension\manager $extension_manager An instance of the phpBB extension manager
+ * @param \phpbb\template\template $template phpBB Template instance
+ * @param \phpbb\user $user User instance
* @param string $phpbb_root_path Path to the phpbb includes directory.
*/
- public function __construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template, $phpbb_root_path)
+ public function __construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template, \phpbb\user $user, $phpbb_root_path)
{
$this->config = $config;
$this->extension_manager = $extension_manager;
$this->template = $template;
+ $this->user = $user;
$this->phpbb_root_path = $phpbb_root_path;
$this->ext_name = $ext_name;
@@ -82,11 +90,11 @@ class metadata_manager
}
/**
- * Processes and gets the metadata requested
- *
- * @param string $element All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term.
- * @return array Contains all of the requested metadata, throws an exception on failure
- */
+ * Processes and gets the metadata requested
+ *
+ * @param string $element All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term.
+ * @return array Contains all of the requested metadata, throws an exception on failure
+ */
public function get_metadata($element = 'all')
{
$this->set_metadata_file();
@@ -128,10 +136,10 @@ class metadata_manager
}
/**
- * Sets the filepath of the metadata file
- *
- * @return boolean Set to true if it exists, throws an exception on failure
- */
+ * Sets the filepath of the metadata file
+ *
+ * @throws \phpbb\extension\exception
+ */
private function set_metadata_file()
{
$ext_filepath = $this->extension_manager->get_extension_path($this->ext_name);
@@ -141,31 +149,32 @@ class metadata_manager
if (!file_exists($this->metadata_file))
{
- throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
+ throw new \phpbb\extension\exception($this->user->lang('FILE_NOT_FOUND', $this->metadata_file));
}
}
/**
- * Gets the contents of the composer.json file
- *
- * @return bool True if success, throws an exception on failure
- */
+ * Gets the contents of the composer.json file
+ *
+ * @return bool True if success, throws an exception on failure
+ * @throws \phpbb\extension\exception
+ */
private function fetch_metadata()
{
if (!file_exists($this->metadata_file))
{
- throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
+ throw new \phpbb\extension\exception($this->user->lang('FILE_NOT_FOUND', $this->metadata_file));
}
else
{
if (!($file_contents = file_get_contents($this->metadata_file)))
{
- throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
+ throw new \phpbb\extension\exception($this->user->lang('FILE_CONTENT_ERR', $this->metadata_file));
}
if (($metadata = json_decode($file_contents, true)) === null)
{
- throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
+ throw new \phpbb\extension\exception($this->user->lang('FILE_JSON_DECODE_ERR', $this->metadata_file));
}
$this->metadata = $metadata;
@@ -175,10 +184,10 @@ class metadata_manager
}
/**
- * This array handles the cleaning of the array
- *
- * @return array Contains the cleaned metadata array
- */
+ * This array handles the cleaning of the array
+ *
+ * @return array Contains the cleaned metadata array
+ */
private function clean_metadata_array()
{
return $this->metadata;
@@ -191,6 +200,7 @@ class metadata_manager
* "display" for name, type, and authors
* "name", "type")
* @return Bool True if valid, throws an exception if invalid
+ * @throws \phpbb\extension\exception
*/
public function validate($name = 'display')
{
@@ -224,12 +234,12 @@ class metadata_manager
{
if (!isset($this->metadata[$name]))
{
- throw new \phpbb\extension\exception("Required meta field '$name' has not been set.");
+ throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', $name));
}
if (!preg_match($fields[$name], $this->metadata[$name]))
{
- throw new \phpbb\extension\exception("Meta field '$name' is invalid.");
+ throw new \phpbb\extension\exception($this->user->lang('META_FIELD_INVALID', $name));
}
}
break;
@@ -239,22 +249,23 @@ class metadata_manager
}
/**
- * Validates the contents of the authors field
- *
- * @return boolean True when passes validation, throws exception if invalid
- */
+ * Validates the contents of the authors field
+ *
+ * @return boolean True when passes validation, throws exception if invalid
+ * @throws \phpbb\extension\exception
+ */
public function validate_authors()
{
if (empty($this->metadata['authors']))
{
- throw new \phpbb\extension\exception("Required meta field 'authors' has not been set.");
+ throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'authors'));
}
foreach ($this->metadata['authors'] as $author)
{
if (!isset($author['name']))
{
- throw new \phpbb\extension\exception("Required meta field 'author name' has not been set.");
+ throw new \phpbb\extension\exception($this->user->lang('META_FIELD_NOT_SET', 'author name'));
}
}
@@ -262,10 +273,10 @@ class metadata_manager
}
/**
- * This array handles the verification that this extension can be enabled on this board
- *
- * @return bool True if validation succeeded, False if failed
- */
+ * This array handles the verification that this extension can be enabled on this board
+ *
+ * @return bool True if validation succeeded, False if failed
+ */
public function validate_enable()
{
// Check for valid directory & phpBB, PHP versions
@@ -278,10 +289,10 @@ class metadata_manager
}
/**
- * Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention.
- *
- * @return boolean True when passes validation
- */
+ * Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention.
+ *
+ * @return boolean True when passes validation
+ */
public function validate_dir()
{
return (substr_count($this->ext_name, '/') === 1 && $this->ext_name == $this->get_metadata('name'));
@@ -289,10 +300,10 @@ class metadata_manager
/**
- * Validates the contents of the phpbb requirement field
- *
- * @return boolean True when passes validation
- */
+ * Validates the contents of the phpbb requirement field
+ *
+ * @return boolean True when passes validation
+ */
public function validate_require_phpbb()
{
if (!isset($this->metadata['require']['phpbb/phpbb']))
@@ -304,10 +315,10 @@ class metadata_manager
}
/**
- * Validates the contents of the php requirement field
- *
- * @return boolean True when passes validation
- */
+ * Validates the contents of the php requirement field
+ *
+ * @return boolean True when passes validation
+ */
public function validate_require_php()
{
if (!isset($this->metadata['require']['php']))
@@ -340,10 +351,10 @@ class metadata_manager
}
/**
- * Outputs the metadata into the template
- *
- * @return null
- */
+ * Outputs the metadata into the template
+ *
+ * @return null
+ */
public function output_template_data()
{
$this->template->assign_vars(array(
diff --git a/phpBB/phpbb/extension/provider.php b/phpBB/phpbb/extension/provider.php
index e1d854df64..1c42cf7b5e 100644
--- a/phpBB/phpbb/extension/provider.php
+++ b/phpBB/phpbb/extension/provider.php
@@ -58,7 +58,7 @@ abstract class provider implements \IteratorAggregate
/**
* Retrieve an iterator over all items
*
- * @return ArrayIterator An iterator for the array of template paths
+ * @return \ArrayIterator An iterator for the array of template paths
*/
public function getIterator()
{
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php
index 36ecbbcc2e..e31854160a 100644
--- a/phpBB/phpbb/feed/base.php
+++ b/phpBB/phpbb/feed/base.php
@@ -70,15 +70,14 @@ abstract class base
/**
* Constructor
*
- * @param \phpbb\feed\helper $helper Feed helper
- * @param \phpbb\config\config $config Config object
+ * @param \phpbb\feed\helper $helper Feed helper
+ * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db Database connection
- * @param \phpbb\cache\driver\driver_interface $cache Cache object
- * @param \phpbb\user $user User object
- * @param \phpbb\auth\auth $auth Auth object
- * @param \phpbb\content_visibility $content_visibility Auth object
- * @param string $phpEx php file extension
- * @return null
+ * @param \phpbb\cache\driver\driver_interface $cache Cache object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\auth\auth $auth Auth object
+ * @param \phpbb\content_visibility $content_visibility Auth object
+ * @param string $phpEx php file extension
*/
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)
{
@@ -133,6 +132,9 @@ abstract class base
/**
* Set key
+ *
+ * @param string $key Key
+ * @param mixed $value Value
*/
function set($key, $value)
{
@@ -141,6 +143,9 @@ abstract class base
/**
* Get key
+ *
+ * @param string $key Key
+ * @return mixed
*/
function get($key)
{
diff --git a/phpBB/phpbb/feed/factory.php b/phpBB/phpbb/feed/factory.php
index 84b4d5d560..f364f06d03 100644
--- a/phpBB/phpbb/feed/factory.php
+++ b/phpBB/phpbb/feed/factory.php
@@ -13,6 +13,8 @@
namespace phpbb\feed;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
/**
* Factory class to return correct object
*/
@@ -20,7 +22,7 @@ class factory
{
/**
* Service container object
- * @var object
+ * @var ContainerInterface
*/
protected $container;
@@ -33,12 +35,11 @@ class factory
/**
* Constructor
*
- * @param objec $container Container object
- * @param \phpbb\config\config $config Config object
+ * @param ContainerInterface $container Container object
+ * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver_interface $db Database connection
- * @return null
*/
- public function __construct($container, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
+ public function __construct(ContainerInterface $container, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
{
$this->container = $container;
$this->config = $config;
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
index ed78f4893e..9741b752af 100644
--- a/phpBB/phpbb/feed/helper.php
+++ b/phpBB/phpbb/feed/helper.php
@@ -36,7 +36,7 @@ class helper
* @param \phpbb\config\config $config Config object
* @param \phpbb\user $user User object
* @param string $phpbb_root_path Root path
- * @return null
+ * @param string $phpEx PHP extension
*/
public function __construct(\phpbb\config\config $config, \phpbb\user $user, $phpbb_root_path, $phpEx)
{
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php
index fe11fd2a79..011775b6af 100644
--- a/phpBB/phpbb/feed/post_base.php
+++ b/phpBB/phpbb/feed/post_base.php
@@ -48,8 +48,8 @@ abstract class post_base extends \phpbb\feed\attachments_base
{
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
- . (($this->is_moderator_approve_forum($row['forum_id']) && (int)$row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
- . (($this->is_moderator_approve_forum($row['forum_id']) && (int)$row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
}
}
}
diff --git a/phpBB/phpbb/feed/topic_base.php b/phpBB/phpbb/feed/topic_base.php
index 4fbb498272..f9ff368cba 100644
--- a/phpBB/phpbb/feed/topic_base.php
+++ b/phpBB/phpbb/feed/topic_base.php
@@ -52,11 +52,11 @@ abstract class topic_base extends \phpbb\feed\attachments_base
if ($this->is_moderator_approve_forum($row['forum_id']))
{
- if ( (int)$row['topic_visibility'] === ITEM_DELETED)
+ if ((int) $row['topic_visibility'] === ITEM_DELETED)
{
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
}
- else if ((int)$row['topic_visibility'] === ITEM_UNAPPROVED)
+ else if ((int) $row['topic_visibility'] === ITEM_UNAPPROVED)
{
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
}
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/finder.php
index 71a5542b67..28f28825ba 100644
--- a/phpBB/phpbb/extension/finder.php
+++ b/phpBB/phpbb/finder.php
@@ -11,14 +11,14 @@
*
*/
-namespace phpbb\extension;
+namespace phpbb;
/**
-* The extension finder provides a simple way to locate files in active extensions
+* The finder provides a simple way to locate files in the core and a set of extensions
*/
class finder
{
- protected $extension_manager;
+ protected $extensions;
protected $filesystem;
protected $phpbb_root_path;
protected $cache;
@@ -48,9 +48,6 @@ class finder
/**
* Creates a new finder instance with its dependencies
*
- * @param \phpbb\extension\manager $extension_manager An extension manager
- * instance that provides the finder with a list of active
- * extensions and their locations
* @param \phpbb\filesystem $filesystem Filesystem instance
* @param string $phpbb_root_path Path to the phpbb root directory
* @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
@@ -58,9 +55,8 @@ class finder
* @param string $cache_name The name of the cache variable, defaults to
* _ext_finder
*/
- public function __construct(\phpbb\extension\manager $extension_manager, \phpbb\filesystem $filesystem, $phpbb_root_path = '', \phpbb\cache\driver\driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
+ public function __construct(\phpbb\filesystem $filesystem, $phpbb_root_path = '', \phpbb\cache\driver\driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
{
- $this->extension_manager = $extension_manager;
$this->filesystem = $filesystem;
$this->phpbb_root_path = $phpbb_root_path;
$this->cache = $cache;
@@ -76,15 +72,37 @@ class finder
'extension_prefix' => false,
'extension_directory' => false,
);
+ $this->extensions = array();
$this->cached_queries = ($this->cache) ? $this->cache->get($this->cache_name) : false;
}
/**
+ * Set the array of extensions
+ *
+ * @param array $extensions A list of extensions that should be searched aswell
+ * @param bool $replace_list Should the list be emptied before adding the extensions
+ * @return \phpbb\finder This object for chaining calls
+ */
+ public function set_extensions(array $extensions, $replace_list = true)
+ {
+ if ($replace_list)
+ {
+ $this->extensions = array();
+ }
+
+ foreach ($extensions as $ext_name)
+ {
+ $this->extensions[$ext_name] = $this->phpbb_root_path . 'ext/' . $ext_name . '/';
+ }
+ return $this;
+ }
+
+ /**
* Sets a core path to be searched in addition to extensions
*
* @param string $core_path The path relative to phpbb_root_path
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_path($core_path)
{
@@ -100,7 +118,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function suffix($suffix)
{
@@ -117,7 +135,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $extension_suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_suffix($extension_suffix)
{
@@ -133,7 +151,7 @@ class finder
* file extension is automatically added to suffixes.
*
* @param string $core_suffix A filename suffix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_suffix($core_suffix)
{
@@ -145,7 +163,7 @@ class finder
* Sets the prefix all files found in extensions and core must match
*
* @param string $prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function prefix($prefix)
{
@@ -158,7 +176,7 @@ class finder
* Sets a prefix all files found in extensions must match
*
* @param string $extension_prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_prefix($extension_prefix)
{
@@ -170,7 +188,7 @@ class finder
* Sets a prefix all files found in the core path must match
*
* @param string $core_prefix A filename prefix
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_prefix($core_prefix)
{
@@ -185,7 +203,7 @@ class finder
* the current directory.
*
* @param string $directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function directory($directory)
{
@@ -198,7 +216,7 @@ class finder
* Sets a directory all files found in extensions must be contained in
*
* @param string $extension_directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function extension_directory($extension_directory)
{
@@ -210,7 +228,7 @@ class finder
* Sets a directory all files found in the core path must be contained in
*
* @param string $core_directory
- * @return \phpbb\extension\finder This object for chaining calls
+ * @return \phpbb\finder This object for chaining calls
*/
public function core_directory($core_directory)
{
@@ -246,16 +264,14 @@ class finder
* phpBB naming rules an incorrect class name will be returned.
*
* @param bool $cache Whether the result should be cached
- * @param bool $use_all_available Use all available instead of just all
- * enabled extensions
* @return array An array of found class names
*/
- public function get_classes($cache = true, $use_all_available = false)
+ public function get_classes($cache = true)
{
$this->query['extension_suffix'] .= '.' . $this->php_ext;
$this->query['core_suffix'] .= '.' . $this->php_ext;
- $files = $this->find($cache, false, $use_all_available);
+ $files = $this->find($cache, false);
return $this->get_classes_from_files($files);
}
@@ -290,27 +306,23 @@ class finder
* Finds all directories matching the configured options
*
* @param bool $cache Whether the result should be cached
- * @param bool $use_all_available Use all available instead of just all
- * enabled extensions
* @param bool $extension_keys Whether the result should have extension name as array key
* @return array An array of paths to found directories
*/
- public function get_directories($cache = true, $use_all_available = false, $extension_keys = false)
+ public function get_directories($cache = true, $extension_keys = false)
{
- return $this->find_with_root_path($cache, true, $use_all_available, $extension_keys);
+ return $this->find_with_root_path($cache, true, $extension_keys);
}
/**
* Finds all files matching the configured options.
*
* @param bool $cache Whether the result should be cached
- * @param bool $use_all_available Use all available instead of just all
- * enabled extensions
* @return array An array of paths to found files
*/
- public function get_files($cache = true, $use_all_available = false)
+ public function get_files($cache = true)
{
- return $this->find_with_root_path($cache, false, $use_all_available);
+ return $this->find_with_root_path($cache, false);
}
/**
@@ -318,16 +330,14 @@ class finder
*
* @param bool $cache Whether the result should be cached
* @param bool $is_dir Directories will be returned when true, only files
- * otherwise
- * @param bool $use_all_available Use all available instead of just all
- * enabled extensions
+ * otherwise
* @param bool $extension_keys If true, result will be associative array
* with extension name as key
* @return array An array of paths to found items
*/
- protected function find_with_root_path($cache = true, $is_dir = false, $use_all_available = false, $extension_keys = false)
+ protected function find_with_root_path($cache = true, $is_dir = false, $extension_keys = false)
{
- $items = $this->find($cache, $is_dir, $use_all_available);
+ $items = $this->find($cache, $is_dir);
$result = array();
foreach ($items as $item => $ext_name)
@@ -351,21 +361,11 @@ class finder
* @param bool $cache Whether the result should be cached
* @param bool $is_dir Directories will be returned when true, only files
* otherwise
- * @param bool $use_all_available Use all available instead of just all
- * enabled extensions
* @return array An array of paths to found items
*/
- public function find($cache = true, $is_dir = false, $use_all_available = false)
+ public function find($cache = true, $is_dir = false)
{
- if ($use_all_available)
- {
- $extensions = $this->extension_manager->all_available();
- }
- else
- {
- $extensions = $this->extension_manager->all_enabled();
- }
-
+ $extensions = $this->extensions;
if ($this->query['core_path'])
{
$extensions['/'] = $this->phpbb_root_path . $this->query['core_path'];
@@ -465,6 +465,10 @@ class finder
}
else if ($directory && $directory[0] === '/')
{
+ if (!$is_dir)
+ {
+ $path .= substr($directory, 1);
+ }
$directory_pattern = '^' . preg_quote(str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
}
else
@@ -477,45 +481,56 @@ class finder
}
$directory_pattern = '#' . $directory_pattern . '#';
- $iterator = new \RecursiveIteratorIterator(
- new \phpbb\recursive_dot_prefix_filter_iterator(
- new \RecursiveDirectoryIterator(
- $path,
- \FilesystemIterator::SKIP_DOTS
- )
- ),
- \RecursiveIteratorIterator::SELF_FIRST
- );
-
- foreach ($iterator as $file_info)
+ if (is_dir($path))
{
- $filename = $file_info->getFilename();
-
- if ($file_info->isDir() == $is_dir)
+ $iterator = new \RecursiveIteratorIterator(
+ new \phpbb\recursive_dot_prefix_filter_iterator(
+ new \RecursiveDirectoryIterator(
+ $path,
+ \FilesystemIterator::SKIP_DOTS
+ )
+ ),
+ \RecursiveIteratorIterator::SELF_FIRST
+ );
+
+ foreach ($iterator as $file_info)
{
- if ($is_dir)
+ $filename = $file_info->getFilename();
+
+ if ($file_info->isDir() == $is_dir)
{
- $relative_path = $iterator->getInnerIterator()->getSubPath() . DIRECTORY_SEPARATOR . basename($filename) . DIRECTORY_SEPARATOR;
- if ($relative_path[0] !== DIRECTORY_SEPARATOR)
+ if ($is_dir)
{
- $relative_path = DIRECTORY_SEPARATOR . $relative_path;
+ $relative_path = $iterator->getInnerIterator()->getSubPath() . DIRECTORY_SEPARATOR . basename($filename) . DIRECTORY_SEPARATOR;
+ if ($relative_path[0] !== DIRECTORY_SEPARATOR)
+ {
+ $relative_path = DIRECTORY_SEPARATOR . $relative_path;
+ }
+ }
+ else
+ {
+ $relative_path = $iterator->getInnerIterator()->getSubPathname();
+ if ($directory && $directory[0] === '/')
+ {
+ $relative_path = str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR . $relative_path;
+ }
+ else
+ {
+ $relative_path = DIRECTORY_SEPARATOR . $relative_path;
+ }
}
- }
- else
- {
- $relative_path = DIRECTORY_SEPARATOR . $iterator->getInnerIterator()->getSubPathname();
- }
- if ((!$suffix || substr($relative_path, -strlen($suffix)) === $suffix) &&
- (!$prefix || substr($filename, 0, strlen($prefix)) === $prefix) &&
- (!$directory || preg_match($directory_pattern, $relative_path)))
- {
- $files[] = array(
- 'named_path' => str_replace(DIRECTORY_SEPARATOR, '/', $location . $name . substr($relative_path, 1)),
- 'ext_name' => $ext_name,
- 'path' => str_replace(array(DIRECTORY_SEPARATOR, $this->phpbb_root_path), array('/', ''), $file_info->getPath()) . '/',
- 'filename' => $filename,
- );
+ if ((!$suffix || substr($relative_path, -strlen($suffix)) === $suffix) &&
+ (!$prefix || substr($filename, 0, strlen($prefix)) === $prefix) &&
+ (!$directory || preg_match($directory_pattern, $relative_path)))
+ {
+ $files[] = array(
+ 'named_path' => str_replace(DIRECTORY_SEPARATOR, '/', $location . $name . substr($relative_path, 1)),
+ 'ext_name' => $ext_name,
+ 'path' => str_replace(array(DIRECTORY_SEPARATOR, $this->phpbb_root_path), array('/', ''), $file_info->getPath()) . '/',
+ 'filename' => $filename,
+ );
+ }
}
}
}
diff --git a/phpBB/phpbb/groupposition/legend.php b/phpBB/phpbb/groupposition/legend.php
index af903e363e..efea3389d4 100644
--- a/phpBB/phpbb/groupposition/legend.php
+++ b/phpBB/phpbb/groupposition/legend.php
@@ -53,7 +53,9 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Returns the group_legend for a given group, if the group exists.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be selected
+ * @return int position of the group
+ * @throws \phpbb\groupposition\exception
*/
public function get_group_value($group_id)
{
@@ -76,7 +78,7 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Get number of groups, displayed on the legend
*
- * {@inheritDoc}
+ * @return int value of the last item displayed
*/
public function get_group_count()
{
@@ -91,8 +93,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Adds a group by group_id
- *
* {@inheritDoc}
*/
public function add_group($group_id)
@@ -118,7 +118,9 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Deletes a group by setting the field to self::GROUP_DISABLED and closing the gap in the list.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be deleted
+ * @param bool $skip_group Skip setting the value for this group, to save the query, when you need to update it anyway.
+ * @return bool True if the group was deleted successfully
*/
public function delete_group($group_id, $skip_group = false)
{
@@ -150,8 +152,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up by group_id
- *
* {@inheritDoc}
*/
public function move_up($group_id)
@@ -160,8 +160,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group down by group_id
- *
* {@inheritDoc}
*/
public function move_down($group_id)
@@ -170,8 +168,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up/down
- *
* {@inheritDoc}
*/
public function move($group_id, $delta)
diff --git a/phpBB/phpbb/groupposition/teampage.php b/phpBB/phpbb/groupposition/teampage.php
index 3e675549bf..2985c51525 100644
--- a/phpBB/phpbb/groupposition/teampage.php
+++ b/phpBB/phpbb/groupposition/teampage.php
@@ -65,7 +65,9 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/**
* Returns the teampage position for a given group, if the group exists.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be selected
+ * @return int position of the group
+ * @throws \phpbb\groupposition\exception
*/
public function get_group_value($group_id)
{
@@ -93,6 +95,7 @@ class teampage implements \phpbb\groupposition\groupposition_interface
*
* @param int $group_id group_id of the group to be selected
* @return array Data row of the group
+ * @throws \phpbb\groupposition\exception
*/
public function get_group_values($group_id)
{
@@ -120,6 +123,7 @@ class teampage implements \phpbb\groupposition\groupposition_interface
*
* @param int $teampage_id Teampage_id of the selected item
* @return int Teampage position of the item
+ * @throws \phpbb\groupposition\exception
*/
public function get_teampage_value($teampage_id)
{
@@ -144,6 +148,7 @@ class teampage implements \phpbb\groupposition\groupposition_interface
*
* @param int $teampage_id Teampage_id of the selected item
* @return array Teampage row of the item
+ * @throws \phpbb\groupposition\exception
*/
public function get_teampage_values($teampage_id)
{
@@ -165,8 +170,6 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/**
- * Get number of items displayed
- *
* {@inheritDoc}
*/
public function get_group_count()
@@ -182,8 +185,6 @@ class teampage implements \phpbb\groupposition\groupposition_interface
}
/**
- * Adds a group by group_id
- *
* {@inheritDoc}
*/
public function add_group($group_id)
@@ -288,7 +289,9 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/**
* Deletes a group from the list and closes the gap in the position list.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be deleted
+ * @param bool $skip_group Skip setting the value for this group, to save the query, when you need to update it anyway.
+ * @return bool True if the group was deleted successfully
*/
public function delete_group($group_id, $skip_group = false)
{
@@ -347,8 +350,6 @@ class teampage implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up by group_id
- *
* {@inheritDoc}
*/
public function move_up($group_id)
@@ -359,7 +360,7 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/**
* Moves an item up by teampage_id
*
- * @param int $group_id group_id of the group to be moved
+ * @param int $teampage_id teampage_id of the item to be move
* @return bool True if the group was moved successfully
*/
public function move_up_teampage($teampage_id)
@@ -368,8 +369,6 @@ class teampage implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group down by group_id
- *
* {@inheritDoc}
*/
public function move_down($group_id)
@@ -378,9 +377,9 @@ class teampage implements \phpbb\groupposition\groupposition_interface
}
/**
- * Movesan item down by teampage_id
+ * Moves an item down by teampage_id
*
- * @param int $group_id group_id of the group to be moved
+ * @param int $teampage_id teampage_id of the item to be moved
* @return bool True if the group was moved successfully
*/
public function move_down_teampage($teampage_id)
@@ -389,8 +388,6 @@ class teampage implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up/down
- *
* {@inheritDoc}
*/
public function move($group_id, $delta)
diff --git a/phpBB/phpbb/lock/db.php b/phpBB/phpbb/lock/db.php
index e3c7e97792..85ba9a7aa3 100644
--- a/phpBB/phpbb/lock/db.php
+++ b/phpBB/phpbb/lock/db.php
@@ -54,8 +54,8 @@ class db
*
* You have to call acquire() to actually create the lock.
*
- * @param string $config_name A config variable to be used for locking
- * @param array $config The phpBB configuration
+ * @param string $config_name A config variable to be used for locking
+ * @param \phpbb\config\config $config The phpBB configuration
* @param \phpbb\db\driver\driver_interface $db A database connection
*/
public function __construct($config_name, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index d83fa90a8e..bf0bfe0ae1 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -70,7 +70,7 @@ class log implements \phpbb\log\log_interface
/**
* Event dispatcher object
- * @var phpbb_dispatcher
+ * @var \phpbb\event\dispatcher
*/
protected $dispatcher;
@@ -103,7 +103,6 @@ class log implements \phpbb\log\log_interface
* @param string $relative_admin_path Relative admin root path
* @param string $php_ext PHP Extension
* @param string $log_table Name of the table we use to store our logs
- * @return null
*/
public function __construct($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, $relative_admin_path, $php_ext, $log_table)
{
@@ -159,8 +158,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * This function returns the state of the log system.
- *
* {@inheritDoc}
*/
public function is_enabled($type = '')
@@ -173,12 +170,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * Disable log
- *
- * This function allows disabling the log system or parts of it, for this
- * page call. When add_log is called and the type is disabled,
- * the log will not be added to the database.
- *
* {@inheritDoc}
*/
public function disable($type = '')
@@ -201,10 +192,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * Enable log
- *
- * This function allows re-enabling the log system.
- *
* {@inheritDoc}
*/
public function enable($type = '')
@@ -227,8 +214,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * Adds a log to the database
- *
* {@inheritDoc}
*/
public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())
@@ -332,8 +317,99 @@ class log implements \phpbb\log\log_interface
}
/**
- * Grab the logs from the database
- *
+ * {@inheritDoc}
+ */
+ public function delete($mode, $conditions = array())
+ {
+ switch ($mode)
+ {
+ case 'admin':
+ $log_type = LOG_ADMIN;
+ break;
+
+ case 'mod':
+ $log_type = LOG_MOD;
+ break;
+
+ case 'user':
+ $log_type = LOG_USERS;
+ break;
+
+ case 'users':
+ $log_type = LOG_USERS;
+ break;
+
+ case 'critical':
+ $log_type = LOG_CRITICAL;
+ break;
+
+ default:
+ $log_type = false;
+ }
+
+ /**
+ * Allows to modify log data before we delete it from the database
+ *
+ * NOTE: if sql_ary does not contain a log_type value, the entry will
+ * not be deleted in the database. So ensure to set it, if needed.
+ *
+ * @event core.delete_log
+ * @var string mode Mode of the entry we log
+ * @var string log_type Type ID of the log (should be different than false)
+ * @var array conditions An array of conditions, 3 different forms are accepted
+ * 1) <key> => <value> transformed into 'AND <key> = <value>' (value should be an integer)
+ * 2) <key> => array(<operator>, <value>) transformed into 'AND <key> <operator> <value>' (values can't be an array)
+ * 3) <key> => array('IN' => array(<values>)) transformed into 'AND <key> IN <values>'
+ * A special field, keywords, can also be defined. In this case only the log entries that have the keywords in log_operation or log_data will be deleted.
+ * @since 3.1.0-b4
+ */
+ $vars = array(
+ 'mode',
+ 'log_type',
+ 'conditions',
+ );
+ extract($this->dispatcher->trigger_event('core.delete_log', compact($vars)));
+
+ if ($log_type === false)
+ {
+ return;
+ }
+
+ $sql_where = 'WHERE log_type = ' . $log_type;
+
+ if (isset($conditions['keywords']))
+ {
+ $sql_where .= $this->generate_sql_keyword($conditions['keywords'], '');
+
+ unset($conditions['keywords']);
+ }
+
+ foreach ($conditions as $field => $field_value)
+ {
+ $sql_where .= ' AND ';
+
+ if (is_array($field_value) && sizeof($field_value) == 2 && !is_array($field_value[1]))
+ {
+ $sql_where .= $field . ' ' . $field_value[0] . ' ' . $field_value[1];
+ }
+ else if (is_array($field_value) && isset($field_value['IN']) && is_array($field_value['IN']))
+ {
+ $sql_where .= $this->db->sql_in_set($field, $field_value['IN']);
+ }
+ else
+ {
+ $sql_where .= $field . ' = ' . $field_value;
+ }
+ }
+
+ $sql = 'DELETE FROM ' . LOG_TABLE . "
+ $sql_where";
+ $this->db->sql_query($sql);
+
+ $this->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CLEAR_' . strtoupper($mode));
+ }
+
+ /**
* {@inheritDoc}
*/
public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '')
@@ -638,11 +714,13 @@ class log implements \phpbb\log\log_interface
/**
* Generates a sql condition for the specified keywords
*
- * @param string $keywords The keywords the user specified to search for
+ * @param string $keywords The keywords the user specified to search for
+ * @param string $table_alias The alias of the logs' table ('l.' by default)
+ * @param string $statement_operator The operator used to prefix the statement ('AND' by default)
*
* @return string Returns the SQL condition searching for the keywords
*/
- protected function generate_sql_keyword($keywords)
+ protected function generate_sql_keyword($keywords, $table_alias = 'l.', $statement_operator = 'AND')
{
// Use no preg_quote for $keywords because this would lead to sole
// backslashes being added. We also use an OR connection here for
@@ -687,12 +765,12 @@ class log implements \phpbb\log\log_interface
}
}
- $sql_keywords = 'AND (';
+ $sql_keywords = ' ' . $statement_operator . ' (';
if (!empty($operations))
{
- $sql_keywords .= $this->db->sql_in_set('l.log_operation', $operations) . ' OR ';
+ $sql_keywords .= $this->db->sql_in_set($table_alias . 'log_operation', $operations) . ' OR ';
}
- $sql_lower = $this->db->sql_lower_text('l.log_data');
+ $sql_lower = $this->db->sql_lower_text($table_alias . 'log_data');
$sql_keywords .= " $sql_lower " . implode(" OR $sql_lower ", $keywords) . ')';
}
@@ -768,8 +846,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * Get total log count
- *
* {@inheritDoc}
*/
public function get_log_count()
@@ -778,8 +854,6 @@ class log implements \phpbb\log\log_interface
}
/**
- * Get offset of the last valid log page
- *
* {@inheritDoc}
*/
public function get_valid_offset()
diff --git a/phpBB/phpbb/log/log_interface.php b/phpBB/phpbb/log/log_interface.php
index 2a44ebecb6..5932f722aa 100644
--- a/phpBB/phpbb/log/log_interface.php
+++ b/phpBB/phpbb/log/log_interface.php
@@ -69,6 +69,18 @@ interface log_interface
public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array());
/**
+ * Delete entries in the logs
+ *
+ * @param string $mode The mode defines which log_type is used and from which log the entries are deleted
+ * @param array $conditions An array of conditions, 3 different forms are accepted
+ * 1) <key> => <value> transformed into 'AND <key> = <value>' (value should be an integer)
+ * 2) <key> => array(<operator>, <value>) transformed into 'AND <key> <operator> <value>' (values can't be an array)
+ * 3) <key> => array('IN' => array(<values>)) transformed into 'AND <key> IN <values>'
+ * A special field, keywords, can also be defined. In this case only the log entries that have the keywords in log_operation or log_data will be deleted.
+ */
+ public function delete($mode, $conditions = array());
+
+ /**
* Grab the logs from the database
*
* @param string $mode The mode defines which log_type is used and ifrom which log the entry is retrieved
diff --git a/phpBB/phpbb/log/null.php b/phpBB/phpbb/log/null.php
index 7b11cc9e21..baa78895ea 100644
--- a/phpBB/phpbb/log/null.php
+++ b/phpBB/phpbb/log/null.php
@@ -51,6 +51,13 @@ class null implements log_interface
/**
* {@inheritdoc}
*/
+ public function delete($mode, $conditions = array())
+ {
+ }
+
+ /**
+ * {@inheritdoc}
+ */
public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '')
{
return array();
diff --git a/phpBB/phpbb/message/admin_form.php b/phpBB/phpbb/message/admin_form.php
new file mode 100644
index 0000000000..93db59880c
--- /dev/null
+++ b/phpBB/phpbb/message/admin_form.php
@@ -0,0 +1,191 @@
+<?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\message;
+
+/**
+* Class admin_form
+* Displays a message to the user and allows him to send an email
+*/
+class admin_form extends form
+{
+ /** @var \phpbb\config\db_text */
+ protected $config_text;
+
+ /** @var string */
+ protected $subject;
+ /** @var string */
+ protected $sender_name;
+ /** @var string */
+ protected $sender_address;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\auth\auth $auth
+ * @param \phpbb\config\config $config
+ * @param \phpbb\config\db_text $config_text
+ * @param \phpbb\db\driver\driver_interface $db
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $phpEx
+ */
+ public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\config\db_text $config_text, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $phpEx)
+ {
+ parent::__construct($auth, $config, $db, $user, $phpbb_root_path, $phpEx);
+ $this->config_text = $config_text;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function check_allow()
+ {
+ $error = parent::check_allow();
+ if ($error)
+ {
+ return $error;
+ }
+
+ if (!$this->config['contact_admin_form_enable'])
+ {
+ return 'NO_CONTACT_PAGE';
+ }
+
+ return false;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function bind(\phpbb\request\request_interface $request)
+ {
+ parent::bind($request);
+
+ $this->subject = $request->variable('subject', '', true);
+ $this->sender_address = $request->variable('email', '');
+ $this->sender_name = $request->variable('name', '', true);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function submit(\messenger $messenger)
+ {
+ if (!$this->subject)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_SUBJECT_EMAIL'];
+ }
+ if (!$this->body)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_MESSAGE_EMAIL'];
+ }
+
+ if ($this->user->data['is_registered'])
+ {
+ $this->message->set_sender_from_user($this->user);
+ $this->sender_name = $this->user->data['username'];
+ $this->sender_address = $this->user->data['user_email'];
+ }
+ else
+ {
+ if (!$this->sender_name)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_SENDER_NAME'];
+ }
+
+ if (!function_exists('validate_data'))
+ {
+ require($this->phpbb_root_path . 'includes/functions_user.' . $this->phpEx);
+ }
+
+ $validate_array = validate_data(
+ array(
+ 'email' => $this->sender_address,
+ ),
+ array(
+ 'email' => array(
+ array('string', false, 6, 60),
+ array('email'),
+ ),
+ )
+ );
+
+ foreach ($validate_array as $error)
+ {
+ $this->errors[] = $this->user->lang[$error];
+ }
+
+ $this->message->set_sender($this->user->ip, $this->sender_name, $this->sender_address, $this->user->lang_name);
+ $this->message->set_sender_notify_type(NOTIFY_EMAIL);
+ }
+
+ $this->message->set_template('contact_admin');
+ $this->message->set_subject($this->subject);
+ $this->message->set_body($this->body);
+ $this->message->add_recipient(
+ $this->user->lang['ADMINISTRATOR'],
+ $this->config['board_contact'],
+ $this->config['default_lang'],
+ NOTIFY_EMAIL
+ );
+
+ $this->message->set_template_vars(array(
+ 'FROM_EMAIL_ADDRESS' => $this->sender_address,
+ 'FROM_IP_ADDRESS' => $this->user->ip,
+ 'S_IS_REGISTERED' => $this->user->data['is_registered'],
+
+ 'U_FROM_PROFILE' => generate_board_url() . '/memberlist.' . $this->phpEx . '?mode=viewprofile&u=' . $this->user->data['user_id'],
+ ));
+
+ parent::submit($messenger);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function render(\phpbb\template\template $template)
+ {
+ $l_admin_info = $this->config_text->get('contact_admin_info');
+ if ($l_admin_info)
+ {
+ $contact_admin_data = $this->config_text->get_array(array(
+ 'contact_admin_info',
+ 'contact_admin_info_uid',
+ 'contact_admin_info_bitfield',
+ 'contact_admin_info_flags',
+ ));
+
+ $l_admin_info = generate_text_for_display(
+ $contact_admin_data['contact_admin_info'],
+ $contact_admin_data['contact_admin_info_uid'],
+ $contact_admin_data['contact_admin_info_bitfield'],
+ $contact_admin_data['contact_admin_info_flags']
+ );
+ }
+
+ $template->assign_vars(array(
+ 'S_CONTACT_ADMIN' => true,
+ 'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'],
+ 'S_IS_REGISTERED' => $this->user->data['is_registered'],
+
+ 'CONTACT_INFO' => $l_admin_info,
+ 'MESSAGE' => $this->body,
+ 'SUBJECT' => $this->subject,
+ 'NAME' => $this->sender_name,
+ 'EMAIL' => $this->sender_address,
+ ));
+
+ parent::render($template);
+ }
+}
diff --git a/phpBB/phpbb/message/form.php b/phpBB/phpbb/message/form.php
new file mode 100644
index 0000000000..076b41dc07
--- /dev/null
+++ b/phpBB/phpbb/message/form.php
@@ -0,0 +1,175 @@
+<?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\message;
+
+/**
+* Abstract class form
+*/
+abstract class form
+{
+ /** @var \phpbb\auth\auth */
+ protected $auth;
+ /** @var \phpbb\config\config */
+ protected $config;
+ /** @var \phpbb\db\driver\driver_interface */
+ protected $db;
+ /** @var \phpbb\message\message */
+ protected $message;
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var string */
+ protected $phpbb_root_path;
+ /** @var string */
+ protected $phpEx;
+
+ /** @var array */
+ protected $errors = array();
+ /** @var bool */
+ protected $cc_sender;
+ /** @var string */
+ protected $body;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\auth\auth $auth
+ * @param \phpbb\config\config $config
+ * @param \phpbb\db\driver\driver_interface $db
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $phpEx
+ */
+ public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $phpEx)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->phpEx = $phpEx;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->config = $config;
+ $this->db = $db;
+
+ $this->message = new message($config['server_name']);
+ $this->message->set_sender_from_user($this->user);
+ }
+
+ /**
+ * Returns the title for the email form page
+ *
+ * @return string
+ */
+ public function get_page_title()
+ {
+ return $this->user->lang['SEND_EMAIL'];
+ }
+
+ /**
+ * Returns the file name of the form template
+ *
+ * @return string
+ */
+ public function get_template_file()
+ {
+ return 'memberlist_email.html';
+ }
+
+ /**
+ * Checks whether the user is allowed to use the form
+ *
+ * @return false|string Error string if not allowed, false otherwise
+ */
+ public function check_allow()
+ {
+ if (!$this->config['email_enable'])
+ {
+ return 'EMAIL_DISABLED';
+ }
+
+ if (time() - $this->user->data['user_emailtime'] < $this->config['flood_interval'])
+ {
+ return 'FLOOD_EMAIL_LIMIT';
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the return link after the message has been sent
+ *
+ * @return string
+ */
+ public function get_return_message()
+ {
+ return sprintf($this->user->lang['RETURN_INDEX'], '<a href="' . append_sid($this->phpbb_root_path . 'index.' . $this->phpEx) . '">', '</a>');
+ }
+
+ /**
+ * Bind the values of the request to the form
+ *
+ * @param \phpbb\request\request_interface $request
+ * @return null
+ */
+ public function bind(\phpbb\request\request_interface $request)
+ {
+ $this->cc_sender = $request->is_set_post('cc_sender');
+ $this->body = $request->variable('message', '', true);
+ }
+
+ /**
+ * Submit form, generate the email and send it
+ *
+ * @param \messenger $messenger
+ * @return null
+ */
+ public function submit(\messenger $messenger)
+ {
+ if (!check_form_key('memberlist_email'))
+ {
+ $this->errors[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($this->errors))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_emailtime = ' . time() . '
+ WHERE user_id = ' . $this->user->data['user_id'];
+ $this->db->sql_query($sql);
+
+ if ($this->cc_sender)
+ {
+ $this->message->cc_sender();
+ }
+
+ $this->message->send($messenger, phpbb_get_board_contact($this->config, $this->phpEx));
+
+ meta_refresh(3, append_sid($this->phpbb_root_path . 'index.' . $this->phpEx));
+ trigger_error($this->user->lang['EMAIL_SENT'] . '<br /><br />' . $this->get_return_message());
+ }
+ }
+
+ /**
+ * Render the template of the form
+ *
+ * @param \phpbb\template\template $template
+ * @return null
+ */
+ public function render(\phpbb\template\template $template)
+ {
+ add_form_key('memberlist_email');
+
+ $template->assign_vars(array(
+ 'ERROR_MESSAGE' => (sizeof($this->errors)) ? implode('<br />', $this->errors) : '',
+ ));
+ }
+}
diff --git a/phpBB/phpbb/message/message.php b/phpBB/phpbb/message/message.php
new file mode 100644
index 0000000000..5fd24b542e
--- /dev/null
+++ b/phpBB/phpbb/message/message.php
@@ -0,0 +1,282 @@
+<?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\message;
+
+/**
+* Class message
+* Holds all information for an email and sends it in the end
+*/
+class message
+{
+ /** @var string */
+ protected $server_name;
+
+ /** @var string */
+ protected $subject = '';
+ /** @var string */
+ protected $body = '';
+ /** @var string */
+ protected $template = '';
+ /** @var array */
+ protected $template_vars = array();
+
+ /** @var string */
+ protected $sender_ip = '';
+ /** @var string */
+ protected $sender_name = '';
+ /** @var string */
+ protected $sender_address = '';
+ /** @var string */
+ protected $sender_lang = '';
+ /** @var string */
+ protected $sender_id = '';
+ /** @var string */
+ protected $sender_username = '';
+ /** @var string */
+ protected $sender_jabber = '';
+ /** @var int */
+ protected $sender_notify_type = NOTIFY_EMAIL;
+
+ /** @var array */
+ protected $recipients;
+
+ /**
+ * Construct
+ *
+ * @param string $server_name Used for AntiAbuse header
+ */
+ public function __construct($server_name)
+ {
+ $this->server_name = $server_name;
+ }
+
+ /**
+ * Set the subject of the email
+ *
+ * @param string $subject
+ * @return null
+ */
+ public function set_subject($subject)
+ {
+ $this->subject = $subject;
+ }
+
+ /**
+ * Set the body of the email text
+ *
+ * @param string $body
+ * @return null
+ */
+ public function set_body($body)
+ {
+ $this->body = $body;
+ }
+
+ /**
+ * Set the name of the email template to use
+ *
+ * @param string $template
+ * @return null
+ */
+ public function set_template($template)
+ {
+ $this->template = $template;
+ }
+
+ /**
+ * Set the array with the "template" data for the email
+ *
+ * @param array $template_vars
+ * @return null
+ */
+ public function set_template_vars($template_vars)
+ {
+ $this->template_vars = $template_vars;
+ }
+
+ /**
+ * Add a recipient from \phpbb\user
+ *
+ * @param array $user
+ * @return null
+ */
+ public function add_recipient_from_user_row(array $user)
+ {
+ $this->add_recipient(
+ $user['username'],
+ $user['user_email'],
+ $user['user_lang'],
+ $user['user_notify_type'],
+ $user['username'],
+ $user['user_jabber']
+ );
+ }
+
+ /**
+ * Add a recipient
+ *
+ * @param string $recipient_name Displayed sender name
+ * @param string $recipient_address Email address
+ * @param string $recipient_lang
+ * @param int $recipient_notify_type Used notification methods (Jabber, Email, ...)
+ * @param string $recipient_username User Name (used for AntiAbuse header)
+ * @param string $recipient_jabber
+ * @return null
+ */
+ public function add_recipient($recipient_name, $recipient_address, $recipient_lang, $recipient_notify_type = NOTIFY_EMAIL, $recipient_username = '', $recipient_jabber = '')
+ {
+ $this->recipients[] = array(
+ 'name' => $recipient_name,
+ 'address' => $recipient_address,
+ 'lang' => $recipient_lang,
+ 'username' => $recipient_username,
+ 'jabber' => $recipient_jabber,
+ 'notify_type' => $recipient_notify_type,
+ 'to_name' => $recipient_name,
+ );
+ }
+
+ /**
+ * Set the senders data from \phpbb\user object
+ *
+ * @param \phpbb\user $user
+ * @return null
+ */
+ public function set_sender_from_user($user)
+ {
+ $this->set_sender(
+ $user->ip,
+ $user->data['username'],
+ $user->data['user_email'],
+ $user->lang_name,
+ $user->data['user_id'],
+ $user->data['username'],
+ $user->data['user_jabber']
+ );
+
+ $this->set_sender_notify_type($user->data['user_notify_type']);
+ }
+
+ /**
+ * Set the senders data
+ *
+ * @param string $sender_ip
+ * @param string $sender_name Displayed sender name
+ * @param string $sender_address Email address
+ * @param string $sender_lang
+ * @param int $sender_id User ID
+ * @param string $sender_username User Name (used for AntiAbuse header)
+ * @param string $sender_jabber
+ * @return null
+ */
+ public function set_sender($sender_ip, $sender_name, $sender_address, $sender_lang = '', $sender_id = 0, $sender_username = '', $sender_jabber = '')
+ {
+ $this->sender_ip = $sender_ip;
+ $this->sender_name = $sender_name;
+ $this->sender_address = $sender_address;
+ $this->sender_lang = $sender_lang;
+ $this->sender_id = $sender_id;
+ $this->sender_username = $sender_username;
+ $this->sender_jabber = $sender_jabber;
+ }
+
+ /**
+ * Which notification type should be used? Jabber, Email, ...?
+ *
+ * @param int $sender_notify_type
+ * @return null
+ */
+ public function set_sender_notify_type($sender_notify_type)
+ {
+ $this->sender_notify_type = $sender_notify_type;
+ }
+
+ /**
+ * Ok, now the same email if CC specified, but without exposing the user's email address
+ *
+ * @return null
+ */
+ public function cc_sender()
+ {
+ if (!sizeof($this->recipients))
+ {
+ trigger_error('No email recipients specified');
+ }
+ if (!$this->sender_address)
+ {
+ trigger_error('No email sender specified');
+ }
+
+ $this->recipients[] = array(
+ 'lang' => $this->sender_lang,
+ 'address' => $this->sender_address,
+ 'name' => $this->sender_name,
+ 'username' => $this->sender_username,
+ 'jabber' => $this->sender_jabber,
+ 'notify_type' => $this->sender_notify_type,
+ 'to_name' => $this->recipients[0]['to_name'],
+ );
+ }
+
+ /**
+ * Send the email
+ *
+ * @param \messenger $messenger
+ * @param string $contact
+ * @return null
+ */
+ public function send(\messenger $messenger, $contact)
+ {
+ if (!sizeof($this->recipients))
+ {
+ return;
+ }
+
+ foreach ($this->recipients as $recipient)
+ {
+ $messenger->template($this->template, $recipient['lang']);
+ $messenger->replyto($this->sender_address);
+ $messenger->to($recipient['address'], $recipient['name']);
+ $messenger->im($recipient['jabber'], $recipient['username']);
+
+ $messenger->headers('X-AntiAbuse: Board servername - ' . $this->server_name);
+ $messenger->headers('X-AntiAbuse: User IP - ' . $this->sender_ip);
+
+ if ($this->sender_id)
+ {
+ $messenger->headers('X-AntiAbuse: User_id - ' . $this->sender_id);
+ }
+ if ($this->sender_username)
+ {
+ $messenger->headers('X-AntiAbuse: Username - ' . $this->sender_username);
+ }
+
+ $messenger->subject(htmlspecialchars_decode($this->subject));
+
+ $messenger->assign_vars(array(
+ 'BOARD_CONTACT' => $contact,
+ 'TO_USERNAME' => htmlspecialchars_decode($recipient['to_name']),
+ 'FROM_USERNAME' => htmlspecialchars_decode($this->sender_name),
+ 'MESSAGE' => htmlspecialchars_decode($this->body))
+ );
+
+ if (sizeof($this->template_vars))
+ {
+ $messenger->assign_vars($this->template_vars);
+ }
+
+ $messenger->send($recipient['notify_type']);
+ }
+ }
+}
diff --git a/phpBB/phpbb/message/topic_form.php b/phpBB/phpbb/message/topic_form.php
new file mode 100644
index 0000000000..1e0f2a1945
--- /dev/null
+++ b/phpBB/phpbb/message/topic_form.php
@@ -0,0 +1,158 @@
+<?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\message;
+
+/**
+* Class topic_form
+* Form used to send topics as notification emails
+*/
+class topic_form extends form
+{
+ /** @var int */
+ protected $topic_id;
+ /** @var array */
+ protected $topic_row;
+ /** @var string */
+ protected $recipient_address;
+ /** @var string */
+ protected $recipient_name;
+ /** @var string */
+ protected $recipient_lang;
+
+ /**
+ * Get the data of the topic
+ *
+ * @param int $topic_id
+ * @return false|array false if the topic does not exist, array otherwise
+ */
+ protected function get_topic_row($topic_id)
+ {
+ $sql = 'SELECT forum_id, topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . (int) $topic_id;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return $row;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function check_allow()
+ {
+ $error = parent::check_allow();
+ if ($error)
+ {
+ return $error;
+ }
+
+ if (!$this->auth->acl_get('u_sendemail'))
+ {
+ return 'NO_EMAIL';
+ }
+
+ if (!$this->topic_row)
+ {
+ return 'NO_TOPIC';
+ }
+
+ if (!$this->auth->acl_get('f_read', $this->topic_row['forum_id']))
+ {
+ return 'SORRY_AUTH_READ';
+ }
+
+ if (!$this->auth->acl_get('f_email', $this->topic_row['forum_id']))
+ {
+ return 'NO_EMAIL';
+ }
+
+ return false;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function bind(\phpbb\request\request_interface $request)
+ {
+ parent::bind($request);
+
+ $this->topic_id = $request->variable('t', 0);
+ $this->recipient_address = $request->variable('email', '');
+ $this->recipient_name = $request->variable('name', '', true);
+ $this->recipient_lang = $request->variable('lang', $this->config['default_lang']);
+
+ $this->topic_row = $this->get_topic_row($this->topic_id);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function submit(\messenger $messenger)
+ {
+ if (!$this->recipient_address || !preg_match('/^' . get_preg_expression('email') . '$/i', $this->recipient_address))
+ {
+ $this->errors[] = $this->user->lang['EMPTY_ADDRESS_EMAIL'];
+ }
+
+ if (!$this->recipient_name)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_NAME_EMAIL'];
+ }
+
+ $this->message->set_template('email_notify');
+ $this->message->set_template_vars(array(
+ 'TOPIC_NAME' => htmlspecialchars_decode($this->topic_row['topic_title']),
+ 'U_TOPIC' => generate_board_url() . '/viewtopic.' . $this->phpEx . '?f=' . $this->topic_row['forum_id'] . '&t=' . $this->topic_id,
+ ));
+
+ $this->message->add_recipient(
+ $this->recipient_name,
+ $this->recipient_address,
+ $this->recipient_lang,
+ NOTIFY_EMAIL
+ );
+ $this->message->set_sender_notify_type(NOTIFY_EMAIL);
+
+ parent::submit($messenger);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function get_return_message()
+ {
+ return sprintf($this->user->lang['RETURN_TOPIC'], '<a href="' . append_sid($this->phpbb_root_path . 'viewtopic.' . $this->phpEx, 'f=' . $this->topic_row['forum_id'] . '&amp;t=' . $this->topic_id) . '">', '</a>');
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function render(\phpbb\template\template $template)
+ {
+ parent::render($template);
+
+ $this->user->add_lang('viewtopic');
+ $template->assign_vars(array(
+ 'EMAIL' => $this->recipient_address,
+ 'NAME' => $this->recipient_name,
+ 'S_LANG_OPTIONS' => language_select($this->recipient_lang),
+ 'MESSAGE' => $this->body,
+
+ 'L_EMAIL_BODY_EXPLAIN' => $this->user->lang['EMAIL_TOPIC_EXPLAIN'],
+ 'S_POST_ACTION' => append_sid($this->phpbb_root_path . 'memberlist.' . $this->phpEx, 'mode=email&amp;t=' . $this->topic_id))
+ );
+ }
+}
diff --git a/phpBB/phpbb/message/user_form.php b/phpBB/phpbb/message/user_form.php
new file mode 100644
index 0000000000..007e575407
--- /dev/null
+++ b/phpBB/phpbb/message/user_form.php
@@ -0,0 +1,136 @@
+<?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\message;
+
+/**
+* Class user_form
+* Allows users to send emails to other users
+*/
+class user_form extends form
+{
+ /** @var int */
+ protected $recipient_id;
+ /** @var array */
+ protected $recipient_row;
+ /** @var string */
+ protected $subject;
+
+ /**
+ * Get the data of the recipient
+ *
+ * @param int $user_id
+ * @return false|array false if the user does not exist, array otherwise
+ */
+ protected function get_user_row($user_id)
+ {
+ $sql = 'SELECT user_id, username, user_colour, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_type
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $user_id . '
+ AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return $row;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function check_allow()
+ {
+ $error = parent::check_allow();
+ if ($error)
+ {
+ return $error;
+ }
+
+ if (!$this->auth->acl_get('u_sendemail'))
+ {
+ return 'NO_EMAIL';
+ }
+
+ if ($this->recipient_id == ANONYMOUS || !$this->config['board_email_form'])
+ {
+ return 'NO_EMAIL';
+ }
+
+ if (!$this->recipient_row)
+ {
+ return 'NO_USER';
+ }
+
+ // Can we send email to this user?
+ if (!$this->recipient_row['user_allow_viewemail'] && !$this->auth->acl_get('a_user'))
+ {
+ return 'NO_EMAIL';
+ }
+
+ return false;
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function bind(\phpbb\request\request_interface $request)
+ {
+ parent::bind($request);
+
+ $this->recipient_id = $request->variable('u', 0);
+ $this->subject = $request->variable('subject', '', true);
+
+ $this->recipient_row = $this->get_user_row($this->recipient_id);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function submit(\messenger $messenger)
+ {
+ if (!$this->subject)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_SUBJECT_EMAIL'];
+ }
+
+ if (!$this->body)
+ {
+ $this->errors[] = $this->user->lang['EMPTY_MESSAGE_EMAIL'];
+ }
+
+ $this->message->set_template('profile_send_email');
+ $this->message->set_subject($this->subject);
+ $this->message->set_body($this->body);
+ $this->message->add_recipient_from_user_row($this->recipient_row);
+
+ parent::submit($messenger);
+ }
+
+ /**
+ * {inheritDoc}
+ */
+ public function render(\phpbb\template\template $template)
+ {
+ parent::render($template);
+
+ $template->assign_vars(array(
+ 'S_SEND_USER' => true,
+ 'S_POST_ACTION' => append_sid($this->phpbb_root_path . 'memberlist.' . $this->phpEx, 'mode=email&amp;u=' . $this->recipient_id),
+
+ 'L_SEND_EMAIL_USER' => $this->user->lang('SEND_EMAIL_USER', $this->recipient_row['username']),
+ 'USERNAME_FULL' => get_username_string('full', $this->recipient_row['user_id'], $this->recipient_row['username'], $this->recipient_row['user_colour']),
+ 'SUBJECT' => $this->subject,
+ 'MESSAGE' => $this->body,
+ ));
+ }
+}
diff --git a/phpBB/phpbb/mimetype/content_guesser.php b/phpBB/phpbb/mimetype/content_guesser.php
index 7c0177b57b..9c83e8dd73 100644
--- a/phpBB/phpbb/mimetype/content_guesser.php
+++ b/phpBB/phpbb/mimetype/content_guesser.php
@@ -16,7 +16,7 @@ namespace phpbb\mimetype;
class content_guesser extends guesser_base
{
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function is_supported()
{
@@ -24,7 +24,7 @@ class content_guesser extends guesser_base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function guess($file, $file_name = '')
{
diff --git a/phpBB/phpbb/mimetype/extension_guesser.php b/phpBB/phpbb/mimetype/extension_guesser.php
index 74bfeb97b6..9e36c07f91 100644
--- a/phpBB/phpbb/mimetype/extension_guesser.php
+++ b/phpBB/phpbb/mimetype/extension_guesser.php
@@ -470,7 +470,7 @@ class extension_guesser extends guesser_base
);
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function is_supported()
{
@@ -478,7 +478,7 @@ class extension_guesser extends guesser_base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function guess($file, $file_name = '')
{
diff --git a/phpBB/phpbb/mimetype/guesser.php b/phpBB/phpbb/mimetype/guesser.php
index 6eb924b584..87b164b561 100644
--- a/phpBB/phpbb/mimetype/guesser.php
+++ b/phpBB/phpbb/mimetype/guesser.php
@@ -21,7 +21,7 @@ class guesser
const PRIORITY_DEFAULT = 0;
/**
- * @var mimetype guessers
+ * @var array guessers
*/
protected $guessers;
diff --git a/phpBB/phpbb/mimetype/guesser_base.php b/phpBB/phpbb/mimetype/guesser_base.php
index f26f207aff..225dfd57dc 100644
--- a/phpBB/phpbb/mimetype/guesser_base.php
+++ b/phpBB/phpbb/mimetype/guesser_base.php
@@ -21,7 +21,7 @@ abstract class guesser_base implements guesser_interface
protected $priority;
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_priority()
{
@@ -29,7 +29,7 @@ abstract class guesser_base implements guesser_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function set_priority($priority)
{
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index c3539e76df..74ef980445 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -13,6 +13,8 @@
namespace phpbb\notification;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
/**
* Notifications service class
*/
@@ -24,7 +26,7 @@ class manager
/** @var array */
protected $notification_methods;
- /** @var ContainerBuilder */
+ /** @var ContainerInterface */
protected $phpbb_container;
/** @var \phpbb\user_loader */
@@ -62,7 +64,7 @@ class manager
*
* @param array $notification_types
* @param array $notification_methods
- * @param ContainerBuilder $phpbb_container
+ * @param ContainerInterface $phpbb_container
* @param \phpbb\user_loader $user_loader
* @param \phpbb\config\config $config
* @param \phpbb\db\driver\driver_interface $db
@@ -74,7 +76,7 @@ class manager
* @param string $user_notifications_table
* @return \phpbb\notification\manager
*/
- public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
+ public function __construct($notification_types, $notification_methods, ContainerInterface $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
{
$this->notification_types = $notification_types;
$this->notification_methods = $notification_methods;
@@ -574,6 +576,34 @@ class manager
return $subscription_methods;
}
+
+ /**
+ * Get user's notification data
+ *
+ * @param int $user_id The user_id of the user to get the notifications for
+ *
+ * @return array User's notification
+ */
+ protected function get_user_notifications($user_id)
+ {
+ $sql = 'SELECT method, notify, item_type
+ FROM ' . $this->user_notifications_table . '
+ WHERE user_id = ' . (int) $user_id . '
+ AND item_id = 0';
+
+ $result = $this->db->sql_query($sql);
+ $user_notifications = array();
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $user_notifications[$row['item_type']][] = $row;
+ }
+
+ $this->db->sql_freeresult($result);
+
+ return $user_notifications;
+ }
+
/**
* Get global subscriptions (item_id = 0)
*
@@ -587,28 +617,23 @@ class manager
$subscriptions = array();
- foreach ($this->get_subscription_types() as $group_name => $types)
+ $user_notifications = $this->get_user_notifications($user_id);
+
+ foreach ($this->get_subscription_types() as $types)
{
foreach ($types as $id => $type)
{
- $sql = 'SELECT method, notify
- FROM ' . $this->user_notifications_table . '
- WHERE user_id = ' . (int) $user_id . "
- AND item_type = '" . $this->db->sql_escape($id) . "'
- AND item_id = 0";
- $result = $this->db->sql_query($sql);
-
- $row = $this->db->sql_fetchrow($result);
- if (!$row)
+
+ if (empty($user_notifications[$id]))
{
// No rows at all, default to ''
$subscriptions[$id] = array('');
}
else
{
- do
+ foreach ($user_notifications[$id] as $user_notification)
{
- if (!$row['notify'])
+ if (!$user_notification['notify'])
{
continue;
}
@@ -618,12 +643,9 @@ class manager
$subscriptions[$id] = array();
}
- $subscriptions[$id][] = $row['method'];
+ $subscriptions[$id][] = $user_notification['method'];
}
- while ($row = $this->db->sql_fetchrow($result));
}
-
- $this->db->sql_freeresult($result);
}
}
@@ -866,6 +888,7 @@ class manager
*
* @param string $notification_type_name The name
* @return int the notification_type_id
+ * @throws \phpbb\notification\exception
*/
public function get_notification_type_id($notification_type_name)
{
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php
index c1d4d0e257..910f51b3a6 100644
--- a/phpBB/phpbb/notification/type/base.php
+++ b/phpBB/phpbb/notification/type/base.php
@@ -308,16 +308,15 @@ abstract class base implements \phpbb\notification\type\type_interface
return array(
'NOTIFICATION_ID' => $this->notification_id,
-
+ 'STYLING' => $this->get_style_class(),
'AVATAR' => $this->get_avatar(),
-
'FORMATTED_TITLE' => $this->get_title(),
-
+ 'REFERENCE' => $this->get_reference(),
+ 'FORUM' => $this->get_forum(),
+ 'REASON' => $this->get_reason(),
'URL' => $this->get_url(),
'TIME' => $this->user->format_date($this->notification_time),
-
'UNREAD' => !$this->notification_read,
-
'U_MARK_READ' => (!$this->notification_read) ? $u_mark_read : '',
);
}
@@ -337,6 +336,16 @@ abstract class base implements \phpbb\notification\type\type_interface
}
/**
+ * Get the CSS style class of the notification (fall back)
+ *
+ * @return string
+ */
+ public function get_style_class()
+ {
+ return '';
+ }
+
+ /**
* Get the user's avatar (fall back)
*
* @return string
@@ -347,6 +356,36 @@ abstract class base implements \phpbb\notification\type\type_interface
}
/**
+ * Get the reference of the notifcation (fall back)
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return '';
+ }
+
+ /**
+ * Get the forum of the notification reference (fall back)
+ *
+ * @return string
+ */
+ public function get_forum()
+ {
+ return '';
+ }
+
+ /**
+ * Get the reason for the notifcation (fall back)
+ *
+ * @return string
+ */
+ public function get_reason()
+ {
+ return '';
+ }
+
+ /**
* Get the special items to load (fall back)
*
* @return array
diff --git a/phpBB/phpbb/notification/type/disapprove_post.php b/phpBB/phpbb/notification/type/disapprove_post.php
index b5f94f404f..7b18ed70ea 100644
--- a/phpBB/phpbb/notification/type/disapprove_post.php
+++ b/phpBB/phpbb/notification/type/disapprove_post.php
@@ -31,6 +31,16 @@ class disapprove_post extends \phpbb\notification\type\approve_post
}
/**
+ * Get the CSS style class of the notification
+ *
+ * @return string
+ */
+ public function get_style_class()
+ {
+ return 'notification-disapproved';
+ }
+
+ /**
* Language key used to output the text
*
* @var string
@@ -63,9 +73,31 @@ class disapprove_post extends \phpbb\notification\type\approve_post
*/
public function get_title()
{
+ return $this->user->lang($this->language_key);
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('topic_title'))
+ );
+ }
+
+ /**
+ * Get the reason for the disapproval notification
+ *
+ * @return string
+ */
+ public function get_reason()
+ {
return $this->user->lang(
- $this->language_key,
- censor_text($this->get_data('topic_title')),
+ 'NOTIFICATION_REASON',
$this->get_data('disapprove_reason')
);
}
diff --git a/phpBB/phpbb/notification/type/disapprove_topic.php b/phpBB/phpbb/notification/type/disapprove_topic.php
index 8883c53294..3f87741807 100644
--- a/phpBB/phpbb/notification/type/disapprove_topic.php
+++ b/phpBB/phpbb/notification/type/disapprove_topic.php
@@ -31,6 +31,16 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
}
/**
+ * Get the CSS style class of the notification
+ *
+ * @return string
+ */
+ public function get_style_class()
+ {
+ return 'notification-disapproved';
+ }
+
+ /**
* Language key used to output the text
*
* @var string
@@ -63,9 +73,31 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
*/
public function get_title()
{
+ return $this->user->lang($this->language_key);
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('topic_title'))
+ );
+ }
+
+ /**
+ * Get the reason for the disapproval notification
+ *
+ * @return string
+ */
+ public function get_reason()
+ {
return $this->user->lang(
- $this->language_key,
- censor_text($this->get_data('topic_title')),
+ 'NOTIFICATION_REASON',
$this->get_data('disapprove_reason')
);
}
diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php
index 955d121cc6..4f54e93e06 100644
--- a/phpBB/phpbb/notification/type/pm.php
+++ b/phpBB/phpbb/notification/type/pm.php
@@ -111,7 +111,20 @@ class pm extends \phpbb\notification\type\base
{
$username = $this->user_loader->get_username($this->get_data('from_user_id'), 'no_profile');
- return $this->user->lang('NOTIFICATION_PM', $username, $this->get_data('message_subject'));
+ return $this->user->lang('NOTIFICATION_PM', $username);
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ $this->get_data('message_subject')
+ );
}
/**
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php
index c8760f904e..ee3a253e0f 100644
--- a/phpBB/phpbb/notification/type/post.php
+++ b/phpBB/phpbb/notification/type/post.php
@@ -225,12 +225,24 @@ class post extends \phpbb\notification\type\base
return $this->user->lang(
$this->language_key,
phpbb_generate_string_list($usernames, $this->user),
- censor_text($this->get_data('topic_title')),
$responders_cnt
);
}
/**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('topic_title'))
+ );
+ }
+
+ /**
* Get email template
*
* @return string|bool
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
index 03e89dd28e..2eb802eb4b 100644
--- a/phpBB/phpbb/notification/type/report_pm.php
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -31,6 +31,16 @@ class report_pm extends \phpbb\notification\type\pm
}
/**
+ * Get the CSS style class of the notification
+ *
+ * @return string
+ */
+ public function get_style_class()
+ {
+ return 'notification-reported';
+ }
+
+ /**
* Language key used to output the text
*
* @var string
@@ -159,12 +169,36 @@ class report_pm extends \phpbb\notification\type\pm
$username = $this->user_loader->get_username($this->get_data('reporter_id'), 'no_profile');
+ return $this->user->lang(
+ $this->language_key,
+ $username
+ );
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('message_subject'))
+ );
+ }
+
+ /**
+ * Get the reason for the notification
+ *
+ * @return string
+ */
+ public function get_reason()
+ {
if ($this->get_data('report_text'))
{
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('message_subject')),
+ 'NOTIFICATION_REASON',
$this->get_data('report_text')
);
}
@@ -172,17 +206,13 @@ class report_pm extends \phpbb\notification\type\pm
if (isset($this->user->lang[$this->get_data('reason_title')]))
{
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('message_subject')),
+ 'NOTIFICATION_REASON',
$this->user->lang[$this->get_data('reason_title')]
);
}
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('message_subject')),
+ 'NOTIFICATION_REASON',
$this->get_data('reason_description')
);
}
diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php
index a646996f75..ed40df67f3 100644
--- a/phpBB/phpbb/notification/type/report_pm_closed.php
+++ b/phpBB/phpbb/notification/type/report_pm_closed.php
@@ -107,7 +107,19 @@ class report_pm_closed extends \phpbb\notification\type\pm
return $this->user->lang(
$this->language_key,
- $username,
+ $username
+ );
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
censor_text($this->get_data('message_subject'))
);
}
diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php
index d5589a6756..024c8d9d42 100644
--- a/phpBB/phpbb/notification/type/report_post.php
+++ b/phpBB/phpbb/notification/type/report_post.php
@@ -30,6 +30,16 @@ class report_post extends \phpbb\notification\type\post_in_queue
}
/**
+ * Get the CSS style class of the notification
+ *
+ * @return string
+ */
+ public function get_style_class()
+ {
+ return 'notification-reported';
+ }
+
+ /**
* Language key used to output the text
*
* @var string
@@ -132,12 +142,36 @@ class report_post extends \phpbb\notification\type\post_in_queue
$username = $this->user_loader->get_username($this->get_data('reporter_id'), 'no_profile');
+ return $this->user->lang(
+ $this->language_key,
+ $username
+ );
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('post_subject'))
+ );
+ }
+
+ /**
+ * Get the reason for the notification
+ *
+ * @return string
+ */
+ public function get_reason()
+ {
if ($this->get_data('report_text'))
{
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('post_subject')),
+ 'NOTIFICATION_REASON',
$this->get_data('report_text')
);
}
@@ -145,17 +179,13 @@ class report_post extends \phpbb\notification\type\post_in_queue
if (isset($this->user->lang[$this->get_data('reason_title')]))
{
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('post_subject')),
+ 'NOTIFICATION_REASON',
$this->user->lang[$this->get_data('reason_title')]
);
}
return $this->user->lang(
- $this->language_key,
- $username,
- censor_text($this->get_data('post_subject')),
+ 'NOTIFICATION_REASON',
$this->get_data('reason_description')
);
}
diff --git a/phpBB/phpbb/notification/type/report_post_closed.php b/phpBB/phpbb/notification/type/report_post_closed.php
index e76fa57036..a979af1fb0 100644
--- a/phpBB/phpbb/notification/type/report_post_closed.php
+++ b/phpBB/phpbb/notification/type/report_post_closed.php
@@ -114,7 +114,19 @@ class report_post_closed extends \phpbb\notification\type\post
return $this->user->lang(
$this->language_key,
- $username,
+ $username
+ );
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
censor_text($this->get_data('post_subject'))
);
}
diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php
index 144c4e58a0..a512a12f20 100644
--- a/phpBB/phpbb/notification/type/topic.php
+++ b/phpBB/phpbb/notification/type/topic.php
@@ -151,8 +151,32 @@ class topic extends \phpbb\notification\type\base
return $this->user->lang(
$this->language_key,
- $username,
- censor_text($this->get_data('topic_title')),
+ $username
+ );
+ }
+
+ /**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_REFERENCE',
+ censor_text($this->get_data('topic_title'))
+ );
+ }
+
+ /**
+ * Get the forum of the notification reference
+ *
+ * @return string
+ */
+ public function get_forum()
+ {
+ return $this->user->lang(
+ 'NOTIFICATION_FORUM',
$this->get_data('forum_name')
);
}
diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php
index c91c7078ad..5c5a110836 100644
--- a/phpBB/phpbb/notification/type/type_interface.php
+++ b/phpBB/phpbb/notification/type/type_interface.php
@@ -88,6 +88,13 @@ interface type_interface
public function load_special($data, $notifications);
/**
+ * Get the CSS style class of the notification
+ *
+ * @return string
+ */
+ public function get_style_class();
+
+ /**
* Get the HTML formatted title of this notification
*
* @return string
@@ -95,6 +102,20 @@ interface type_interface
public function get_title();
/**
+ * Get the HTML formatted reference of the notification
+ *
+ * @return string
+ */
+ public function get_reference();
+
+ /**
+ * Get the forum of the notification reference
+ *
+ * @return string
+ */
+ public function get_forum();
+
+ /**
* Get the url to this item
*
* @return string URL
diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php
index 927d711f4b..8aba41d651 100644
--- a/phpBB/phpbb/pagination.php
+++ b/phpBB/phpbb/pagination.php
@@ -46,7 +46,7 @@ class pagination
* If you use page numbers inside your controller route, start name should be the string
* that should be removed for the first page (example: /page/%d)
* @param int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce
- * @return URL for the requested page
+ * @return string URL for the requested page
*/
protected function generate_page_link($base_url, $on_page, $start_name, $per_page)
{
@@ -126,8 +126,8 @@ class pagination
// determine this number. Again at most five pages? Then just display them all. More than
// five and we first (min) determine whether we'd end up listing more pages than exist.
// We then (max) ensure we're displaying the minimum number of pages.
- $start_page = ($total_pages > 5) ? min(max(1, $on_page - 3), $total_pages - 4) : 1;
- $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 3), 5) : $total_pages;
+ $start_page = ($total_pages > 5) ? min(max(1, $on_page - 2), $total_pages - 4) : 1;
+ $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 2), 5) : $total_pages;
}
if ($on_page != 1)
diff --git a/phpBB/phpbb/passwords/driver/base.php b/phpBB/phpbb/passwords/driver/base.php
index fffc9d1461..fd07a61bf4 100644
--- a/phpBB/phpbb/passwords/driver/base.php
+++ b/phpBB/phpbb/passwords/driver/base.php
@@ -15,10 +15,10 @@ namespace phpbb\passwords\driver;
abstract class base implements driver_interface
{
- /** @var phpbb\config\config */
+ /** @var \phpbb\config\config */
protected $config;
- /** @var phpbb\passwords\driver\helper */
+ /** @var \phpbb\passwords\driver\helper */
protected $helper;
/** @var driver name */
@@ -37,10 +37,26 @@ abstract class base implements driver_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function is_supported()
{
return true;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_settings_only($hash, $full = false)
+ {
+ return false;
+ }
}
diff --git a/phpBB/phpbb/passwords/driver/bcrypt.php b/phpBB/phpbb/passwords/driver/bcrypt.php
index 3edf7255c0..23add37a56 100644
--- a/phpBB/phpbb/passwords/driver/bcrypt.php
+++ b/phpBB/phpbb/passwords/driver/bcrypt.php
@@ -18,7 +18,7 @@ class bcrypt extends base
const PREFIX = '$2a$';
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_prefix()
{
@@ -26,7 +26,7 @@ class bcrypt extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function hash($password, $salt = '')
{
@@ -58,9 +58,9 @@ class bcrypt extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
- public function check($password, $hash)
+ public function check($password, $hash, $user_row = array())
{
$salt = substr($hash, 0, 29);
if (strlen($salt) != 29)
@@ -86,7 +86,7 @@ class bcrypt extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_settings_only($hash, $full = false)
{
diff --git a/phpBB/phpbb/passwords/driver/bcrypt_2y.php b/phpBB/phpbb/passwords/driver/bcrypt_2y.php
index 8b59037fca..c710e0d04a 100644
--- a/phpBB/phpbb/passwords/driver/bcrypt_2y.php
+++ b/phpBB/phpbb/passwords/driver/bcrypt_2y.php
@@ -18,7 +18,7 @@ class bcrypt_2y extends bcrypt
const PREFIX = '$2y$';
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_prefix()
{
@@ -26,7 +26,7 @@ class bcrypt_2y extends bcrypt
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function is_supported()
{
diff --git a/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php b/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php
new file mode 100644
index 0000000000..2d6f897a7b
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/bcrypt_wcf2.php
@@ -0,0 +1,84 @@
+<?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\passwords\driver;
+
+class bcrypt_wcf2 extends base
+{
+ const PREFIX = '$wcf2$';
+
+ /** @var \phpbb\passwords\driver\bcrypt */
+ protected $bcrypt;
+
+ /** @var \phpbb\passwords\driver\helper */
+ protected $helper;
+
+ /**
+ * Constructor of passwords driver object
+ *
+ * @param \phpbb\passwords\driver\bcrypt $bcrypt Salted md5 driver
+ * @param \phpbb\passwords\driver\helper $helper Password driver helper
+ */
+ public function __construct(\phpbb\passwords\driver\bcrypt $bcrypt, helper $helper)
+ {
+ $this->bcrypt = $bcrypt;
+ $this->helper = $helper;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (empty($hash) || strlen($hash) != 60)
+ {
+ return false;
+ }
+ else
+ {
+ $salt = substr($hash, 0, 29);
+
+ if (strlen($salt) != 29)
+ {
+ return false;
+ }
+ // Works for standard WCF 2.x, i.e. WBB4 and similar
+ return $hash === $this->bcrypt->hash($this->bcrypt->hash($password, $salt), $salt);
+ }
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/convert_password.php b/phpBB/phpbb/passwords/driver/convert_password.php
new file mode 100644
index 0000000000..eb70434df2
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/convert_password.php
@@ -0,0 +1,43 @@
+<?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\passwords\driver;
+
+class convert_password extends base
+{
+ const PREFIX = '$CP$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ return false;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/driver_interface.php b/phpBB/phpbb/passwords/driver/driver_interface.php
index 54c9d6500e..3974484f13 100644
--- a/phpBB/phpbb/passwords/driver/driver_interface.php
+++ b/phpBB/phpbb/passwords/driver/driver_interface.php
@@ -23,6 +23,13 @@ interface driver_interface
public function is_supported();
/**
+ * Check if hash type is a legacy hash type
+ *
+ * @return bool True if it's a legacy hash type, false if not
+ */
+ public function is_legacy();
+
+ /**
* Returns the hash prefix
*
* @return string Hash prefix
@@ -44,10 +51,11 @@ interface driver_interface
*
* @param string $password The password to check
* @param string $hash The password hash to check against
+ * @param array $user_row User's row in users table
*
* @return bool True if password is correct, else false
*/
- public function check($password, $hash);
+ public function check($password, $hash, $user_row = array());
/**
* Get only the settings of the specified hash
diff --git a/phpBB/phpbb/passwords/driver/helper.php b/phpBB/phpbb/passwords/driver/helper.php
index 85019bd5c9..2b3ebce53a 100644
--- a/phpBB/phpbb/passwords/driver/helper.php
+++ b/phpBB/phpbb/passwords/driver/helper.php
@@ -16,7 +16,7 @@ namespace phpbb\passwords\driver;
class helper
{
/**
- * @var phpbb\config\config
+ * @var \phpbb\config\config
*/
protected $config;
@@ -29,7 +29,7 @@ class helper
/**
* Construct a driver helper object
*
- * @param phpbb\config\config $config phpBB configuration
+ * @param \phpbb\config\config $config phpBB configuration
*/
public function __construct(\phpbb\config\config $config)
{
diff --git a/phpBB/phpbb/passwords/driver/md5_mybb.php b/phpBB/phpbb/passwords/driver/md5_mybb.php
new file mode 100644
index 0000000000..61ea8dafd8
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/md5_mybb.php
@@ -0,0 +1,60 @@
+<?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\passwords\driver;
+
+class md5_mybb extends base
+{
+ const PREFIX = '$md5_mybb$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (empty($hash) || strlen($hash) != 32 || !isset($user_row['user_passwd_salt']))
+ {
+ return false;
+ }
+ else
+ {
+ // Works for myBB 1.1.x, 1.2.x, 1.4.x, 1.6.x
+ return $hash === md5(md5($user_row['user_passwd_salt']) . md5($password));
+ }
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/md5_phpbb2.php b/phpBB/phpbb/passwords/driver/md5_phpbb2.php
new file mode 100644
index 0000000000..86a4b62ea5
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/md5_phpbb2.php
@@ -0,0 +1,118 @@
+<?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\passwords\driver;
+
+class md5_phpbb2 extends base
+{
+ const PREFIX = '$md5_phpbb2$';
+
+ /** @var \phpbb\request\request phpBB request object */
+ protected $request;
+
+ /** @var \phpbb\passwords\driver\salted_md5 */
+ protected $salted_md5;
+
+ /** @var string phpBB root path */
+ protected $phpbb_root_path;
+
+ /** @var string php file extension */
+ protected $php_ext;
+
+ /**
+ * Constructor of passwords driver object
+ *
+ * @param \phpbb\request\request $request phpBB request object
+ * @param \phpbb\passwords\driver\salted_md5 $salted_md5 Salted md5 driver
+ * @param string $phpbb_root_path phpBB root path
+ * @param string $php_ext PHP file extension
+ */
+ public function __construct($request, \phpbb\passwords\driver\salted_md5 $salted_md5, $phpbb_root_path, $php_ext)
+ {
+ $this->request = $request;
+ $this->salted_md5 = $salted_md5;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (strlen($hash) != 32 && strlen($hash) != 34)
+ {
+ return false;
+ }
+
+ // enable super globals to get literal value
+ // this is needed to prevent unicode normalization
+ $super_globals_disabled = $this->request->super_globals_disabled();
+ if ($super_globals_disabled)
+ {
+ $this->request->enable_super_globals();
+ }
+
+ // in phpBB2 passwords were used exactly as they were sent, with addslashes applied
+ $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
+ $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
+ $password_new_format = $this->request->variable('password', '', true);
+
+ if ($super_globals_disabled)
+ {
+ $this->request->disable_super_globals();
+ }
+
+ if ($password == $password_new_format)
+ {
+ if (!function_exists('utf8_to_cp1252'))
+ {
+ include($this->phpbb_root_path . 'includes/utf/data/recode_basic.' . $this->php_ext);
+ }
+
+ if (md5($password_old_format) === $hash || md5(\utf8_to_cp1252($password_old_format)) === $hash
+ || $this->salted_md5->check(md5($password_old_format), $hash) === true
+ || $this->salted_md5->check(md5(\utf8_to_cp1252($password_old_format)), $hash) === true)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/md5_vb.php b/phpBB/phpbb/passwords/driver/md5_vb.php
new file mode 100644
index 0000000000..c83c32a596
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/md5_vb.php
@@ -0,0 +1,60 @@
+<?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\passwords\driver;
+
+class md5_vb extends base
+{
+ const PREFIX = '$md5_vb$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (empty($hash) || strlen($hash) != 32 || !isset($user_row['user_passwd_salt']))
+ {
+ return false;
+ }
+ else
+ {
+ // Works for vB 3.8.x, 4.x.x, 5.0.x
+ return $hash === md5(md5($password) . $user_row['user_passwd_salt']);
+ }
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/phpass.php b/phpBB/phpbb/passwords/driver/phpass.php
index 44d9dc8fab..bef8355276 100644
--- a/phpBB/phpbb/passwords/driver/phpass.php
+++ b/phpBB/phpbb/passwords/driver/phpass.php
@@ -18,7 +18,7 @@ class phpass extends salted_md5
const PREFIX = '$P$';
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_prefix()
{
diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php
index a9f6712751..97a2b9154b 100644
--- a/phpBB/phpbb/passwords/driver/salted_md5.php
+++ b/phpBB/phpbb/passwords/driver/salted_md5.php
@@ -46,7 +46,7 @@ class salted_md5 extends base
const PREFIX = '$H$';
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_prefix()
{
@@ -54,7 +54,15 @@ class salted_md5 extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
*/
public function hash($password, $setting = '')
{
@@ -90,9 +98,9 @@ class salted_md5 extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
- public function check($password, $hash)
+ public function check($password, $hash, $user_row = array())
{
if (strlen($hash) !== 34)
{
@@ -152,7 +160,7 @@ class salted_md5 extends base
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_settings_only($hash, $full = false)
{
diff --git a/phpBB/phpbb/passwords/driver/sha1.php b/phpBB/phpbb/passwords/driver/sha1.php
new file mode 100644
index 0000000000..0852fd32fc
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/sha1.php
@@ -0,0 +1,52 @@
+<?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\passwords\driver;
+
+class sha1 extends base
+{
+ const PREFIX = '$sha1$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ return (strlen($hash) == 40) ? $hash === sha1($password) : false;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/sha1_smf.php b/phpBB/phpbb/passwords/driver/sha1_smf.php
new file mode 100644
index 0000000000..ec64bd6afb
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/sha1_smf.php
@@ -0,0 +1,51 @@
+<?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\passwords\driver;
+
+class sha1_smf extends base
+{
+ const PREFIX = '$smf$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ return (isset($user_row['login_name'])) ? sha1(strtolower($user_row['login_name']) . $password) : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ return (strlen($hash) == 40) ? $hash === $this->hash($password, $user_row) : false;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/sha1_wcf1.php b/phpBB/phpbb/passwords/driver/sha1_wcf1.php
new file mode 100644
index 0000000000..919fa2bb71
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/sha1_wcf1.php
@@ -0,0 +1,60 @@
+<?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\passwords\driver;
+
+class sha1_wcf1 extends base
+{
+ const PREFIX = '$wcf1$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (empty($hash) || strlen($hash) != 40 || !isset($user_row['user_passwd_salt']))
+ {
+ return false;
+ }
+ else
+ {
+ // Works for standard WCF 1.x, i.e. WBB3 and similar
+ return $hash === sha1($user_row['user_passwd_salt'] . sha1($user_row['user_passwd_salt'] . sha1($password)));
+ }
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/sha_xf1.php b/phpBB/phpbb/passwords/driver/sha_xf1.php
new file mode 100644
index 0000000000..7a1ea1450a
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/sha_xf1.php
@@ -0,0 +1,68 @@
+<?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\passwords\driver;
+
+class sha_xf1 extends base
+{
+ const PREFIX = '$xf1$';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_legacy()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hash($password, $user_row = '')
+ {
+ // Do not support hashing
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check($password, $hash, $user_row = array())
+ {
+ if (empty($hash) || (strlen($hash) != 40 && strlen($hash) != 64) || !isset($user_row['user_passwd_salt']))
+ {
+ return false;
+ }
+ else
+ {
+ // Works for xenforo 1.0, 1.1
+ if ($hash === sha1(sha1($password) . $user_row['user_passwd_salt'])
+ || $hash === hash('sha256', hash('sha256', $password) . $user_row['user_passwd_salt']))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/passwords/helper.php b/phpBB/phpbb/passwords/helper.php
index c6c5fb6d02..c2a49202cd 100644
--- a/phpBB/phpbb/passwords/helper.php
+++ b/phpBB/phpbb/passwords/helper.php
@@ -60,7 +60,7 @@ class helper
$data[$type] .= ($data[$type] !== '$') ? '\\' : '';
$data[$type] .= str_replace('$', '', $value);
}
- elseif ($type == 'settings')
+ else if ($type == 'settings')
{
$data[$type] .= ($data[$type] !== '$') ? '$' : '';
$data[$type] .= $value;
diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php
index 8b16cf55dd..fbb49d86a0 100644
--- a/phpBB/phpbb/passwords/manager.php
+++ b/phpBB/phpbb/passwords/manager.php
@@ -39,23 +39,23 @@ class manager
/**
* Passwords helper
- * @var phpbb\passwords\helper
+ * @var \phpbb\passwords\helper
*/
protected $helper;
/**
* phpBB configuration
- * @var phpbb\config\config
+ * @var \phpbb\config\config
*/
protected $config;
/**
* Construct a passwords object
*
- * @param phpbb\config\config $config phpBB configuration
+ * @param \phpbb\config\config $config phpBB configuration
* @param array $hashing_algorithms Hashing driver
* service collection
- * @param phpbb\passwords\helper $helper Passwords helper object
+ * @param \phpbb\passwords\helper $helper Passwords helper object
* @param string $defaults List of default driver types
*/
public function __construct(\phpbb\config\config $config, $hashing_algorithms, helper $helper, $defaults)
@@ -89,7 +89,7 @@ class manager
/**
* Fill algorithm type map
*
- * @param phpbb\di\service_collection $hashing_algorithms
+ * @param \phpbb\di\service_collection $hashing_algorithms
*/
protected function fill_type_map($hashing_algorithms)
{
@@ -141,7 +141,7 @@ class manager
*/
if (!preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match))
{
- return $this->get_algorithm('$H$');
+ return false;
}
// Be on the lookout for multiple hashing algorithms
@@ -224,9 +224,10 @@ class manager
*
* @param string $password Password that should be checked
* @param string $hash Stored hash
+ * @param array $user_row User's row in users table
* @return string|bool True if password is correct, false if not
*/
- public function check($password, $hash)
+ public function check($password, $hash, $user_row = array())
{
if (strlen($password) > 4096)
{
@@ -235,11 +236,19 @@ class manager
return false;
}
+ // Empty hashes can't be checked
+ if (empty($hash))
+ {
+ return false;
+ }
+
// First find out what kind of hash we're dealing with
$stored_hash_type = $this->detect_algorithm($hash);
if ($stored_hash_type == false)
{
- return false;
+ // Still check MD5 hashes as that is what the installer
+ // will default to for the admin user
+ return $this->get_algorithm('$H$')->check($password, $hash);
}
// Multiple hash passes needed
@@ -259,6 +268,21 @@ class manager
$this->convert_flag = false;
}
+ // Check all legacy hash types if prefix is $CP$
+ if ($stored_hash_type->get_prefix() === '$CP$')
+ {
+ // Remove $CP$ prefix for proper checking
+ $hash = substr($hash, 4);
+
+ foreach ($this->type_map as $algorithm)
+ {
+ if ($algorithm->is_legacy() && $algorithm->check($password, $hash, $user_row) === true)
+ {
+ return true;
+ }
+ }
+ }
+
return $stored_hash_type->check($password, $hash);
}
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 685a5ec180..b592cc4460 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -310,7 +310,7 @@ class path_helper
*
* @param string $url URL to append parameters to
* @param array $new_params Parameters to add in the form of array(name => value)
- * @param string $is_amp Is the parameter separator &amp;. Defaults to true.
+ * @param bool $is_amp Is the parameter separator &amp;. Defaults to true.
* @return string Returns the new URL.
*/
public function append_url_params($url, $new_params, $is_amp = true)
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index 72d85cb094..3f51016c93 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -32,7 +32,6 @@ class permissions
*
* @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher
* @param \phpbb\user $user User Object
- * @return null
*/
public function __construct(\phpbb\event\dispatcher $phpbb_dispatcher, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index 99278d40df..c610d49a63 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -69,8 +69,6 @@ class plupload
* @param \phpbb\user $user
* @param \phpbb\php\ini $php_ini
* @param \phpbb\mimetype\guesser $mimetype_guesser
- *
- * @return null
*/
public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \phpbb\php\ini $php_ini, \phpbb\mimetype\guesser $mimetype_guesser)
{
diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php
index 3ca1274458..c770a0d93c 100644
--- a/phpBB/phpbb/profilefields/type/type_base.php
+++ b/phpBB/phpbb/profilefields/type/type_base.php
@@ -39,7 +39,6 @@ abstract class type_base implements type_interface
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php
index 8d3c0cad93..eb8d3e47d6 100644
--- a/phpBB/phpbb/profilefields/type/type_bool.php
+++ b/phpBB/phpbb/profilefields/type/type_bool.php
@@ -46,7 +46,6 @@ class type_bool extends type_base
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_date.php b/phpBB/phpbb/profilefields/type/type_date.php
index aedd6a56d6..158eec6a0c 100644
--- a/phpBB/phpbb/profilefields/type/type_date.php
+++ b/phpBB/phpbb/profilefields/type/type_date.php
@@ -39,7 +39,6 @@ class type_date extends type_base
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_dropdown.php b/phpBB/phpbb/profilefields/type/type_dropdown.php
index 053a02d593..52c9fcf86a 100644
--- a/phpBB/phpbb/profilefields/type/type_dropdown.php
+++ b/phpBB/phpbb/profilefields/type/type_dropdown.php
@@ -46,7 +46,6 @@ class type_dropdown extends type_base
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_googleplus.php b/phpBB/phpbb/profilefields/type/type_googleplus.php
new file mode 100644
index 0000000000..df1bcc7f4b
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_googleplus.php
@@ -0,0 +1,58 @@
+<?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\profilefields\type;
+
+class type_googleplus extends type_string
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function get_service_name()
+ {
+ return 'profilefields.type.googleplus';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 20,
+ 'field_minlen' => 3,
+ 'field_maxlen' => 255,
+ 'field_validation' => '[\w]+',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_contact_value($field_value, $field_data)
+ {
+ if (!$field_value && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ if (!is_numeric($field_value))
+ {
+ $field_value = '+' . $field_value;
+ }
+
+ return $field_value;
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php
index 8cbcf62b8c..78f1c7d2c9 100644
--- a/phpBB/phpbb/profilefields/type/type_int.php
+++ b/phpBB/phpbb/profilefields/type/type_int.php
@@ -39,7 +39,6 @@ class type_int extends type_base
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php
index 7e994d700b..67befc457d 100644
--- a/phpBB/phpbb/profilefields/type/type_string.php
+++ b/phpBB/phpbb/profilefields/type/type_string.php
@@ -39,7 +39,6 @@ class type_string extends type_string_common
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php
index 7d0cb04d7c..b48e3c5add 100644
--- a/phpBB/phpbb/profilefields/type/type_string_common.php
+++ b/phpBB/phpbb/profilefields/type/type_string_common.php
@@ -20,7 +20,9 @@ abstract class type_string_common extends type_base
'NUMBERS_ONLY' => '[0-9]+',
'ALPHA_ONLY' => '[\w]+',
'ALPHA_UNDERSCORE' => '[\w_]+',
+ 'ALPHA_DOTS' => '[\w.]+',
'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+',
+ 'ALPHA_PUNCTUATION' => '[a-zA-Z][\w\.,\-_]+',
);
/**
diff --git a/phpBB/phpbb/profilefields/type/type_text.php b/phpBB/phpbb/profilefields/type/type_text.php
index 856573292f..bacf60a213 100644
--- a/phpBB/phpbb/profilefields/type/type_text.php
+++ b/phpBB/phpbb/profilefields/type/type_text.php
@@ -39,7 +39,6 @@ class type_text extends type_string_common
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
- * @param string $language_table Table where the language strings are stored
*/
public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
{
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index f7b1751a51..2fbff57990 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -1485,7 +1485,6 @@ class fulltext_native extends \phpbb\search\base
{
case 'sqlite':
case 'sqlite3':
- case 'firebird':
$this->db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
$this->db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
$this->db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE);
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php
index 49d528c8ba..bdb5a86009 100644
--- a/phpBB/phpbb/search/fulltext_postgres.php
+++ b/phpBB/phpbb/search/fulltext_postgres.php
@@ -263,12 +263,12 @@ class fulltext_postgres extends \phpbb\search\base
$this->search_query .= $word . ' ';
$this->tsearch_query .= '&' . substr($word, 1) . ' ';
}
- elseif (strpos($word, '-') === 0)
+ else if (strpos($word, '-') === 0)
{
$this->search_query .= $word . ' ';
$this->tsearch_query .= '&!' . substr($word, 1) . ' ';
}
- elseif (strpos($word, '|') === 0)
+ else if (strpos($word, '|') === 0)
{
$this->search_query .= $word . ' ';
$this->tsearch_query .= '|' . substr($word, 1) . ' ';
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index c6c636562e..9008af338b 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -693,7 +693,7 @@ class fulltext_sphinx
{
if ($mode == 'edit')
{
- $this->sphinx->UpdateAttributes($this->indexes, array('forum_id', 'poster_id'), array((int)$post_id => array((int)$forum_id, (int)$poster_id)));
+ $this->sphinx->UpdateAttributes($this->indexes, array('forum_id', 'poster_id'), array((int) $post_id => array((int) $forum_id, (int) $poster_id)));
}
else if ($mode != 'post' && $post_id)
{
@@ -718,7 +718,7 @@ class fulltext_sphinx
$post_time = time();
while ($row = $this->db->sql_fetchrow($result))
{
- $post_updates[(int)$row['post_id']] = array($post_time);
+ $post_updates[(int) $row['post_id']] = array($post_time);
}
$this->db->sql_freeresult($result);
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index d286dc9cfc..59b7ec2029 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -408,9 +408,8 @@ class session
$session_expired = false;
// Check whether the session is still valid if we have one
- $method = basename(trim($config['auth_method']));
-
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider_collection = $phpbb_container->get('auth.provider_collection');
+ $provider = $provider_collection->get_provider();
if (!($provider instanceof \phpbb\auth\provider\provider_interface))
{
@@ -577,9 +576,8 @@ class session
}
}
- $method = basename(trim($config['auth_method']));
-
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider_collection = $phpbb_container->get('auth.provider_collection');
+ $provider = $provider_collection->get_provider();
$this->data = $provider->autologin();
if (sizeof($this->data))
@@ -898,9 +896,8 @@ class session
$db->sql_query($sql);
// Allow connecting logout with external auth method logout
- $method = basename(trim($config['auth_method']));
-
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider_collection = $phpbb_container->get('auth.provider_collection');
+ $provider = $provider_collection->get_provider();
$provider->logout($this->data, $new_session);
if ($this->data['user_id'] != ANONYMOUS)
@@ -1075,7 +1072,7 @@ class session
{
global $config, $db;
- if (defined('IN_CHECK_BAN'))
+ if (defined('IN_CHECK_BAN') || defined('SKIP_CHECK_BAN'))
{
return;
}
@@ -1189,7 +1186,7 @@ class session
if ($banned && !$return)
{
- global $template;
+ global $template, $phpbb_root_path, $phpEx;
// If the session is empty we need to create a valid one...
if (empty($this->session_id))
@@ -1210,8 +1207,6 @@ class session
// We show a login box here to allow founders accessing the board if banned by IP
if (defined('IN_LOGIN') && $this->data['user_id'] == ANONYMOUS)
{
- global $phpEx;
-
$this->setup('ucp');
$this->data['is_registered'] = $this->data['is_bot'] = false;
@@ -1235,7 +1230,8 @@ class session
$till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
$message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
- $message = sprintf($this->lang[$message], $till_date, '<a href="mailto:' . $config['board_contact'] . '">', '</a>');
+ $contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx);
+ $message = sprintf($this->lang[$message], $till_date, '<a href="' . $contact_link . '">', '</a>');
$message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : '';
$message .= '<br /><br /><em>' . $this->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>';
diff --git a/phpBB/phpbb/symfony_request.php b/phpBB/phpbb/symfony_request.php
index 62e155aa23..bf9ddec493 100644
--- a/phpBB/phpbb/symfony_request.php
+++ b/phpBB/phpbb/symfony_request.php
@@ -20,7 +20,7 @@ class symfony_request extends Request
/**
* Constructor
*
- * @param phpbb\request\request_interface $phpbb_request
+ * @param \phpbb\request\request_interface $phpbb_request
*/
public function __construct(\phpbb\request\request_interface $phpbb_request)
{
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 8df6c8b492..0a32879943 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -55,6 +55,7 @@ class context
*
* @param string $varname Variable name
* @param string $varval Value to assign to variable
+ * @return true
*/
public function assign_var($varname, $varval)
{
@@ -70,6 +71,7 @@ class context
*
* @param string $varname Variable name
* @param string $varval Value to append to variable
+ * @return true
*/
public function append_var($varname, $varval)
{
@@ -117,6 +119,7 @@ class context
*
* @param string $blockname Name of block to assign $vararray to
* @param array $vararray A hash of variable name => value pairs
+ * @return true
*/
public function assign_block_vars($blockname, array $vararray)
{
@@ -206,6 +209,7 @@ class context
*
* @param string $blockname Name of block to assign $block_vars_array to
* @param array $block_vars_array An array of hashes of variable name => value pairs
+ * @return true
*/
public function assign_block_vars_array($blockname, array $block_vars_array)
{
@@ -374,6 +378,7 @@ class context
* Reset/empty complete block
*
* @param string $blockname Name of block to destroy
+ * @return true
*/
public function destroy_block_vars($blockname)
{
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php
index 374f9e9359..041ecb12e4 100644
--- a/phpBB/phpbb/template/template.php
+++ b/phpBB/phpbb/template/template.php
@@ -175,6 +175,7 @@ interface template
/**
* Get path to template for handle (required for BBCode parser)
*
+ * @param string $handle Handle to retrieve the source file
* @return string
*/
public function get_source_file_for_handle($handle);
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php
index d71c02967c..8d25153e14 100644
--- a/phpBB/phpbb/template/twig/environment.php
+++ b/phpBB/phpbb/template/twig/environment.php
@@ -40,7 +40,7 @@ class environment extends \Twig_Environment
* @param \phpbb\path_helper
* @param \phpbb\extension\manager
* @param string $phpbb_root_path
- * @param Twig_LoaderInterface $loader
+ * @param \Twig_LoaderInterface $loader
* @param array $options Array of options to pass to Twig
*/
public function __construct($phpbb_config, \phpbb\path_helper $path_helper, \phpbb\extension\manager $extension_manager = null, \Twig_LoaderInterface $loader = null, $options = array())
@@ -122,7 +122,7 @@ class environment extends \Twig_Environment
* Set the namespace look up order to load templates from
*
* @param array $namespace
- * @return Twig_Environment
+ * @return \Twig_Environment
*/
public function setNamespaceLookUpOrder($namespace)
{
@@ -132,12 +132,13 @@ class environment extends \Twig_Environment
}
/**
- * Loads a template by name.
- *
- * @param string $name The template name
- * @param integer $index The index if it is an embedded template
- * @return Twig_TemplateInterface A template instance representing the given template name
- */
+ * Loads a template by name.
+ *
+ * @param string $name The template name
+ * @param integer $index The index if it is an embedded template
+ * @return \Twig_TemplateInterface A template instance representing the given template name
+ * @throws \Twig_Error_Loader
+ */
public function loadTemplate($name, $index = null)
{
if (strpos($name, '@') === false)
@@ -168,11 +169,12 @@ class environment extends \Twig_Environment
}
/**
- * Finds a template by name.
- *
- * @param string $name The template name
- * @return string
- */
+ * Finds a template by name.
+ *
+ * @param string $name The template name
+ * @return string
+ * @throws \Twig_Error_Loader
+ */
public function findTemplate($name)
{
if (strpos($name, '@') === false)
@@ -188,7 +190,7 @@ class environment extends \Twig_Environment
return parent::getLoader()->getCacheKey('@' . $namespace . '/' . $name);
}
- catch (Twig_Error_Loader $e)
+ catch (\Twig_Error_Loader $e)
{
}
}
diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php
index a357db30a5..8f523684dd 100644
--- a/phpBB/phpbb/template/twig/extension.php
+++ b/phpBB/phpbb/template/twig/extension.php
@@ -127,7 +127,7 @@ class extension extends \Twig_Extension
/**
* Grabs a subset of a loop
*
- * @param Twig_Environment $env A Twig_Environment instance
+ * @param \Twig_Environment $env A Twig_Environment instance
* @param mixed $item A variable
* @param integer $start Start of the subset
* @param integer $end End of the subset
diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php
index 851eb9ddd0..2f8ffaa776 100644
--- a/phpBB/phpbb/template/twig/loader.php
+++ b/phpBB/phpbb/template/twig/loader.php
@@ -24,7 +24,7 @@ class loader extends \Twig_Loader_Filesystem
* Set safe directories
*
* @param array $directories Array of directories that are safe (empty to clear)
- * @return Twig_Loader_Filesystem
+ * @return \Twig_Loader_Filesystem
*/
public function setSafeDirectories($directories = array())
{
@@ -45,7 +45,7 @@ class loader extends \Twig_Loader_Filesystem
* Add safe directory
*
* @param string $directory Directory that should be added
- * @return Twig_Loader_Filesystem
+ * @return \Twig_Loader_Filesystem
*/
public function addSafeDirectory($directory)
{
@@ -110,7 +110,7 @@ class loader extends \Twig_Loader_Filesystem
// Try validating the name (which may throw an exception)
parent::validateName($name);
}
- catch (Twig_Error_Loader $e)
+ catch (\Twig_Error_Loader $e)
{
if (strpos($e->getRawMessage(), 'Looks like you try to load a template outside configured directories') === 0)
{
diff --git a/phpBB/phpbb/template/twig/node/definenode.php b/phpBB/phpbb/template/twig/node/definenode.php
index fe336d4129..695ec4281f 100644
--- a/phpBB/phpbb/template/twig/node/definenode.php
+++ b/phpBB/phpbb/template/twig/node/definenode.php
@@ -23,10 +23,10 @@ class definenode extends \Twig_Node
}
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php
index b551d7a75e..8fc4ba4775 100644
--- a/phpBB/phpbb/template/twig/node/event.php
+++ b/phpBB/phpbb/template/twig/node/event.php
@@ -17,12 +17,12 @@ namespace phpbb\template\twig\node;
class event extends \Twig_Node
{
/**
- * The subdirectory in which all template listener files must be placed
- * @var string
- */
+ * The subdirectory in which all template listener files must be placed
+ * @var string
+ */
protected $listener_directory = 'event/';
- /** @var Twig_Environment */
+ /** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@@ -33,10 +33,10 @@ class event extends \Twig_Node
}
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php
index c41d4d03f3..15195a226b 100644
--- a/phpBB/phpbb/template/twig/node/includeasset.php
+++ b/phpBB/phpbb/template/twig/node/includeasset.php
@@ -15,7 +15,7 @@ namespace phpbb\template\twig\node;
abstract class includeasset extends \Twig_Node
{
- /** @var Twig_Environment */
+ /** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@@ -25,10 +25,10 @@ abstract class includeasset extends \Twig_Node
parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
}
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
@@ -74,7 +74,7 @@ abstract class includeasset extends \Twig_Node
/**
* Append the output code for the asset
*
- * @param Twig_Compiler A Twig_Compiler instance
+ * @param \Twig_Compiler A Twig_Compiler instance
* @return null
*/
abstract protected function append_asset(\Twig_Compiler $compiler);
diff --git a/phpBB/phpbb/template/twig/node/includenode.php b/phpBB/phpbb/template/twig/node/includenode.php
index 141c9ffe66..42428b6106 100644
--- a/phpBB/phpbb/template/twig/node/includenode.php
+++ b/phpBB/phpbb/template/twig/node/includenode.php
@@ -17,10 +17,10 @@ namespace phpbb\template\twig\node;
class includenode extends \Twig_Node_Include
{
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php
index e7df11c74e..826617e8e8 100644
--- a/phpBB/phpbb/template/twig/node/includephp.php
+++ b/phpBB/phpbb/template/twig/node/includephp.php
@@ -17,7 +17,7 @@ namespace phpbb\template\twig\node;
class includephp extends \Twig_Node
{
- /** @var Twig_Environment */
+ /** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
@@ -28,10 +28,10 @@ class includephp extends \Twig_Node
}
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
diff --git a/phpBB/phpbb/template/twig/node/php.php b/phpBB/phpbb/template/twig/node/php.php
index de3a8a4af1..3a24513dca 100644
--- a/phpBB/phpbb/template/twig/node/php.php
+++ b/phpBB/phpbb/template/twig/node/php.php
@@ -16,7 +16,7 @@ namespace phpbb\template\twig\node;
class php extends \Twig_Node
{
- /** @var Twig_Environment */
+ /** @var \Twig_Environment */
protected $environment;
public function __construct(\Twig_Node_Text $text, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
@@ -27,10 +27,10 @@ class php extends \Twig_Node
}
/**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
+ * Compiles the node to PHP.
+ *
+ * @param \Twig_Compiler A Twig_Compiler instance
+ */
public function compile(\Twig_Compiler $compiler)
{
$compiler->addDebugInfo($this);
diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
index 48c4853fe8..cfee84a363 100644
--- a/phpBB/phpbb/template/twig/tokenparser/defineparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -18,12 +18,14 @@ namespace phpbb\template\twig\tokenparser;
class defineparser extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ * @throws \Twig_Error_Syntax
+ * @throws \phpbb\template\twig\node\definenode
+ */
public function parse(\Twig_Token $token)
{
$lineno = $token->getLine();
@@ -61,10 +63,10 @@ class defineparser extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'DEFINE';
diff --git a/phpBB/phpbb/template/twig/tokenparser/event.php b/phpBB/phpbb/template/twig/tokenparser/event.php
index 05b963f3e8..4c7c8e07d9 100644
--- a/phpBB/phpbb/template/twig/tokenparser/event.php
+++ b/phpBB/phpbb/template/twig/tokenparser/event.php
@@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class event extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@@ -34,10 +34,10 @@ class event extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'EVENT';
diff --git a/phpBB/phpbb/template/twig/tokenparser/includecss.php b/phpBB/phpbb/template/twig/tokenparser/includecss.php
index c7d2bb712e..1f30811754 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includecss.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includecss.php
@@ -16,12 +16,12 @@ namespace phpbb\template\twig\tokenparser;
class includecss extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@@ -33,10 +33,10 @@ class includecss extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'INCLUDECSS';
diff --git a/phpBB/phpbb/template/twig/tokenparser/includejs.php b/phpBB/phpbb/template/twig/tokenparser/includejs.php
index 0c32692209..4156048e42 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includejs.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includejs.php
@@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class includejs extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@@ -34,10 +34,10 @@ class includejs extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'INCLUDEJS';
diff --git a/phpBB/phpbb/template/twig/tokenparser/includeparser.php b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
index e9f4db0890..6ee78e5562 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includeparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
@@ -18,12 +18,12 @@ namespace phpbb\template\twig\tokenparser;
class includeparser extends \Twig_TokenParser_Include
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@@ -34,10 +34,10 @@ class includeparser extends \Twig_TokenParser_Include
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'INCLUDE';
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
index f745c320c2..38196c5290 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includephp.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -18,12 +18,12 @@ namespace phpbb\template\twig\tokenparser;
class includephp extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
@@ -44,10 +44,10 @@ class includephp extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'INCLUDEPHP';
diff --git a/phpBB/phpbb/template/twig/tokenparser/php.php b/phpBB/phpbb/template/twig/tokenparser/php.php
index 0546a2d93f..557a70cca1 100644
--- a/phpBB/phpbb/template/twig/tokenparser/php.php
+++ b/phpBB/phpbb/template/twig/tokenparser/php.php
@@ -17,12 +17,12 @@ namespace phpbb\template\twig\tokenparser;
class php extends \Twig_TokenParser
{
/**
- * Parses a token and returns a node.
- *
- * @param Twig_Token $token A Twig_Token instance
- *
- * @return Twig_NodeInterface A Twig_NodeInterface instance
- */
+ * Parses a token and returns a node.
+ *
+ * @param \Twig_Token $token A Twig_Token instance
+ *
+ * @return \Twig_NodeInterface A Twig_NodeInterface instance
+ */
public function parse(\Twig_Token $token)
{
$stream = $this->parser->getStream();
@@ -42,10 +42,10 @@ class php extends \Twig_TokenParser
}
/**
- * Gets the tag name associated with this token parser.
- *
- * @return string The tag name
- */
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
public function getTag()
{
return 'PHP';
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index bf27dd5f20..5e2057f818 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -67,7 +67,7 @@ class twig extends \phpbb\template\base
/**
* Twig Environment
*
- * @var Twig_Environment
+ * @var \Twig_Environment
*/
protected $twig;
@@ -347,9 +347,7 @@ class twig extends \phpbb\template\base
}
/**
- * Get path to template for handle (required for BBCode parser)
- *
- * @return string
+ * {@inheritdoc}
*/
public function get_source_file_for_handle($handle)
{
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php
index 7a26c81b0e..57d109652e 100644
--- a/phpBB/phpbb/tree/nestedset.php
+++ b/phpBB/phpbb/tree/nestedset.php
@@ -103,7 +103,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
*
* @return bool True if the lock was acquired, false if it has been acquired previously
*
- * @throws RuntimeException If the lock could not be acquired
+ * @throws \RuntimeException If the lock could not be acquired
*/
protected function acquire_lock()
{
@@ -121,7 +121,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function insert(array $additional_data)
{
@@ -176,6 +176,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
*
* @param int $item_id The item to be deleted
* @return array Item ids that have been removed
+ * @throws \OutOfBoundsException
*/
protected function remove_item_from_nestedset($item_id)
{
@@ -199,7 +200,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function delete($item_id)
{
@@ -214,7 +215,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function move($item_id, $delta)
{
@@ -332,7 +333,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function move_down($item_id)
{
@@ -340,7 +341,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function move_up($item_id)
{
@@ -348,7 +349,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function move_children($current_parent_id, $new_parent_id)
{
@@ -454,7 +455,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function change_parent($item_id, $new_parent_id)
{
@@ -553,7 +554,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_path_and_subtree_data($item_id, $order_asc = true, $include_item = true)
{
@@ -564,7 +565,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_path_data($item_id, $order_asc = true, $include_item = true)
{
@@ -574,7 +575,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function get_subtree_data($item_id, $order_asc = true, $include_item = true)
{
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index f4cc26cc9a..4e90044395 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -317,7 +317,7 @@ class user extends \phpbb\session
}
// Is board disabled and user not an admin or moderator?
- if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ if ($config['board_disable'] && !defined('IN_LOGIN') && !defined('SKIP_CHECK_DISABLED') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
{
if ($this->data['is_bot'])
{
diff --git a/phpBB/posting.php b/phpBB/posting.php
index d3015c6eb6..70df052099 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -195,7 +195,7 @@ switch ($mode)
}
else
{
- upload_popup();
+ phpbb_upload_popup();
return;
}
break;
@@ -233,7 +233,7 @@ if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'b
if ($mode == 'popup')
{
- upload_popup($post_data['forum_style']);
+ phpbb_upload_popup($post_data['forum_style']);
return;
}
@@ -439,7 +439,7 @@ if ($mode == 'delete' || $mode == 'soft_delete')
$allow_reason = $auth->acl_get('m_softdelete', $forum_id) || ($auth->acl_gets('m_delete', 'f_delete', $forum_id) && $auth->acl_gets('m_softdelete', 'f_softdelete', $forum_id));
$soft_delete_reason = ($mode == 'soft_delete' && $allow_reason) ? $request->variable('delete_reason', '', true) : '';
- handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete'), $soft_delete_reason);
+ phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete'), $soft_delete_reason);
return;
}
@@ -1028,6 +1028,14 @@ if ($submit || $preview || $refresh)
$error[] = $user->lang['EMPTY_SUBJECT'];
}
+ // Check for out-of-bounds characters that are currently
+ // not supported by utf8_bin in MySQL
+ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
+ {
+ $character_list = implode('<br />', $matches[0]);
+ $error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
+ }
+
$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;
if ($post_data['poll_option_text'] &&
@@ -1251,7 +1259,7 @@ if ($submit || $preview || $refresh)
{
$allow_reason = $auth->acl_get('m_softdelete', $forum_id) || ($auth->acl_gets('m_delete', 'f_delete', $forum_id) && $auth->acl_gets('m_softdelete', 'f_softdelete', $forum_id));
$soft_delete_reason = (!$request->is_set_post('delete_permanent') && $allow_reason) ? $request->variable('delete_reason', '', true) : '';
- handle_post_delete($forum_id, $topic_id, $post_id, $post_data, !$request->is_set_post('delete_permanent'), $soft_delete_reason);
+ phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, !$request->is_set_post('delete_permanent'), $soft_delete_reason);
return;
}
@@ -1546,6 +1554,7 @@ $page_data = array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'],
'EDIT_REASON' => $request->variable('edit_reason', ''),
+ 'SHOW_PANEL' => $request->variable('show_panel', ''),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"),
'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") : '',
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&amp;mode=popup"),
@@ -1571,7 +1580,6 @@ $page_data = array(
'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '',
'S_SOFTDELETE_CHECKED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? ' checked="checked"' : '',
- 'S_DELETE_REASON' => ($mode == 'edit' && $auth->acl_get('m_softdelete', $forum_id)) ? true : false,
'S_SOFTDELETE_ALLOWED' => ($mode == 'edit' && $phpbb_content_visibility->can_soft_delete($forum_id, $post_data['poster_id'], $lock_post_checked)) ? true : false,
'S_RESTORE_ALLOWED' => $auth->acl_get('m_approve', $forum_id),
'S_IS_DELETED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? true : false,
@@ -1714,139 +1722,3 @@ if ($mode == 'reply' || $mode == 'quote')
}
page_footer();
-
-/**
-* Show upload popup (progress bar)
-*/
-function upload_popup($forum_style = 0)
-{
- global $template, $user;
-
- ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting');
-
- page_header($user->lang['PROGRESS_BAR']);
-
- $template->set_filenames(array(
- 'popup' => 'posting_progress_bar.html')
- );
-
- $template->assign_vars(array(
- 'PROGRESS_BAR' => $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS']))
- );
-
- $template->display('popup');
-
- garbage_collection();
- exit_handler();
-}
-
-/**
-* Do the various checks required for removing posts as well as removing it
-*/
-function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $soft_delete_reason = '')
-{
- global $user, $db, $auth, $config, $request;
- global $phpbb_root_path, $phpEx;
-
- $perm_check = ($is_soft) ? 'softdelete' : 'delete';
-
- // If moderator removing post or user itself removing post, present a confirmation screen
- if ($auth->acl_get("m_$perm_check", $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get("f_$perm_check", $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
- {
- $s_hidden_fields = array(
- 'p' => $post_id,
- 'f' => $forum_id,
- 'mode' => ($is_soft) ? 'soft_delete' : 'delete',
- );
-
- if (confirm_box(true))
- {
- $data = array(
- 'topic_first_post_id' => $post_data['topic_first_post_id'],
- 'topic_last_post_id' => $post_data['topic_last_post_id'],
- 'topic_posts_approved' => $post_data['topic_posts_approved'],
- 'topic_posts_unapproved' => $post_data['topic_posts_unapproved'],
- 'topic_posts_softdeleted' => $post_data['topic_posts_softdeleted'],
- 'topic_visibility' => $post_data['topic_visibility'],
- 'topic_type' => $post_data['topic_type'],
- 'post_visibility' => $post_data['post_visibility'],
- 'post_reported' => $post_data['post_reported'],
- 'post_time' => $post_data['post_time'],
- 'poster_id' => $post_data['poster_id'],
- 'post_postcount' => $post_data['post_postcount'],
- );
-
- $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $soft_delete_reason);
- $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
-
- if ($next_post_id === false)
- {
- add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username);
-
- $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
- $message = $user->lang['POST_DELETED'];
- }
- else
- {
- add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username);
-
- $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
- $message = $user->lang['POST_DELETED'];
-
- if (!$request->is_ajax())
- {
- $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $meta_info . '">', '</a>');
- }
- }
-
- meta_refresh(3, $meta_info);
- if (!$request->is_ajax())
- {
- $message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
- }
- trigger_error($message);
- }
- else
- {
- global $user, $template, $request;
-
- $can_delete = $auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id));
- $can_softdelete = $auth->acl_get('m_softdelete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_softdelete', $forum_id));
- $display_reason = $auth->acl_get('m_softdelete', $forum_id) || ($can_delete && $can_softdelete);
-
- $template->assign_vars(array(
- 'S_SOFTDELETED' => $post_data['post_visibility'] == ITEM_DELETED,
- 'S_CHECKED_PERMANENT' => $request->is_set_post('delete_permanent') ? ' checked="checked"' : '',
- 'S_ALLOWED_DELETE' => $can_delete,
- 'S_ALLOWED_SOFTDELETE' => $can_softdelete,
- 'S_DELETE_REASON' => $display_reason,
- ));
-
- $l_confirm = 'DELETE_POST';
- if ($post_data['post_visibility'] == ITEM_DELETED)
- {
- $l_confirm .= '_PERMANENTLY';
- $s_hidden_fields['delete_permanent'] = '1';
- }
- else if (!$can_softdelete)
- {
- $s_hidden_fields['delete_permanent'] = '1';
- }
-
- confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
- }
- }
-
- // If we are here the user is not able to delete - present the correct error message
- if ($post_data['poster_id'] != $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id))
- {
- trigger_error('DELETE_OWN_POSTS');
- }
-
- if ($post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && $post_id != $post_data['topic_last_post_id'])
- {
- trigger_error('CANNOT_DELETE_REPLIED');
- }
-
- trigger_error('USER_CANNOT_DELETE');
-}
diff --git a/phpBB/search.php b/phpBB/search.php
index 91ea21909d..c01fcfede7 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -923,16 +923,19 @@ if ($keywords || $author || $author_id || $search_id || $submit)
* @var array attachments Array with posts attachments data
* @var string hilit String to highlight
* @var array rowset Array with the search results data
+ * @var string show_results String indicating the show results mode
* @var array topic_tracking_info Array with the topics tracking data
* @var string u_hilit Highlight string to be injected into URL
* @var string view Search results view mode
* @var array zebra Array with zebra data for the current user
* @since 3.1.0-b4
+ * @changed 3.1.0-b5 Added var show_results
*/
$vars = array(
'attachments',
'hilit',
'rowset',
+ 'show_results',
'topic_tracking_info',
'u_hilit',
'view',
@@ -1256,7 +1259,7 @@ $s_characters .= '<option value="0">0</option>';
$s_characters .= '<option value="25">25</option>';
$s_characters .= '<option value="50">50</option>';
-for ($i = 100; $i <= 1000 ; $i += 100)
+for ($i = 100; $i <= 1000; $i += 100)
{
$selected = ($i == 300) ? ' selected="selected"' : '';
$s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index b4a96cd811..b75207bd70 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.0-b3
-phpbb_version = 3.1.0-b3
+style_version = 3.1.0-RC1
+phpbb_version = 3.1.0-RC1
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html
index 2d4dde5cd5..f164b5f357 100644
--- a/phpBB/styles/prosilver/template/confirm_delete_body.html
+++ b/phpBB/styles/prosilver/template/confirm_delete_body.html
@@ -2,23 +2,19 @@
<form action="{S_CONFIRM_ACTION}" method="post">
<p>{MESSAGE_TEXT}</p>
- <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
- <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
- <label>
- <strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong>
- <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
- <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
- </label>
- <!-- ENDIF -->
-
- <!-- IF S_DELETE_REASON -->
- <label for="delete_reason">
- <strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
- <input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
- </label>
- <!-- ENDIF -->
+ <!-- IF not S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <label>
+ <strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong>
+ <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
+ <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
+ </label>
<!-- ENDIF -->
+ <label for="delete_reason">
+ <strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
+ <input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
+ </label>
+
<fieldset class="submit-buttons">
<input type="button" name="confirm" value="{L_YES}" class="button1" />&nbsp;
<input type="button" name="cancel" value="{L_NO}" class="button2" />
@@ -37,9 +33,8 @@
<p>{MESSAGE_TEXT}</p>
- <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
<fieldset class="fields1">
- <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <!-- IF not S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
<dl>
<dt><label for="delete_permanent">{L_DELETE_PERMANENTLY}{L_COLON}</label></dt>
<dd>
@@ -51,14 +46,11 @@
</dl>
<!-- ENDIF -->
- <!-- IF S_DELETE_REASON -->
- <dl>
- <dt><label for="delete_reason">{L_DELETE_REASON}{L_COLON}</label><br /><span>{L_DELETE_REASON_EXPLAIN}</span></dt>
- <dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
- </dl>
- <!-- ENDIF -->
+ <dl>
+ <dt><label for="delete_reason">{L_DELETE_REASON}{L_COLON}</label><br /><span>{L_DELETE_REASON_EXPLAIN}</span></dt>
+ <dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
+ </dl>
</fieldset>
- <!-- ENDIF -->
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index a4ede51f4b..ea2b815e77 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -25,20 +25,12 @@ function popup(url, width, height, name) {
/**
* Jump to page
*/
-function jumpto(item) {
- if (!item || !item.length) {
- item = $('a.pagination-trigger[data-lang-jump-page]');
- if (!item.length) {
- return;
- }
- }
+function pageJump(item) {
- var jump_page = item.attr('data-lang-jump-page'),
- on_page = item.attr('data-on-page'),
+ var page = item.val(),
per_page = item.attr('data-per-page'),
base_url = item.attr('data-base-url'),
- start_name = item.attr('data-start-name'),
- page = prompt(jump_page, on_page);
+ start_name = item.attr('data-start-name');
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
if (base_url.indexOf('?') === -1) {
@@ -104,27 +96,38 @@ jQuery(document).ready(function() {
show_panel = this.getAttribute('data-show-panel');
if (panels.length) {
- subPanels(show_panel);
+ activateSubPanel(show_panel, panels);
childNodes.click(function () {
- subPanels(this.getAttribute('data-subpanel'));
+ activateSubPanel(this.getAttribute('data-subpanel'), panels);
return false;
});
}
+ });
+});
- function subPanels(p) {
- var i;
+/**
+* Activate specific subPanel
+*/
+function activateSubPanel(p, panels) {
+ var i;
- if (typeof(p) === 'string') {
- show_panel = p;
- }
+ if (typeof(p) === 'string') {
+ show_panel = p;
+ }
+ $('input[name="show_panel"]').val(show_panel);
- for (i = 0; i < panels.length; i++) {
- jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
- jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
- }
- }
- });
-});
+ if (typeof(panels) === 'undefined') {
+ panels = [];
+ jQuery('.sub-panels a[data-subpanel]').each(function() {
+ panels.push(this.getAttribute('data-subpanel'));
+ });
+ }
+
+ for (i = 0; i < panels.length; i++) {
+ jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
+ jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
+ }
+}
/**
* Call print preview
@@ -352,41 +355,26 @@ function parse_document(container)
/**
* Pagination
*/
- container.find('a.pagination-trigger').click(function() {
- jumpto($(this));
+ container.find('.pagination .page-jump-form :button').click(function() {
+ $input = $(this).siblings('input.inputbox');
+ pageJump($input);
});
- /**
- * Dropdowns
- */
- container.find('.dropdown-container').each(function() {
- var $this = $(this),
- trigger = $this.find('.dropdown-trigger:first'),
- contents = $this.find('.dropdown'),
- options = {
- direction: 'auto',
- verticalDirection: 'auto'
- },
- data;
-
- if (!trigger.length) {
- data = $this.attr('data-dropdown-trigger');
- trigger = data ? $this.children(data) : $this.children('a:first');
+ container.find('.pagination .page-jump-form input.inputbox').on('keypress', function(event) {
+ if (event.which == 13 || event.keyCode == 13) {
+ event.preventDefault();
+ pageJump($(this));
}
+ });
- if (!contents.length) {
- data = $this.attr('data-dropdown-contents');
- contents = data ? $this.children(data) : $this.children('div:first');
- }
-
- if (!trigger.length || !contents.length) return;
-
- if ($this.hasClass('dropdown-up')) options.verticalDirection = 'up';
- if ($this.hasClass('dropdown-down')) options.verticalDirection = 'down';
- if ($this.hasClass('dropdown-left')) options.direction = 'left';
- if ($this.hasClass('dropdown-right')) options.direction = 'right';
-
- phpbb.registerDropdown(trigger, contents, options);
+ container.find('.pagination .dropdown-trigger').click(function() {
+ $dropdown_container = $(this).parent();
+ // Wait a little bit to make sure the dropdown has activated
+ setTimeout(function() {
+ if ($dropdown_container.hasClass('dropdown-visible')) {
+ $dropdown_container.find('input.inputbox').focus();
+ }
+ },100);
});
/**
@@ -517,7 +505,7 @@ function parse_document(container)
block = $this.find('dt .responsive-show:last-child');
}
else {
- first = (block.text().trim().length == 0);
+ first = ($.trim(block.text()).length == 0);
}
// Copy contents of each column
@@ -570,7 +558,7 @@ function parse_document(container)
block = $this.find('dt .responsive-show:last-child');
}
else {
- first = (block.text().trim().length == 0);
+ first = ($.trim(block.text()).length == 0);
}
// Copy contents of each column
@@ -648,7 +636,7 @@ function parse_document(container)
cells.each(function() {
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
- text = cell.text().trim();
+ text = $.trim(cell.text());
if (headersLength <= column) {
return;
@@ -817,7 +805,7 @@ function parse_document(container)
ul = $this.children(),
tabs = ul.children().not('[data-skip-responsive]'),
links = tabs.children('a'),
- item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
+ item = ul.append('<li class="tab responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link">&nbsp;</a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
menu = item.find('.dropdown-contents'),
maxHeight = 0,
lastWidth = false,
@@ -859,7 +847,7 @@ function parse_document(container)
for (i = total - 1; i >= 0; i --) {
tab = availableTabs.eq(i);
- menu.prepend(tab.clone(true));
+ menu.prepend(tab.clone(true).removeClass('tab'));
tab.hide();
if ($this.height() <= maxHeight) {
menu.find('a').click(function() { check(true); });
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index 4a8c4c5de9..c9f81a4099 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -10,18 +10,16 @@
<div class="panel">
<div class="inner">
- <!-- IF .pagination or TOTAL_TOPICS -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- </ul>
- <!-- ENDIF -->
+ <div class="action-bar top">
+ <div class="pagination">
+ {TOTAL_TOPICS}
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ </div>
<!-- IF .topicrow -->
<ul class="topiclist<!-- IF S_MERGE_SELECT --> missing-column<!-- ENDIF -->">
@@ -95,8 +93,6 @@
<!-- ENDIF -->
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
@@ -105,18 +101,16 @@
<hr />
- <!-- IF .pagination or TOTAL_TOPICS -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- </ul>
- <!-- ENDIF -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_TOPICS}
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ </div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html
index bdfa254741..69239887e3 100644
--- a/phpBB/styles/prosilver/template/mcp_header.html
+++ b/phpBB/styles/prosilver/template/mcp_header.html
@@ -11,7 +11,7 @@
<div id="tabs">
<ul>
<!-- BEGIN l_block1 -->
- <li<!-- IF l_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li>
+ <li class="tab<!-- IF l_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a></li>
<!-- END l_block1 -->
</ul>
</div>
@@ -22,7 +22,7 @@
<div style="width: 100%;">
<div id="cp-menu">
- <div id="navigation">
+ <div id="navigation" role="navigation">
<ul>
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html
index b930bbbcc6..eaa3838f17 100644
--- a/phpBB/styles/prosilver/template/mcp_logs.html
+++ b/phpBB/styles/prosilver/template/mcp_logs.html
@@ -7,19 +7,17 @@
<div class="panel">
<div class="inner">
- <ul class="linklist">
- <li class="leftside">
- {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
- </li>
- <li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ <div class="pagination">
+ {TOTAL}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
<table class="table1">
<thead>
@@ -54,8 +52,6 @@
<!-- IF .log -->
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
@@ -64,16 +60,17 @@
<hr />
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
{S_FORM_TOKEN}
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
index 9b6c9b2667..ec317b141a 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_user.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -50,19 +50,17 @@
<div class="panel">
<div class="inner">
- <ul class="linklist">
- <li class="leftside">
- {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
- </li>
- <li class="rightside pagination">
- <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ <div class="pagination">
+ {TOTAL_REPORTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
<table class="table1">
<thead>
@@ -95,8 +93,6 @@
<hr />
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label>{L_DISPLAY_LOG}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
@@ -104,16 +100,16 @@
<hr />
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_REPORTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
index 461d5982db..864b231142 100644
--- a/phpBB/styles/prosilver/template/mcp_queue.html
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -16,16 +16,17 @@
<p>{L_EXPLAIN}</p>
<!-- IF .postrow -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL --> {TOTAL} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ <div class="pagination">
+ {TOTAL}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<ul class="topiclist missing-column">
<li class="header">
<dl>
@@ -73,8 +74,6 @@
</ul>
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
@@ -83,16 +82,17 @@
<hr />
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<!-- ELSE -->
<p class="notopics"><strong>
<!-- IF S_RESTORE -->
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html
index ffa82d5e0e..24c0479f63 100644
--- a/phpBB/styles/prosilver/template/mcp_reports.html
+++ b/phpBB/styles/prosilver/template/mcp_reports.html
@@ -18,16 +18,17 @@
<p>{L_EXPLAIN}</p>
<!-- IF .postrow -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ <div class="pagination">
+ {TOTAL_REPORTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<ul class="topiclist missing-column">
<li class="header">
<dl>
@@ -79,24 +80,24 @@
</ul>
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
+
<hr />
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_REPORTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
<!-- ELSE -->
<p><strong>{L_NO_REPORTS}</strong></p>
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 19ee123eba..6bf6af1b78 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -11,16 +11,16 @@
<!-- DEFINE $SHOW_PANEL = 'display-panel' -->
<!-- ENDIF -->
-<div id="minitabs" class="sub-panels" data-show-panel="{$SHOW_PANEL}">
+<div id="minitabs" class="sub-panels" data-show-panel="{$SHOW_PANEL}" role="tablist">
<ul>
- <li id="display-panel-tab"<!-- IF not S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
- <a href="#minitabs" data-subpanel="display-panel"><span>{L_DISPLAY_OPTIONS}</span></a>
+ <li id="display-panel-tab" class="tab<!-- IF not S_MERGE_VIEW --> activetab<!-- ENDIF -->">
+ <a href="#minitabs" data-subpanel="display-panel" role="tab" aria-controls="display-panel">{L_DISPLAY_OPTIONS}</a>
</li>
- <li id="split-panel-tab">
- <a href="#minitabs" data-subpanel="split-panel"><span>{L_SPLIT_TOPIC}</span></a>
+ <li id="split-panel-tab" class="tab">
+ <a href="#minitabs" data-subpanel="split-panel" role="tab" aria-controls="split-panel">{L_SPLIT_TOPIC}</a>
</li>
- <li id="merge-panel-tab"<!-- IF S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
- <a href="#minitabs" data-subpanel="merge-panel"><span>{L_MERGE_POSTS}</span></a>
+ <li id="merge-panel-tab" class="tab<!-- IF S_MERGE_VIEW --> activetab<!-- ENDIF -->">
+ <a href="#minitabs" data-subpanel="merge-panel" role="tab" aria-controls="merge-panel">{L_MERGE_POSTS}</a>
</li>
</ul>
</div>
@@ -31,7 +31,7 @@
<div class="panel">
<div class="inner">
- <fieldset id="display-panel" class="fields2">
+ <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="1" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
@@ -43,7 +43,7 @@
</fieldset>
<!-- IF S_CAN_SPLIT -->
- <fieldset id="split-panel" class="fields2">
+ <fieldset id="split-panel" class="fields2" role="tabpanel">
<p>{L_SPLIT_TOPIC_EXPLAIN}</p>
<!-- IF S_SHOW_TOPIC_ICONS -->
@@ -66,7 +66,7 @@
<!-- ENDIF -->
<!-- IF S_CAN_MERGE -->
- <fieldset id="merge-panel" class="fields2">
+ <fieldset id="merge-panel" class="fields2" role="tabpanel">
<p>{L_MERGE_TOPIC_EXPLAIN}</p>
<dl>
<dt><label for="to_topic_id">{L_MERGE_TOPIC_ID}{L_COLON}</label></dt>
@@ -150,18 +150,16 @@
<hr />
- <!-- IF .pagination or TOTAL_POSTS -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_POSTS --> {TOTAL_POSTS} &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_POSTS}
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
- <!-- ENDIF -->
+ </div>
+ </div>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html
index 731c945fe6..d0e80a1479 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_list.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_list.html
@@ -10,17 +10,17 @@
<p>{L_WARNED_USERS_EXPLAIN}</p>
<!-- IF .user -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_USERS -->{TOTAL_USERS} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ <div class="pagination">
+ {TOTAL_USERS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
-
+ </div>
+ </div>
+
<table class="table1">
<thead>
<tr>
@@ -48,18 +48,20 @@
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
+
<hr />
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_USERS -->{TOTAL_USERS} &bull; <!-- ENDIF -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_USERS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<!-- ELSE -->
<p><strong>{L_NO_WARNINGS}</strong></p>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 7623fbe38b..512df7b0a7 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -13,7 +13,6 @@
<!-- ENDIF -->
<!-- IF S_SHOW_GROUP -->
-
<h2 class="group-title"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2>
<p>{GROUP_DESC} {GROUP_TYPE}</p>
<p>
@@ -21,36 +20,30 @@
<!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF -->
<!-- IF GROUP_RANK -->{GROUP_RANK}<!-- ENDIF -->
</p>
-
<!-- ELSE -->
<h2 class="solo">{PAGE_TITLE}<!-- IF SEARCH_WORDS -->{L_COLON} <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
- <div class="panel">
- <div class="inner">
-
- <ul class="linklist wrap">
- <li>
+ <div class="action-bar top">
+ <div class="member-search panel">
<!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}" id="member_search" data-alt-text="{LA_HIDE_MEMBER_SEARCH}">{L_FIND_USERNAME}</a> &bull; <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}" id="member_search" data-alt-text="{LA_FIND_USERNAME}">{L_HIDE_MEMBER_SEARCH}</a> &bull; <!-- ENDIF -->
- <strong style="font-size: 0.95em;">
+ <strong>
<!-- BEGIN first_char -->
<a href="{first_char.U_SORT}">{first_char.DESC}</a>&nbsp;
<!-- END first_char -->
</strong>
- </li>
- <li class="rightside pagination">
- {TOTAL_USERS}
- <!-- IF .pagination -->
- &bull;
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- </ul>
-
+ </div>
+
+ <div class="pagination">
+ {TOTAL_USERS}
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
</div>
<!-- ENDIF -->
+
<!-- IF S_LEADERS_SET or not S_SHOW_GROUP or not .memberrow -->
<div class="forumbg forumbg-table">
<div class="inner">
@@ -140,8 +133,6 @@
<!-- IF S_IN_SEARCH_POPUP and not S_SEARCH_USER -->
<fieldset class="display-options">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<label for="sk">{L_SELECT_SORT_METHOD}{L_COLON} <select name="sk" id="sk">{S_MODE_SELECT}</select></label>
<label for="sd">{L_ORDER} <select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
<input type="submit" name="sort" value="{L_SUBMIT}" class="button2" />
@@ -150,18 +141,16 @@
</form>
-<hr />
-
-<ul class="linklist">
- <li class="rightside pagination">{TOTAL_USERS}
- <!-- IF .pagination -->
- &bull;
+<div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_USERS}
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
-</ul>
+ </div>
+</div>
<!-- IF S_IN_SEARCH_POPUP -->
<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html
index 78d0eba5a8..865f0b883c 100644
--- a/phpBB/styles/prosilver/template/memberlist_email.html
+++ b/phpBB/styles/prosilver/template/memberlist_email.html
@@ -1,24 +1,62 @@
<!-- INCLUDE overall_header.html -->
+<!-- IF S_CONTACT_ADMIN-->
+<h2 class="titlespace">{L_CONTACT_ADMIN}</h2>
+<!-- ELSEIF S_SEND_USER -->
<h2 class="titlespace">{L_SEND_EMAIL_USER}</h2>
+<!-- ELSE -->
+<h2 class="titlespace">{L_EMAIL_TOPIC}</h2>
+<!-- ENDIF -->
<form method="post" action="{S_POST_ACTION}" id="post">
-<div class="panel">
- <div class="inner">
+ <!-- IF CONTACT_INFO -->
+ <div class="panel">
+ <div class="inner">
+ <div class="postbody">
+ <div class="content">
+ {CONTACT_INFO}
+ </div>
+ </div>
+ </div>
+ </div>
+ <br class="clear" />
+ <!-- ENDIF -->
+ <div class="panel">
+ <div class="inner">
<div class="content">
+
<!-- IF ERROR_MESSAGE --><p class="error">{ERROR_MESSAGE}</p><!-- ENDIF -->
<fieldset class="fields2">
<!-- IF S_SEND_USER -->
<dl>
<dt><label>{L_RECIPIENT}{L_COLON}</label></dt>
- <dd><strong>{USERNAME}</strong></dd>
+ <dd><strong>{USERNAME_FULL}</strong></dd>
</dl>
<dl>
<dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
<dd><input class="inputbox autowidth" type="text" name="subject" id="subject" size="50" tabindex="1" value="{SUBJECT}" /></dd>
</dl>
+ <!-- ELSEIF S_CONTACT_ADMIN-->
+ <dl>
+ <dt><label>{L_RECIPIENT}:</label></dt>
+ <dd><strong>{L_ADMINISTRATOR}</strong></dd>
+ </dl>
+ <!-- IF not S_IS_REGISTERED -->
+ <dl>
+ <dt><label for="email">{L_SENDER_EMAIL_ADDRESS}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="email" id="email" size="50" maxlength="100" tabindex="1" value="{EMAIL}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="name">{L_SENDER_NAME}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="name" id="name" size="50" tabindex="2" value="{NAME}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dd><input class="inputbox autowidth" type="text" name="subject" id="subject" size="50" tabindex="3" value="{SUBJECT}" /></dd>
+ </dl>
<!-- ELSE -->
<dl>
<dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label></dt>
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html
index f4439b6934..4c14baf2b6 100644
--- a/phpBB/styles/prosilver/template/memberlist_search.html
+++ b/phpBB/styles/prosilver/template/memberlist_search.html
@@ -10,9 +10,9 @@
<dl style="overflow: visible;">
<dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd>
+ <!-- IF U_LIVE_SEARCH --><div class="dropdown-container dropdown-{S_CONTENT_FLOW_END}"><!-- ENDIF -->
<input type="text" name="username" id="username" value="{USERNAME}" class="inputbox"<!-- IF U_LIVE_SEARCH --> autocomplete="off" data-filter="phpbb.search.filter" data-ajax="member_search" data-min-length="3" data-url="{U_LIVE_SEARCH}" data-results="#user-search" data-overlay="false"<!-- ENDIF --> />
<!-- IF U_LIVE_SEARCH -->
- <div class="dropdown-container">
<div class="dropdown live-search hidden" id="user-search">
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents search-results">
diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html
index 13e50dae19..e2259e8712 100644
--- a/phpBB/styles/prosilver/template/navbar_footer.html
+++ b/phpBB/styles/prosilver/template/navbar_footer.html
@@ -3,8 +3,8 @@
<ul class="linklist bulletin">
<li class="small-icon icon-home breadcrumbs">
- <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a></span><!-- ENDIF -->
- <span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span>
+ <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}" data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}" data-navbar-reference="index">{L_INDEX}</a></span>
<!-- EVENT overall_footer_breadcrumb_append -->
</li>
<!-- IF not S_IS_BOT -->
@@ -16,6 +16,7 @@
<!-- IF not S_IS_BOT --><li class="rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_before -->
<!-- IF U_TEAM --><li class="rightside"><a href="{U_TEAM}">{L_THE_TEAM}</a></li><!-- ENDIF -->
+ <!-- IF U_CONTACT_US --><li class="rightside"><a href="{U_CONTACT_US}">{L_CONTACT_US}</a></li><!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_after -->
</ul>
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index 804fa5b2aa..67a3b553fd 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -4,21 +4,38 @@
<ul class="linklist navlinks">
<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
<li class="small-icon icon-home breadcrumbs">
- <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a></span><!-- ENDIF -->
- <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span>
- <!-- BEGIN navlinks --><!-- EVENT overall_header_navlink_prepend --><span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- EVENT overall_header_navlink_append --><!-- END navlinks -->
+ <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA} data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA} data-navbar-reference="index">{L_INDEX}</a></span>
+ <!-- BEGIN navlinks -->
+ <!-- EVENT overall_header_navlink_prepend -->
+ <span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a></span>
+ <!-- EVENT overall_header_navlink_append -->
+ <!-- END navlinks -->
<!-- EVENT overall_header_breadcrumb_append -->
</li>
- <!-- IF S_REGISTERED_USER --><li id="username_logged_in" class="rightside"><!-- IF CURRENT_USER_AVATAR --><a href="{U_USER_PROFILE}" class="header-avatar">{CURRENT_USER_AVATAR}</a> <!-- ENDIF -->{CURRENT_USERNAME_FULL}</li><!-- ENDIF -->
+ <!-- IF S_REGISTERED_USER -->
+ <li id="username_logged_in" class="rightside">
+ <!-- EVENT navbar_header_username_prepend -->
+ <!-- IF CURRENT_USER_AVATAR -->
+ <a href="{U_USER_PROFILE}" class="header-avatar">{CURRENT_USER_AVATAR}</a>
+ <!-- ENDIF -->
+ {CURRENT_USERNAME_FULL}
+ <!-- EVENT navbar_header_username_append -->
+ </li>
+ <!-- ELSE -->
+ <li id="logged_out" class="rightside">
+ <!-- EVENT navbar_header_logged_out_content -->
+ </li>
+ <!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --><li class="responsive-search rightside" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH}</a></li><!-- ENDIF -->
</ul>
<ul class="linklist bulletin">
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<!-- IF S_NOTIFICATIONS_DISPLAY -->
- <li class="small-icon icon-notification" data-skip-responsive="true">
- <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
+ <li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END}" 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>
<!-- INCLUDE notification_dropdown.html -->
</li>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/notification_dropdown.html b/phpBB/styles/prosilver/template/notification_dropdown.html
index 3f32189fe5..13d90a9d38 100644
--- a/phpBB/styles/prosilver/template/notification_dropdown.html
+++ b/phpBB/styles/prosilver/template/notification_dropdown.html
@@ -13,19 +13,22 @@
<ul>
<!-- IF not .notifications -->
- <li>
+ <li class="no_notifications">
{L_NO_NOTIFICATIONS}
</li>
<!-- ENDIF -->
<!-- BEGIN notifications -->
- <li class="<!-- IF notifications.UNREAD --> bg2<!-- ENDIF -->">
+ <li class="<!-- IF notifications.UNREAD --> bg2<!-- ENDIF --><!-- IF notifications.STYLING --> {notifications.STYLING}<!-- ENDIF --><!-- IF not notifications.URL --> no-url<!-- ENDIF -->">
<!-- IF notifications.URL -->
- <a href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}" data-real-url="{notifications.URL}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->">
+ <a class="notification-block" href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}" data-real-url="{notifications.URL}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->">
<!-- ENDIF -->
<!-- IF notifications.AVATAR -->{notifications.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
<div class="notification_text">
- <p>{notifications.FORMATTED_TITLE}</p>
- <p>&raquo; {notifications.TIME}</p>
+ <p class="notification-title">{notifications.FORMATTED_TITLE}</p>
+ <!-- IF notifications.REFERENCE --><p class="notification-reference">{notifications.REFERENCE}</p><!-- ENDIF -->
+ <!-- IF notifications.FORUM --><p class="notification-forum">{notifications.FORUM}</p><!-- ENDIF -->
+ <!-- IF notifications.REASON --><p class="notification-reason">{notifications.REASON}</p><!-- ENDIF -->
+ <p class="notification-time">{notifications.TIME}</p>
</div>
<!-- IF notifications.URL --></a><!-- ENDIF -->
<!-- IF notifications.UNREAD -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 28ed215662..e9c95aa799 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -33,7 +33,7 @@
</div>
<div>
- <a id="bottom" accesskey="z"></a>
+ <a id="bottom" class="anchor" accesskey="z"></a>
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index d18fff6bb0..df09fc6a30 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -57,13 +57,13 @@
<!-- EVENT overall_header_body_before -->
<div id="wrap">
- <a id="top" accesskey="t"></a>
+ <a id="top" class="anchor" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
<div class="inner">
<div id="site-description">
- <a href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->" id="logo">{SITE_LOGO_IMG}</a>
+ <a id="logo" class="logo" href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->">{SITE_LOGO_IMG}</a>
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
@@ -89,7 +89,7 @@
<!-- EVENT overall_header_page_body_before -->
- <a id="start_here"></a>
+ <a id="start_here" class="anchor"></a>
<div id="page-body">
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
<div id="information" class="rules">
diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html
index e27a90900a..cde183291d 100644
--- a/phpBB/styles/prosilver/template/pagination.html
+++ b/phpBB/styles/prosilver/template/pagination.html
@@ -1,18 +1,30 @@
- <!-- IF BASE_URL -->
- <a href="#" class="pagination-trigger" title="{L_JUMP_TO_PAGE}" data-lang-jump-page="{L_JUMP_PAGE|e('html_attr')}{L_COLON}" data-on-page="{CURRENT_PAGE}" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-base-is-route="{BASE_IS_ROUTE}" data-start-name="{START_NAME}">{PAGE_NUMBER}</a> &bull;
- <!-- ELSE -->
- {PAGE_NUMBER} &bull;
- <!-- ENDIF -->
- <ul>
- <!-- BEGIN pagination -->
- <!-- IF pagination.S_IS_PREV -->
- <!-- ELSEIF pagination.S_IS_CURRENT -->
- <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
- <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
- <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
- <!-- ELSEIF pagination.S_IS_NEXT -->
- <!-- ELSE -->
- <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
- <!-- ENDIF -->
- <!-- END pagination -->
- </ul>
+<ul>
+<!-- IF BASE_URL and TOTAL_PAGES > 6 -->
+ <li class="dropdown-container dropdown-button-control dropdown-page-jump page-jump">
+ <a href="#" class="dropdown-trigger" title="{L_JUMP_TO_PAGE_CLICK}" role="button">{PAGE_NUMBER}</a>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
+ <li>{L_JUMP_TO_PAGE}{L_COLON}</li>
+ <li class="page-jump-form">
+ <input type="text" name="page-number" maxlength="6" title="{L_SEARCH_KEYWORDS}" class="inputbox tiny" value="" 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>
+ </div>
+ </li>
+<!-- ENDIF -->
+<!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV -->
+ <li class="previous"><a href="{pagination.PAGE_URL}" rel="prev" role="button">{L_PREVIOUS}</a></li>
+ <!-- ELSEIF pagination.S_IS_CURRENT -->
+ <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
+ <li class="ellipsis" role="separator"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF pagination.S_IS_NEXT -->
+ <li class="next"><a href="{pagination.PAGE_URL}" rel="next" role="button">{L_NEXT}</a></li>
+ <!-- ELSE -->
+ <li><a href="{pagination.PAGE_URL}" role="button">{pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+<!-- END pagination -->
+</ul>
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index 4ad66656b2..81b2c2bf41 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -23,7 +23,7 @@
<div class="panel<!-- IF not .attach_row --> hidden<!-- ENDIF -->" id="file-list-container">
<div class="inner">
- <table class="table1 zebra-list">
+ <table class="table1 zebra-list fixed-width-table">
<thead>
<tr>
<th class="attach-name">{L_PLUPLOAD_FILENAME}</th>
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index e311b85cbe..25e3be3bcb 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -99,19 +99,21 @@
<!-- ENDIF -->
<!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
- <div id="tabs" class="sub-panels" data-show-panel="options-panel">
+ <div id="tabs" class="sub-panels" data-show-panel="<!-- IF SHOW_PANEL -->{SHOW_PANEL}<!-- ELSE -->options-panel<!-- ENDIF -->" role="tablist">
<ul>
- <li id="options-panel-tab" class="activetab"><a href="#tabs" data-subpanel="options-panel"><span>{L_OPTIONS}</span></a></li>
+ <li id="options-panel-tab" class="tab activetab"><a href="#tabs" data-subpanel="options-panel" role="tab" aria-controls="options-panel"><span>{L_OPTIONS}</span></a></li>
<!-- IF S_SHOW_ATTACH_BOX -->
- <li id="attach-panel-tab">
- <a href="#tabs" data-subpanel="attach-panel">
- <span>
- {L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
- </span>
+ <li id="attach-panel-tab" class="tab">
+ <a href="#tabs" data-subpanel="attach-panel" role="tab" aria-controls="attach-panel">
+ {L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
</a>
</li>
<!-- ENDIF -->
- <!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE --><li id="poll-panel-tab"><a href="#tabs" data-subpanel="poll-panel"><span>{L_ADD_POLL}</span></a></li><!-- ENDIF -->
+ <!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE -->
+ <li id="poll-panel-tab" class="tab">
+ <a href="#tabs" data-subpanel="poll-panel" role="tab" aria-controls="poll-panel">{L_ADD_POLL}</a>
+ </li>
+ <!-- ENDIF -->
</ul>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html
index 4ef0954200..630afdb832 100644
--- a/phpBB/styles/prosilver/template/posting_layout.html
+++ b/phpBB/styles/prosilver/template/posting_layout.html
@@ -68,6 +68,7 @@
<!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
<!-- INCLUDE posting_editor.html -->
+ <input type="hidden" name="show_panel" value="options-panel" />
{S_FORM_TOKEN}
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html
index c5371b9b6a..3bd51275ec 100644
--- a/phpBB/styles/prosilver/template/posting_smilies.html
+++ b/phpBB/styles/prosilver/template/posting_smilies.html
@@ -17,11 +17,11 @@
</div>
</div>
-<div class="pagination">
- <!-- IF .pagination -->
+<!-- IF .pagination -->
+ <div class="pagination">
<!-- INCLUDE pagination.html -->
- <!-- ENDIF -->
-</div>
+ </div>
+<!-- ENDIF -->
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index 0043da4507..47aa8d85de 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -14,7 +14,7 @@
<!-- IF .pagination or SEARCH_MATCHES or PAGE_NUMBER -->
<form method="post" action="{S_SEARCH_ACTION}">
- <div class="topic-actions">
+ <div class="action-bar top">
<!-- IF SEARCH_MATCHES -->
<div class="search-box">
@@ -25,13 +25,12 @@
</div>
<!-- ENDIF -->
- <div class="rightside pagination">
+ <div class="pagination">
{SEARCH_MATCHES}
<!-- IF .pagination -->
- &bull;
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
</div>
@@ -164,8 +163,6 @@
<form method="post" action="{S_SEARCH_ACTION}">
<fieldset class="display-options">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}<!-- ENDIF --></label>
@@ -179,17 +176,16 @@
<!-- ENDIF -->
<!-- IF .pagination or .searchresults or PAGE_NUMBER -->
- <ul class="linklist">
- <li class="rightside pagination">
- {SEARCH_MATCHES}
- <!-- IF .pagination -->
- &bull;
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- </ul>
+<div class="action-bar bottom">
+ <div class="pagination">
+ {SEARCH_MATCHES}
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+</div>
<!-- ENDIF -->
<!-- INCLUDE jumpbox.html -->
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 48f6cc87da..d31dd32cf6 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -35,5 +35,5 @@
<!-- EVENT simple_header_body_before -->
<div id="simple-wrap">
- <a id="top" accesskey="t"></a>
+ <a id="top" class="anchor" accesskey="t"></a>
<div id="page-body">
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index 4731683a80..ddbf892dee 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -10,16 +10,16 @@
<p>{L_ATTACHMENTS_EXPLAIN}</p>
<!-- IF .attachrow -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE} &bull; <!-- ENDIF -->
+ <div class="action-bar top">
+ <div class="pagination">
+ {TOTAL_ATTACHMENTS} {L_TITLE}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
<ul class="topiclist">
<li class="header">
@@ -51,8 +51,6 @@
</ul>
<fieldset class="display-options">
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
<label for="sk">{L_SORT_BY}{L_COLON} <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
<label><select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
<input class="button2" type="submit" name="sort" value="{L_SORT}" />
@@ -60,17 +58,18 @@
</fieldset>
<hr />
-
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE} &bull; <!-- ENDIF -->
+
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_ATTACHMENTS} {L_TITLE}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<!-- ELSE -->
<p><strong>{L_UCP_NO_ATTACHMENTS}</strong></p>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html
index 4b4581a59c..ca077fdf5b 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html
@@ -17,7 +17,7 @@
<dl>
<dt><label>{L_AVATAR_TYPE}{L_COLON}</label></dt>
<dd><select name="avatar_driver" id="avatar_driver" data-togglable-settings="true">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <option value="">{L_NO_AVATAR}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF --> data-toggle-setting="#avatar_option_{avatar_drivers.DRIVER}">{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
index 3946b9d269..2a0f403782 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
@@ -1,6 +1,5 @@
<!-- IF .avatar_local_cats -->
<label for="category">{L_AVATAR_CATEGORY}{L_COLON} <select name="avatar_local_cat" id="category">
-<option value="">{L_NO_AVATAR_CATEGORY}</option>
<!-- BEGIN avatar_local_cats -->
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
<!-- END avatar_local_cats -->
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html
index df80135acb..3b805c4862 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_manage.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html
@@ -159,15 +159,13 @@
</tbody>
</table>
- <ul class="linklist">
- <li class="leftside pagination">
- <!-- IF .pagination -->
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- </ul>
+ <!-- IF .pagination -->
+ <div class="action-bar bottom">
+ <div class="pagination">
+ <!-- INCLUDE pagination.html -->
+ </div>
+ </div>
+ <!-- ENDIF -->
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html
index 102ea5a3a0..a17f145cbc 100644
--- a/phpBB/styles/prosilver/template/ucp_header.html
+++ b/phpBB/styles/prosilver/template/ucp_header.html
@@ -5,7 +5,7 @@
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
- <li <!-- IF t_block1.S_SELECTED -->class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <li class="tab<!-- IF t_block1.S_SELECTED --> activetab<!-- ENDIF -->"><a href="{t_block1.U_TITLE}">{t_block1.L_TITLE}</a></li>
<!-- END t_block1 -->
</ul>
</div>
@@ -20,7 +20,7 @@
<div style="width: 100%;">
<div id="cp-menu">
- <div id="navigation">
+ <div id="navigation" role="navigation">
<!-- IF S_PRIVMSGS -->
<!-- BEGIN t_block2 -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
index b9e3c16524..f74728bdb3 100644
--- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -75,16 +75,18 @@
</li>
<!-- END topicrow -->
</ul>
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
+
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_TOPICS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<!-- ELSE -->
<p><strong>{L_NO_BOOKMARKS}</strong></p>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index 74ab5226cb..ef03317578 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -109,16 +109,18 @@
</li>
<!-- END topicrow -->
</ul>
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
+
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_TOPICS}
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
+ </div>
+
<!-- ELSEIF S_TOPIC_NOTIFY -->
<ul class="topiclist">
<li class="header">
diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html
index b400a3c8b1..500bae0c47 100644
--- a/phpBB/styles/prosilver/template/ucp_notifications.html
+++ b/phpBB/styles/prosilver/template/ucp_notifications.html
@@ -42,19 +42,17 @@
</table>
<!-- ELSE -->
<!-- IF .notification_list -->
- <!-- IF .pagination or TOTAL_COUNT -->
- <div class="topic-actions">
+ <div class="action-bar top">
<div class="pagination">
- <!-- IF U_MARK_ALL --><a href="{U_MARK_ALL}">{L_NOTIFICATIONS_MARK_ALL_READ}</a> &bull; <!-- ENDIF -->
- <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
+ <!-- IF U_MARK_ALL --><a href="{U_MARK_ALL}" class="mark">{L_NOTIFICATIONS_MARK_ALL_READ}</a> &bull; <!-- ENDIF -->
+ {L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>]
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
</div>
- <!-- ENDIF -->
<div class="notification_list">
<ul class="topiclist two-columns">
@@ -67,19 +65,18 @@
</ul>
<ul class="topiclist cplist two-columns">
<!-- BEGIN notification_list -->
- <li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF -->">
+ <li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF --><!-- IF notification_list.STYLING --> {notification_list.STYLING}<!-- ENDIF -->">
<dl>
<dt>
<div class="list-inner">
<!-- IF notification_list.AVATAR -->{notification_list.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
<div class="notifications">
<!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
- <p class="notifications_title">{notification_list.FORMATTED_TITLE}</p>
- <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ <p class="notifications_title">{notification_list.FORMATTED_TITLE}<!-- IF notification_list.REFERENCE --> {notification_list.REFERENCE}<!-- ENDIF --></p>
+ <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ <!-- IF notification_list.FORUM --><p class="notifications_forum">{notification_list.FORUM}</p><!-- ENDIF -->
+ <!-- IF notification_list.REASON --><p class="notifications_reason">{notification_list.REASON}</p><!-- ENDIF -->
<p class="notifications_time">{notification_list.TIME}</p>
- <!-- IF not notification_list.URL and notification_list.U_MARK_READ -->
- <p><a href="{notification_list.U_MARK_READ}">{L_MARK_READ}</a></p>
- <!-- ENDIF -->
</div>
</div>
</dt>
@@ -91,18 +88,16 @@
</ul>
</div>
- <!-- IF .pagination or TOTAL_COUNT -->
- <div class="topic-actions">
- <div class="pagination">
- <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </div>
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>]
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
- <!-- ENDIF -->
+ </div>
<!-- ELSE -->
<p><strong>{L_NO_NOTIFICATIONS}</strong></p>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
index 56e27811c6..d777de908d 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
@@ -4,8 +4,9 @@
<div class="panel">
<div class="inner">
-
<!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF -->
+
+ <div class="action-bar top">
<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
<div class="buttons">
<!-- IF U_POST_REPLY_PM -->
@@ -43,17 +44,17 @@
<!-- ENDIF -->
<!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
- <ul class="linklist">
- <li class="rightside pagination">
- <!-- IF S_VIEW_MESSAGE --><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO_FOLDER}</a><!-- ENDIF -->
- <!-- IF FOLDER_CUR_MESSAGES neq 0 -->
- <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES} &bull; <!-- ENDIF -->
+ <div class="pagination">
+ <!-- IF S_VIEW_MESSAGE -->
+ <a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO_FOLDER}</a>
+ <!-- ELSEIF FOLDER_CUR_MESSAGES neq 0 -->
+ {TOTAL_MESSAGES}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
<!-- ENDIF -->
- </li>
- </ul>
+ </div>
<!-- ENDIF -->
+ </div>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index b081c14498..d93a62282e 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -96,26 +96,24 @@
<!-- ENDIF -->
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
- <fieldset class="display-actions">
- <div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}{L_COLON} <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button2" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
- <select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button2" type="submit" name="submit_mark" value="{L_GO}" />
- <div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
- </fieldset>
-
- <hr />
-
- <ul class="linklist">
- <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
- <li class="rightside pagination">
- <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES} &bull; <!-- ENDIF -->
- <!-- IF .pagination -->
- <!-- INCLUDE pagination.html -->
- <!-- ELSE -->
- {PAGE_NUMBER}
- <!-- ENDIF -->
- </li>
- <!-- ENDIF -->
- </ul>
+ <fieldset class="display-actions">
+ <div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}{L_COLON} <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button2" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
+ <select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button2" type="submit" name="submit_mark" value="{L_GO}" />
+ <div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
+ </fieldset>
+
+ <hr />
+
+ <div class="action-bar bottom">
+ <div class="pagination">
+ {TOTAL_MESSAGES}
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ </div>
<!-- ENDIF -->
</div>
@@ -123,8 +121,6 @@
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
<fieldset class="display-options">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<label>{L_DISPLAY}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 84ab6ecb44..9f33bc04f7 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -38,7 +38,7 @@
<dd class="profile-contact">
<strong>{L_CONTACT}{L_COLON}</strong>
<div class="dropdown-container dropdown-left">
- <a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
+ <a href="#" class="dropdown-trigger"><span class="imageset icon_contact" title="{CONTACT_USER}">{CONTACT_USER}</span></a>
<div class="dropdown hidden">
<div class="pointer"><div class="pointer-inner"></div></div>
<div class="dropdown-contents contact-icons">
@@ -49,7 +49,7 @@
<div>
<!-- ENDIF -->
<a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
- <span class="contact-icon {contact.ID}-icon"></span>
+ <span class="contact-icon {contact.ID}-icon">{contact.NAME}</span>
</a>
<!-- IF REMAINDER eq 3 or contact.S_LAST_ROW -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 551e58f62f..ce0f4941a5 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -11,7 +11,7 @@
</head>
<body id="phpbb">
<div id="wrap">
- <a id="top" accesskey="t"></a>
+ <a id="top" class="anchor" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index b27003faab..020f69cb26 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -26,6 +26,7 @@
<!-- IF L_REG_COND -->
<dl><dd><strong>{L_REG_COND}</strong></dd></dl>
<!-- ENDIF -->
+ <!-- EVENT ucp_register_credentials_before -->
<dl>
<dt><label for="username">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" title="{L_USERNAME}" /></dd>
@@ -43,8 +44,10 @@
<dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>
+ <!-- EVENT ucp_register_credentials_after -->
<hr />
+ <!-- EVENT ucp_register_options_before -->
<dl>
<dt><label for="lang">{L_LANGUAGE}{L_COLON}</label></dt>
<dd><select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></dd>
@@ -52,6 +55,7 @@
<!-- INCLUDE timezone_option.html -->
+ <!-- EVENT ucp_register_profile_fields_before -->
<!-- IF .profile_fields -->
<dl><dd><strong>{L_ITEMS_REQUIRED}</strong></dd></dl>
@@ -65,6 +69,7 @@
<!-- END profile_fields -->
<!-- ENDIF -->
+ <!-- EVENT ucp_register_profile_fields_after -->
</fieldset>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index c747dd01f5..c44e830b9c 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -35,7 +35,7 @@
<!-- ENDIF -->
<!-- IF S_DISPLAY_POST_INFO or .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
- <div class="topic-actions" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
+ <div class="action-bar top" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
@@ -58,12 +58,12 @@
<!-- ENDIF -->
<div class="pagination">
- <!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
- {TOTAL_TOPICS} &bull;
+ <!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" class="mark" accesskey="m" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
+ {TOTAL_TOPICS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -208,8 +208,6 @@
<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
<form method="post" action="{S_FORUM_ACTION}">
<fieldset class="display-options">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
@@ -222,7 +220,7 @@
<!-- ENDIF -->
<!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
- <div class="topic-actions">
+ <div class="action-bar bottom">
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
<a href="{U_POST_NEW_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->">
@@ -233,11 +231,11 @@
<div class="pagination">
<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
- {TOTAL_TOPICS} &bull;
+ {TOTAL_TOPICS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
index 553e322f92..ee1672c6c9 100644
--- a/phpBB/styles/prosilver/template/viewonline_body.html
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -3,15 +3,15 @@
<h2 class="viewonline-title">{TOTAL_REGISTERED_USERS_ONLINE}</h2>
<p>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> &bull; <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a><!-- ENDIF --></p>
-<ul class="linklist">
- <li class="rightside pagination">
+<div class="action-bar top">
+ <div class="pagination">
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
- </li>
-</ul>
+ </div>
+</div>
<div class="forumbg forumbg-table">
<div class="inner">
@@ -47,23 +47,17 @@
</div>
</div>
-<!-- IF U_PREVIOUS_PAGE or U_NEXT_PAGE -->
-<fieldset class="display-options right-box">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ELSE -->{L_PREVIOUS}<!-- ENDIF --> &bull; <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ELSE -->{L_NEXT}<!-- ENDIF -->
-</fieldset>
-<!-- ENDIF -->
-
<!-- IF LEGEND --><p><em>{L_LEGEND}{L_COLON} {LEGEND}</em></p><!-- ENDIF -->
-<ul class="linklist">
- <li class="rightside pagination">
+<div class="action-bar bottom">
+ <div class="pagination">
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
- </li>
-</ul>
+ </div>
+</div>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index eb61bd3e72..03da6a74de 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -25,7 +25,7 @@
</div>
<!-- ENDIF -->
-<div class="topic-actions">
+<div class="action-bar top">
<div class="buttons">
<!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
@@ -51,15 +51,15 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS} &bull;
+ <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}" class="mark">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
<!-- ENDIF -->
- <div class="clear"></div>
+
</div>
<!-- IF S_HAS_POLL -->
@@ -117,7 +117,9 @@
<!-- BEGIN postrow -->
<!-- EVENT viewtopic_body_postrow_post_before -->
- <!-- IF postrow.S_FIRST_UNREAD --><a id="unread" data-url="{postrow.U_MINI_POST}"></a><!-- ENDIF -->
+ <!-- IF postrow.S_FIRST_UNREAD -->
+ <a id="unread" class="anchor"<!-- IF S_UNREAD_VIEW --> data-url="{postrow.U_MINI_POST}"<!-- ENDIF -->></a>
+ <!-- ENDIF -->
<div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF -->">
<div class="inner">
@@ -153,7 +155,7 @@
<dd class="profile-contact">
<strong>{L_CONTACT}{L_COLON}</strong>
<div class="dropdown-container dropdown-left">
- <a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
+ <a href="#" class="dropdown-trigger"><span class="imageset icon_contact" title="{postrow.CONTACT_USER}">{postrow.CONTACT_USER}</span></a>
<div class="dropdown hidden">
<div class="pointer"><div class="pointer-inner"></div></div>
<div class="dropdown-contents contact-icons">
@@ -164,7 +166,7 @@
<div>
<!-- ENDIF -->
<a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
- <span class="contact-icon {postrow.contact.ID}-icon"></span>
+ <span class="contact-icon {postrow.contact.ID}-icon">{postrow.contact.NAME}</span>
</a>
<!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
</div>
@@ -318,28 +320,26 @@
<hr class="divider" />
<!-- EVENT viewtopic_body_postrow_post_after -->
<!-- END postrow -->
+
<!-- IF S_QUICK_REPLY -->
<!-- INCLUDE quickreply_editor.html -->
<!-- ENDIF -->
-<!-- IF S_NUM_POSTS > 1 or U_PREVIOUS_PAGE or U_NEXT_PAGE -->
- <form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
+<!-- IF S_NUM_POSTS > 1 or .pagination -->
+ <form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
<fieldset class="display-options" style="margin-top: 0; ">
- <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
-
</form>
<hr />
<!-- ENDIF -->
<!-- EVENT viewtopic_body_topic_actions_before -->
-<div class="topic-actions">
+<div class="action-bar bottom">
<div class="buttons">
<!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
<a href="{U_POST_REPLY_TOPIC}" class="button icon-button <!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->">
@@ -352,11 +352,11 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- {TOTAL_POSTS} &bull;
+ {TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {PAGE_NUMBER}
+ &bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 98308c4adc..5c44f58adb 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -11,7 +11,7 @@
</head>
<body id="phpbb">
<div id="wrap">
- <a id="top" accesskey="t"></a>
+ <a id="top" class="anchor" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 78b95d902e..2e9253928e 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -20,7 +20,7 @@
/* Main blocks
---------------------------------------- */
-.rtl #logo {
+.rtl .logo {
float: right;
padding: 10px 10px 0 13px;
}
@@ -112,6 +112,32 @@
padding-right: 10px;
}
+.rtl .dropdown-extended .header .header_settings {
+ float: left;
+}
+
+/* Notifications
+----------------------------------------*/
+.rtl .notification_list ul li img {
+ float: right;
+ margin-left: 5px;
+ margin-right: 0;
+}
+
+.rtl .notification_list div.notifications {
+ margin-left: 0;
+ margin-right: 50px;
+}
+
+.rtl .notification_text {
+ margin-left: 0;
+ margin-right: 58px;
+}
+
+.rtl .notification_list p.notification-time {
+ text-align: left;
+}
+
/* Responsive breadcrumbs
----------------------------------------*/
.rtl .breadcrumbs .crumb {
@@ -206,26 +232,39 @@
.rtl .pagination {
text-align: left;
float: left;
- padding-left: 5px;
+}
+
+.rtl .pagination > ul {
+ margin-left: 0;
+ margin-right: 5px;
}
/* Pagination in viewforum for multipage topics */
.rtl .row .pagination {
background-position: 100% 50%;
float: left;
- padding: 1px 15px 1px 0;
+ padding-left: 0;
+ padding-right: 15px;
+}
+
+.rtl .row .pagination > ul {
+ margin: 0;
}
.rtl .pagination span {
direction: ltr;
}
-.rtl .pagination span.page-sep {
- display: inline;
- visibility: hidden;
- position: absolute;
+.pagination li.page-jump {
+ margin-left: 5px;
+ margin-right: 0;
}
+.pagination li.previous a { background-position: -50px 2px; }
+.pagination li.next a { background-position: -30px 2px; }
+.pagination li.previous a:hover { background-position: -50px -18px; }
+.pagination li.next a:hover { background-position: -30px -18px; }
+
/* Miscellaneous styles
---------------------------------------- */
.rtl #forum-permissions {
@@ -245,6 +284,10 @@
width: 99%; /* fix for IE6 */
}
+.rtl .member-search {
+ float: right;
+}
+
/**
* links.css
*/
@@ -300,7 +343,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
.rtl ul.topiclist.missing-column dt {
margin-right: 0;
- margin-left: -330px;
+ margin-left: -345px;
}
.rtl ul.topiclist.two-long-columns dt {
@@ -333,10 +376,6 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
margin-left: 80px;
}
-.rtl ul.topiclist dl {
- position: static; /* fix for IE6 */
-}
-
.rtl ul.topiclist dd {
float: right;
border-right-width: 1px;
@@ -389,10 +428,6 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
padding-right: 45px; /* Space for folder icon */
}
-.rtl dl.icon dt { /* fix for topic row icon links */
- position: relative;
-}
-
.rtl dl a.icon-link { /* topic row icon links */
display: inline-block;
left: auto;
@@ -602,6 +637,19 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
margin-right: 0;
}
+/* Poster contact icons
+ ----------------------------------------*/
+.rtl .contact-icons a {
+ border-left-width: 1px;
+ border-left-style: dotted;
+ border-right: none;
+ float: right;
+}
+
+.rtl .contact-icons .last-cell {
+ border-left: none;
+}
+
/**
* cp.css
*/
@@ -624,10 +672,6 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
margin-left: 0;
}
-.rtl #cp-main .pagination {
- float: left;
-}
-
.rtl #cp-main .buttons {
margin-right: 0;
margin-left: 0;
@@ -640,34 +684,63 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
/* CP tabbed menu
----------------------------------------*/
.rtl #tabs {
- margin: 20px 7px -1px 0;
+ margin-left: 0;
+ margin-right: 7px;
}
-.rtl #tabs a {
+.rtl #tabs .tab {
float: right;
}
-/*.rtl #tabs a span {
- float: right;
-}*/
+.rtl #tabs .tab > a {
+ margin-left: 1px;
+ margin-right: 0;
+}
/* Mini tabbed menu used in MCP
----------------------------------------*/
.rtl #minitabs {
+ float: left;
margin-right: 0;
margin-left: 7px;
}
-.rtl .tabs-container #minitabs {
+.rtl #minitabs .tab {
float: left;
}
-.rtl #minitabs li {
- float: left;
+.rtl #minitabs .tab > a {
margin-right: 2px;
margin-left: 0;
}
+/* Responsive tabs
+----------------------------------------*/
+.rtl #tabs .dropdown {
+ margin-left: -2px;
+}
+
+.rtl #tabs .dropdown li {
+ text-align: left;
+}
+
+.rtl #minitabs .dropdown {
+ margin-left: -4px;
+}
+
+.rtl #minitabs .dropdown li {
+ text-align: right;
+}
+
+/* Responsive *CP navigation
+----------------------------------------*/
+@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
+{
+ .rtl #cp-menu, .rtl #navigation, .rtl #cp-main {
+ float: none;
+ }
+}
+
/* UCP navigation menu
----------------------------------------*/
@@ -718,6 +791,15 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
float: right;
}
+/* Responsive *CP navigation
+----------------------------------------*/
+@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
+{
+ .rtl #cp-menu, .rtl #navigation, .rtl #cp-main {
+ float: none;
+ }
+}
+
/**
* forms.css
*/
@@ -865,10 +947,6 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
}
/* Former imageset */
-.rtl .imageset.site_logo {
- padding-right: 139px;
- padding-left: 0;
-}
.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum, .rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread {
padding-right: 27px;
padding-left: 0;
@@ -893,3 +971,104 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
padding-right: 16px;
padding-left: 0;
}
+
+/**
+* plupload.css
+*/
+
+.rtl .attach-controls {
+ float: left;
+}
+
+/**
+* responsive.css
+*/
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ /* .topiclist lists
+ ----------------------------------------*/
+ .rtl ul.topiclist li.header dt, .rtl ul.topiclist li.header dt .list-inner {
+ margin-left: 0 !important;
+ padding-left: 0;
+ }
+
+ .rtl ul.topiclist dt, .rtl ul.topiclist dt .list-inner,
+ .rtl ul.topiclist.missing-column dt, .rtl ul.topiclist.missing-column dt .list-inner,
+ .rtl ul.topiclist.two-long-columns dt, .rtl ul.topiclist.two-long-columns dt .list-inner,
+ .rtl ul.topiclist.two-columns dt, .rtl ul.topiclist.two-columns dt .list-inner {
+ margin-left: 0;
+ }
+
+ .rtl ul.topiclist dt .list-inner.with-mark {
+ padding-left: 34px;
+ }
+
+ /* Forums and topics lists
+ ----------------------------------------*/
+ .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt {
+ margin-left: -250px;
+ }
+ .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner {
+ margin-left: 250px;
+ }
+
+ .rtl ul.topiclist dd.mark {
+ left: 5px;
+ right: auto;
+ text-align: right;
+ }
+
+ @media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
+ {
+ .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt {
+ margin-left: 0;
+ }
+
+ .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner {
+ margin-left: 0;
+ }
+ }
+
+ .rtl table.responsive.show-header thead, .rtl table.responsive.show-header th:first-child {
+ text-align: right !important;
+ }
+
+ .rtl table.responsive td {
+ text-align: right !important;
+ }
+
+ /* User profile
+ ----------------------------------------*/
+ .rtl .column1, .rtl .column2, .rtl .left-box.profile-details {
+ float: none;
+ }
+
+ @media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
+ {
+ .rtl dl.details dt, .rtl dl.details dd {
+ float: none;
+ text-align: right;
+ }
+
+ .rtl dl.details dd {
+ margin-left: 0;
+ margin-right: 20px;
+ }
+ }
+
+ /* Post
+ ----------------------------------------*/
+ .rtl .postprofile, .rtl .postbody, .rtl .search .postbody {
+ float: none;
+ }
+
+ .rtl .post .postprofile {
+ border-width: 0 0 1px 0;
+ }
+
+ .rtl .postprofile .avatar {
+ float: right;
+ margin-left: 5px;
+ margin-right: 0;
+ }
+}
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index 7d9aae86d7..96743bef5d 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -105,6 +105,7 @@ ul.linklist.bulletin li.small-icon:before {
.contact-icons.dropdown-contents {
min-width: 0;
padding: 0;
+ font-size: 0;
}
.contact-icon {
@@ -143,7 +144,7 @@ ul.linklist.bulletin li.small-icon:before {
.phpbb_website-icon { background-position: -40px 0; }
.phpbb_youtube-icon { background-position: -98px 0; }
.phpbb_facebook-icon { background-position: -119px 0; }
-.phpbb_google_plus-icon { background-position: -140px 0; }
+.phpbb_googleplus-icon { background-position: -140px 0; }
.phpbb_skype-icon { background-position: -161px 0; }
.phpbb_twitter-icon { background-position: -203px 0; }
.phpbb_yahoo-icon { background-position: -224px 0; }
@@ -156,15 +157,6 @@ ul.linklist.bulletin li.small-icon:before {
margin-top: 2px;
}
-.notouch.section-viewtopic .post-buttons {
- opacity: 0;
- transition: opacity .5s;
-}
-
-.notouch.section-viewtopic .post:hover .post-buttons {
- opacity: 1;
-}
-
.post-buttons li {
float: left;
margin-right: 3px;
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 72c8b5f226..4b7532ab8a 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -159,7 +159,7 @@ dl.details dd {
/* Pagination
---------------------------------------- */
-.pagination li a, .pagination li a:link, .pagination li a:visited {
+.pagination li a {
color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
@@ -176,16 +176,14 @@ dl.details dd {
border-color: #4692BF;
}
-.pagination li a:hover, .pagination .active a:hover {
+.pagination li a:hover, .pagination .dropdown-visible a.dropdown-trigger, .nojs .pagination .dropdown-container:hover a.dropdown-trigger {
border-color: #368AD2;
background-color: #368AD2;
color: #FFFFFF;
}
-.pagination li a:active, .pagination li.active a:active {
- color: #5C758C;
- background-color: #ECEDEE;
- border-color: #B4BAC0;
+.pagination li.next a, .pagination li.previous a, .pagination li.page-jump a {
+ background-image: url("./images/icons_pagination.png");
}
/* Pagination in viewforum for multipage topics */
@@ -193,14 +191,6 @@ dl.details dd {
background-image: url("./images/icon_pages.gif");
}
-.row .pagination span a, li.pagination span a {
- background-color: #FFFFFF;
-}
-
-.row .pagination span a:hover, li.pagination span a:hover {
- background-color: #368AD2;
-}
-
/* Miscellaneous styles
---------------------------------------- */
@@ -817,52 +807,54 @@ ul.cplist {
/* CP tabbed menu
----------------------------------------*/
-#tabs a {
- background-image: url("./images/bg_tabs1.gif");
-}
-
-#tabs a span {
- background-image: url("./images/bg_tabs2.gif");
+#tabs .tab > a {
+ background: #BACCD9;
color: #536482;
}
-#tabs a:hover span {
+#tabs .tab > a:hover {
+ background: #DDEDFB;
color: #BC2A4D;
}
-#tabs .activetab a {
- border-bottom-color: #CADCEB;
-}
-
-#tabs .activetab a span {
+#tabs .activetab > a,
+#tabs .activetab > a:hover {
+ background: #CADCEB;
+ background: -moz-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E2F2FF), color-stop(100%, #CADCEB));
+ background: -webkit-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
+ background: -o-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
+ background: -ms-linear-gradient(top, #E2F2FF 0%, #CADCEB 100%);
+ background: linear-gradient(to bottom, #E2F2FF 0%, #CADCEB 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#E2F2FF', endColorstr='#CADCEB', GradientType=0 );
+ border-color: #CADCEB;
+ box-shadow: 0 1px 1px #F2F9FF inset;
color: #333333;
}
-#tabs .activetab a:hover span {
+#tabs .activetab > a:hover {
color: #000000;
}
/* Mini tabbed menu used in MCP
----------------------------------------*/
-#minitabs li {
+#minitabs .tab > a {
background-color: #E1EBF2;
}
-#minitabs li.activetab {
+#minitabs .activetab > a,
+#minitabs .activetab > a:hover {
background-color: #F9F9F9;
-}
-
-#minitabs li.activetab a span, #minitabs li.activetab a:hover span {
color: #333333;
}
/* Responsive tabs
----------------------------------------*/
-.responsive-tab .responsive-tab-link span:before {
+.responsive-tab .responsive-tab-link:before {
border-color: #536482;
}
-.responsive-tab .responsive-tab-link:hover span:before {
+.responsive-tab .responsive-tab-link:hover:before {
border-color: #BC2A4D;
}
@@ -872,35 +864,47 @@ ul.cplist {
/* Link styles for the sub-section links */
#navigation a {
color: #333;
- background-color: #B2C2CF;
- background-image: url("./images/bg_menu.gif");
+ background: #B4C4D1;
+ background: -moz-linear-gradient(left, #B4C4D1 50%, #CADCEB 100%);
+ background: -webkit-gradient(left top, right top, color-stop(50%, #B4C4D1), color-stop(100%, #CADCEB));
+ background: -webkit-linear-gradient(left, #B4C4D1 50%, #CADCEB 100%);
+ background: -o-linear-gradient(left, #B4C4D1 50%, #CADCEB 100%);
+ background: -ms-linear-gradient(left, #B4C4D1 50%, #CADCEB 100%);
+ background: linear-gradient(to right, #B4C4D1 50%, #CADCEB 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#B4C4D1', endColorstr='#CADCEB', GradientType=1 );
}
.rtl #navigation a {
- background-image: url("./images/bg_menu_rtl.gif");
- background-position: 0 100%;
+ background: #B4C4D1;
+ background: -moz-linear-gradient(left, #CADCEB 0%, #B4C4D1 50%);
+ background: -webkit-gradient(left top, right top, color-stop(0%, #CADCEB), color-stop(50%, #B4C4D1));
+ background: -webkit-linear-gradient(left, #CADCEB 0%, #B4C4D1 50%);
+ background: -o-linear-gradient(left, #CADCEB 0%, #B4C4D1 50%);
+ background: -ms-linear-gradient(left, #CADCEB 0%, #B4C4D1 50%);
+ background: linear-gradient(to right, #CADCEB 0%, #B4C4D1 50%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CADCEB', endColorstr='#B4C4D1', GradientType=1 );
}
#navigation a:hover {
- background-image: none;
- background-color: #aabac6;
+ background: #AABAC6;
color: #BC2A4D;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
#navigation #active-subsection a {
+ background: #F9F9F9;
color: #D31141;
- background-color: #F9F9F9;
- background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
#navigation #active-subsection a:hover {
color: #D31141;
}
-@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
{
#navigation a, .rtl #navigation a {
- background-image: none;
+ background: #B2C2CF;
}
}
@@ -1154,7 +1158,7 @@ input.disabled {
border-color: #FFF transparent;
}
-.dropdown-extended .pointer-inner, #minitabs .pointer-inner {
+.dropdown-extended .pointer-inner {
border-color: #F1F8FF transparent;
}
@@ -1180,6 +1184,13 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist
border-color: #DCDCDC;
}
-#minitabs .dropdown-contents {
- background-color: #F1F8FF;
+/* Notifications
+---------------------------------------- */
+
+.notification_list p.notification-time {
+ color: #4C5D77;
+}
+
+li.notification-reported strong, li.notification-disapproved strong {
+ color: #D31141;
}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index b90a53b4e8..a52f5e494d 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -196,13 +196,13 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul {
margin-top: 20px;
}
-#logo {
+.logo {
float: left;
width: auto;
padding: 10px 13px 0 10px;
}
-a#logo:hover {
+.logo:hover {
text-decoration: none;
}
@@ -802,63 +802,111 @@ fieldset.fields1 dl.pmlist dd.recipients {
margin-left: 0 !important;
}
+/* Action-bars (container for post/reply buttons, pagination, etc.)
+---------------------------------------- */
+.action-bar {
+ font-size: 11px;
+ margin: 4px 0;
+}
+
+.action-bar:after {
+ clear: both;
+ content: '';
+ display: block;
+}
+
/* Pagination
---------------------------------------- */
.pagination {
- width: auto;
- text-align: right;
- margin-top: 5px;
float: right;
+ font-size: 11px;
+ margin-top: 3px;
+ text-align: right;
+ width: auto;
}
-li.pagination {
+.action-bar.bottom .pagination {
margin-top: 0;
}
-.pagination img {
- vertical-align: middle;
-}
-
-.pagination ul {
+.pagination > ul {
display: inline-block;
- *display: inline; /* IE7 inline-block hack */
- *zoom: 1;
- margin-left: 0;
- margin-bottom: 0;
-}
-
-li.pagination ul {
- margin-top: -2px;
- vertical-align: middle;
+ list-style: none !important;
+ margin-left: 5px;
}
-.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li {
- display: inline;
+.pagination > ul > li {
+ display: inline-block !important;
padding: 0;
font-size: 100%;
line-height: normal;
+ vertical-align: middle;
}
-.pagination li a, .pagnation li span, li .pagination li a, li .pagination li span, .pagination li.active span, .pagination li.ellipsis span {
- font-weight: normal;
- text-decoration: none;
- padding: 0 2px;
+.pagination li a, .pagination li span {
border: 1px solid transparent;
+ border-radius: 2px;
+ display: block;
font-size: 0.9em;
- line-height: 1.5em;
+ font-weight: normal;
+ line-height: 13px;
+ min-width: 10px;
+ padding: 3px;
+ text-align: center;
+ text-decoration: none;
+}
+
+.pagination li.ellipsis span {
+ border: none;
+ padding: 0;
+}
+
+.pagination li.page-jump {
+ margin-right: 5px;
+}
+
+.pagination li.page-jump a, .pagination li.next a, .pagination li.previous a {
+ background-repeat: no-repeat;
+ font-size: 0;
+ height: 13px;
+ width: 11px;
+}
+
+.pagination li.page-jump a {
+ background-position: 0 2px;
+ width: 24px;
+}
+
+.pagination li.next a {
+ background-position: -50px 2px;
+}
+
+.pagination li.previous a {
+ background-position: -30px 2px;
}
+.pagination li.page-jump a:hover, .pagination .dropdown-visible a.dropdown-trigger, .nojs .pagination .dropdown-container:hover a.dropdown-trigger { background-position: 0 -18px; }
+.pagination li.next a:hover { background-position: -50px -18px; }
+.pagination li.previous a:hover { background-position: -30px -18px; }
+
/* Pagination in viewforum for multipage topics */
.row .pagination {
display: block;
- float: right;
- width: auto;
margin-top: 0;
- padding: 1px 0 1px 8px;
+ padding: 1px 0 1px 15px;
font-size: 0.9em;
background: none 0 50% no-repeat;
}
+.row .pagination > ul {
+ margin: 0;
+}
+
+.row .pagination li a, .row .pagination li span {
+ border-radius: 1px;
+ padding: 1px;
+}
+
/* jQuery popups
---------------------------------------- */
.phpbb_alert {
@@ -1039,11 +1087,21 @@ form > p.post-notice strong {
position: relative;
}
+.member-search {
+ float: left;
+ margin: 0;
+ padding: 6px 10px;
+}
+
+.member-search strong {
+ font-size: 0.95em;
+}
+
.dropdown-extended {
display: none;
position: absolute;
left: 0;
- width: 330px;
+ width: 340px;
z-index: 1;
top: 22px;
}
@@ -1057,7 +1115,7 @@ form > p.post-notice strong {
.dropdown-extended ul li {
padding: 0;
- margin: 0;
+ margin: 0 !important;
float: none;
border-bottom: 1px solid;
list-style-type: none;
@@ -1066,6 +1124,10 @@ form > p.post-notice strong {
position: relative;
}
+.dropdown-extended ul li.no_notifications {
+ padding: 10px;
+}
+
.dropdown-extended ul li:before, .dropdown-extended ul li:after {
display: none;
}
@@ -1098,8 +1160,8 @@ form > p.post-notice strong {
font-size: 1.1em;
}
-.dropdown-extended ul li a{
- padding: 10px;
+.dropdown-extended ul li a, .dropdown-extended ul li.no-url {
+ padding: 8px;
}
.dropdown-extended .footer > a {
@@ -1114,28 +1176,55 @@ form > p.post-notice strong {
.notification_list ul li img {
float: left;
max-height: 50px;
+ max-width: 50px;
width: auto !important;
height: auto !important;
margin-right: 5px;
}
.notification_list ul li p {
- margin: 0;
+ margin-bottom: 4px;
font-size: 1em;
}
+.notification_list p.notification-reference,
+.notification_list p.notification-location,
+.notification_list li a p.notification-reason {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.notification_list p.notification-time {
+ font-size: 10px;
+ margin: 0;
+ text-align: right;
+}
+
.notification_list div.notifications {
+ margin-left: 50px;
padding: 5px;
}
+.notification_list div.notifications a {
+ display: block;
+}
+
.notification_list p.notifications_title {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 13px !important;
+}
+
+.notification_list p.notifications_title strong {
font-weight: bold;
}
.notification_list p.notifications_time {
- font-size: 11px !important;
+ font-size: 10px !important;
+}
+
+.notification_text {
+ margin-left: 58px;
}
.notification_text:after {
@@ -1151,3 +1240,15 @@ form > p.post-notice strong {
.compact .icon-notification > a > strong, .compact .icon-pm > a > strong {
padding-left: 2px;
}
+
+.dropdown-page-jump .dropdown {
+ top: 20px;
+}
+
+.dropdown-page-jump.dropdown-up .dropdown {
+ bottom: 20px;
+}
+
+.dropdown-page-jump input.tiny {
+ width: 50px;
+}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index b66c841d7c..b99312a5be 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -37,7 +37,7 @@ ul.topiclist dt {
}
ul.topiclist.missing-column dt {
- margin-right: -330px;
+ margin-right: -345px;
}
ul.topiclist.two-long-columns dt {
@@ -55,7 +55,7 @@ ul.topiclist dt .list-inner {
}
ul.topiclist.missing-column dt .list-inner {
- margin-right: 330px;
+ margin-right: 345px;
}
ul.topiclist.two-long-columns dt .list-inner {
@@ -226,17 +226,6 @@ dd.option {
font-size: 1.1em;
}
-/* Container for post/reply buttons and pagination */
-.topic-actions {
- margin-bottom: 3px;
- font-size: 1.1em;
- height: 28px;
- min-height: 28px;
-}
-div[class].topic-actions {
- height: auto;
-}
-
/* Post body styles
----------------------------------------*/
.postbody {
@@ -278,7 +267,7 @@ div[class].topic-actions {
}
.postbody img.postimage {
- max-width: 99%;
+ max-width: 100%;
}
.search .postbody {
@@ -613,6 +602,7 @@ dl.file dd {
dl.thumbnail img {
padding: 3px;
border: 1px solid transparent;
+ box-sizing: border-box;
}
dl.thumbnail dd {
@@ -745,14 +735,16 @@ dd.profile-contact {
.profile-contact .dropdown-container {
display: inline-block;
- text-align: left;
- width: 30px;
}
.profile-contact .icon_contact {
vertical-align: middle;
}
+.profile-contact .dropdown {
+ margin-right: -14px;
+}
+
.online {
background-image: none;
background-position: 100% 0;
@@ -778,7 +770,7 @@ dl.pmlist dd {
margin-bottom: 2px;
}
-.topic-actions div.dl_links {
+.action-bar div.dl_links {
padding: 10px 0 0 10px;
}
@@ -812,6 +804,10 @@ div.dl_links {
white-space: nowrap;
}
+table.fixed-width-table {
+ table-layout: fixed;
+}
+
/* Show scrollbars for items with overflow on iOS devices
----------------------------------------*/
.postbody .content::-webkit-scrollbar, #topicreview::-webkit-scrollbar, #post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar {
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
index 61df82c0ce..e144c74f20 100644
--- a/phpBB/styles/prosilver/theme/cp.css
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -59,12 +59,6 @@ ul.cplist {
border-bottom: none;
}
-#cp-main .pagination {
- float: right;
- width: auto;
- padding-top: 1px;
-}
-
#cp-main .postbody p {
font-size: 1.1em;
}
@@ -103,117 +97,82 @@ ul.cplist {
}
.tabs-container:after {
- display: block;
clear: both;
content: '';
+ display: block;
}
-/* CP tabbed menu
+/* CP tabs shared
----------------------------------------*/
-#tabs {
+#tabs, #minitabs {
line-height: normal;
- margin: 20px 0 -1px 7px;
- *overflow: hidden;
}
-#tabs ul {
- margin:0;
- padding: 0;
+#tabs > ul, #minitabs > ul {
list-style: none;
+ margin: 0;
+ padding: 0;
+ position: relative;
}
-#tabs ul:after {
+#tabs > ul:after, #minitabs > ul:after {
+ clear: both;
content: '';
display: block;
- clear: both;
}
-#tabs li {
- display: inline;
- margin: 0;
- padding: 0;
+#tabs .tab, #minitabs .tab {
+ display: inline-block;
+ float: left;
font-size: 1em;
font-weight: bold;
+ line-height: 14px;
}
-#tabs a {
- float: left;
- background: none no-repeat 0% -35px;
- margin: 0 1px 0 0;
- padding: 0 0 0 5px;
- text-decoration: none;
+#tabs .tab > a, #minitabs .tab > a {
+ display: block;
+ padding: 5px 9px;
position: relative;
+ text-decoration: none;
+ white-space: nowrap;
cursor: pointer;
}
-#tabs a span {
- float: left;
- display: block;
- background: none no-repeat 100% -35px;
- padding: 6px 10px 6px 5px;
- white-space: nowrap;
+/* CP tabbed menu
+----------------------------------------*/
+#tabs {
+ margin: 20px 0 0 7px;
}
-#tabs .activetab a {
- background-position: 0 0;
- border-bottom: 1px solid transparent;
+#tabs .tab > a {
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+ margin: 1px 1px 0 0;
}
-#tabs .activetab a span {
- background-position: 100% 0;
+#tabs .activetab > a {
+ margin-top: 0;
padding-bottom: 7px;
}
-#tabs a:hover {
- background-position: 0 -70px;
-}
-
-#tabs a:hover span {
- background-position:100% -70px;
-}
-
-#tabs .activetab a:hover {
- background-position: 0 0;
-}
-
-#tabs .activetab a:hover span {
- background-position: 100% 0;
-}
-
/* Mini tabbed menu used in MCP
----------------------------------------*/
#minitabs {
- line-height: normal;
- margin: -20px 7px 0 0;
-}
-
-.tabs-container #minitabs {
float: right;
- margin-top: 19px;
+ margin: 15px 7px 0 0;
max-width: 50%;
}
-#minitabs ul {
- margin:0;
- padding: 0;
- list-style: none;
-}
-
-#minitabs li {
- display: block;
+#minitabs .tab {
float: right;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- padding: 5px 10px 4px 10px;
- font-size: 1em;
- font-weight: bold;
- margin-left: 2px;
}
-#minitabs a {
+#minitabs .tab > a {
+ border-radius: 5px 5px 0 0;
+ margin-left: 2px;
}
-#minitabs a:hover {
+#minitabs .tab > a:hover {
text-decoration: none;
}
@@ -223,8 +182,8 @@ ul.cplist {
position: relative;
}
-.responsive-tab .responsive-tab-link span {
- display: inline-block;
+.responsive-tab > a.responsive-tab-link {
+ display: block;
font-size: 16px;
position: relative;
width: 16px;
@@ -232,80 +191,41 @@ ul.cplist {
text-decoration: none;
}
-#minitabs .responsive-tab .responsive-tab-link span {
- display: block;
-}
-
-.responsive-tab .responsive-tab-link span:before {
+.responsive-tab .responsive-tab-link:before {
content: '';
position: absolute;
- left: 5px;
- top: 8px;
+ left: 10px;
+ top: 7px;
height: .125em;
width: 14px;
border-bottom: 0.125em solid transparent;
border-top: 0.375em double transparent;
}
-#minitabs .responsive-tab .responsive-tab-link span:before {
- left: 0;
- top: 2px;
-}
-
-#tabs ul, #minitabs ul {
- position: relative;
-}
-
#tabs .dropdown, #minitabs .dropdown {
- top: 29px;
- margin-right: -1px;
+ top: 20px;
+ margin-right: -2px;
+ font-size: 1.1em;
+ font-weight: normal;
}
#minitabs .dropdown {
- top: 18px;
+ margin-right: -4px;
}
#tabs .dropdown-up .dropdown, #minitabs .dropdown-up .dropdown {
- bottom: -5px;
+ bottom: 20px;
top: auto;
}
-#minitabs .dropdown-up .dropdown {
- bottom: 18px;
-}
-
-#tabs .dropdown-right .dropdown, #minitabs .dropdown-right .dropdown {
- margin-left: -41px;
-}
-
-#tabs .dropdown li, #minitabs .dropdown li {
- display: block !important;
- background: transparent none;
- padding: 0;
-}
-
-.tabs-container #minitabs .dropdown a span {
- display: block;
-}
-
-#tabs .dropdown a, #tabs .dropdown a span, #minitabs .dropdown a, #minitabs .dropdown a span {
- background: transparent;
- float: none;
- margin: 0;
- padding: 0;
+#tabs .dropdown li {
text-align: right;
}
-.tabs-container #minitabs .dropdown a span {
+#minitabs .dropdown li {
text-align: left;
}
-#tabs .dropdown a span, #minitabs .dropdown a span {
- padding: 5px 8px;
- color: inherit !important;
-}
-
-
/* UCP navigation menu
----------------------------------------*/
/* Container for sub-navigation list */
@@ -315,15 +235,15 @@ ul.cplist {
}
#navigation ul {
- list-style:none;
+ list-style: none;
}
/* Default list state */
#navigation li {
+ display: inline;
+ font-weight: bold;
margin: 1px 0;
padding: 0;
- font-weight: bold;
- display: inline;
}
/* Link styles for the sub-section links */
@@ -332,18 +252,10 @@ ul.cplist {
padding: 5px;
margin: 1px 0;
text-decoration: none;
- font-weight: bold;
- background: transparent none repeat-y 100% 0;
}
#navigation a:hover {
text-decoration: none;
- background-image: none;
-}
-
-#navigation #active-subsection a {
- display: block;
- background-image: none;
}
/* Preferences pane layout
diff --git a/phpBB/styles/prosilver/theme/images/bg_menu.gif b/phpBB/styles/prosilver/theme/images/bg_menu.gif
deleted file mode 100644
index 4a9f5a9174..0000000000
--- a/phpBB/styles/prosilver/theme/images/bg_menu.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif b/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif
deleted file mode 100644
index 10add09a17..0000000000
--- a/phpBB/styles/prosilver/theme/images/bg_menu_rtl.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs1.gif b/phpBB/styles/prosilver/theme/images/bg_tabs1.gif
deleted file mode 100644
index 335a72c711..0000000000
--- a/phpBB/styles/prosilver/theme/images/bg_tabs1.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/bg_tabs2.gif b/phpBB/styles/prosilver/theme/images/bg_tabs2.gif
deleted file mode 100644
index a2142d5432..0000000000
--- a/phpBB/styles/prosilver/theme/images/bg_tabs2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left2.gif b/phpBB/styles/prosilver/theme/images/corners_left2.gif
deleted file mode 100644
index fa27ce3ba2..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_left2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right2.gif b/phpBB/styles/prosilver/theme/images/corners_right2.gif
deleted file mode 100644
index 2d689446ee..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_right2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icons_pagination.png b/phpBB/styles/prosilver/theme/images/icons_pagination.png
new file mode 100644
index 0000000000..872b7308c2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icons_pagination.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css
index ff6df7c9a7..89639dde02 100644
--- a/phpBB/styles/prosilver/theme/links.css
+++ b/phpBB/styles/prosilver/theme/links.css
@@ -62,6 +62,9 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
top: 50%;
width: 30px;
height: 40px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
.dropdown-extended li:hover a.mark_read {
@@ -228,3 +231,7 @@ a.feed-icon-forum {
float: right;
margin: 3px;
}
+
+a.anchor {
+ display: block;
+}
diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css
index b76f6b60cd..e27a2292b3 100644
--- a/phpBB/styles/prosilver/theme/responsive.css
+++ b/phpBB/styles/prosilver/theme/responsive.css
@@ -41,7 +41,7 @@ body {
text-align: center;
}
-#logo {
+.logo {
/* change display value to inline-block to show logo */
display: none;
float: none;
@@ -197,14 +197,12 @@ ul.topiclist li.row dt a.subforum {
/* Pagination
----------------------------------------*/
-.pagination {
- margin: 5px 0;
+.pagination > ul {
+ margin: 5px 0 0;
}
-.pagination li a, .pagination li span {
- min-width: 10px;
- display: inline-block;
- text-align: center;
+.row .pagination > ul {
+ margin-top: 0;
}
/* Responsive tables
@@ -459,11 +457,6 @@ p.rightside {
margin-bottom: 0;
}
-.column1, .column2 {
- width: auto;
- float: none;
-}
-
fieldset.quickmod {
width: auto;
float: none;
@@ -507,18 +500,21 @@ fieldset.display-actions {
margin: 0;
}
- .topic-actions > .pagination, fieldset.jumpbox {
+ .action-bar > .pagination, fieldset.jumpbox {
text-align: center;
}
- .topic-actions > .pagination {
+ .action-bar > .pagination {
float: none;
- overflow: hidden;
clear: both;
padding-bottom: 1px;
}
- .topic-actions > div.search-box, p.jumpbox-return {
+ .action-bar > .pagination li.page-jump {
+ margin: 0 2px;
+ }
+
+ .action-bar > div.search-box, p.jumpbox-return {
display: none;
}
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index d7cab8ead0..9a0c77b627 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.0-b3
-phpbb_version = 3.1.0-b3
+style_version = 3.1.0-RC1
+phpbb_version = 3.1.0-RC1
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/subsilver2/template/breadcrumbs.html b/phpBB/styles/subsilver2/template/breadcrumbs.html
index 646525c206..3aa05bc0eb 100644
--- a/phpBB/styles/subsilver2/template/breadcrumbs.html
+++ b/phpBB/styles/subsilver2/template/breadcrumbs.html
@@ -2,7 +2,7 @@
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
<tr>
<td class="row1">
- <p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>&#187;</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --><!-- EVENT overall_header_navlink_prepend --> &#187; <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- EVENT overall_header_navlink_append --><!-- END navlinks -->
+ <p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA} data-navbar-reference="home">{L_SITE_HOME}</a> <strong>&#187;</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA} data-navbar-reference="index">{L_INDEX}</a><!-- BEGIN navlinks --><!-- EVENT overall_header_navlink_prepend --> &#187; <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a><!-- EVENT overall_header_navlink_append --><!-- END navlinks -->
<!-- EVENT overall_header_breadcrumb_append --></p>
<!-- EVENT overall_footer_timezone_before -->
<p class="datetime">{S_TIMEZONE}</p>
diff --git a/phpBB/styles/subsilver2/template/confirm_delete_body.html b/phpBB/styles/subsilver2/template/confirm_delete_body.html
index 9e416f5195..18df397fc3 100644
--- a/phpBB/styles/subsilver2/template/confirm_delete_body.html
+++ b/phpBB/styles/subsilver2/template/confirm_delete_body.html
@@ -14,26 +14,23 @@
<p class="gen">{MESSAGE_TEXT}</p>
<br />
- <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
- <table border="0" width="90%" cellspacing="2" cellpadding="1">
- <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
- <tr>
- <td class="row1" width="22%"><b class="gen">{L_DELETE_PERMANENTLY}{L_COLON}</b></td>
- <td class="row1" width="78%">
- <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
- <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
- </td>
- </tr>
- <!-- ENDIF -->
- <!-- IF S_DELETE_REASON -->
- <tr>
- <td class="row1" valign="top"><span class="gen"><b>{L_DELETE_REASON}{L_COLON}</b></span><br /><span class="gensmall">{L_DELETE_REASON_EXPLAIN}</span></td>
- <td class="row1"><input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></td>
- </tr>
- <!-- ENDIF -->
- </table>
- <br />
+ <table border="0" width="90%" cellspacing="2" cellpadding="1">
+ <!-- IF not S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <tr>
+ <td class="row1" width="22%"><b class="gen">{L_DELETE_PERMANENTLY}{L_COLON}</b></td>
+ <td class="row1" width="78%">
+ <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
+ <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
+ </td>
+ </tr>
<!-- ENDIF -->
+ <tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_DELETE_REASON}{L_COLON}</b></span><br /><span class="gensmall">{L_DELETE_REASON_EXPLAIN}</span></td>
+ <td class="row1"><input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></td>
+ </tr>
+ </table>
+ <br />
+
{S_HIDDEN_FIELDS}
<input type="submit" name="confirm" value="{L_YES}" class="btnmain" />&nbsp;&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="btnlite" />
diff --git a/phpBB/styles/subsilver2/template/faq_body.html b/phpBB/styles/subsilver2/template/faq_body.html
index 22c4145a20..b3c41e932a 100644
--- a/phpBB/styles/subsilver2/template/faq_body.html
+++ b/phpBB/styles/subsilver2/template/faq_body.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="faqtop"></a>
+<a name="faqtop" class="anchor"></a>
<div id="pagecontent">
@@ -38,7 +38,7 @@
<!-- ELSE -->
<td class="row2" valign="top">
<!-- ENDIF -->
- <div class="postbody"><a name="f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}"></a><b>&#187; {faq_block.faq_row.FAQ_QUESTION}</b></div>
+ <div class="postbody"><a name="f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}" class="anchor"></a><b>&#187; {faq_block.faq_row.FAQ_QUESTION}</b></div>
<div class="postbody">{faq_block.faq_row.FAQ_ANSWER}</div>
<p class="gensmall"><a href="#faqtop">{L_BACK_TO_TOP}</a></p>
</td>
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index cb67768b15..2fdd0c77c1 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -20,10 +20,14 @@
<!-- IF not S_IS_BOT and U_TEAM --> | <!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_before -->
<!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF -->
+ <!-- IF U_CONTACT_US -->
+ <!-- IF U_TEAM --> | <!-- ENDIF -->
+ <a href="{U_CONTACT_US}">{L_CONTACT_US}</a>
+ <!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_after -->
</span>
-<br />
<!-- ENDIF -->
+<br />
<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/mcp_post.html b/phpBB/styles/subsilver2/template/mcp_post.html
index 0f000ca931..f5052ee2d0 100644
--- a/phpBB/styles/subsilver2/template/mcp_post.html
+++ b/phpBB/styles/subsilver2/template/mcp_post.html
@@ -144,7 +144,7 @@
<!-- IF S_TOPIC_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
<!-- ELSE -->
<!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST or S_CAN_CHGPOSTER -->
- <br /><a name="mod"></a>
+ <br /><a name="mod" class="anchor"></a>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
@@ -166,7 +166,7 @@
<!-- ENDIF -->
<!-- IF S_CAN_VIEWIP -->
- <br /><a name="ip"></a>
+ <br /><a name="ip" class="anchor"></a>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg">
<tr>
diff --git a/phpBB/styles/subsilver2/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html
index 7693a4167f..13ff4baace 100644
--- a/phpBB/styles/subsilver2/template/memberlist_email.html
+++ b/phpBB/styles/subsilver2/template/memberlist_email.html
@@ -6,13 +6,24 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
+ <!-- IF S_CONTACT_ADMIN-->
+ <th colspan="2">{L_CONTACT_ADMIN}</th>
+ <!-- ELSEIF S_SEND_USER -->
<th colspan="2">{L_SEND_EMAIL_USER}</th>
+ <!-- ELSE -->
+ <th colspan="2">{L_EMAIL_TOPIC}</th>
+ <!-- ENDIF -->
</tr>
<!-- IF ERROR_MESSAGE -->
<tr>
<td class="row3" colspan="2" align="center"><span class="error">{ERROR_MESSAGE}</span></td>
</tr>
<!-- ENDIF -->
+ <!-- IF CONTACT_INFO -->
+ <tr>
+ <td class="row1" colspan="2">{CONTACT_INFO}</td>
+ </tr>
+ <!-- ENDIF -->
<!-- IF S_SEND_USER -->
<tr>
<td class="row1" width="35%"><b class="genmed">{L_RECIPIENT}</b></td>
@@ -22,6 +33,21 @@
<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>
+ <!-- ELSEIF S_CONTACT_ADMIN-->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_RECIPIENT}</b></td>
+ <td class="row2" width="65%"><b class="genmed">{L_ADMINISTRATOR}</b></td>
+ </tr>
+ <!-- IF not S_IS_REGISTERED -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_SENDER_EMAIL_ADDRESS}</b></td>
+ <td class="row2"><input class="post" type="text" name="email" size="50" maxlength="100" value="{EMAIL}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_SENDER_NAME}</b></td>
+ <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_EMAIL_ADDRESS}</b></td>
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index b4a2fa5b59..711ce66362 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -140,7 +140,7 @@ function marklist(id, name, state)
<!-- EVENT overall_header_body_before -->
-<a name="top"></a>
+<a name="top" class="anchor"></a>
<div id="wrapheader">
@@ -156,17 +156,20 @@ function marklist(id, name, state)
<div id="menubar">
<table width="100%" cellspacing="0">
<tr>
- <td class="genmed">
+ <td class="genmed dropdown-container">
<!-- IF S_NOTIFICATIONS_DISPLAY and not S_IS_BOT and S_USER_LOGGED_IN -->
- <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button"><img src="{T_THEME_PATH}/images/icon_mini_notification.gif" width="12" height="13" alt="*" /> {L_NOTIFICATIONS} [<strong>{NOTIFICATIONS_COUNT}</strong>]</a>&nbsp;
- <div id="notification_list" class="notification_list">
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger">
+ <img src="{T_THEME_PATH}/images/icon_mini_notification.gif" width="12" height="13" alt="*" />
+ {L_NOTIFICATIONS} [<strong>{NOTIFICATIONS_COUNT}</strong>]
+ </a>&nbsp;
+ <div id="notification_list" class="notification_list dropdown">
<div class="row1 header">
{L_NOTIFICATIONS}
<span class="header_settings"><a href="{U_NOTIFICATION_SETTINGS}">{L_SETTINGS}</a></span>
</div>
<div class="notification_scroll">
- <table class="tablebg" width="310" cellspacing="1">
+ <table class="tablebg" cellspacing="1">
<!-- BEGIN notifications -->
<tr class="row<!-- IF notifications.UNREAD -->2<!-- ELSE -->1<!-- ENDIF -->">
<td width="50">
@@ -177,7 +180,11 @@ function marklist(id, name, state)
<!-- IF notifications.URL --><a href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->"><!-- ENDIF -->
{notifications.FORMATTED_TITLE}
<!-- IF notifications.URL --></a><!-- ENDIF -->
- <br />&raquo; {notifications.TIME}
+
+ <!-- IF notifications.REFERENCE --><br /><span class="notification-reference">{notifications.REFERENCE}</span><!-- ENDIF -->
+ <!-- IF notifications.FORUM --><br /><span class="notification-forum">{notifications.FORUM}</span><!-- ENDIF -->
+ <!-- IF notifications.REASON --><br /><span class="notification-reason">{notifications.REASON}</span><!-- ENDIF -->
+ <br /><span class="notification-time">{notifications.TIME}</span>
<!-- IF not notifications.URL and notifications.UNREAD -->
<br /><a href="{notifications.U_MARK_READ}">{L_MARK_READ}</a>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/pagination.html b/phpBB/styles/subsilver2/template/pagination.html
index 550b28d305..b1c1d0e6c9 100644
--- a/phpBB/styles/subsilver2/template/pagination.html
+++ b/phpBB/styles/subsilver2/template/pagination.html
@@ -1,5 +1,5 @@
<!-- IF .pagination -->
- <!-- IF BASE_URL --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a></b><!-- ENDIF -->
+ <!-- IF BASE_URL --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE_CLICK}">{L_GOTO_PAGE}</a></b><!-- ENDIF -->
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a>
<!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong>
diff --git a/phpBB/styles/subsilver2/template/posting_review.html b/phpBB/styles/subsilver2/template/posting_review.html
index baf159aecd..c118499564 100644
--- a/phpBB/styles/subsilver2/template/posting_review.html
+++ b/phpBB/styles/subsilver2/template/posting_review.html
@@ -23,7 +23,7 @@
<td colspan="2">{post_review_row.L_IGNORE_POST}</td>
<!-- ELSE -->
- <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{post_review_row.POST_ID}"></a>
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{post_review_row.POST_ID}" class="anchor"></a>
<table width="150" cellspacing="0" cellpadding="4" border="0">
<tr>
<td align="center"><b class="postauthor">{post_review_row.POST_AUTHOR_FULL}</b></td>
diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html
index 0be71098db..7087414fa8 100644
--- a/phpBB/styles/subsilver2/template/posting_smilies.html
+++ b/phpBB/styles/subsilver2/template/posting_smilies.html
@@ -18,7 +18,7 @@
<tr>
<td class="row1" align="center" valign="middle"><!-- BEGIN smiley --> <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" /></a> <!-- END smiley --><br />
<!-- IF .pagination -->
- <b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a>
+ <b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE_CLICK}">{L_GOTO_PAGE}</a>
<!-- BEGIN pagination -->
<!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
<!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong>
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html
index 23ea56a216..20976861fc 100644
--- a/phpBB/styles/subsilver2/template/posting_topic_review.html
+++ b/phpBB/styles/subsilver2/template/posting_topic_review.html
@@ -23,7 +23,7 @@
<!-- IF topic_review_row.S_IGNORE_POST -->
<td colspan="2">{topic_review_row.L_IGNORE_POST}</td>
<!-- ELSE -->
- <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{topic_review_row.POST_ID}"></a>
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{topic_review_row.POST_ID}" class="anchor"></a>
<table width="150" cellspacing="0">
<tr>
<td align="center"><b class="postauthor"<!-- IF topic_review_row.POST_AUTHOR_COLOUR --> style="color: {topic_review_row.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topic_review_row.POST_AUTHOR}</b></td>
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html
index 3649bb9633..23d0b3a146 100644
--- a/phpBB/styles/subsilver2/template/search_results.html
+++ b/phpBB/styles/subsilver2/template/search_results.html
@@ -97,7 +97,7 @@
<!-- IF searchresults.S_IGNORE_POST -->
<td class="gensmall" colspan="2" height="25" align="center">{searchresults.L_IGNORE_POST}</td>
<!-- ELSE -->
- <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}"></a>&nbsp;{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a> &nbsp; {L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a> </p></td>
+ <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}" class="anchor"></a>&nbsp;{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a> &nbsp; {L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a> </p></td>
</tr>
<tr class="row1">
<td width="150" align="center" valign="middle"><b class="postauthor">{searchresults.POST_AUTHOR_FULL}</b></td>
diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html
index 36ac149691..faeeaea3d5 100644
--- a/phpBB/styles/subsilver2/template/simple_header.html
+++ b/phpBB/styles/subsilver2/template/simple_header.html
@@ -18,5 +18,5 @@
<body class="{S_CONTENT_DIRECTION} {BODY_CLASS}">
<!-- EVENT simple_header_body_before -->
-<a name="top"></a>
+<a name="top" class="anchor"></a>
<div id="wrapcentre">
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
index 87e5608fec..7beddfc109 100644
--- a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
@@ -2,7 +2,6 @@
<!-- IF .avatar_local_cats -->
<tr>
<td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}{L_COLON} </span><select name="avatar_local_cat" id="category">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
<!-- BEGIN avatar_local_cats -->
<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
<!-- END avatar_local_cats -->
diff --git a/phpBB/styles/subsilver2/template/ucp_groups_manage.html b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
index 3099fcb1d8..55c1c20528 100644
--- a/phpBB/styles/subsilver2/template/ucp_groups_manage.html
+++ b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
@@ -78,7 +78,7 @@
<td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td>
<td class="row2">
<select name="avatar_driver" id="avatar_driver">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <option value="">{L_NO_AVATAR}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
diff --git a/phpBB/styles/subsilver2/template/ucp_notifications.html b/phpBB/styles/subsilver2/template/ucp_notifications.html
index 64e21ec4a6..b0d2925b68 100644
--- a/phpBB/styles/subsilver2/template/ucp_notifications.html
+++ b/phpBB/styles/subsilver2/template/ucp_notifications.html
@@ -92,9 +92,11 @@
<td valign="top">
<span class="gen">
<!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
- <strong>{notification_list.FORMATTED_TITLE}</strong>
+ {notification_list.FORMATTED_TITLE}<!-- IF notification_list.REFERENCE --> {notification_list.REFERENCE}<!-- ENDIF -->
<!-- IF notification_list.URL --></a><!-- ENDIF --><br />
- {notification_list.TIME}
+ <!-- IF notification_list.FORUM --><span class="notifications_forum">{notification_list.FORUM}</span><br /><!-- ENDIF -->
+ <!-- IF notification_list.REASON --><span class="notifications_reason">{notification_list.REASON}</span><br /><!-- ENDIF -->
+ <span class="notifications_time">{notification_list.TIME}</span>
</span>
</td>
<td align="center">
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html
index ad06da2b7e..c07edb0f68 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_history.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html
@@ -18,7 +18,7 @@
</tr>
<!-- BEGIN history_row -->
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a name="{history_row.MSG_ID}"></a>
+ <td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a name="{history_row.MSG_ID}" class="anchor"></a>
<table width="150" cellspacing="0">
<tr>
<td align="center" colspan="2"><span class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</span></td>
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
index 07b3edb498..fc52c149c6 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
@@ -28,7 +28,7 @@
<td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td>
<td class="row2">
<select name="avatar_driver" id="avatar_driver" data-togglable-settings="true">
- <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <option value="">{L_NO_AVATAR}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF --> data-toggle-setting=".avatar_option_{avatar_drivers.DRIVER}">{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html
index 1d55b952e5..162fa2a020 100644
--- a/phpBB/styles/subsilver2/template/ucp_register.html
+++ b/phpBB/styles/subsilver2/template/ucp_register.html
@@ -34,6 +34,7 @@
</tr>
<!-- ENDIF -->
+<!-- EVENT ucp_register_credentials_before -->
<tr>
<td class="row1" width="38%"><b class="genmed">{L_USERNAME}{L_COLON} </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="username" size="25" value="{USERNAME}" /></td>
@@ -50,6 +51,8 @@
<td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}{L_COLON} </b></td>
<td class="row2"><input class="post" type="password" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" /></td>
</tr>
+<!-- EVENT ucp_register_credentials_after -->
+<!-- EVENT ucp_register_options_before -->
<tr>
<td class="row1"><b class="genmed">{L_LANGUAGE}{L_COLON} </b></td>
<td class="row2"><select name="lang" onchange="change_language(this.value); return false;">{S_LANG_OPTIONS}</select></td>
@@ -57,6 +60,7 @@
<!-- INCLUDE timezone_option.html -->
+<!-- EVENT ucp_register_profile_fields_before -->
<!-- IF .profile_fields -->
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
@@ -73,7 +77,7 @@
<!-- END profile_fields -->
<!-- ENDIF -->
-
+<!-- EVENT ucp_register_profile_fields_after -->
<!-- IF CAPTCHA_TEMPLATE -->
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index 0c7900076b..c69be83a1e 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -141,8 +141,8 @@
<!-- IF postrow.S_POST_HIDDEN -->
<td class="gensmall" colspan="2" height="25" align="center">
- <!-- IF postrow.S_FIRST_UNREAD --><a id="unread" data-url="{postrow.U_MINI_POST}"></a><!-- ENDIF -->
- <a name="p{postrow.POST_ID}"></a>
+ <!-- IF postrow.S_FIRST_UNREAD --><a id="unread" class="anchor" data-url="{postrow.U_MINI_POST}"></a><!-- ENDIF -->
+ <a name="p{postrow.POST_ID}" class="anchor"></a>
<!-- IF postrow.S_POST_HIDDEN -->
<!-- IF postrow.S_POST_DELETED -->
{postrow.L_POST_DELETED_MESSAGE}
@@ -155,7 +155,10 @@
<!-- ELSE -->
<td align="center" valign="middle">
- <!-- IF postrow.S_FIRST_UNREAD --><a id="unread" data-url="{postrow.U_MINI_POST}"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>
+ <!-- IF postrow.S_FIRST_UNREAD -->
+ <a id="unread" class="anchor"<!-- IF S_UNREAD_VIEW --> data-url="{postrow.U_MINI_POST}"<!-- ENDIF -->></a>
+ <!-- ENDIF -->
+ <a name="p{postrow.POST_ID}" class="anchor"></a>
<b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b>
</td>
<td width="100%" height="25">
diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css
index ea8e660e30..3c7ff23db5 100644
--- a/phpBB/styles/subsilver2/theme/stylesheet.css
+++ b/phpBB/styles/subsilver2/theme/stylesheet.css
@@ -458,6 +458,10 @@ th a:hover {
text-decoration: underline;
}
+a.anchor {
+ display: block;
+}
+
/* Form Elements
------------ */
@@ -628,7 +632,7 @@ input:focus, select:focus, textarea:focus {
}
.postimage {
- max-width: 99%;
+ max-width: 100%;
}
.syntaxbg {
@@ -1185,12 +1189,21 @@ a.imageset {
overflow-x: hidden;
}
+#notification_list table {
+ width: 100%;
+}
+
#notification_list .notification_title {
- padding: 5px;
+ padding: 3px;
+}
+
+#notification_list .notification_title:after {
+ clear: both;
+ content: '';
+ display: block;
}
#notification_list .header {
- width: 298px;
padding: 5px;
font-weight: bold;
border: 1px solid #A9B8C2;
@@ -1204,7 +1217,6 @@ a.imageset {
}
#notification_list .footer {
- width: 300px;
text-align: center;
font-size: 1.2em;
border: 1px solid #A9B8C2;
@@ -1219,3 +1231,12 @@ a.imageset {
#notification_list .footer > a {
display: block;
}
+
+#notification_list .notification-time {
+ font-size: 0.9em;
+ float: right;
+}
+
+.notification_list .notifications_time {
+ font-size: 0.8em;
+}
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 4c7723b0ac..182bc2e285 100644
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -357,23 +357,3 @@ $module->assign_tpl_vars(append_sid("{$phpbb_root_path}ucp.$phpEx"));
// Generate the page, do not display/query online list
$module->display($module->get_page_title());
-
-/**
-* Function for assigning a template var if the zebra module got included
-*/
-function _module_zebra($mode, &$module_row)
-{
- global $template;
-
- $template->assign_var('S_ZEBRA_ENABLED', true);
-
- if ($mode == 'friends')
- {
- $template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
- }
-
- if ($mode == 'foes')
- {
- $template->assign_var('S_ZEBRA_FOES_ENABLED', true);
- }
-}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 385a4cfe55..d87f7de2b0 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -635,6 +635,7 @@ $template->assign_vars(array(
'L_RETURN_TO_FORUM' => $user->lang('RETURN_TO', $topic_data['forum_name']),
'S_VIEWTOPIC' => true,
+ 'S_UNREAD_VIEW' => $view == 'unread',
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx"),
'S_SEARCH_LOCAL_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),
@@ -1140,6 +1141,7 @@ while ($row = $db->sql_fetchrow($result))
'username' => $row['username'],
'user_colour' => $row['user_colour'],
+ 'contact_user' => '',
'warnings' => 0,
'allow_pm' => 0,
@@ -1197,6 +1199,7 @@ while ($row = $db->sql_fetchrow($result))
'username' => $row['username'],
'user_colour' => $row['user_colour'],
+ 'contact_user' => $user->lang('CONTACT_USER', get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['username'])),
'online' => false,
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
@@ -1698,6 +1701,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
'POSTER_WARNINGS' => $auth->acl_get('m_warn') ? $user_cache[$poster_id]['warnings'] : '',
'POSTER_AGE' => $user_cache[$poster_id]['age'],
+ 'CONTACT_USER' => $user_cache[$poster_id]['contact_user'],
'POST_DATE' => $user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
'POST_SUBJECT' => $row['post_subject'],
@@ -1809,7 +1813,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$contact_fields = array(
array(
'ID' => 'pm',
- 'NAME' => $user->lang['PRIVATE_MESSAGES'],
+ 'NAME' => $user->lang['SEND_PRIVATE_MESSAGE'],
'U_CONTACT' => $u_pm,
),
array(