diff options
45 files changed, 1076 insertions, 3726 deletions
diff --git a/.gitignore b/.gitignore index de503c10ad..f9c04980ba 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /phpBB/images/avatars/gallery/* /phpBB/images/avatars/upload/* /phpBB/images/ranks/* +/phpBB/install/schemas/schema.json /phpBB/language/* !/phpBB/language/en /phpBB/store/* diff --git a/build/build.xml b/build/build.xml index 8ac7c1758c..de0f916a1f 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> - <property name="newversion" value="3.1.0-RC5-dev" /> - <property name="prevversion" value="3.1.0-RC4" /> - <property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2, 3.1.0-b3, 3.1.0-b4, 3.1.0-RC1, 3.1.0-RC2, 3.1.0-RC3" /> + <property name="newversion" value="3.1.0-RC6-dev" /> + <property name="prevversion" value="3.1.0-RC5" /> + <property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2, 3.1.0-b3, 3.1.0-b4, 3.1.0-RC1, 3.1.0-RC2, 3.1.0-RC3, 3.1.0-RC4" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> @@ -273,6 +273,9 @@ </else> </if> + <!-- Create schema.json --> + <exec dir="${dir}" command="php develop/create_schema_files.php" /> + <delete file="${dir}/config.php" /> <delete dir="${dir}/develop" /> <delete dir="${dir}/install/data" /> diff --git a/phpBB/config/auth_providers.yml b/phpBB/config/auth.yml index 89303a684a..88a90ca2d6 100644 --- a/phpBB/config/auth_providers.yml +++ b/phpBB/config/auth.yml @@ -1,4 +1,9 @@ services: +# ----- Auth management ----- + auth: + class: phpbb\auth\auth + +# ----- Auth providers ----- auth.provider_collection: class: phpbb\auth\provider_collection arguments: @@ -6,6 +11,7 @@ services: - @config tags: - { name: service_collection, tag: auth.provider } + auth.provider.db: class: phpbb\auth\provider\db arguments: @@ -19,6 +25,7 @@ services: - %core.php_ext% tags: - { name: auth.provider } + auth.provider.apache: class: phpbb\auth\provider\apache arguments: @@ -31,6 +38,7 @@ services: - %core.php_ext% tags: - { name: auth.provider } + auth.provider.ldap: class: phpbb\auth\provider\ldap arguments: @@ -40,6 +48,7 @@ services: - @user tags: - { name: auth.provider } + auth.provider.oauth: class: phpbb\auth\provider\oauth\oauth arguments: @@ -57,12 +66,15 @@ services: - %core.php_ext% tags: - { name: auth.provider } + +# ----- OAuth services providers ----- auth.provider.oauth.service_collection: class: phpbb\di\service_collection arguments: - @service_container tags: - { name: service_collection, tag: auth.provider.oauth.service } + auth.provider.oauth.service.bitly: class: phpbb\auth\provider\oauth\service\bitly arguments: @@ -70,6 +82,7 @@ services: - @request tags: - { name: auth.provider.oauth.service } + auth.provider.oauth.service.facebook: class: phpbb\auth\provider\oauth\service\facebook arguments: @@ -77,6 +90,7 @@ services: - @request tags: - { name: auth.provider.oauth.service } + auth.provider.oauth.service.google: class: phpbb\auth\provider\oauth\service\google arguments: diff --git a/phpBB/config/avatars.yml b/phpBB/config/avatar.yml index 8e5b1fdbfe..5292489715 100644 --- a/phpBB/config/avatars.yml +++ b/phpBB/config/avatar.yml @@ -1,4 +1,18 @@ services: + avatar.manager: + class: phpbb\avatar\manager + arguments: + - @config + - @avatar.driver_collection + +# ----- Avatar drivers ----- + avatar.driver_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: avatar.driver } + avatar.driver.gravatar: class: phpbb\avatar\driver\gravatar arguments: @@ -51,10 +65,3 @@ services: - [set_name, [avatar.driver.upload]] tags: - { name: avatar.driver } - - avatar.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: avatar.driver } diff --git a/phpBB/config/captcha.yml b/phpBB/config/captcha.yml index bca37767af..e3f617e909 100644 --- a/phpBB/config/captcha.yml +++ b/phpBB/config/captcha.yml @@ -1,8 +1,3 @@ -parameters: - tables.captcha_qa_questions: %core.table_prefix%captcha_questions - tables.captcha_qa_answers: %core.table_prefix%captcha_answers - tables.captcha_qa_confirm: %core.table_prefix%qa_confirm - services: captcha.factory: class: phpbb\captcha\factory @@ -10,6 +5,8 @@ services: - @service_container - @captcha.plugins.service_collection +# ----- Captcha plugins ----- +# Scope MUST be prototype for all the plugins to work. captcha.plugins.service_collection: class: phpbb\di\service_collection arguments: @@ -19,7 +16,7 @@ services: core.captcha.plugins.gd: class: phpbb\captcha\plugins\gd - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.gd]] tags: @@ -27,7 +24,7 @@ services: core.captcha.plugins.gd_wave: class: phpbb\captcha\plugins\gd_wave - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.gd_wave]] tags: @@ -35,7 +32,7 @@ services: core.captcha.plugins.nogd: class: phpbb\captcha\plugins\nogd - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.nogd]] tags: @@ -43,7 +40,7 @@ services: core.captcha.plugins.qa: class: phpbb\captcha\plugins\qa - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - %tables.captcha_qa_questions% - %tables.captcha_qa_answers% @@ -55,7 +52,7 @@ services: core.captcha.plugins.recaptcha: class: phpbb\captcha\plugins\recaptcha - scope: prototype # scope MUST be prototype for this to work! + scope: prototype calls: - [set_name, [core.captcha.plugins.recaptcha]] tags: diff --git a/phpBB/config/content.yml b/phpBB/config/content.yml new file mode 100644 index 0000000000..f0985f0292 --- /dev/null +++ b/phpBB/config/content.yml @@ -0,0 +1,71 @@ +services: + content.visibility: + class: phpbb\content_visibility + arguments: + - @auth + - @config + - @dbal.conn + - @user + - %core.root_path% + - %core.php_ext% + - %tables.forums% + - %tables.posts% + - %tables.topics% + - %tables.users% + + groupposition.legend: + class: phpbb\groupposition\legend + arguments: + - @dbal.conn + - @user + + groupposition.teampage: + class: phpbb\groupposition\teampage + arguments: + - @dbal.conn + - @user + - @cache.driver + + 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 + - @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% + + pagination: + class: phpbb\pagination + arguments: + - @template + - @user + - @controller.helper + - @dispatcher + + viewonline_helper: + class: phpbb\viewonline_helper + arguments: + - @filesystem diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron.yml index acf9a48bf9..7a90c39733 100644 --- a/phpBB/config/cron_tasks.yml +++ b/phpBB/config/cron.yml @@ -1,4 +1,26 @@ services: + cron.manager: + class: phpbb\cron\manager + arguments: + - @cron.task_collection + - %core.root_path% + - %core.php_ext% + + cron.lock_db: + class: phpbb\lock\db + arguments: + - cron_lock + - @config + - @dbal.conn + +# ----- Cron tasks ----- + cron.task_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: cron.task } + cron.task.core.prune_all_forums: class: phpbb\cron\task\core\prune_all_forums arguments: diff --git a/phpBB/config/migrator.yml b/phpBB/config/db.yml index cd04eea5c2..b3f1b485ea 100644 --- a/phpBB/config/migrator.yml +++ b/phpBB/config/db.yml @@ -1,4 +1,20 @@ services: + dbal.conn: + class: phpbb\db\driver\factory + arguments: + - @service_container + + dbal.conn.driver: + class: %dbal.driver.class% + calls: + - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]] + + dbal.tools: + class: phpbb\db\tools + arguments: + - @dbal.conn + +# ----- Migrator ----- migrator: class: phpbb\db\migrator arguments: @@ -15,6 +31,7 @@ services: migrator.helper: class: phpbb\db\migration\helper +# ----- Migrator's tools ----- migrator.tool_collection: class: phpbb\di\service_collection arguments: diff --git a/phpBB/config/event.yml b/phpBB/config/event.yml new file mode 100644 index 0000000000..599b3cbb40 --- /dev/null +++ b/phpBB/config/event.yml @@ -0,0 +1,34 @@ +services: + dispatcher: + class: phpbb\event\dispatcher + arguments: + - @service_container + + hook_finder: + class: phpbb\hook\finder + arguments: + - %core.root_path% + - %core.php_ext% + - @cache.driver + + kernel_request_subscriber: + class: phpbb\event\kernel_request_subscriber + arguments: + - @ext.manager + - %core.root_path% + - %core.php_ext% + tags: + - { name: kernel.event_subscriber } + + kernel_exception_subscriber: + class: phpbb\event\kernel_exception_subscriber + arguments: + - @template + - @user + tags: + - { name: kernel.event_subscriber } + + kernel_terminate_subscriber: + class: phpbb\event\kernel_terminate_subscriber + tags: + - { name: kernel.event_subscriber } diff --git a/phpBB/config/mimetype_guessers.yml b/phpBB/config/mimetype_guesser.yml index 0115146deb..2e89ed3c1f 100644 --- a/phpBB/config/mimetype_guessers.yml +++ b/phpBB/config/mimetype_guesser.yml @@ -1,11 +1,11 @@ -parameters: - mimetype.guesser.priority.lowest: -2 - mimetype.guesser.priority.low: -1 - mimetype.guesser.priority.default: 0 - mimetype.guesser.priority.high: 1 - mimetype.guesser.priority.highest: 2 - services: + mimetype.guesser_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: mimetype.guessers } + mimetype.fileinfo_mimetype_guesser: class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser tags: @@ -30,13 +30,6 @@ services: tags: - { name: mimetype.guessers } - mimetype.guesser_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: mimetype.guessers } - mimetype.guesser: class: phpbb\mimetype\guesser arguments: diff --git a/phpBB/config/notifications.yml b/phpBB/config/notification.yml index 5675e76a99..add577be2c 100644 --- a/phpBB/config/notifications.yml +++ b/phpBB/config/notification.yml @@ -1,21 +1,33 @@ services: - notification.type_collection: - class: phpbb\di\service_collection + notification_manager: + class: phpbb\notification\manager arguments: + - @notification.type_collection + - @notification.method_collection - @service_container - tags: - - { name: service_collection, tag: notification.type } + - @user_loader + - @config + - @dbal.conn + - @cache + - @user + - %core.root_path% + - %core.php_ext% + - %tables.notification_types% + - %tables.notifications% + - %tables.user_notifications% - notification.method_collection: +# ----- Notification's types ----- +# Scope MUST be prototype for all the plugins to work. + notification.type_collection: class: phpbb\di\service_collection arguments: - @service_container tags: - - { name: service_collection, tag: notification.method } + - { name: service_collection, tag: notification.type } notification.type.approve_post: class: phpbb\notification\type\approve_post - scope: prototype # scope MUST be prototype for this to work! # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -33,7 +45,7 @@ services: notification.type.approve_topic: class: phpbb\notification\type\approve_topic - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -51,7 +63,7 @@ services: notification.type.bookmark: class: phpbb\notification\type\bookmark - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -69,7 +81,7 @@ services: notification.type.disapprove_post: class: phpbb\notification\type\disapprove_post - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -87,7 +99,7 @@ services: notification.type.disapprove_topic: class: phpbb\notification\type\disapprove_topic - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -105,7 +117,7 @@ services: notification.type.group_request: class: phpbb\notification\type\group_request - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -123,7 +135,7 @@ services: notification.type.group_request_approved: class: phpbb\notification\type\group_request_approved - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -141,7 +153,7 @@ services: notification.type.pm: class: phpbb\notification\type\pm - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -159,7 +171,7 @@ services: notification.type.post: class: phpbb\notification\type\post - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -177,7 +189,7 @@ services: notification.type.post_in_queue: class: phpbb\notification\type\post_in_queue - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -195,7 +207,7 @@ services: notification.type.quote: class: phpbb\notification\type\quote - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -213,7 +225,7 @@ services: notification.type.report_pm: class: phpbb\notification\type\report_pm - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -231,7 +243,7 @@ services: notification.type.report_pm_closed: class: phpbb\notification\type\report_pm_closed - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -249,7 +261,7 @@ services: notification.type.report_post: class: phpbb\notification\type\report_post - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -267,7 +279,7 @@ services: notification.type.report_post_closed: class: phpbb\notification\type\report_post_closed - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -285,7 +297,7 @@ services: notification.type.topic: class: phpbb\notification\type\topic - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -303,7 +315,7 @@ services: notification.type.topic_in_queue: class: phpbb\notification\type\topic_in_queue - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -321,7 +333,7 @@ services: notification.type.admin_activate_user: class: phpbb\notification\type\admin_activate_user - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -336,10 +348,19 @@ services: - %tables.user_notifications% tags: - { name: notification.type } + +# ----- Notification's methods ----- +# Scope MUST be prototype for all the plugins to work. + notification.method_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: notification.method } notification.method.email: class: phpbb\notification\method\email - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn @@ -354,7 +375,7 @@ services: notification.method.jabber: class: phpbb\notification\method\jabber - scope: prototype # scope MUST be prototype for this to work! + scope: prototype arguments: - @user_loader - @dbal.conn diff --git a/phpBB/config/parameters.yml b/phpBB/config/parameters.yml index b076ea3ecb..8ecc1428f4 100644 --- a/phpBB/config/parameters.yml +++ b/phpBB/config/parameters.yml @@ -1,3 +1,20 @@ parameters: + # Disable the usage of the super globals (_GET, _POST, _SERVER...) core.disable_super_globals: true + + # Datetime class to use datetime.class: \phpbb\datetime + + # Mimetype guesser priorities + mimetype.guesser.priority.lowest: -2 + mimetype.guesser.priority.low: -1 + mimetype.guesser.priority.default: 0 + mimetype.guesser.priority.high: 1 + mimetype.guesser.priority.highest: 2 + + # List of default password driver types + passwords.algorithms: + - passwords.driver.bcrypt_2y + - passwords.driver.bcrypt + - passwords.driver.salted_md5 + - passwords.driver.phpass diff --git a/phpBB/config/passwords.yml b/phpBB/config/password.yml index 3dc217286f..09e935016e 100644 --- a/phpBB/config/passwords.yml +++ b/phpBB/config/password.yml @@ -1,11 +1,29 @@ -parameters: - passwords.algorithms: - - passwords.driver.bcrypt_2y - - passwords.driver.bcrypt - - passwords.driver.salted_md5 - - passwords.driver.phpass - services: +# ----- Password management ----- + passwords.manager: + class: phpbb\passwords\manager + arguments: + - @config + - @passwords.driver_collection + - @passwords.helper + - %passwords.algorithms% + + passwords.helper: + class: phpbb\passwords\helper + + passwords.driver_helper: + class: phpbb\passwords\driver\helper + arguments: + - @config + +# ----- Password's drivers ----- + passwords.driver_collection: + class: phpbb\di\service_collection + arguments: + - @service_container + tags: + - { name: service_collection, tag: passwords.driver } + passwords.driver.bcrypt: class: phpbb\passwords\driver\bcrypt arguments: @@ -103,26 +121,3 @@ services: - @passwords.driver_helper tags: - { name: passwords.driver } - - passwords.driver_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: passwords.driver } - - passwords.driver_helper: - class: phpbb\passwords\driver\helper - arguments: - - @config - - passwords.manager: - class: phpbb\passwords\manager - arguments: - - @config - - @passwords.driver_collection - - @passwords.helper - - %passwords.algorithms% - - passwords.helper: - class: phpbb\passwords\helper diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefield.yml index ce2a84b12b..5ccfef9148 100644 --- a/phpBB/config/profilefields.yml +++ b/phpBB/config/profilefield.yml @@ -19,6 +19,7 @@ services: - @dbal.conn - %tables.profile_fields_options_language% +# ----- Profile fields types ----- profilefields.type_collection: class: phpbb\di\service_collection arguments: diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index d32b665039..5003697564 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -1,34 +1,23 @@ imports: - - { resource: tables.yml } - - { resource: cron_tasks.yml } - - { resource: notifications.yml } - - { resource: migrator.yml } - - { resource: avatars.yml } - - { resource: feed.yml } - - { resource: auth_providers.yml } - - { resource: console.yml } - - { resource: mimetype_guessers.yml } - - { resource: passwords.yml } - - { resource: profilefields.yml } + - { resource: auth.yml } + - { resource: avatar.yml } - { resource: captcha.yml } + - { resource: console.yml } + - { resource: content.yml } + - { resource: cron.yml } + - { resource: db.yml } + - { resource: event.yml } + - { resource: feed.yml } + - { resource: mimetype_guesser.yml } + - { resource: notification.yml } + - { resource: password.yml } + - { resource: profilefield.yml } + - { resource: user.yml } + + - { resource: tables.yml } - { resource: parameters.yml } services: - acl.permissions: - class: phpbb\permissions - arguments: - - @dispatcher - - @user - - auth: - class: phpbb\auth\auth - - avatar.manager: - class: phpbb\avatar\manager - arguments: - - @config - - @avatar.driver_collection - cache: class: phpbb\cache\service arguments: @@ -77,20 +66,6 @@ services: - @dbal.conn - %tables.config_text% - content.visibility: - class: phpbb\content_visibility - arguments: - - @auth - - @config - - @dbal.conn - - @user - - %core.root_path% - - %core.php_ext% - - %tables.forums% - - %tables.posts% - - %tables.topics% - - %tables.users% - controller.helper: class: phpbb\controller\helper arguments: @@ -117,47 +92,6 @@ services: calls: - [find, [%core.root_path%]] - cron.task_collection: - class: phpbb\di\service_collection - arguments: - - @service_container - tags: - - { name: service_collection, tag: cron.task } - - cron.manager: - class: phpbb\cron\manager - arguments: - - @cron.task_collection - - %core.root_path% - - %core.php_ext% - - cron.lock_db: - class: phpbb\lock\db - arguments: - - cron_lock - - @config - - @dbal.conn - - dispatcher: - class: phpbb\event\dispatcher - arguments: - - @service_container - - dbal.conn: - class: phpbb\db\driver\factory - arguments: - - @service_container - - dbal.conn.driver: - class: %dbal.driver.class% - calls: - - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]] - - dbal.tools: - class: phpbb\db\tools - arguments: - - @dbal.conn - ext.manager: class: phpbb\extension\manager arguments: @@ -174,54 +108,12 @@ services: filesystem: class: phpbb\filesystem - groupposition.legend: - class: phpbb\groupposition\legend - arguments: - - @dbal.conn - - @user - - groupposition.teampage: - class: phpbb\groupposition\teampage - arguments: - - @dbal.conn - - @user - - @cache.driver - http_kernel: class: Symfony\Component\HttpKernel\HttpKernel arguments: - @dispatcher - @controller.resolver - hook_finder: - class: phpbb\hook\finder - arguments: - - %core.root_path% - - %core.php_ext% - - @cache.driver - - kernel_request_subscriber: - class: phpbb\event\kernel_request_subscriber - arguments: - - @ext.manager - - %core.root_path% - - %core.php_ext% - tags: - - { name: kernel.event_subscriber } - - kernel_exception_subscriber: - class: phpbb\event\kernel_exception_subscriber - arguments: - - @template - - @user - tags: - - { name: kernel.event_subscriber } - - kernel_terminate_subscriber: - class: phpbb\event\kernel_terminate_subscriber - tags: - - { name: kernel.event_subscriber } - log: class: phpbb\log\log arguments: @@ -234,62 +126,6 @@ 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 - - @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: - - @notification.type_collection - - @notification.method_collection - - @service_container - - @user_loader - - @config - - @dbal.conn - - @cache - - @user - - %core.root_path% - - %core.php_ext% - - %tables.notification_types% - - %tables.notifications% - - %tables.user_notifications% - - pagination: - class: phpbb\pagination - arguments: - - @template - - @user - - @controller.helper - - @dispatcher - path_helper: class: phpbb\path_helper arguments: @@ -336,19 +172,6 @@ services: template_context: class: phpbb\template\context - user: - class: phpbb\user - arguments: - - %datetime.class% - - user_loader: - class: phpbb\user_loader - arguments: - - @dbal.conn - - %core.root_path% - - %core.php_ext% - - %tables.users% - version_helper: class: phpbb\version_helper scope: prototype @@ -356,8 +179,3 @@ services: - @cache - @config - @user - - viewonline_helper: - class: phpbb\viewonline_helper - arguments: - - @filesystem diff --git a/phpBB/config/tables.yml b/phpBB/config/tables.yml index e4f7bda89b..2fe2a33be8 100644 --- a/phpBB/config/tables.yml +++ b/phpBB/config/tables.yml @@ -1,6 +1,9 @@ parameters: tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts + tables.captcha_qa_questions: %core.table_prefix%captcha_questions + tables.captcha_qa_answers: %core.table_prefix%captcha_answers + tables.captcha_qa_confirm: %core.table_prefix%qa_confirm tables.config: %core.table_prefix%config tables.config_text: %core.table_prefix%config_text tables.ext: %core.table_prefix%ext diff --git a/phpBB/config/user.yml b/phpBB/config/user.yml new file mode 100644 index 0000000000..1ca853ea45 --- /dev/null +++ b/phpBB/config/user.yml @@ -0,0 +1,19 @@ +services: + acl.permissions: + class: phpbb\permissions + arguments: + - @dispatcher + - @user + + user: + class: phpbb\user + arguments: + - %datetime.class% + + user_loader: + class: phpbb\user_loader + arguments: + - @dbal.conn + - %core.root_path% + - %core.php_ext% + - %tables.users% diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index b1e981795f..7ef86ad7fc 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -57,4 +57,4 @@ $fp = fopen($schema_path . 'schema.json', 'wb'); fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT)); fclose($fp); -echo 'done'; +echo 'Successfully created schema file'; diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7b46129c6c..3658ae5e3b 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -46,6 +46,7 @@ <ol> <li><a href="#changelog">Changelog</a> <ol style="list-style-type: lower-roman;"> + <li><a href="#v310RC4">Changes since 3.1.0-RC4</a></li> <li><a href="#v310RC3">Changes since 3.1.0-RC3</a></li> <li><a href="#v310RC2">Changes since 3.1.0-RC2</a></li> <li><a href="#v310RC1">Changes since 3.1.0-RC1</a></li> @@ -97,7 +98,74 @@ <div class="content"> - <a name="v310RC3"></a><h3>1.i. Changes since 3.1.0-RC3</h3> + <a name="v310RC4"></a><h3>1.i. Changes since 3.1.0-RC4</h3> + + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10729">PHPBB3-10729</a>] - Post editor information is not updated when user being deleted with posts</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11224">PHPBB3-11224</a>] - SQL cache destroy does not destroy queries to tables joined</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12368">PHPBB3-12368</a>] - Updating database fails in upgrade from 3.0 when trying twice without purging the cache</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12489">PHPBB3-12489</a>] - Description for Contact link in custom profile fields</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12657">PHPBB3-12657</a>] - Add a test file for cli command cache:purge</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12858">PHPBB3-12858</a>] - 'GMT' is hard coded and not pulled from language files</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12889">PHPBB3-12889</a>] - multi-select element in unban email-adresses not limited in width</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13011">PHPBB3-13011</a>] - Javascript bug when selecting first one or two characters of a post</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13027">PHPBB3-13027</a>] - PM folder full percentage could be a bit more accurate</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13033">PHPBB3-13033</a>] - Duplicate entry SQL error thrown when running notifications_use_full_name migration</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13045">PHPBB3-13045</a>] - Pragma header not specified as response header by RFC2616</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13048">PHPBB3-13048</a>] - AJAX requests are being stored to session_page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13055">PHPBB3-13055</a>] - String profile fields validation limits content to latin chars only</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13070">PHPBB3-13070</a>] - Wrong hook name is registered for array(template, display)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13071">PHPBB3-13071</a>] - total_match_count is used before core.search_get_posts_data event</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13080">PHPBB3-13080</a>] - Responsive design - language variable to long</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13082">PHPBB3-13082</a>] - Search box does not displayed proper in admin cp when no logs listed</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13085">PHPBB3-13085</a>] - Fix typo in oauth.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13086">PHPBB3-13086</a>] - Update ACP_MASS_EMAIL_EXPLAIN language key</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13087">PHPBB3-13087</a>] - WLM link is empty in viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13097">PHPBB3-13097</a>] - Fix missing unit type in forms.css</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13104">PHPBB3-13104</a>] - Responsive tabs display bug in IE11</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13105">PHPBB3-13105</a>] - Future dates are displayed as "Tomorrow" with relative date format</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13111">PHPBB3-13111</a>] - Debug output when editing DropDown Custom Fields with multiple languages</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13113">PHPBB3-13113</a>] - The routes are not always generated for the good app.php file</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13116">PHPBB3-13116</a>] - Topic and post approval notifications got interchanged</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13117">PHPBB3-13117</a>] - Installation fails on MySQL 5.7 because auto_increment columns can be NULL</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13118">PHPBB3-13118</a>] - datetime.class parameter not used in user class</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13120">PHPBB3-13120</a>] - phpbb_load_extensions_autoloaders() doesn't work very well with the extensions behind a symlink</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13121">PHPBB3-13121</a>] - Customise Purge Cache always returns user to Styles page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13125">PHPBB3-13125</a>] - Uploaded avatars are not displayed in IE <= 7</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12408">PHPBB3-12408</a>] - Add quick setting for "default guest style" to ACP board settings</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12985">PHPBB3-12985</a>] - Add event to modify the redirect after a successful login</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12993">PHPBB3-12993</a>] - Add event to get_user_rank() function</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13025">PHPBB3-13025</a>] - Add template events for buttons on viewforum and viewtopic</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13059">PHPBB3-13059</a>] - Add core event to generate_page_link() to allow modifying pagination URLs</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13072">PHPBB3-13072</a>] - Add total_match_count to core.search_get_topic_data event</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13077">PHPBB3-13077</a>] - Change module order in Customise tab for better usability</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13094">PHPBB3-13094</a>] - Remove the search box if there are no new posts to search for</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13107">PHPBB3-13107</a>] - Add template events to forum row in forumlist_body.html</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13108">PHPBB3-13108</a>] - Add core event to the parse_attachments() function to allow modifying files info</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13110">PHPBB3-13110</a>] - Add core event to the page_footer() function to allow handling overall output</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13122">PHPBB3-13122</a>] - phpbb_wrapper_gmgetdate_test intermittently fails</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13134">PHPBB3-13134</a>] - Add core event to the root of the function display_forums()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13137">PHPBB3-13137</a>] - Remove schema.json from repository</li> + </ul> + <h4>Sub-task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12929">PHPBB3-12929</a>] - Add an event when getting the information for PM composal</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12930">PHPBB3-12930</a>] - Add an event to the query getting the post for quoting in a PM</li> + </ul> + <h4>Task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10794">PHPBB3-10794</a>] - Make schema available at runtime</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12987">PHPBB3-12987</a>] - Cleanup the services.yml file</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13106">PHPBB3-13106</a>] - Remove the \phpbb\di\pass\kernel_pass class</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13119">PHPBB3-13119</a>] - Add events to mcp and acp ban modules</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13123">PHPBB3-13123</a>] - Add events to allow post blocking and post pre/past processing</li> + </ul> + + <a name="v310RC3"></a><h3>1.ii. Changes since 3.1.0-RC3</h3> <h4>Bug</h4> <ul> @@ -187,7 +255,7 @@ </ul> - <a name="v310RC2"></a><h3>1.ii. Changes since 3.1.0-RC2</h3> + <a name="v310RC2"></a><h3>1.iii. Changes since 3.1.0-RC2</h3> <h4>Bug</h4> <ul> @@ -311,7 +379,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12948">PHPBB3-12948</a>] - Remove Travis CI "broken opcache on PHP 5.5.7 and 5.5.8" workaround.</li> </ul> - <a name="v310RC1"></a><h3>1.iii. Changes since 3.1.0-RC1</h3> + <a name="v310RC1"></a><h3>1.iv. Changes since 3.1.0-RC1</h3> <h4>Bug</h4> <ul> @@ -382,7 +450,7 @@ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12829">PHPBB3-12829</a>] - Remove check for pgsql 8.3/8.2</li> </ul> - <a name="v310b4"></a><h3>1.iv. Changes since 3.1.0-b4</h3> + <a name="v310b4"></a><h3>1.v. Changes since 3.1.0-b4</h3> <h4>Bug</h4> <ul> @@ -502,7 +570,7 @@ </ul> - <a name="v310b3"></a><h3>1.v. Changes since 3.1.0-b3</h3> + <a name="v310b3"></a><h3>1.vi. Changes since 3.1.0-b3</h3> <h4>Bug</h4> <ul> @@ -609,7 +677,7 @@ </ul> - <a name="v310b2"></a><h3>1.vi. Changes since 3.1.0-b2</h3> + <a name="v310b2"></a><h3>1.vii. Changes since 3.1.0-b2</h3> <h4>Bug</h4> <ul> @@ -774,7 +842,7 @@ </ul> - <a name="v310b1"></a><h3>1.vii. Changes since 3.1.0-b1</h3> + <a name="v310b1"></a><h3>1.viii. Changes since 3.1.0-b1</h3> <h4>Bug</h4> <ul> @@ -842,7 +910,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.viii. Changes since 3.1.0-a3</h3> + <a name="v310a3"></a><h3>1.ix. Changes since 3.1.0-a3</h3> <h4>Bug</h4> <ul> @@ -989,7 +1057,7 @@ </ul> - <a name="v310a2"></a><h3>1.ix. Changes since 3.1.0-a2</h3> + <a name="v310a2"></a><h3>1.x. Changes since 3.1.0-a2</h3> <h4>Bug</h4> <ul> @@ -1097,7 +1165,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.x. Changes since 3.1.0-a1</h3> + <a name="v310a1"></a><h3>1.xi. Changes since 3.1.0-a1</h3> <h4>Bug</h4> <ul> @@ -1173,7 +1241,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.xi. Changes since 3.0.x</h3> + <a name="v30x"></a><h3>1.xii. Changes since 3.0.x</h3> <h4>Bug</h4> <ul> @@ -1854,7 +1922,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.xii. Changes since 3.0.11</h3> + <a name="v3011"></a><h3>1.xiii. Changes since 3.0.11</h3> <h4>Bug</h4> <ul> @@ -2009,7 +2077,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.xiii. Changes since 3.0.10</h3> + <a name="v3010"></a><h3>1.xiv. Changes since 3.0.10</h3> <h4>Bug</h4> <ul> @@ -2134,7 +2202,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.xiv. Changes since 3.0.9</h3> + <a name="v309"></a><h3>1.xv. Changes since 3.0.9</h3> <h4>Bug</h4> <ul> @@ -2270,7 +2338,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.xv. Changes since 3.0.8</h3> + <a name="v308"></a><h3>1.xvi. Changes since 3.0.8</h3> <h4> Bug </h4> @@ -2638,7 +2706,7 @@ </ul> - <a name="v307-PL1"></a><h3>1.xvi. Changes since 3.0.7-PL1</h3> + <a name="v307-PL1"></a><h3>1.xvii. Changes since 3.0.7-PL1</h3> <h4> Security </h4> <ul> @@ -3096,13 +3164,13 @@ </ul> - <a name="v307"></a><h3>1.xvii. Changes since 3.0.7</h3> + <a name="v307"></a><h3>1.xviii. 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.xviii. Changes since 3.0.6</h3> + <a name="v306"></a><h3>1.xix. 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> @@ -3206,7 +3274,7 @@ </ul> - <a name="v305"></a><h3>1.xix. Changes since 3.0.5</h3> + <a name="v305"></a><h3>1.xx. Changes since 3.0.5</h3> <ul> <li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li> @@ -3428,7 +3496,7 @@ <li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li> </ul> - <a name="v304"></a><h3>1.xx. Changes since 3.0.4</h3> + <a name="v304"></a><h3>1.xxi. 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> @@ -3517,7 +3585,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.xxi. Changes since 3.0.3</h3> + <a name="v303"></a><h3>1.xxii. Changes since 3.0.3</h3> <ul> <li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li> @@ -3549,7 +3617,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.xxii. Changes since 3.0.2</h3> + <a name="v302"></a><h3>1.xxiii. 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> @@ -3648,7 +3716,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.xxiii. Changes since 3.0.1</h3> + <a name="v301"></a><h3>1.xxiv. Changes since 3.0.1</h3> <ul> <li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li> @@ -3696,7 +3764,7 @@ <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li> </ul> - <a name="v300"></a><h3>1.xxiv. Changes since 3.0.0</h3> + <a name="v300"></a><h3>1.xxv. Changes since 3.0.0</h3> <ul> <li>[Change] Validate birthdays (Bug #15004)</li> @@ -3767,7 +3835,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.xxv. Changes since 3.0.RC8</h3> + <a name="v30rc8"></a><h3>1.xxvi. Changes since 3.0.RC8</h3> <ul> <li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li> @@ -3776,7 +3844,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.xxvi. Changes since 3.0.RC7</h3> + <a name="v30rc7"></a><h3>1.xxvii. Changes since 3.0.RC7</h3> <ul> <li>[Fix] Fixed MSSQL related bug in the update system</li> @@ -3811,7 +3879,7 @@ <li>[Fix] No duplication of active topics (Bug #15474)</li> </ul> - <a name="v30rc6"></a><h3>1.xxvii. Changes since 3.0.RC6</h3> + <a name="v30rc6"></a><h3>1.xxviii. Changes since 3.0.RC6</h3> <ul> <li>[Fix] Submitting language changes using acp_language (Bug #14736)</li> @@ -3821,7 +3889,7 @@ <li>[Fix] Able to request new password (Bug #14743)</li> </ul> - <a name="v30rc5"></a><h3>1.xxviii. Changes since 3.0.RC5</h3> + <a name="v30rc5"></a><h3>1.xxix. 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> @@ -3884,7 +3952,7 @@ <li>[Sec] New password hashing mechanism for storing passwords (#i42)</li> </ul> - <a name="v30rc4"></a><h3>1.xxix. Changes since 3.0.RC4</h3> + <a name="v30rc4"></a><h3>1.xxx. Changes since 3.0.RC4</h3> <ul> <li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li> @@ -3935,7 +4003,7 @@ <li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li> </ul> - <a name="v30rc3"></a><h3>1.xxx. Changes since 3.0.RC3</h3> + <a name="v30rc3"></a><h3>1.xxxi. Changes since 3.0.RC3</h3> <ul> <li>[Fix] Fixing some subsilver2 and prosilver style issues</li> @@ -4044,7 +4112,7 @@ </ul> - <a name="v30rc2"></a><h3>1.xxxi. Changes since 3.0.RC2</h3> + <a name="v30rc2"></a><h3>1.xxxii. Changes since 3.0.RC2</h3> <ul> <li>[Fix] Re-allow searching within the memberlist</li> @@ -4090,7 +4158,7 @@ </ul> - <a name="v30rc1"></a><h3>1.xxxii. Changes since 3.0.RC1</h3> + <a name="v30rc1"></a><h3>1.xxxiii. Changes since 3.0.RC1</h3> <ul> <li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index dae3bce977..c51bc72160 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1155,6 +1155,70 @@ ucp_friend_list_after * Since: 3.1.0-a4 * Purpose: Add optional elements after list of friends in UCP +viewforum_buttons_bottom_before +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons before New Topic button on the bottom of the topic's list + +viewforum_buttons_bottom_after +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons after New Topic button on the bottom of the topic's list + +viewforum_buttons_top_before +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons before New Topic button on the top of the topic's list + +viewforum_buttons_top_after +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons after New Topic button on the top of the topic's list + +viewtopic_buttons_bottom_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons before Post Reply button on the bottom of the posts's list + +viewtopic_buttons_bottom_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons after Post Reply button on the bottom of the posts's list + +viewtopic_buttons_top_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons before Post Reply button on the top of the posts's list + +viewtopic_buttons_top_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.0-RC5 +* Purpose: Add buttons after Post Reply button on the top of the posts's list + viewforum_forum_name_append === * Locations: diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 9c9e32b57c..f4f7512f0c 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -65,13 +65,16 @@ class acp_board 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false), 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true), 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'timezone', 'type' => 'custom', 'method' => 'timezone_select', 'explain' => true), - 'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false), + + 'legend2' => 'BOARD_STYLE', + 'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true), + 'guest_style' => array('lang' => 'GUEST_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array($this->guest_style_get(), false), 'explain' => true), 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'legend2' => 'WARNINGS', + 'legend3' => 'WARNINGS', 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), - 'legend3' => 'ACP_SUBMIT_CHANGES', + 'legend4' => 'ACP_SUBMIT_CHANGES', ) ); break; @@ -509,6 +512,14 @@ class acp_board continue; } + if ($config_name == 'guest_style') + { + if (isset($cfg_array[$config_name])) { + $this->guest_style_set($cfg_array[$config_name]); + } + continue; + } + $this->new_config[$config_name] = $config_value = $cfg_array[$config_name]; if ($config_name == 'email_function_name') @@ -912,6 +923,39 @@ class acp_board } /** + * Get guest style + */ + public function guest_style_get() + { + global $db; + + $sql = 'SELECT user_style + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . ANONYMOUS; + $result = $db->sql_query($sql); + + $style = (int) $db->sql_fetchfield('user_style'); + $db->sql_freeresult($result); + + return $style; + } + + /** + * Set guest style + * + * @param int $style_id The style ID + */ + public function guest_style_set($style_id) + { + global $db; + + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_style = ' . (int) $style_id . ' + WHERE user_id = ' . ANONYMOUS; + $db->sql_query($sql); + } + + /** * Select default dateformat */ function dateformat_select($value, $key) diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index b72e4ab6d4..6693b822fe 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-RC5-dev'); +define('PHPBB_VERSION', '3.1.0-RC6-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 77447c62f6..745eb20c77 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -649,6 +649,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED_FORUM'), )); + /** + * Event to perform additional actions after the forum list has been generated + * + * @event core.display_forums_after + * @var array active_forum_ary Array with forum data to display active topics + * @var bool display_moderators Flag indicating if we display forum moderators + * @var array forum_moderators Array with forum moderators list + * @var array forum_rows Data array of all forums we display + * @var bool return_moderators Flag indicating if moderators list should be returned + * @var array root_data Array with the root forum data + * @since 3.1.0-RC5 + */ + $vars = array( + 'active_forum_ary', + 'display_moderators', + 'forum_moderators', + 'forum_rows', + 'return_moderators', + 'root_data', + ); + extract($phpbb_dispatcher->trigger_event('core.display_forums_after', compact($vars))); + if ($return_moderators) { return array($active_forum_ary, $forum_moderators); diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 01c2041f42..f3b59186a6 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -27,8 +27,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) { global $template, $db, $auth, $user, $cache; global $phpbb_root_path, $phpEx, $config; - global $request; - global $phpbb_container; + global $request, $phpbb_dispatcher, $phpbb_container; // Damn php and globals - i know, this is horrible // Needed for handle_message_list_actions() @@ -233,6 +232,42 @@ function compose_pm($id, $mode, $action, $user_folders = array()) if ($sql) { + /** + * Alter sql query to get message for user to write the PM + * + * @event core.ucp_pm_compose_compose_pm_basic_info_query_before + * @var string sql String with the query to be executed + * @var array forum_list List of forums that contain the posts + * @var int visibility_const Integer with one of the possible ITEM_* constant values + * @var int msg_id topic_id in the page request + * @var int to_user_id The id of whom the message is to + * @var int to_group_id The id of the group whom the message is to + * @var bool submit Whether the user is sending the PM or not + * @var bool preview Whether the user is previewing the PM or not + * @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies + * @var bool delete Whether the user is deleting the PM + * @var int reply_to_all Value of reply_to_all request variable. + * @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string) + * @var string sort_order_sql String with the ORDER BY SQL code used in this query + * @since 3.1.0-RC5 + */ + $vars = array( + 'sql', + 'forum_list', + 'visibility_const', + 'msg_id', + 'to_user_id', + 'to_group_id', + 'submit', + 'preview', + 'action', + 'delete', + 'reply_to_all', + 'limit_time_sql', + 'sort_order_sql', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_compose_pm_basic_info_query_before', compact($vars))); + $result = $db->sql_query($sql); $post = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -267,6 +302,40 @@ function compose_pm($id, $mode, $action, $user_folders = array()) trigger_error('NOT_AUTHORISED'); } + /** + * Get the result of querying for the post to be quoted in the pm message + * + * @event core.ucp_pm_compose_quotepost_query_after + * @var string sql The original SQL used in the query + * @var array post Associative array with the data of the quoted post + * @var array msg_id The post_id that was searched to get the message for quoting + * @var int visibility_const Visibility of the quoted post (one of the possible ITEM_* constant values) + * @var int topic_id Topic ID of the quoted post + * @var int to_user_id Users the message is sent to + * @var int to_group_id Groups the message is sent to + * @var bool submit Whether the user is sending the PM or not + * @var bool preview Whether the user is previewing the PM or not + * @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies + * @var bool delete If deleting message + * @var int reply_to_all Value of reply_to_all request variable. + * @since 3.1.0-RC5 + */ + $vars = array( + 'sql', + 'post', + 'msg_id', + 'visibility_const', + 'topic_id', + 'to_user_id', + 'to_group_id', + 'submit', + 'preview', + 'action', + 'delete', + 'reply_to_all', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_quotepost_query_after', compact($vars))); + // Passworded forum? if ($post['forum_id']) { diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 4ec408a670..cab3fd7f1f 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.0-RC4', + 'phpbb_version' => '3.1.0-RC5', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 20b211dde9..103262b516 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1175,8 +1175,31 @@ class install_install extends module } // Ok we have the db info go ahead and work on building the table - $db_table_schema = @file_get_contents('schemas/schema.json'); - $db_table_schema = json_decode($db_table_schema, true); + if (file_exists('schemas/schema.json')) + { + $db_table_schema = @file_get_contents('schemas/schema.json'); + $db_table_schema = json_decode($db_table_schema, true); + } + else + { + global $phpbb_root_path, $phpEx, $table_prefix; + $table_prefix = 'phpbb_'; + + if (!defined('CONFIG_TABLE')) + { + // We need to include the constants file for the table constants + // when we generate the schema from the migration files. + include($phpbb_root_path . 'includes/constants.' . $phpEx); + } + + $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx); + $classes = $finder->core_path('phpbb/db/migration/data/') + ->get_classes(); + + $sqlite_db = new \phpbb\db\driver\sqlite(); + $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $sqlite_db, new \phpbb\db\tools($sqlite_db, true), $phpbb_root_path, $phpEx, $table_prefix); + $db_table_schema = $schema_generator->get_schema(); + } if (!defined('CONFIG_TABLE')) { @@ -1654,6 +1677,19 @@ class install_install extends module $db->sql_freeresult($result); $_module->move_module_by($row, 'move_up', 5); + + // Move extension management module 1 up... + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_langname = 'ACP_EXTENSION_MANAGEMENT' + AND module_class = 'acp' + AND module_mode = '' + AND module_basename = ''"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $_module->move_module_by($row, 'move_up', 1); } if ($module_class == 'mcp') diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json deleted file mode 100644 index b71b1fecbe..0000000000 --- a/phpBB/install/schemas/schema.json +++ /dev/null @@ -1,3356 +0,0 @@ -{ - "phpbb_acl_groups": { - "COLUMNS": { - "group_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "auth_option_id": [ - "UINT", - 0 - ], - "auth_role_id": [ - "UINT", - 0 - ], - "auth_setting": [ - "TINT:2", - 0 - ] - }, - "KEYS": { - "group_id": [ - "INDEX", - "group_id" - ], - "auth_opt_id": [ - "INDEX", - "auth_option_id" - ], - "auth_role_id": [ - "INDEX", - "auth_role_id" - ] - } - }, - "phpbb_acl_options": { - "COLUMNS": { - "auth_option_id": [ - "UINT", - null, - "auto_increment" - ], - "auth_option": [ - "VCHAR:50", - "" - ], - "is_global": [ - "BOOL", - 0 - ], - "is_local": [ - "BOOL", - 0 - ], - "founder_only": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "auth_option_id", - "KEYS": { - "auth_option": [ - "UNIQUE", - [ - "auth_option" - ] - ] - } - }, - "phpbb_acl_roles": { - "COLUMNS": { - "role_id": [ - "UINT", - null, - "auto_increment" - ], - "role_name": [ - "VCHAR_UNI", - "" - ], - "role_description": [ - "TEXT_UNI", - "" - ], - "role_type": [ - "VCHAR:10", - "" - ], - "role_order": [ - "USINT", - 0 - ] - }, - "PRIMARY_KEY": "role_id", - "KEYS": { - "role_type": [ - "INDEX", - "role_type" - ], - "role_order": [ - "INDEX", - "role_order" - ] - } - }, - "phpbb_acl_roles_data": { - "COLUMNS": { - "role_id": [ - "UINT", - 0 - ], - "auth_option_id": [ - "UINT", - 0 - ], - "auth_setting": [ - "TINT:2", - 0 - ] - }, - "PRIMARY_KEY": [ - "role_id", - "auth_option_id" - ], - "KEYS": { - "ath_op_id": [ - "INDEX", - "auth_option_id" - ] - } - }, - "phpbb_acl_users": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "auth_option_id": [ - "UINT", - 0 - ], - "auth_role_id": [ - "UINT", - 0 - ], - "auth_setting": [ - "TINT:2", - 0 - ] - }, - "KEYS": { - "user_id": [ - "INDEX", - "user_id" - ], - "auth_option_id": [ - "INDEX", - "auth_option_id" - ], - "auth_role_id": [ - "INDEX", - "auth_role_id" - ] - } - }, - "phpbb_attachments": { - "COLUMNS": { - "attach_id": [ - "UINT", - null, - "auto_increment" - ], - "post_msg_id": [ - "UINT", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "in_message": [ - "BOOL", - 0 - ], - "poster_id": [ - "UINT", - 0 - ], - "is_orphan": [ - "BOOL", - 1 - ], - "physical_filename": [ - "VCHAR", - "" - ], - "real_filename": [ - "VCHAR", - "" - ], - "download_count": [ - "UINT", - 0 - ], - "attach_comment": [ - "TEXT_UNI", - "" - ], - "extension": [ - "VCHAR:100", - "" - ], - "mimetype": [ - "VCHAR:100", - "" - ], - "filesize": [ - "UINT:20", - 0 - ], - "filetime": [ - "TIMESTAMP", - 0 - ], - "thumbnail": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "attach_id", - "KEYS": { - "filetime": [ - "INDEX", - "filetime" - ], - "post_msg_id": [ - "INDEX", - "post_msg_id" - ], - "topic_id": [ - "INDEX", - "topic_id" - ], - "poster_id": [ - "INDEX", - "poster_id" - ], - "is_orphan": [ - "INDEX", - "is_orphan" - ] - } - }, - "phpbb_banlist": { - "COLUMNS": { - "ban_id": [ - "UINT", - null, - "auto_increment" - ], - "ban_userid": [ - "UINT", - 0 - ], - "ban_ip": [ - "VCHAR:40", - "" - ], - "ban_email": [ - "VCHAR_UNI:100", - "" - ], - "ban_start": [ - "TIMESTAMP", - 0 - ], - "ban_end": [ - "TIMESTAMP", - 0 - ], - "ban_exclude": [ - "BOOL", - 0 - ], - "ban_reason": [ - "VCHAR_UNI", - "" - ], - "ban_give_reason": [ - "VCHAR_UNI", - "" - ] - }, - "PRIMARY_KEY": "ban_id", - "KEYS": { - "ban_end": [ - "INDEX", - "ban_end" - ], - "ban_user": [ - "INDEX", - [ - "ban_userid", - "ban_exclude" - ] - ], - "ban_email": [ - "INDEX", - [ - "ban_email", - "ban_exclude" - ] - ], - "ban_ip": [ - "INDEX", - [ - "ban_ip", - "ban_exclude" - ] - ] - } - }, - "phpbb_bbcodes": { - "COLUMNS": { - "bbcode_id": [ - "USINT", - 0 - ], - "bbcode_tag": [ - "VCHAR:16", - "" - ], - "bbcode_helpline": [ - "VCHAR_UNI", - "" - ], - "display_on_posting": [ - "BOOL", - 0 - ], - "bbcode_match": [ - "TEXT_UNI", - "" - ], - "bbcode_tpl": [ - "MTEXT_UNI", - "" - ], - "first_pass_match": [ - "MTEXT_UNI", - "" - ], - "first_pass_replace": [ - "MTEXT_UNI", - "" - ], - "second_pass_match": [ - "MTEXT_UNI", - "" - ], - "second_pass_replace": [ - "MTEXT_UNI", - "" - ] - }, - "PRIMARY_KEY": "bbcode_id", - "KEYS": { - "display_on_post": [ - "INDEX", - "display_on_posting" - ] - } - }, - "phpbb_bookmarks": { - "COLUMNS": { - "topic_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": [ - "topic_id", - "user_id" - ] - }, - "phpbb_bots": { - "COLUMNS": { - "bot_id": [ - "UINT", - null, - "auto_increment" - ], - "bot_active": [ - "BOOL", - 1 - ], - "bot_name": [ - "STEXT_UNI", - "" - ], - "user_id": [ - "UINT", - 0 - ], - "bot_agent": [ - "VCHAR", - "" - ], - "bot_ip": [ - "VCHAR", - "" - ] - }, - "PRIMARY_KEY": "bot_id", - "KEYS": { - "bot_active": [ - "INDEX", - "bot_active" - ] - } - }, - "phpbb_config": { - "COLUMNS": { - "config_name": [ - "VCHAR", - "" - ], - "config_value": [ - "VCHAR_UNI", - "" - ], - "is_dynamic": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "config_name", - "KEYS": { - "is_dynamic": [ - "INDEX", - "is_dynamic" - ] - } - }, - "phpbb_config_text": { - "COLUMNS": { - "config_name": [ - "VCHAR", - "" - ], - "config_value": [ - "MTEXT", - "" - ] - }, - "PRIMARY_KEY": "config_name" - }, - "phpbb_confirm": { - "COLUMNS": { - "confirm_id": [ - "CHAR:32", - "" - ], - "session_id": [ - "CHAR:32", - "" - ], - "confirm_type": [ - "TINT:3", - 0 - ], - "code": [ - "VCHAR:8", - "" - ], - "seed": [ - "UINT:10", - 0 - ], - "attempts": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": [ - "session_id", - "confirm_id" - ], - "KEYS": { - "confirm_type": [ - "INDEX", - "confirm_type" - ] - } - }, - "phpbb_disallow": { - "COLUMNS": { - "disallow_id": [ - "UINT", - null, - "auto_increment" - ], - "disallow_username": [ - "VCHAR_UNI:255", - "" - ] - }, - "PRIMARY_KEY": "disallow_id" - }, - "phpbb_drafts": { - "COLUMNS": { - "draft_id": [ - "UINT", - null, - "auto_increment" - ], - "user_id": [ - "UINT", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "save_time": [ - "TIMESTAMP", - 0 - ], - "draft_subject": [ - "STEXT_UNI", - "" - ], - "draft_message": [ - "MTEXT_UNI", - "" - ] - }, - "PRIMARY_KEY": "draft_id", - "KEYS": { - "save_time": [ - "INDEX", - "save_time" - ] - } - }, - "phpbb_ext": { - "COLUMNS": { - "ext_name": [ - "VCHAR", - "" - ], - "ext_active": [ - "BOOL", - 0 - ], - "ext_state": [ - "TEXT", - "" - ] - }, - "KEYS": { - "ext_name": [ - "UNIQUE", - "ext_name" - ] - } - }, - "phpbb_extension_groups": { - "COLUMNS": { - "group_id": [ - "UINT", - null, - "auto_increment" - ], - "group_name": [ - "VCHAR_UNI", - "" - ], - "cat_id": [ - "TINT:2", - 0 - ], - "allow_group": [ - "BOOL", - 0 - ], - "download_mode": [ - "BOOL", - 1 - ], - "upload_icon": [ - "VCHAR", - "" - ], - "max_filesize": [ - "UINT:20", - 0 - ], - "allowed_forums": [ - "TEXT", - "" - ], - "allow_in_pm": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "group_id" - }, - "phpbb_extensions": { - "COLUMNS": { - "extension_id": [ - "UINT", - null, - "auto_increment" - ], - "group_id": [ - "UINT", - 0 - ], - "extension": [ - "VCHAR:100", - "" - ] - }, - "PRIMARY_KEY": "extension_id" - }, - "phpbb_forums": { - "COLUMNS": { - "forum_id": [ - "UINT", - null, - "auto_increment" - ], - "parent_id": [ - "UINT", - 0 - ], - "left_id": [ - "UINT", - 0 - ], - "right_id": [ - "UINT", - 0 - ], - "forum_parents": [ - "MTEXT", - "" - ], - "forum_name": [ - "STEXT_UNI", - "" - ], - "forum_desc": [ - "TEXT_UNI", - "" - ], - "forum_desc_bitfield": [ - "VCHAR:255", - "" - ], - "forum_desc_options": [ - "UINT:11", - 7 - ], - "forum_desc_uid": [ - "VCHAR:8", - "" - ], - "forum_link": [ - "VCHAR_UNI", - "" - ], - "forum_password": [ - "VCHAR:255", - "" - ], - "forum_style": [ - "UINT", - 0 - ], - "forum_image": [ - "VCHAR", - "" - ], - "forum_rules": [ - "TEXT_UNI", - "" - ], - "forum_rules_link": [ - "VCHAR_UNI", - "" - ], - "forum_rules_bitfield": [ - "VCHAR:255", - "" - ], - "forum_rules_options": [ - "UINT:11", - 7 - ], - "forum_rules_uid": [ - "VCHAR:8", - "" - ], - "forum_topics_per_page": [ - "TINT:4", - 0 - ], - "forum_type": [ - "TINT:4", - 0 - ], - "forum_status": [ - "TINT:4", - 0 - ], - "forum_last_post_id": [ - "UINT", - 0 - ], - "forum_last_poster_id": [ - "UINT", - 0 - ], - "forum_last_post_subject": [ - "STEXT_UNI", - "" - ], - "forum_last_post_time": [ - "TIMESTAMP", - 0 - ], - "forum_last_poster_name": [ - "VCHAR_UNI", - "" - ], - "forum_last_poster_colour": [ - "VCHAR:6", - "" - ], - "forum_flags": [ - "TINT:4", - 32 - ], - "display_on_index": [ - "BOOL", - 1 - ], - "enable_indexing": [ - "BOOL", - 1 - ], - "enable_icons": [ - "BOOL", - 1 - ], - "enable_prune": [ - "BOOL", - 0 - ], - "prune_next": [ - "TIMESTAMP", - 0 - ], - "prune_days": [ - "UINT", - 0 - ], - "prune_viewed": [ - "UINT", - 0 - ], - "prune_freq": [ - "UINT", - 0 - ], - "display_subforum_list": [ - "BOOL", - 1 - ], - "forum_options": [ - "UINT:20", - 0 - ], - "enable_shadow_prune": [ - "BOOL", - 0 - ], - "prune_shadow_days": [ - "UINT", - 7 - ], - "prune_shadow_freq": [ - "UINT", - 1 - ], - "prune_shadow_next": [ - "INT:11", - 0 - ], - "forum_posts_approved": [ - "UINT", - 0 - ], - "forum_posts_unapproved": [ - "UINT", - 0 - ], - "forum_posts_softdeleted": [ - "UINT", - 0 - ], - "forum_topics_approved": [ - "UINT", - 0 - ], - "forum_topics_unapproved": [ - "UINT", - 0 - ], - "forum_topics_softdeleted": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "forum_id", - "KEYS": { - "left_right_id": [ - "INDEX", - [ - "left_id", - "right_id" - ] - ], - "forum_lastpost_id": [ - "INDEX", - "forum_last_post_id" - ] - } - }, - "phpbb_forums_access": { - "COLUMNS": { - "forum_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "session_id": [ - "CHAR:32", - "" - ] - }, - "PRIMARY_KEY": [ - "forum_id", - "user_id", - "session_id" - ] - }, - "phpbb_forums_track": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "mark_time": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": [ - "user_id", - "forum_id" - ] - }, - "phpbb_forums_watch": { - "COLUMNS": { - "forum_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "notify_status": [ - "BOOL", - 0 - ] - }, - "KEYS": { - "forum_id": [ - "INDEX", - "forum_id" - ], - "user_id": [ - "INDEX", - "user_id" - ], - "notify_stat": [ - "INDEX", - "notify_status" - ] - } - }, - "phpbb_groups": { - "COLUMNS": { - "group_id": [ - "UINT", - null, - "auto_increment" - ], - "group_type": [ - "TINT:4", - 1 - ], - "group_founder_manage": [ - "BOOL", - 0 - ], - "group_skip_auth": [ - "BOOL", - 0 - ], - "group_name": [ - "VCHAR_CI", - "" - ], - "group_desc": [ - "TEXT_UNI", - "" - ], - "group_desc_bitfield": [ - "VCHAR:255", - "" - ], - "group_desc_options": [ - "UINT:11", - 7 - ], - "group_desc_uid": [ - "VCHAR:8", - "" - ], - "group_display": [ - "BOOL", - 0 - ], - "group_avatar": [ - "VCHAR", - "" - ], - "group_avatar_type": [ - "VCHAR:255", - "" - ], - "group_avatar_width": [ - "USINT", - 0 - ], - "group_avatar_height": [ - "USINT", - 0 - ], - "group_rank": [ - "UINT", - 0 - ], - "group_colour": [ - "VCHAR:6", - "" - ], - "group_sig_chars": [ - "UINT", - 0 - ], - "group_receive_pm": [ - "BOOL", - 0 - ], - "group_message_limit": [ - "UINT", - 0 - ], - "group_legend": [ - "UINT", - 0 - ], - "group_max_recipients": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "group_id", - "KEYS": { - "group_legend_name": [ - "INDEX", - [ - "group_legend", - "group_name" - ] - ] - } - }, - "phpbb_icons": { - "COLUMNS": { - "icons_id": [ - "UINT", - null, - "auto_increment" - ], - "icons_url": [ - "VCHAR", - "" - ], - "icons_width": [ - "TINT:4", - 0 - ], - "icons_height": [ - "TINT:4", - 0 - ], - "icons_order": [ - "UINT", - 0 - ], - "display_on_posting": [ - "BOOL", - 1 - ] - }, - "PRIMARY_KEY": "icons_id", - "KEYS": { - "display_on_posting": [ - "INDEX", - "display_on_posting" - ] - } - }, - "phpbb_lang": { - "COLUMNS": { - "lang_id": [ - "TINT:4", - null, - "auto_increment" - ], - "lang_iso": [ - "VCHAR:30", - "" - ], - "lang_dir": [ - "VCHAR:30", - "" - ], - "lang_english_name": [ - "VCHAR_UNI:100", - "" - ], - "lang_local_name": [ - "VCHAR_UNI:255", - "" - ], - "lang_author": [ - "VCHAR_UNI:255", - "" - ] - }, - "PRIMARY_KEY": "lang_id", - "KEYS": { - "lang_iso": [ - "INDEX", - "lang_iso" - ] - } - }, - "phpbb_log": { - "COLUMNS": { - "log_id": [ - "UINT", - null, - "auto_increment" - ], - "log_type": [ - "TINT:4", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "reportee_id": [ - "UINT", - 0 - ], - "log_ip": [ - "VCHAR:40", - "" - ], - "log_time": [ - "TIMESTAMP", - 0 - ], - "log_operation": [ - "TEXT_UNI", - "" - ], - "log_data": [ - "MTEXT_UNI", - "" - ] - }, - "PRIMARY_KEY": "log_id", - "KEYS": { - "log_type": [ - "INDEX", - "log_type" - ], - "forum_id": [ - "INDEX", - "forum_id" - ], - "topic_id": [ - "INDEX", - "topic_id" - ], - "reportee_id": [ - "INDEX", - "reportee_id" - ], - "user_id": [ - "INDEX", - "user_id" - ] - } - }, - "phpbb_login_attempts": { - "COLUMNS": { - "attempt_ip": [ - "VCHAR:40", - "" - ], - "attempt_browser": [ - "VCHAR:150", - "" - ], - "attempt_forwarded_for": [ - "VCHAR:255", - "" - ], - "attempt_time": [ - "TIMESTAMP", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "username": [ - "VCHAR_UNI:255", - 0 - ], - "username_clean": [ - "VCHAR_CI", - 0 - ] - }, - "KEYS": { - "att_ip": [ - "INDEX", - [ - "attempt_ip", - "attempt_time" - ] - ], - "att_for": [ - "INDEX", - [ - "attempt_forwarded_for", - "attempt_time" - ] - ], - "att_time": [ - "INDEX", - [ - "attempt_time" - ] - ], - "user_id": [ - "INDEX", - "user_id" - ] - } - }, - "phpbb_migrations": { - "COLUMNS": { - "migration_name": [ - "VCHAR", - "" - ], - "migration_depends_on": [ - "TEXT", - "" - ], - "migration_schema_done": [ - "BOOL", - 0 - ], - "migration_data_done": [ - "BOOL", - 0 - ], - "migration_data_state": [ - "TEXT", - "" - ], - "migration_start_time": [ - "TIMESTAMP", - 0 - ], - "migration_end_time": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": "migration_name" - }, - "phpbb_moderator_cache": { - "COLUMNS": { - "forum_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "username": [ - "VCHAR_UNI:255", - "" - ], - "group_id": [ - "UINT", - 0 - ], - "group_name": [ - "VCHAR_UNI", - "" - ], - "display_on_index": [ - "BOOL", - 1 - ] - }, - "KEYS": { - "disp_idx": [ - "INDEX", - "display_on_index" - ], - "forum_id": [ - "INDEX", - "forum_id" - ] - } - }, - "phpbb_modules": { - "COLUMNS": { - "module_id": [ - "UINT", - null, - "auto_increment" - ], - "module_enabled": [ - "BOOL", - 1 - ], - "module_display": [ - "BOOL", - 1 - ], - "module_basename": [ - "VCHAR", - "" - ], - "module_class": [ - "VCHAR:10", - "" - ], - "parent_id": [ - "UINT", - 0 - ], - "left_id": [ - "UINT", - 0 - ], - "right_id": [ - "UINT", - 0 - ], - "module_langname": [ - "VCHAR", - "" - ], - "module_mode": [ - "VCHAR", - "" - ], - "module_auth": [ - "VCHAR", - "" - ] - }, - "PRIMARY_KEY": "module_id", - "KEYS": { - "left_right_id": [ - "INDEX", - [ - "left_id", - "right_id" - ] - ], - "module_enabled": [ - "INDEX", - "module_enabled" - ], - "class_left_id": [ - "INDEX", - [ - "module_class", - "left_id" - ] - ] - } - }, - "phpbb_notification_types": { - "COLUMNS": { - "notification_type_id": [ - "USINT", - null, - "auto_increment" - ], - "notification_type_name": [ - "VCHAR:255", - "" - ], - "notification_type_enabled": [ - "BOOL", - 1 - ] - }, - "PRIMARY_KEY": [ - "notification_type_id" - ], - "KEYS": { - "type": [ - "UNIQUE", - [ - "notification_type_name" - ] - ] - } - }, - "phpbb_notifications": { - "COLUMNS": { - "notification_id": [ - "UINT:10", - null, - "auto_increment" - ], - "notification_type_id": [ - "USINT", - 0 - ], - "item_id": [ - "UINT", - 0 - ], - "item_parent_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "notification_read": [ - "BOOL", - 0 - ], - "notification_time": [ - "TIMESTAMP", - 1 - ], - "notification_data": [ - "TEXT_UNI", - "" - ] - }, - "PRIMARY_KEY": "notification_id", - "KEYS": { - "item_ident": [ - "INDEX", - [ - "notification_type_id", - "item_id" - ] - ], - "user": [ - "INDEX", - [ - "user_id", - "notification_read" - ] - ] - } - }, - "phpbb_oauth_accounts": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "provider": [ - "VCHAR", - "" - ], - "oauth_provider_id": [ - "TEXT_UNI", - "" - ] - }, - "PRIMARY_KEY": [ - "user_id", - "provider" - ] - }, - "phpbb_oauth_tokens": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "session_id": [ - "CHAR:32", - "" - ], - "provider": [ - "VCHAR", - "" - ], - "oauth_token": [ - "MTEXT", - "" - ] - }, - "KEYS": { - "user_id": [ - "INDEX", - "user_id" - ], - "provider": [ - "INDEX", - "provider" - ] - } - }, - "phpbb_poll_options": { - "COLUMNS": { - "poll_option_id": [ - "TINT:4", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "poll_option_text": [ - "TEXT_UNI", - "" - ], - "poll_option_total": [ - "UINT", - 0 - ] - }, - "KEYS": { - "poll_opt_id": [ - "INDEX", - "poll_option_id" - ], - "topic_id": [ - "INDEX", - "topic_id" - ] - } - }, - "phpbb_poll_votes": { - "COLUMNS": { - "topic_id": [ - "UINT", - 0 - ], - "poll_option_id": [ - "TINT:4", - 0 - ], - "vote_user_id": [ - "UINT", - 0 - ], - "vote_user_ip": [ - "VCHAR:40", - "" - ] - }, - "KEYS": { - "topic_id": [ - "INDEX", - "topic_id" - ], - "vote_user_id": [ - "INDEX", - "vote_user_id" - ], - "vote_user_ip": [ - "INDEX", - "vote_user_ip" - ] - } - }, - "phpbb_posts": { - "COLUMNS": { - "post_id": [ - "UINT", - null, - "auto_increment" - ], - "topic_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "poster_id": [ - "UINT", - 0 - ], - "icon_id": [ - "UINT", - 0 - ], - "poster_ip": [ - "VCHAR:40", - "" - ], - "post_time": [ - "TIMESTAMP", - 0 - ], - "post_reported": [ - "BOOL", - 0 - ], - "enable_bbcode": [ - "BOOL", - 1 - ], - "enable_smilies": [ - "BOOL", - 1 - ], - "enable_magic_url": [ - "BOOL", - 1 - ], - "enable_sig": [ - "BOOL", - 1 - ], - "post_username": [ - "VCHAR_UNI:255", - "" - ], - "post_subject": [ - "STEXT_UNI", - "", - "true_sort" - ], - "post_text": [ - "MTEXT_UNI", - "" - ], - "post_checksum": [ - "VCHAR:32", - "" - ], - "post_attachment": [ - "BOOL", - 0 - ], - "bbcode_bitfield": [ - "VCHAR:255", - "" - ], - "bbcode_uid": [ - "VCHAR:8", - "" - ], - "post_postcount": [ - "BOOL", - 1 - ], - "post_edit_time": [ - "TIMESTAMP", - 0 - ], - "post_edit_reason": [ - "STEXT_UNI", - "" - ], - "post_edit_user": [ - "UINT", - 0 - ], - "post_edit_count": [ - "USINT", - 0 - ], - "post_edit_locked": [ - "BOOL", - 0 - ], - "post_visibility": [ - "TINT:3", - 0 - ], - "post_delete_time": [ - "TIMESTAMP", - 0 - ], - "post_delete_reason": [ - "STEXT_UNI", - "" - ], - "post_delete_user": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "post_id", - "KEYS": { - "forum_id": [ - "INDEX", - "forum_id" - ], - "topic_id": [ - "INDEX", - "topic_id" - ], - "poster_ip": [ - "INDEX", - "poster_ip" - ], - "poster_id": [ - "INDEX", - "poster_id" - ], - "tid_post_time": [ - "INDEX", - [ - "topic_id", - "post_time" - ] - ], - "post_username": [ - "INDEX", - [ - "post_username:255" - ] - ], - "post_visibility": [ - "INDEX", - [ - "post_visibility" - ] - ] - } - }, - "phpbb_privmsgs": { - "COLUMNS": { - "msg_id": [ - "UINT", - null, - "auto_increment" - ], - "root_level": [ - "UINT", - 0 - ], - "author_id": [ - "UINT", - 0 - ], - "icon_id": [ - "UINT", - 0 - ], - "author_ip": [ - "VCHAR:40", - "" - ], - "message_time": [ - "TIMESTAMP", - 0 - ], - "enable_bbcode": [ - "BOOL", - 1 - ], - "enable_smilies": [ - "BOOL", - 1 - ], - "enable_magic_url": [ - "BOOL", - 1 - ], - "enable_sig": [ - "BOOL", - 1 - ], - "message_subject": [ - "STEXT_UNI", - "" - ], - "message_text": [ - "MTEXT_UNI", - "" - ], - "message_edit_reason": [ - "STEXT_UNI", - "" - ], - "message_edit_user": [ - "UINT", - 0 - ], - "message_attachment": [ - "BOOL", - 0 - ], - "bbcode_bitfield": [ - "VCHAR:255", - "" - ], - "bbcode_uid": [ - "VCHAR:8", - "" - ], - "message_edit_time": [ - "TIMESTAMP", - 0 - ], - "message_edit_count": [ - "USINT", - 0 - ], - "to_address": [ - "TEXT_UNI", - "" - ], - "bcc_address": [ - "TEXT_UNI", - "" - ], - "message_reported": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "msg_id", - "KEYS": { - "author_ip": [ - "INDEX", - "author_ip" - ], - "message_time": [ - "INDEX", - "message_time" - ], - "author_id": [ - "INDEX", - "author_id" - ], - "root_level": [ - "INDEX", - "root_level" - ] - } - }, - "phpbb_privmsgs_folder": { - "COLUMNS": { - "folder_id": [ - "UINT", - null, - "auto_increment" - ], - "user_id": [ - "UINT", - 0 - ], - "folder_name": [ - "VCHAR_UNI", - "" - ], - "pm_count": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "folder_id", - "KEYS": { - "user_id": [ - "INDEX", - "user_id" - ] - } - }, - "phpbb_privmsgs_rules": { - "COLUMNS": { - "rule_id": [ - "UINT", - null, - "auto_increment" - ], - "user_id": [ - "UINT", - 0 - ], - "rule_check": [ - "UINT", - 0 - ], - "rule_connection": [ - "UINT", - 0 - ], - "rule_string": [ - "VCHAR_UNI", - "" - ], - "rule_user_id": [ - "UINT", - 0 - ], - "rule_group_id": [ - "UINT", - 0 - ], - "rule_action": [ - "UINT", - 0 - ], - "rule_folder_id": [ - "INT:11", - 0 - ] - }, - "PRIMARY_KEY": "rule_id", - "KEYS": { - "user_id": [ - "INDEX", - "user_id" - ] - } - }, - "phpbb_privmsgs_to": { - "COLUMNS": { - "msg_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "author_id": [ - "UINT", - 0 - ], - "pm_deleted": [ - "BOOL", - 0 - ], - "pm_new": [ - "BOOL", - 1 - ], - "pm_unread": [ - "BOOL", - 1 - ], - "pm_replied": [ - "BOOL", - 0 - ], - "pm_marked": [ - "BOOL", - 0 - ], - "pm_forwarded": [ - "BOOL", - 0 - ], - "folder_id": [ - "INT:11", - 0 - ] - }, - "KEYS": { - "msg_id": [ - "INDEX", - "msg_id" - ], - "author_id": [ - "INDEX", - "author_id" - ], - "usr_flder_id": [ - "INDEX", - [ - "user_id", - "folder_id" - ] - ] - } - }, - "phpbb_profile_fields": { - "COLUMNS": { - "field_id": [ - "UINT", - null, - "auto_increment" - ], - "field_name": [ - "VCHAR_UNI", - "" - ], - "field_type": [ - "VCHAR:100", - "" - ], - "field_ident": [ - "VCHAR:20", - "" - ], - "field_length": [ - "VCHAR:20", - "" - ], - "field_minlen": [ - "VCHAR", - "" - ], - "field_maxlen": [ - "VCHAR", - "" - ], - "field_novalue": [ - "VCHAR_UNI", - "" - ], - "field_default_value": [ - "VCHAR_UNI", - "" - ], - "field_validation": [ - "VCHAR_UNI:20", - "" - ], - "field_required": [ - "BOOL", - 0 - ], - "field_show_on_reg": [ - "BOOL", - 0 - ], - "field_hide": [ - "BOOL", - 0 - ], - "field_no_view": [ - "BOOL", - 0 - ], - "field_active": [ - "BOOL", - 0 - ], - "field_order": [ - "UINT", - 0 - ], - "field_show_profile": [ - "BOOL", - 0 - ], - "field_show_on_vt": [ - "BOOL", - 0 - ], - "field_show_novalue": [ - "BOOL", - 0 - ], - "field_show_on_pm": [ - "BOOL", - 0 - ], - "field_show_on_ml": [ - "BOOL", - 0 - ], - "field_is_contact": [ - "BOOL", - 0 - ], - "field_contact_desc": [ - "VCHAR", - "" - ], - "field_contact_url": [ - "VCHAR", - "" - ] - }, - "PRIMARY_KEY": "field_id", - "KEYS": { - "fld_type": [ - "INDEX", - "field_type" - ], - "fld_ordr": [ - "INDEX", - "field_order" - ] - } - }, - "phpbb_profile_fields_data": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "pf_phpbb_interests": [ - "MTEXT", - "" - ], - "pf_phpbb_occupation": [ - "MTEXT", - "" - ], - "pf_phpbb_facebook": [ - "VCHAR", - "" - ], - "pf_phpbb_googleplus": [ - "VCHAR", - "" - ], - "pf_phpbb_icq": [ - "VCHAR", - "" - ], - "pf_phpbb_location": [ - "VCHAR", - "" - ], - "pf_phpbb_skype": [ - "VCHAR", - "" - ], - "pf_phpbb_twitter": [ - "VCHAR", - "" - ], - "pf_phpbb_website": [ - "VCHAR", - "" - ], - "pf_phpbb_wlm": [ - "VCHAR", - "" - ], - "pf_phpbb_yahoo": [ - "VCHAR", - "" - ], - "pf_phpbb_youtube": [ - "VCHAR", - "" - ], - "pf_phpbb_aol": [ - "VCHAR", - "" - ] - }, - "PRIMARY_KEY": "user_id" - }, - "phpbb_profile_fields_lang": { - "COLUMNS": { - "field_id": [ - "UINT", - 0 - ], - "lang_id": [ - "UINT", - 0 - ], - "option_id": [ - "UINT", - 0 - ], - "field_type": [ - "VCHAR:100", - "" - ], - "lang_value": [ - "VCHAR_UNI", - "" - ] - }, - "PRIMARY_KEY": [ - "field_id", - "lang_id", - "option_id" - ] - }, - "phpbb_profile_lang": { - "COLUMNS": { - "field_id": [ - "UINT", - 0 - ], - "lang_id": [ - "UINT", - 0 - ], - "lang_name": [ - "VCHAR_UNI", - "" - ], - "lang_explain": [ - "TEXT_UNI", - "" - ], - "lang_default_value": [ - "VCHAR_UNI", - "" - ] - }, - "PRIMARY_KEY": [ - "field_id", - "lang_id" - ] - }, - "phpbb_ranks": { - "COLUMNS": { - "rank_id": [ - "UINT", - null, - "auto_increment" - ], - "rank_title": [ - "VCHAR_UNI", - "" - ], - "rank_min": [ - "UINT", - 0 - ], - "rank_special": [ - "BOOL", - 0 - ], - "rank_image": [ - "VCHAR", - "" - ] - }, - "PRIMARY_KEY": "rank_id" - }, - "phpbb_reports": { - "COLUMNS": { - "report_id": [ - "UINT", - null, - "auto_increment" - ], - "reason_id": [ - "USINT", - 0 - ], - "post_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "user_notify": [ - "BOOL", - 0 - ], - "report_closed": [ - "BOOL", - 0 - ], - "report_time": [ - "TIMESTAMP", - 0 - ], - "report_text": [ - "MTEXT_UNI", - "" - ], - "pm_id": [ - "UINT", - 0 - ], - "reported_post_enable_bbcode": [ - "BOOL", - 1 - ], - "reported_post_enable_smilies": [ - "BOOL", - 1 - ], - "reported_post_enable_magic_url": [ - "BOOL", - 1 - ], - "reported_post_text": [ - "MTEXT_UNI", - "" - ], - "reported_post_uid": [ - "VCHAR:8", - "" - ], - "reported_post_bitfield": [ - "VCHAR:255", - "" - ] - }, - "PRIMARY_KEY": "report_id", - "KEYS": { - "post_id": [ - "INDEX", - [ - "post_id" - ] - ], - "pm_id": [ - "INDEX", - [ - "pm_id" - ] - ] - } - }, - "phpbb_reports_reasons": { - "COLUMNS": { - "reason_id": [ - "USINT", - null, - "auto_increment" - ], - "reason_title": [ - "VCHAR_UNI", - "" - ], - "reason_description": [ - "MTEXT_UNI", - "" - ], - "reason_order": [ - "USINT", - 0 - ] - }, - "PRIMARY_KEY": "reason_id" - }, - "phpbb_search_results": { - "COLUMNS": { - "search_key": [ - "VCHAR:32", - "" - ], - "search_time": [ - "TIMESTAMP", - 0 - ], - "search_keywords": [ - "MTEXT_UNI", - "" - ], - "search_authors": [ - "MTEXT", - "" - ] - }, - "PRIMARY_KEY": "search_key" - }, - "phpbb_search_wordlist": { - "COLUMNS": { - "word_id": [ - "UINT", - null, - "auto_increment" - ], - "word_text": [ - "VCHAR_UNI", - "" - ], - "word_common": [ - "BOOL", - 0 - ], - "word_count": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "word_id", - "KEYS": { - "wrd_txt": [ - "UNIQUE", - "word_text" - ], - "wrd_cnt": [ - "INDEX", - "word_count" - ] - } - }, - "phpbb_search_wordmatch": { - "COLUMNS": { - "post_id": [ - "UINT", - 0 - ], - "word_id": [ - "UINT", - 0 - ], - "title_match": [ - "BOOL", - 0 - ] - }, - "KEYS": { - "word_id": [ - "INDEX", - "word_id" - ], - "post_id": [ - "INDEX", - "post_id" - ], - "un_mtch": [ - "UNIQUE", - [ - "word_id", - "post_id", - "title_match" - ] - ] - } - }, - "phpbb_sessions": { - "COLUMNS": { - "session_id": [ - "CHAR:32", - "" - ], - "session_user_id": [ - "UINT", - 0 - ], - "session_last_visit": [ - "TIMESTAMP", - 0 - ], - "session_start": [ - "TIMESTAMP", - 0 - ], - "session_time": [ - "TIMESTAMP", - 0 - ], - "session_ip": [ - "VCHAR:40", - "" - ], - "session_browser": [ - "VCHAR:150", - "" - ], - "session_forwarded_for": [ - "VCHAR:255", - "" - ], - "session_page": [ - "VCHAR_UNI", - "" - ], - "session_viewonline": [ - "BOOL", - 1 - ], - "session_autologin": [ - "BOOL", - 0 - ], - "session_admin": [ - "BOOL", - 0 - ], - "session_forum_id": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "session_id", - "KEYS": { - "session_time": [ - "INDEX", - "session_time" - ], - "session_user_id": [ - "INDEX", - "session_user_id" - ], - "session_fid": [ - "INDEX", - [ - "session_forum_id" - ] - ] - } - }, - "phpbb_sessions_keys": { - "COLUMNS": { - "key_id": [ - "CHAR:32", - "" - ], - "user_id": [ - "UINT", - 0 - ], - "last_ip": [ - "VCHAR:40", - "" - ], - "last_login": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": [ - "key_id", - "user_id" - ], - "KEYS": { - "last_login": [ - "INDEX", - "last_login" - ] - } - }, - "phpbb_sitelist": { - "COLUMNS": { - "site_id": [ - "UINT", - null, - "auto_increment" - ], - "site_ip": [ - "VCHAR:40", - "" - ], - "site_hostname": [ - "VCHAR", - "" - ], - "ip_exclude": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": "site_id" - }, - "phpbb_smilies": { - "COLUMNS": { - "smiley_id": [ - "UINT", - null, - "auto_increment" - ], - "code": [ - "VCHAR_UNI:50", - "" - ], - "emotion": [ - "VCHAR_UNI:50", - "" - ], - "smiley_url": [ - "VCHAR:50", - "" - ], - "smiley_width": [ - "USINT", - 0 - ], - "smiley_height": [ - "USINT", - 0 - ], - "smiley_order": [ - "UINT", - 0 - ], - "display_on_posting": [ - "BOOL", - 1 - ] - }, - "PRIMARY_KEY": "smiley_id", - "KEYS": { - "display_on_post": [ - "INDEX", - "display_on_posting" - ] - } - }, - "phpbb_styles": { - "COLUMNS": { - "style_id": [ - "UINT", - null, - "auto_increment" - ], - "style_name": [ - "VCHAR_UNI:255", - "" - ], - "style_copyright": [ - "VCHAR_UNI", - "" - ], - "style_active": [ - "BOOL", - 1 - ], - "style_path": [ - "VCHAR:100", - "" - ], - "bbcode_bitfield": [ - "VCHAR:255", - "kNg=" - ], - "style_parent_id": [ - "UINT:4", - 0 - ], - "style_parent_tree": [ - "TEXT", - "" - ] - }, - "PRIMARY_KEY": "style_id", - "KEYS": { - "style_name": [ - "UNIQUE", - "style_name" - ] - } - }, - "phpbb_teampage": { - "COLUMNS": { - "teampage_id": [ - "UINT", - null, - "auto_increment" - ], - "group_id": [ - "UINT", - 0 - ], - "teampage_name": [ - "VCHAR_UNI:255", - "" - ], - "teampage_position": [ - "UINT", - 0 - ], - "teampage_parent": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "teampage_id" - }, - "phpbb_topics": { - "COLUMNS": { - "topic_id": [ - "UINT", - null, - "auto_increment" - ], - "forum_id": [ - "UINT", - 0 - ], - "icon_id": [ - "UINT", - 0 - ], - "topic_attachment": [ - "BOOL", - 0 - ], - "topic_reported": [ - "BOOL", - 0 - ], - "topic_title": [ - "STEXT_UNI", - "", - "true_sort" - ], - "topic_poster": [ - "UINT", - 0 - ], - "topic_time": [ - "TIMESTAMP", - 0 - ], - "topic_time_limit": [ - "TIMESTAMP", - 0 - ], - "topic_views": [ - "UINT", - 0 - ], - "topic_status": [ - "TINT:3", - 0 - ], - "topic_type": [ - "TINT:3", - 0 - ], - "topic_first_post_id": [ - "UINT", - 0 - ], - "topic_first_poster_name": [ - "VCHAR_UNI:255", - "", - "true_sort" - ], - "topic_first_poster_colour": [ - "VCHAR:6", - "" - ], - "topic_last_post_id": [ - "UINT", - 0 - ], - "topic_last_poster_id": [ - "UINT", - 0 - ], - "topic_last_poster_name": [ - "VCHAR_UNI", - "" - ], - "topic_last_poster_colour": [ - "VCHAR:6", - "" - ], - "topic_last_post_subject": [ - "STEXT_UNI", - "" - ], - "topic_last_post_time": [ - "TIMESTAMP", - 0 - ], - "topic_last_view_time": [ - "TIMESTAMP", - 0 - ], - "topic_moved_id": [ - "UINT", - 0 - ], - "topic_bumped": [ - "BOOL", - 0 - ], - "topic_bumper": [ - "UINT", - 0 - ], - "poll_title": [ - "STEXT_UNI", - "" - ], - "poll_start": [ - "TIMESTAMP", - 0 - ], - "poll_length": [ - "TIMESTAMP", - 0 - ], - "poll_max_options": [ - "TINT:4", - 1 - ], - "poll_last_vote": [ - "TIMESTAMP", - 0 - ], - "poll_vote_change": [ - "BOOL", - 0 - ], - "topic_visibility": [ - "TINT:3", - 0 - ], - "topic_delete_time": [ - "TIMESTAMP", - 0 - ], - "topic_delete_reason": [ - "STEXT_UNI", - "" - ], - "topic_delete_user": [ - "UINT", - 0 - ], - "topic_posts_approved": [ - "UINT", - 0 - ], - "topic_posts_unapproved": [ - "UINT", - 0 - ], - "topic_posts_softdeleted": [ - "UINT", - 0 - ] - }, - "PRIMARY_KEY": "topic_id", - "KEYS": { - "forum_id": [ - "INDEX", - "forum_id" - ], - "forum_id_type": [ - "INDEX", - [ - "forum_id", - "topic_type" - ] - ], - "last_post_time": [ - "INDEX", - "topic_last_post_time" - ], - "fid_time_moved": [ - "INDEX", - [ - "forum_id", - "topic_last_post_time", - "topic_moved_id" - ] - ], - "topic_visibility": [ - "INDEX", - [ - "topic_visibility" - ] - ], - "forum_vis_last": [ - "INDEX", - [ - "forum_id", - "topic_visibility", - "topic_last_post_id" - ] - ] - } - }, - "phpbb_topics_posted": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "topic_posted": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": [ - "user_id", - "topic_id" - ] - }, - "phpbb_topics_track": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "topic_id": [ - "UINT", - 0 - ], - "forum_id": [ - "UINT", - 0 - ], - "mark_time": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": [ - "user_id", - "topic_id" - ], - "KEYS": { - "forum_id": [ - "INDEX", - "forum_id" - ], - "topic_id": [ - "INDEX", - [ - "topic_id" - ] - ] - } - }, - "phpbb_topics_watch": { - "COLUMNS": { - "topic_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "notify_status": [ - "BOOL", - 0 - ] - }, - "KEYS": { - "topic_id": [ - "INDEX", - "topic_id" - ], - "user_id": [ - "INDEX", - "user_id" - ], - "notify_stat": [ - "INDEX", - "notify_status" - ] - } - }, - "phpbb_user_group": { - "COLUMNS": { - "group_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "group_leader": [ - "BOOL", - 0 - ], - "user_pending": [ - "BOOL", - 1 - ] - }, - "KEYS": { - "group_id": [ - "INDEX", - "group_id" - ], - "user_id": [ - "INDEX", - "user_id" - ], - "group_leader": [ - "INDEX", - "group_leader" - ] - } - }, - "phpbb_user_notifications": { - "COLUMNS": { - "item_type": [ - "VCHAR:255", - "" - ], - "item_id": [ - "UINT", - 0 - ], - "user_id": [ - "UINT", - 0 - ], - "method": [ - "VCHAR:255", - "" - ], - "notify": [ - "BOOL", - 1 - ] - } - }, - "phpbb_users": { - "COLUMNS": { - "user_id": [ - "UINT", - null, - "auto_increment" - ], - "user_type": [ - "TINT:2", - 0 - ], - "group_id": [ - "UINT", - 3 - ], - "user_permissions": [ - "MTEXT", - "" - ], - "user_perm_from": [ - "UINT", - 0 - ], - "user_ip": [ - "VCHAR:40", - "" - ], - "user_regdate": [ - "TIMESTAMP", - 0 - ], - "username": [ - "VCHAR_CI", - "" - ], - "username_clean": [ - "VCHAR_CI", - "" - ], - "user_password": [ - "VCHAR:255", - "" - ], - "user_passchg": [ - "TIMESTAMP", - 0 - ], - "user_email": [ - "VCHAR_UNI:100", - "" - ], - "user_email_hash": [ - "BINT", - 0 - ], - "user_birthday": [ - "VCHAR:10", - "" - ], - "user_lastvisit": [ - "TIMESTAMP", - 0 - ], - "user_lastmark": [ - "TIMESTAMP", - 0 - ], - "user_lastpost_time": [ - "TIMESTAMP", - 0 - ], - "user_lastpage": [ - "VCHAR_UNI:200", - "" - ], - "user_last_confirm_key": [ - "VCHAR:10", - "" - ], - "user_last_search": [ - "TIMESTAMP", - 0 - ], - "user_warnings": [ - "TINT:4", - 0 - ], - "user_last_warning": [ - "TIMESTAMP", - 0 - ], - "user_login_attempts": [ - "TINT:4", - 0 - ], - "user_inactive_reason": [ - "TINT:2", - 0 - ], - "user_inactive_time": [ - "TIMESTAMP", - 0 - ], - "user_posts": [ - "UINT", - 0 - ], - "user_lang": [ - "VCHAR:30", - "" - ], - "user_timezone": [ - "VCHAR:100", - "" - ], - "user_dateformat": [ - "VCHAR_UNI:30", - "d M Y H:i" - ], - "user_style": [ - "UINT", - 0 - ], - "user_rank": [ - "UINT", - 0 - ], - "user_colour": [ - "VCHAR:6", - "" - ], - "user_new_privmsg": [ - "INT:4", - 0 - ], - "user_unread_privmsg": [ - "INT:4", - 0 - ], - "user_last_privmsg": [ - "TIMESTAMP", - 0 - ], - "user_message_rules": [ - "BOOL", - 0 - ], - "user_full_folder": [ - "INT:11", - -3 - ], - "user_emailtime": [ - "TIMESTAMP", - 0 - ], - "user_topic_show_days": [ - "USINT", - 0 - ], - "user_topic_sortby_type": [ - "VCHAR:1", - "t" - ], - "user_topic_sortby_dir": [ - "VCHAR:1", - "d" - ], - "user_post_show_days": [ - "USINT", - 0 - ], - "user_post_sortby_type": [ - "VCHAR:1", - "t" - ], - "user_post_sortby_dir": [ - "VCHAR:1", - "a" - ], - "user_notify": [ - "BOOL", - 0 - ], - "user_notify_pm": [ - "BOOL", - 1 - ], - "user_notify_type": [ - "TINT:4", - 0 - ], - "user_allow_pm": [ - "BOOL", - 1 - ], - "user_allow_viewonline": [ - "BOOL", - 1 - ], - "user_allow_viewemail": [ - "BOOL", - 1 - ], - "user_allow_massemail": [ - "BOOL", - 1 - ], - "user_options": [ - "UINT:11", - 230271 - ], - "user_avatar": [ - "VCHAR", - "" - ], - "user_avatar_type": [ - "VCHAR:255", - "" - ], - "user_avatar_width": [ - "USINT", - 0 - ], - "user_avatar_height": [ - "USINT", - 0 - ], - "user_sig": [ - "MTEXT_UNI", - "" - ], - "user_sig_bbcode_uid": [ - "VCHAR:8", - "" - ], - "user_sig_bbcode_bitfield": [ - "VCHAR:255", - "" - ], - "user_jabber": [ - "VCHAR_UNI", - "" - ], - "user_actkey": [ - "VCHAR:32", - "" - ], - "user_newpasswd": [ - "VCHAR:255", - "" - ], - "user_form_salt": [ - "VCHAR_UNI:32", - "" - ], - "user_new": [ - "BOOL", - 1 - ], - "user_reminded": [ - "TINT:4", - 0 - ], - "user_reminded_time": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": "user_id", - "KEYS": { - "user_birthday": [ - "INDEX", - "user_birthday" - ], - "user_email_hash": [ - "INDEX", - "user_email_hash" - ], - "user_type": [ - "INDEX", - "user_type" - ], - "username_clean": [ - "UNIQUE", - "username_clean" - ] - } - }, - "phpbb_warnings": { - "COLUMNS": { - "warning_id": [ - "UINT", - null, - "auto_increment" - ], - "user_id": [ - "UINT", - 0 - ], - "post_id": [ - "UINT", - 0 - ], - "log_id": [ - "UINT", - 0 - ], - "warning_time": [ - "TIMESTAMP", - 0 - ] - }, - "PRIMARY_KEY": "warning_id" - }, - "phpbb_words": { - "COLUMNS": { - "word_id": [ - "UINT", - null, - "auto_increment" - ], - "word": [ - "VCHAR_UNI", - "" - ], - "replacement": [ - "VCHAR_UNI", - "" - ] - }, - "PRIMARY_KEY": "word_id" - }, - "phpbb_zebra": { - "COLUMNS": { - "user_id": [ - "UINT", - 0 - ], - "zebra_id": [ - "UINT", - 0 - ], - "friend": [ - "BOOL", - 0 - ], - "foe": [ - "BOOL", - 0 - ] - }, - "PRIMARY_KEY": [ - "user_id", - "zebra_id" - ] - } -}
\ No newline at end of file diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index baabe90f2a..adbd5a540e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -273,7 +273,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC5-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC6-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'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 24cfe4556b..ae7565d608 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -41,17 +41,21 @@ $lang = array_merge($lang, array( 'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, give it a fitting name and description, and among other settings adjust the default values for timezone and language.', 'BOARD_INDEX_TEXT' => 'Board index text', 'BOARD_INDEX_TEXT_EXPLAIN' => 'This text is displayed as the board index in the board’s breadcrumbs. If not specified, it will default to “Board index”.', + 'BOARD_STYLE' => 'Board style', 'CUSTOM_DATEFORMAT' => 'Custom…', 'DEFAULT_DATE_FORMAT' => 'Date format', 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code>date</code> function.', 'DEFAULT_LANGUAGE' => 'Default language', 'DEFAULT_STYLE' => 'Default style', + 'DEFAULT_STYLE_EXPLAIN' => 'The default style for new users.', 'DISABLE_BOARD' => 'Disable board', 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users who are neither administrators nor moderators. You can also enter a short (255 character) message to display if you wish.', 'DISPLAY_LAST_SUBJECT' => 'Display subject of last added post on forum list', 'DISPLAY_LAST_SUBJECT_EXPLAIN' => 'The subject of the last added post will be displayed in the forum list with a hyperlink to the post. Subjects from password protected forums and forums in which user doesn’t have read access are not shown.', + 'GUEST_STYLE' => 'Guest style', + 'GUEST_STYLE_EXPLAIN' => 'The board style for guests.', 'OVERRIDE_STYLE' => 'Override user style', - 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s style with the default.', + 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s (and guest’s) style with the style as defined under "Default style".', 'SITE_DESC' => 'Site description', 'SITE_HOME_TEXT' => 'Main website text', 'SITE_HOME_TEXT_EXPLAIN' => 'This text will be displayed as a link to your website homepage in the board’s breadcrumbs. If not specified, it will default to “Home”.', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 5972f8a18e..d365aeb183 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -99,7 +99,7 @@ $lang = array_merge($lang, array( 'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.', 'FIELD_INT' => 'Numbers', 'FIELD_IS_CONTACT' => 'Display field as a contact field', - 'FIELD_IS_CONTACT_EXPLAIN' => 'Contact fields are displayed within the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages.', + 'FIELD_IS_CONTACT_EXPLAIN' => 'Contact fields are displayed within the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages. You can use <samp>%s</samp> as a placeholder variable which will be replaced by a value provided by the user.', 'FIELD_LENGTH' => 'Length of input box', 'FIELD_NOT_FOUND' => 'Profile field not found.', 'FIELD_STRING' => 'Single text field', diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php index 56308be8da..0b0e323e3d 100644 --- a/phpBB/phpbb/cache/driver/memory.php +++ b/phpBB/phpbb/cache/driver/memory.php @@ -208,12 +208,24 @@ abstract class memory extends \phpbb\cache\driver\base // determine which tables this query belongs to // Some queries use backticks, namely the get_database_size() query // don't check for conformity, the SQL would error and not reach here. - if (!preg_match('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs)) + if (!preg_match_all('/(?:FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?)|(?:JOIN (`?\\w+`?(?: \\w+)?))/', $query, $regs, PREG_SET_ORDER)) { // Bail out if the match fails. return $query_result; } - $tables = array_map('trim', explode(',', $regs[1])); + + $tables = array(); + foreach ($regs as $match) + { + if ($match[0][0] == 'F') + { + $tables = array_merge($tables, array_map('trim', explode(',', $match[1]))); + } + else + { + $tables[] = $match[2]; + } + } foreach ($tables as $table_name) { diff --git a/phpBB/phpbb/db/migration/data/v310/rc5.php b/phpBB/phpbb/db/migration/data/v310/rc5.php new file mode 100644 index 0000000000..5b6f70e32e --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/rc5.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 rc5 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\rc4', + '\phpbb\db\migration\data\v310\profilefield_field_validation_length', + '\phpbb\db\migration\data\v310\remove_acp_styles_cache', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.0-RC5')), + ); + } +} diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 1c4315f937..8853bd4382 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-RC4 -phpbb_version = 3.1.0-RC4 +style_version = 3.1.0-RC5 +phpbb_version = 3.1.0-RC5 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index ddd95780d7..8a6ea1a0bb 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -62,6 +62,7 @@ </div> <!-- ENDIF --> <!-- END contact --> + </div> </div> </div> </dd> diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 4362d50b37..43e994f1f9 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -39,9 +39,13 @@ <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <div class="buttons"> + <!-- EVENT viewforum_buttons_top_before --> + <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 -->"> <!-- IF S_IS_LOCKED -->{L_BUTTON_FORUM_LOCKED}<!-- ELSE -->{L_BUTTON_NEW_TOPIC}<!-- ENDIF --> </a> + + <!-- EVENT viewforum_buttons_top_after --> </div> <!-- ENDIF --> @@ -60,7 +64,7 @@ <div class="pagination"> <!-- 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> • <!-- ENDIF --> - {TOTAL_TOPICS} + {TOTAL_TOPICS} <!-- IF .pagination --> <!-- INCLUDE pagination.html --> <!-- ELSE --> @@ -227,15 +231,19 @@ <div class="action-bar bottom"> <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <div class="buttons"> + <!-- EVENT viewforum_buttons_bottom_before --> + <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 -->"> <!-- IF S_IS_LOCKED -->{L_BUTTON_FORUM_LOCKED}<!-- ELSE -->{L_BUTTON_NEW_TOPIC}<!-- ENDIF --> </a> + + <!-- EVENT viewforum_buttons_bottom_after --> </div> <!-- ENDIF --> <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> • <!-- ENDIF --> - {TOTAL_TOPICS} + {TOTAL_TOPICS} <!-- IF .pagination --> <!-- INCLUDE pagination.html --> <!-- ELSE --> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 127a3ca1aa..621e2d6143 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -28,11 +28,15 @@ <div class="action-bar top"> <div class="buttons"> + <!-- EVENT viewtopic_buttons_top_before --> + <!-- 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 -->"> <!-- IF S_IS_LOCKED -->{L_BUTTON_TOPIC_LOCKED}<!-- ELSE -->{L_BUTTON_POST_REPLY}<!-- ENDIF --> </a> <!-- ENDIF --> + + <!-- EVENT viewtopic_buttons_top_after --> </div> <!-- INCLUDE viewtopic_topic_tools.html --> @@ -338,11 +342,15 @@ <!-- EVENT viewtopic_body_topic_actions_before --> <div class="action-bar bottom"> <div class="buttons"> + <!-- EVENT viewtopic_buttons_bottom_before --> + <!-- 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 -->"> <!-- IF S_IS_LOCKED -->{L_BUTTON_TOPIC_LOCKED}<!-- ELSE -->{L_BUTTON_POST_REPLY}<!-- ENDIF --> </a> <!-- ENDIF --> + + <!-- EVENT viewtopic_buttons_bottom_after --> </div> <!-- INCLUDE viewtopic_topic_tools.html --> diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index 0c0bd04456..b8de165608 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-RC4 -phpbb_version = 3.1.0-RC4 +style_version = 3.1.0-RC5 +phpbb_version = 3.1.0-RC5 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index e34d1807e6..925581ffcd 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -150,9 +150,16 @@ <!-- IF S_DISPLAY_POST_INFO or TOTAL_TOPICS --> <table width="100%" cellspacing="1"> <tr> + <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"> + <!-- EVENT viewforum_buttons_top_before --> + <!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT --> - <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> + <a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a> <!-- ENDIF --> + + <!-- EVENT viewforum_buttons_top_after --> + </td> + <!-- IF TOTAL_TOPICS --> <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> <td class="gensmall" nowrap="nowrap"> [ {TOTAL_TOPICS} ] </td> @@ -273,9 +280,16 @@ <!-- IF S_DISPLAY_POST_INFO or TOTAL_TOPICS --> <table width="100%" cellspacing="1"> <tr> + <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"> + <!-- EVENT viewforum_buttons_bottom_before --> + <!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT --> - <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td> + <a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a> <!-- ENDIF --> + + <!-- EVENT viewforum_buttons_bottom_after --> + </td> + <!-- IF TOTAL_TOPICS --> <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> <td class="gensmall" nowrap="nowrap"> [ {TOTAL_TOPICS} ] </td> diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 838f6c5f03..24a8c12be0 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -32,10 +32,14 @@ <table width="100%" cellspacing="1"> <tr> <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"> + <!-- EVENT viewtopic_buttons_top_before --> + <!-- IF not S_IS_BOT --> <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a> <!-- ENDIF --> <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF --> <!-- ENDIF --> + + <!-- EVENT viewtopic_buttons_top_after --> </td> <!-- IF TOTAL_POSTS --> <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> @@ -371,10 +375,14 @@ <table width="100%" cellspacing="1"> <tr> <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap"> + <!-- EVENT viewtopic_buttons_bottom_before --> + <!-- IF not S_IS_BOT --> <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a> <!-- ENDIF --> <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF --> <!-- ENDIF --> + + <!-- EVENT viewtopic_buttons_bottom_after --> </td> <!-- IF TOTAL_POSTS --> <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index a340dbe5ad..75276d7bfc 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1270,7 +1270,7 @@ while ($row = $db->sql_fetchrow($result)) $user_cache[$poster_id] = $user_cache_data; - $user_rank_data = phpbb_get_user_rank($row, false); + $user_rank_data = phpbb_get_user_rank($row, $row['user_posts']); $user_cache[$poster_id]['rank_title'] = $user_rank_data['title']; $user_cache[$poster_id]['rank_image'] = $user_rank_data['img']; $user_cache[$poster_id]['rank_image_src'] = $user_rank_data['img_src']; diff --git a/tests/cache/cache_memory.php b/tests/cache/cache_memory.php new file mode 100644 index 0000000000..806edb963a --- /dev/null +++ b/tests/cache/cache_memory.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. + * + */ + +class phpbb_cache_memory extends \phpbb\cache\driver\memory +{ + protected $data = array(); + + /** + * Set cache path + */ + function phpbb_cache_memory() + { + } + + /** + * Fetch an item from the cache + * + * @access protected + * @param string $var Cache key + * @return mixed Cached data + */ + function _read($var) + { + return $this->data[$var]; + } + + /** + * Store data in the cache + * + * @access protected + * @param string $var Cache key + * @param mixed $data Data to store + * @param int $ttl Time-to-live of cached data + * @return bool True if the operation succeeded + */ + function _write($var, $data, $ttl = 2592000) + { + $this->data[$var] = $data; + return true; + } + + /** + * Remove an item from the cache + * + * @access protected + * @param string $var Cache key + * @return bool True if the operation succeeded + */ + function _delete($var) + { + unset($this->data[$var]); + return true; + } +} diff --git a/tests/cache/cache_memory_test.php b/tests/cache/cache_memory_test.php new file mode 100644 index 0000000000..9f92e8d8dc --- /dev/null +++ b/tests/cache/cache_memory_test.php @@ -0,0 +1,129 @@ +<?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. + * + */ + +require_once dirname(__FILE__) . '/cache_memory.php'; + +class phpbb_cache_memory_test extends phpbb_database_test_case +{ + protected $cache; + protected $db; + + public function getDataSet() + { + return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/cache_memory.xml'); + } + + protected function setUp() + { + global $db; + parent::setUp(); + + $this->cache = new phpbb_cache_memory(); + $db = $this->new_dbal(); + $this->db = $db; + } + + static public function cache_single_query_data() + { + return array( + array( + array( + array( + 'SELECT * FROM ' . POSTS_TABLE, + 3, + ), + ), + POSTS_TABLE, + ), + array( + array( + array( + 'SELECT * FROM ' . POSTS_TABLE, + 3, + ), + array( + 'SELECT * FROM ' . POSTS_TABLE . ' p + LEFT JOIN ' . TOPICS_TABLE . ' t ON p.topic_id = t.topic_id', + 3, + ), + ), + POSTS_TABLE, + ), + array( + array( + array( + 'SELECT * FROM ' . POSTS_TABLE, + 3, + ), + array( + 'SELECT * FROM ' . POSTS_TABLE . ' p + LEFT JOIN ' . TOPICS_TABLE . ' t ON p.topic_id = t.topic_id', + 3, + ), + array( + 'SELECT * FROM ' . POSTS_TABLE . ' p + LEFT JOIN ' . TOPICS_TABLE . ' t ON p.topic_id = t.topic_id + LEFT JOIN ' . USERS_TABLE . ' u ON p.poster_id = u.user_id', + 3, + ), + ), + POSTS_TABLE, + ), + array( + array( + array( + 'SELECT * FROM ' . POSTS_TABLE . ' p + LEFT JOIN ' . TOPICS_TABLE . ' t ON p.topic_id = t.topic_id', + 3, + ), + array( + 'SELECT * FROM ' . POSTS_TABLE . ' p + LEFT JOIN ' . TOPICS_TABLE . ' t ON p.topic_id = t.topic_id + LEFT JOIN ' . USERS_TABLE . ' u ON p.poster_id = u.user_id', + 3, + ), + ), + TOPICS_TABLE, + ), + ); + } + + /** + * @dataProvider cache_single_query_data + */ + public function test_cache_single_query($sql_queries, $table) + { + foreach ($sql_queries as $query) + { + $sql_request_res = $this->db->sql_query($query[0]); + + $this->cache->sql_save($this->db, $query[0], $sql_request_res, 1); + + $results = array(); + $query_id = $this->cache->sql_load($query[0]); + while ($row = $this->cache->sql_fetchrow($query_id)) + { + $results[] = $row; + } + $this->cache->sql_freeresult($query_id); + $this->assertEquals($query[1], sizeof($results)); + } + + $this->cache->destroy('sql', $table); + + foreach ($sql_queries as $query) + { + $this->assertNotEquals(false, $this->cache->sql_load($query[0])); + } + } +} diff --git a/tests/cache/fixtures/cache_memory.xml b/tests/cache/fixtures/cache_memory.xml new file mode 100644 index 0000000000..9c19ebb7ba --- /dev/null +++ b/tests/cache/fixtures/cache_memory.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_topics"> + <column>topic_id</column> + <column>forum_id</column> + <column>topic_title</column> + <column>topic_first_post_id</column> + <column>topic_last_post_id</column> + <row> + <value>1</value> + <value>1</value> + <value>Topic</value> + <value>2</value> + <value>2</value> + </row> + </table> + <table name="phpbb_posts"> + <column>post_id</column> + <column>poster_id</column> + <column>topic_id</column> + <column>forum_id</column> + <column>post_text</column> + <row> + <value>1</value> + <value>1</value> + <value>1</value> + <value>1</value> + <value>Post 1</value> + </row> + <row> + <value>2</value> + <value>2</value> + <value>1</value> + <value>1</value> + <value>Post 2</value> + </row> + <row> + <value>3</value> + <value>3</value> + <value>1</value> + <value>1</value> + <value>Post 3</value> + </row> + </table> + <table name="phpbb_users"> + <column>user_id</column> + <column>user_posts</column> + <column>username</column> + <column>username_clean</column> + <column>user_permissions</column> + <column>user_sig</column> + <row> + <value>1</value> + <value>1</value> + <value>user 1</value> + <value>user 1</value> + <value></value> + <value></value> + </row> + <row> + <value>2</value> + <value>1</value> + <value>user 2</value> + <value>user 2</value> + <value></value> + <value></value> + </row> + <row> + <value>3</value> + <value>1</value> + <value>user 3</value> + <value>user 3</value> + <value></value> + <value></value> + </row> + </table> +</dataset> diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index 9dbb7150f1..fc1a3632f4 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -54,46 +54,43 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test static public function setUpBeforeClass() { + global $phpbb_root_path, $phpEx; + $setup_extensions = static::setup_extensions(); - self::$schema_file = ''; + + $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx); + $finder->core_path('phpbb/db/migration/data/'); if (!empty($setup_extensions)) { - $schema_md5 = md5(serialize($setup_extensions)); - - self::$schema_file = __DIR__ . '/../tmp/' . $schema_md5 . '.json'; - self::$phpbb_schema_copy = __DIR__ . '/../tmp/schema_phpbb_copy.json'; - self::$install_schema_file = __DIR__ . '/../../phpBB/install/schemas/schema.json'; - - if (!file_exists(self::$schema_file)) - { - global $phpbb_root_path, $phpEx, $table_prefix; + $finder->set_extensions($setup_extensions) + ->extension_directory('/migrations'); + } + $classes = $finder->get_classes(); - $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx); - $classes = $finder->core_path('phpbb/db/migration/data/') - ->set_extensions($setup_extensions) - ->extension_directory('/migrations') - ->get_classes(); + $schema_sha1 = sha1(serialize($classes)); + self::$schema_file = __DIR__ . '/../tmp/' . $schema_sha1 . '.json'; + self::$install_schema_file = __DIR__ . '/../../phpBB/install/schemas/schema.json'; - $db = new \phpbb\db\driver\sqlite(); - $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); - $schema_data = $schema_generator->get_schema(); + if (!file_exists(self::$schema_file)) + { - file_put_contents(self::$schema_file, json_encode($schema_data)); - } + global $table_prefix; - copy(self::$install_schema_file, self::$phpbb_schema_copy); - copy(self::$schema_file, self::$install_schema_file); + $db = new \phpbb\db\driver\sqlite(); + $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); + file_put_contents(self::$schema_file, json_encode($schema_generator->get_schema())); } + copy(self::$schema_file, self::$install_schema_file); + parent::setUpBeforeClass(); } static public function tearDownAfterClass() { - if (self::$schema_file !== '') + if (file_exists(self::$install_schema_file)) { - copy(self::$phpbb_schema_copy, self::$install_schema_file); - unlink(self::$schema_file); + unlink(self::$install_schema_file); } parent::tearDownAfterClass(); diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php index 92e2080dba..5d643e43e2 100644 --- a/tests/test_framework/phpbb_database_test_connection_manager.php +++ b/tests/test_framework/phpbb_database_test_connection_manager.php @@ -356,8 +356,23 @@ class phpbb_database_test_connection_manager } // Ok we have the db info go ahead and work on building the table - $db_table_schema = file_get_contents($directory . 'schema.json'); - $db_table_schema = json_decode($db_table_schema, true); + if (file_exists($directory . 'schema.json')) + { + $db_table_schema = file_get_contents($directory . 'schema.json'); + $db_table_schema = json_decode($db_table_schema, true); + } + else + { + global $phpbb_root_path, $phpEx, $table_prefix; + + $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx); + $classes = $finder->core_path('phpbb/db/migration/data/') + ->get_classes(); + + $db = new \phpbb\db\driver\sqlite(); + $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix); + $db_table_schema = $schema_generator->get_schema(); + } $db_tools = new \phpbb\db\tools($db, true); foreach ($db_table_schema as $table_name => $table_data) |