aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml42
-rw-r--r--phpBB/.htaccess10
-rw-r--r--phpBB/adm/style/acp_groups.html9
-rw-r--r--phpBB/adm/style/admin.css13
-rw-r--r--phpBB/adm/style/installer_convert.html87
-rw-r--r--phpBB/adm/style/installer_footer.html9
-rw-r--r--phpBB/assets/javascript/core.js4
-rw-r--r--phpBB/assets/javascript/installer.js62
-rw-r--r--phpBB/composer.json5
-rw-r--r--phpBB/composer.lock621
-rw-r--r--phpBB/config/default/container/services_cron.yml2
-rw-r--r--phpBB/config/default/container/services_files.yml1
-rw-r--r--phpBB/config/installer/container/services_install_controller.yml16
-rw-r--r--phpBB/config/installer/container/services_install_data.yml1
-rw-r--r--phpBB/config/installer/container/services_install_database.yml30
-rw-r--r--phpBB/config/installer/container/services_install_finish.yml1
-rw-r--r--phpBB/config/installer/container/services_install_navigation.yml7
-rw-r--r--phpBB/config/installer/container/services_installer.yml3
-rw-r--r--phpBB/config/installer/container/services_update_requirements.yml1
-rw-r--r--phpBB/config/installer/routing/installer.yml25
-rw-r--r--phpBB/docs/CHANGELOG.html89
-rw-r--r--phpBB/docs/events.md16
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php2
-rw-r--r--phpBB/includes/acp/acp_board.php1
-rw-r--r--phpBB/includes/acp/acp_groups.php5
-rw-r--r--phpBB/includes/acp/acp_users.php8
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php6
-rw-r--r--phpBB/includes/functions_acp.php4
-rw-r--r--phpBB/includes/functions_admin.php6
-rw-r--r--phpBB/includes/functions_messenger.php2
-rw-r--r--phpBB/includes/functions_user.php23
-rw-r--r--phpBB/includes/mcp/mcp_front.php10
-rw-r--r--phpBB/includes/mcp/mcp_reports.php6
-rw-r--r--phpBB/install/convert/controller/convertor.php866
-rw-r--r--phpBB/install/convert/convert.php60
-rw-r--r--phpBB/install/convert/convertor.php1618
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rwxr-xr-xphpBB/install/phpbbcli.php2
-rw-r--r--phpBB/install/schemas/schema.json3389
-rw-r--r--phpBB/install/schemas/schema_data.sql3
-rw-r--r--phpBB/install/startup.php2
-rw-r--r--phpBB/language/en/acp/board.php2
-rw-r--r--phpBB/language/en/acp/groups.php2
-rw-r--r--phpBB/language/en/help/bbcode.php4
-rw-r--r--phpBB/language/en/install.php132
-rw-r--r--phpBB/memberlist.php32
-rw-r--r--phpBB/phpbb/cache/driver/base.php1
-rw-r--r--phpBB/phpbb/console/command/db/migration_command.php2
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_plupload.php16
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/v318rc1.php32
-rw-r--r--phpBB/phpbb/db/migration/data/v320/default_data_type_ids.php361
-rw-r--r--phpBB/phpbb/db/migration/data/v320/remote_upload_validation.php31
-rw-r--r--phpBB/phpbb/db/migration/data/v320/text_reparser.php7
-rw-r--r--phpBB/phpbb/db/migration/data/v320/v320b1.php39
-rw-r--r--phpBB/phpbb/db/migration/migration.php34
-rw-r--r--phpBB/phpbb/db/migration/migration_interface.php70
-rw-r--r--phpBB/phpbb/db/migration/schema_generator.php9
-rw-r--r--phpBB/phpbb/db/migrator.php41
-rw-r--r--phpBB/phpbb/db/tools/mssql.php2
-rw-r--r--phpBB/phpbb/db/tools/postgres.php1
-rw-r--r--phpBB/phpbb/db/tools/tools.php20
-rw-r--r--phpBB/phpbb/di/container_builder.php31
-rw-r--r--phpBB/phpbb/extension/base.php12
-rw-r--r--phpBB/phpbb/files/types/remote.php119
-rw-r--r--phpBB/phpbb/install/controller/archive_download.php6
-rw-r--r--phpBB/phpbb/install/controller/helper.php12
-rw-r--r--phpBB/phpbb/install/controller/install.php3
-rw-r--r--phpBB/phpbb/install/controller/update.php3
-rw-r--r--phpBB/phpbb/install/helper/config.php40
-rw-r--r--phpBB/phpbb/install/helper/container_factory.php18
-rw-r--r--phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php92
-rw-r--r--phpBB/phpbb/install/helper/iohandler/cli_iohandler.php9
-rw-r--r--phpBB/phpbb/install/helper/iohandler/factory.php2
-rw-r--r--phpBB/phpbb/install/helper/iohandler/iohandler_base.php8
-rw-r--r--phpBB/phpbb/install/helper/iohandler/iohandler_interface.php22
-rw-r--r--phpBB/phpbb/install/helper/navigation/convertor_navigation.php78
-rw-r--r--phpBB/phpbb/install/installer.php116
-rw-r--r--phpBB/phpbb/install/module/install_data/task/add_bots.php22
-rw-r--r--phpBB/phpbb/install/module/install_data/task/add_modules.php428
-rw-r--r--phpBB/phpbb/install/module/install_database/task/add_config_settings.php20
-rw-r--r--phpBB/phpbb/install/module/install_database/task/add_default_data.php21
-rw-r--r--phpBB/phpbb/install/module/install_database/task/add_tables.php151
-rw-r--r--phpBB/phpbb/install/module/install_database/task/create_schema.php13
-rw-r--r--phpBB/phpbb/install/module/install_database/task/create_schema_file.php164
-rw-r--r--phpBB/phpbb/install/module/install_database/task/set_up_database.php164
-rw-r--r--phpBB/phpbb/install/module/install_filesystem/task/create_config_file.php2
-rw-r--r--phpBB/phpbb/install/module/install_finish/task/notify_user.php6
-rw-r--r--phpBB/phpbb/install/module/install_finish/task/populate_migrations.php24
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_file_updater_method.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_server_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_update_ftp_data.php1
-rw-r--r--phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php38
-rw-r--r--phpBB/phpbb/install/module/requirements/abstract_requirements_module.php37
-rw-r--r--phpBB/phpbb/install/module/requirements/task/check_update.php16
-rw-r--r--phpBB/phpbb/install/module/update_database/task/update.php2
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php1
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php1
-rw-r--r--phpBB/phpbb/install/module_base.php97
-rw-r--r--phpBB/phpbb/language/language.php26
-rw-r--r--phpBB/phpbb/path_helper.php9
-rw-r--r--phpBB/phpbb/session.php2
-rw-r--r--phpBB/phpbb/template/assets_bag.php95
-rw-r--r--phpBB/phpbb/template/twig/definition.php5
-rw-r--r--phpBB/phpbb/template/twig/environment.php69
-rw-r--r--phpBB/phpbb/template/twig/node/includeasset.php25
-rw-r--r--phpBB/phpbb/template/twig/node/includecss.php16
-rw-r--r--phpBB/phpbb/template/twig/node/includejs.php16
-rw-r--r--phpBB/posting.php2
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/confirm_delete_body.html2
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html12
-rw-r--r--phpBB/styles/prosilver/template/mcp_approve.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_ban.html6
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_logs.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_move.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_front.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_queue.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_reports.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_front.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_list.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_post.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_user.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html10
-rw-r--r--phpBB/styles/prosilver/template/memberlist_team.html2
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html10
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_layout.html12
-rw-r--r--phpBB/styles/prosilver/template/posting_pm_layout.html4
-rw-r--r--phpBB/styles/prosilver/template/posting_smilies.html8
-rw-r--r--phpBB/styles/prosilver/template/report_body.html4
-rw-r--r--phpBB/styles/prosilver/template/search_results.html44
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html16
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_remote.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_manage.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_membership.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_front.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html10
-rw-r--r--phpBB/styles/prosilver/template/ucp_notifications.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_post.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_view.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_reg_details.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_foes.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_friends.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html12
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html12
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html4
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_topic_tools.html2
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css4
-rw-r--r--phpBB/styles/prosilver/theme/colours.css2
-rw-r--r--phpBB/styles/prosilver/theme/icons.css8
-rw-r--r--phpBB/styles/prosilver/theme/links.css6
-rw-r--r--phpBB/styles/prosilver/theme/normalize.css2
-rw-r--r--phpBB/styles/prosilver/theme/stylesheet.css2
-rw-r--r--phpBB/viewonline.php2
-rw-r--r--tests/composer.json5
-rw-r--r--tests/composer.lock66
-rw-r--r--tests/extension/ext/vendor2/bar/migrations/bar.php7
-rw-r--r--tests/extension/ext/vendor2/bar/migrations/foo.php54
-rw-r--r--tests/extension/extension_base_test.php11
-rw-r--r--tests/files/types_remote_test.php34
-rw-r--r--tests/functional/fileupload_remote_test.php5
-rw-r--r--tests/functional/plupload_test.php12
-rw-r--r--tests/installer/installer_config_test.php7
-rw-r--r--tests/language/language_test.php19
-rw-r--r--tests/mock/migrator.php4
-rw-r--r--tests/mock/phpbb_di_container_builder.php10
-rw-r--r--tests/path_helper/path_helper_test.php37
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php15
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php34
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php67
-rw-r--r--tests/ui/quick_links_test.php1
-rwxr-xr-xtravis/install-phpbb-test-dependencies.sh16
-rwxr-xr-xtravis/setup-phpbb.sh1
187 files changed, 9548 insertions, 1170 deletions
diff --git a/build/build.xml b/build/build.xml
index f517b679cf..6d5b652b0a 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.2.0-a3-dev" />
- <property name="prevversion" value="3.2.0-a1" />
- <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1" />
+ <property name="newversion" value="3.2.0-b2-dev" />
+ <property name="prevversion" value="3.2.0-b1" />
+ <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.2.0-a1, 3.2.0-a2" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -318,6 +318,35 @@
<delete file="${dir}/vendor/google/recaptcha/phpunit.xml.dist" />
<delete file="${dir}/vendor/google/recaptcha/README.md" />
+ <delete dir="${dir}/vendor/guzzlehttp/guzzle/build" />
+ <delete dir="${dir}/vendor/guzzlehttp/guzzle/docs" />
+ <delete dir="${dir}/vendor/guzzlehttp/guzzle/tests" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/CHANGELOG.md" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/.editorconfig" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/.gitignore" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/Makefile" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/README.md" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/.travis.yml" />
+ <delete file="${dir}/vendor/guzzlehttp/guzzle/UPGRADING.md" />
+
+ <delete dir="${dir}/vendor/guzzlehttp/ringphp/docs" />
+ <delete dir="${dir}/vendor/guzzlehttp/ringphp/tests" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/CHANGELOG.md" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/.gitignore" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/Makefile" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/README.rst" />
+ <delete file="${dir}/vendor/guzzlehttp/ringphp/.travis.yml" />
+
+ <delete dir="${dir}/vendor/guzzlehttp/streams/tests" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/CHANGELOG.rst" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/.gitignore" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/Makefile" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/README.rst" />
+ <delete file="${dir}/vendor/guzzlehttp/streams/.travis.yml" />
+
<delete dir="${dir}/vendor/lusitanian/oauth/examples" />
<delete dir="${dir}/vendor/lusitanian/oauth/tests" />
<delete file="${dir}/vendor/lusitanian/oauth/.gitignore" />
@@ -335,6 +364,13 @@
<delete file="${dir}/vendor/psr/log/.gitignore" />
<delete file="${dir}/vendor/psr/log/README.md" />
+ <delete dir="${dir}/vendor/react/promise/tests" />
+ <delete file="${dir}/vendor/react/promise/CHANGELOG.md" />
+ <delete file="${dir}/vendor/react/promise/.gitignore" />
+ <delete file="${dir}/vendor/react/promise/phpunit.xml.dist" />
+ <delete file="${dir}/vendor/react/promise/README.md" />
+ <delete file="${dir}/vendor/react/promise/.travis.yml" />
+
<delete dir="${dir}/vendor/s9e/text-formatter/.git" />
<delete dir="${dir}/vendor/symfony/config/.git" />
diff --git a/phpBB/.htaccess b/phpBB/.htaccess
index 1ae74ed825..53bce762ea 100644
--- a/phpBB/.htaccess
+++ b/phpBB/.htaccess
@@ -2,6 +2,16 @@
RewriteEngine on
#
+# Uncomment the statement below if URL rewriting doesn't
+# work properly. If you installed phpBB in a subdirectory
+# of your site, properly set the argument for the statement.
+# e.g.: if your domain is test.com and you installed phpBB
+# in http://www.test.com/phpBB/index.php you have to set
+# the statement RewriteBase /phpBB/
+#
+#RewriteBase /
+
+#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index 23f6e744c0..ffde27a437 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -267,11 +267,12 @@
<!-- EVENT acp_groups_manage_before -->
<table class="table1">
- <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <col class="col1" /><col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>
<th style="width: 50%">{L_GROUP}</th>
<th>{L_TOTAL_MEMBERS}</th>
+ <th>{L_PENDING_MEMBERS}</th>
<th colspan="2">{L_OPTIONS}</th>
<th>{L_ACTION}</th>
</tr>
@@ -281,7 +282,7 @@
<!-- IF groups.S_SPECIAL -->
<!-- IF groups.S_FIRST_ROW -->
<tr>
- <td colspan="5" class="row3">{L_NO_GROUPS_CREATED}</td>
+ <td colspan="6" class="row3">{L_NO_GROUPS_CREATED}</td>
</tr>
<!-- ENDIF -->
</tbody>
@@ -302,11 +303,12 @@
<p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
<table class="table1">
- <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
+ <col class="col1" /><col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
<th style="width: 50%">{L_GROUP}</th>
<th>{L_TOTAL_MEMBERS}</th>
+ <th>{L_PENDING_MEMBERS}</th>
<th colspan="2">{L_OPTIONS}</th>
<th>{L_ACTION}</th>
</tr>
@@ -316,6 +318,7 @@
<tr>
<td><strong>{groups.GROUP_NAME}</strong></td>
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
+ <td style="text-align: center;">{groups.PENDING_MEMBERS}</td>
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
<td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index e38e1cc3d7..4bb9922d56 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -2554,6 +2554,7 @@ fieldset.permissions .padding {
#progress-bar {
position: relative;
width: 90%;
+ text-align: center;
height: 25px;
margin: 20px auto;
border: 1px solid #cecece;
@@ -2563,10 +2564,7 @@ fieldset.permissions .padding {
position: absolute;
top: 0;
width: 100%;
- text-align: center;
- line-height: 25px;
- font-weight: bold;
- color: #fff;
+ color: #000;
}
#progress-bar #progress-bar-filler {
@@ -2577,4 +2575,11 @@ fieldset.permissions .padding {
background-color: #3c84ad;
width: 0;
height: 25px;
+ overflow: hidden;
+ color: #fff;
+}
+
+#progress-bar p {
+ line-height: 25px;
+ font-weight: bold;
}
diff --git a/phpBB/adm/style/installer_convert.html b/phpBB/adm/style/installer_convert.html
new file mode 100644
index 0000000000..aa16542b6b
--- /dev/null
+++ b/phpBB/adm/style/installer_convert.html
@@ -0,0 +1,87 @@
+<!-- INCLUDE installer_header.html -->
+<!-- IF TITLE --><h1>{TITLE}</h1><!-- ENDIF -->
+<!-- IF S_ERROR_BOX -->
+<div class="errorbox">
+ <h3>{ERROR_TITLE}</h3>
+ <p>{ERROR_MSG}</p>
+</div>
+<!-- ENDIF -->
+<!-- IF .errors -->
+<div id="error-container">
+<!-- BEGIN errors -->
+ <strong>{errors.TITLE}</strong>
+ <!-- IF errors.DESCRIPTION --><p>{errors.DESCRIPTION}</p><!-- ENDIF -->
+<!-- END errors -->
+</div>
+<!-- ENDIF -->
+<!-- IF BODY --><p>{BODY}</p><!-- ENDIF -->
+<!-- IF CONTENT -->{CONTENT}<!-- ENDIF -->
+<!-- IF S_CONV_IN_PROGRESS -->
+<p class="centered-text"><a href="{U_ACTION}" class="button1<!-- IF S_REFRESH --> disabled<!-- ENDIF -->"<!-- IF S_REFRESH --> onclick="return false;"<!-- ENDIF -->>{L_SUBMIT}</a></p>
+<!-- ENDIF -->
+<!-- IF S_CONTINUE -->
+<div id="download-wrapper" class="download-box">
+ <p class="centered-text">
+ <a href="{U_NEW_ACTION}" class="button1">{L_CONVERT_NEW_CONVERSION}</a>
+ <a href="{U_CONTINUE_ACTION}" class="button1">{L_CONTINUE_OLD_CONVERSION}</a>
+ </p>
+</div>
+<!-- ENDIF -->
+<!-- IF S_LIST -->
+<table class="table1">
+ <caption>{L_AVAILABLE_CONVERTORS}</caption>
+ <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
+ <thead>
+ <tr>
+ <th>{L_SOFTWARE}</th>
+ <th>{L_VERSION}</th>
+ <th>{L_AUTHOR}</th>
+ <th>{L_CONVERT_OPTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF .convertors -->
+ <!-- BEGIN convertors -->
+ <tr>
+ <td>{convertors.SOFTWARE}</td>
+ <td>{convertors.VERSION}</td>
+ <td>{convertors.AUTHOR}</td>
+ <td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
+ </tr>
+ <!-- END convertors -->
+ <!-- ELSE -->
+ <tr>
+ <td>{L_NO_CONVERTORS}</td>
+ <td>-</td>
+ <td>-</td>
+ <td>-</td>
+ </tr>
+ <!-- ENDIF -->
+ </tbody>
+</table>
+<!-- ENDIF -->
+<!-- IF .checks -->
+<fieldset>
+
+ <!-- BEGIN checks -->
+ <!-- IF checks.S_LEGEND -->
+ <!-- IF not checks.S_FIRST_ROW -->
+</fieldset>
+
+<fieldset>
+ <!-- ENDIF -->
+ <legend>{checks.LEGEND}</legend>
+ <!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
+ <!-- ELSE -->
+
+ <dl>
+ <dt><label>{checks.TITLE}{L_COLON}</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dd>{checks.RESULT}</dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- END checks -->
+
+</fieldset>
+<!-- ENDIF -->
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/installer.js -->
+<!-- INCLUDE installer_footer.html -->
diff --git a/phpBB/adm/style/installer_footer.html b/phpBB/adm/style/installer_footer.html
index 63aebec993..fefa8f6d3f 100644
--- a/phpBB/adm/style/installer_footer.html
+++ b/phpBB/adm/style/installer_footer.html
@@ -11,6 +11,15 @@
</div>
</div>
+<script type="text/javascript">
+<!--
+installLang = {
+ title: '{LA_TIMEOUT_DETECTED_TITLE}',
+ msg: '{LA_TIMEOUT_DETECTED_MESSAGE}'
+};
+//-->
+</script>
+
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 91f5521c7a..5844537fc8 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -1032,7 +1032,7 @@ phpbb.resizeTextArea = function($items, options) {
function autoResize(item) {
function setHeight(height) {
- height += parseInt($item.css('height'), 10) - $item.height();
+ height += parseInt($item.css('height'), 10) - $item.innerHeight();
$item
.css({ height: height + 'px', resize: 'none' })
.addClass('auto-resized');
@@ -1051,7 +1051,7 @@ phpbb.resizeTextArea = function($items, options) {
configuration.maxHeight
),
$item = $(item),
- height = parseInt($item.height(), 10),
+ height = parseInt($item.innerHeight(), 10),
scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
if (height < 0) {
diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js
index c5909556c6..d9f446a28d 100644
--- a/phpBB/assets/javascript/installer.js
+++ b/phpBB/assets/javascript/installer.js
@@ -12,6 +12,7 @@
var progressTimer = null;
var currentProgress = 0;
var refreshRequested = false;
+ var transmissionOver = false;
// Template related variables
var $contentWrapper = $('.install-body').find('.main');
@@ -177,7 +178,7 @@
* @param progressObject
*/
function setProgress(progressObject) {
- var $statusText, $progressBar, $progressText, $progressFiller;
+ var $statusText, $progressBar, $progressText, $progressFiller, $progressFillerText;
if (progressObject.task_name.length) {
if (!progressBarTriggered) {
@@ -189,27 +190,34 @@
$progressBar.attr('id', 'progress-bar');
$progressText = $('<p />');
$progressText.attr('id', 'progress-bar-text');
- $progressFiller = $('<span />');
+ $progressFiller = $('<div />');
$progressFiller.attr('id', 'progress-bar-filler');
- $progressFiller.html($progressText);
+ $progressFillerText = $('<p />');
+ $progressFillerText.attr('id', 'progress-bar-filler-text');
$statusText = $('<p />');
$statusText.attr('id', 'progress-status-text');
+ $progressFiller.append($progressFillerText);
+ $progressBar.append($progressText);
$progressBar.append($progressFiller);
$progressBarWrapper.append($statusText);
$progressBarWrapper.append($progressBar);
+ $progressFillerText.css('width', $progressBar.width());
+
progressBarTriggered = true;
} else if (progressObject.hasOwnProperty('restart')) {
clearInterval(progressTimer);
$progressFiller = $('#progress-bar-filler');
+ $progressFillerText = $('#progress-bar-filler-text');
$progressText = $('#progress-bar-text');
$statusText = $('#progress-status-text');
$progressText.text('0%');
+ $progressFillerText.text('0%');
$progressFiller.css('width', '0%');
currentProgress = 0;
@@ -236,6 +244,22 @@
}
}
+ // Redirects user
+ function redirect(url, use_ajax) {
+ if (use_ajax) {
+ resetPolling();
+
+ var xhReq = createXhrObject();
+ xhReq.open('GET', url, true);
+ xhReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ xhReq.send();
+
+ startPolling(xhReq);
+ } else {
+ window.location.href = url;
+ }
+ }
+
/**
* Parse messages from the response object
*
@@ -302,6 +326,16 @@
if (responseObject.hasOwnProperty('refresh')) {
refreshRequested = true;
}
+
+ if (responseObject.hasOwnProperty('redirect')) {
+ redirect(responseObject.redirect.url, responseObject.redirect.use_ajax);
+ }
+
+ if (responseObject.hasOwnProperty('over')) {
+ if (responseObject.over) {
+ transmissionOver = true;
+ }
+ }
}
/**
@@ -330,10 +364,21 @@
$('#loading_indicator').css('display', 'none');
resetPolling();
+ var timeoutDetected = !transmissionOver;
+
if (refreshRequested) {
refreshRequested = false;
doRefresh();
}
+
+ if (timeoutDetected) {
+ addMessage('error',
+ [{
+ title: installLang.title,
+ description: installLang.msg
+ }]
+ );
+ }
}
}
@@ -342,15 +387,20 @@
*
* @param $progressText
* @param $progressFiller
+ * @param $progressFillerText
* @param progressLimit
*/
- function incrementFiller($progressText, $progressFiller, progressLimit) {
+ function incrementFiller($progressText, $progressFiller, $progressFillerText, progressLimit) {
if (currentProgress >= progressLimit || currentProgress >= 100) {
clearInterval(progressTimer);
return;
}
+ var $progressBar = $('#progress-bar');
+
currentProgress++;
+ $progressFillerText.css('width', $progressBar.width());
+ $progressFillerText.text(currentProgress + '%');
$progressText.text(currentProgress + '%');
$progressFiller.css('width', currentProgress + '%');
}
@@ -362,13 +412,14 @@
*/
function incrementProgressBar(progressLimit) {
var $progressFiller = $('#progress-bar-filler');
+ var $progressFillerText = $('#progress-bar-filler-text');
var $progressText = $('#progress-bar-text');
var progressStart = $progressFiller.width() / $progressFiller.offsetParent().width() * 100;
currentProgress = Math.floor(progressStart);
clearInterval(progressTimer);
progressTimer = setInterval(function() {
- incrementFiller($progressText, $progressFiller, progressLimit);
+ incrementFiller($progressText, $progressFiller, $progressFillerText, progressLimit);
}, 10);
}
@@ -387,6 +438,7 @@
*/
function startPolling(xhReq) {
resetPolling();
+ transmissionOver = false;
pollTimer = setInterval(function () {
pollContent(xhReq);
}, 250);
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 1b2625c593..88df2bfa3d 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -28,6 +28,7 @@
"php": ">=5.4,<7.1",
"bantu/ini-get-wrapper": "1.0.*",
"google/recaptcha": "~1.1",
+ "guzzlehttp/guzzle": "~5.3",
"lusitanian/oauth": "^0.8.1",
"marc1706/fast-image-size": "1.1.*",
"patchwork/utf8": "1.1.*",
@@ -47,8 +48,8 @@
"twig/twig": "1.*"
},
"require-dev": {
- "fabpot/goutte": "1.0.*",
- "guzzle/guzzle": "3.9.*",
+ "fabpot/goutte": "~2.0",
+ "facebook/webdriver": "~1.1",
"phing/phing": "2.4.*",
"phpunit/dbunit": "1.3.*",
"phpunit/phpunit": "4.1.*",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index c5789e90e8..7cb6c160ce 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "bcebf4613c2d6273c6d92494b8d08ad6",
- "content-hash": "5b630fa42608a550e8dfbd9346893b6b",
+ "hash": "2de20b0ffe0ca05fb62a7c685a25ca79",
+ "content-hash": "6e427257e82c0d33fc94040d9685f516",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -83,6 +83,207 @@
"time": "2015-09-02 17:23:59"
},
{
+ "name": "guzzlehttp/guzzle",
+ "version": "5.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "f3c8c22471cb55475105c14769644a49c3262b93"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93",
+ "reference": "f3c8c22471cb55475105c14769644a49c3262b93",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/ringphp": "^1.1",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.0",
+ "psr/log": "^1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
+ ],
+ "time": "2015-05-20 03:47:55"
+ },
+ {
+ "name": "guzzlehttp/ringphp",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/RingPHP.git",
+ "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
+ "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/streams": "~3.0",
+ "php": ">=5.4.0",
+ "react/promise": "~2.0"
+ },
+ "require-dev": {
+ "ext-curl": "*",
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "ext-curl": "Guzzle will use specific adapters if cURL is present"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Ring\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
+ "time": "2015-05-20 03:37:09"
+ },
+ {
+ "name": "guzzlehttp/streams",
+ "version": "3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/streams.git",
+ "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
+ "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Stream\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ }
+ ],
+ "description": "Provides a simple abstraction over streams of data",
+ "homepage": "http://guzzlephp.org/",
+ "keywords": [
+ "Guzzle",
+ "stream"
+ ],
+ "time": "2014-10-12 19:18:40"
+ },
+ {
+ "name": "ircmaxell/password-compat",
+ "version": "v1.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ircmaxell/password_compat.git",
+ "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c",
+ "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c",
+ "shasum": ""
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "lib/password.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anthony Ferrara",
+ "email": "ircmaxell@php.net",
+ "homepage": "http://blog.ircmaxell.com"
+ }
+ ],
+ "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash",
+ "homepage": "https://github.com/ircmaxell/password_compat",
+ "keywords": [
+ "hashing",
+ "password"
+ ],
+ "time": "2014-11-20 16:49:30"
+ },
+ {
"name": "lusitanian/oauth",
"version": "v0.8.6",
"source": {
@@ -290,17 +491,61 @@
"time": "2012-12-21 11:40:51"
},
{
+ "name": "react/promise",
+ "version": "v2.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/promise.git",
+ "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/3b6fca09c7d56321057fa8867c8dbe1abf648627",
+ "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jan Sorgalla",
+ "email": "jsorgalla@gmail.com"
+ }
+ ],
+ "description": "A lightweight implementation of CommonJS Promises/A for PHP",
+ "time": "2015-07-03 13:48:55"
+ },
+ {
"name": "s9e/text-formatter",
- "version": "0.4.6",
+ "version": "0.4.10",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
- "reference": "da255f4be12d9b192063b2e4c9de580faee180a8"
+ "reference": "dc6b7b069d17fc18c8a40cce9e1048e25aa11fec"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/da255f4be12d9b192063b2e4c9de580faee180a8",
- "reference": "da255f4be12d9b192063b2e4c9de580faee180a8",
+ "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/dc6b7b069d17fc18c8a40cce9e1048e25aa11fec",
+ "reference": "dc6b7b069d17fc18c8a40cce9e1048e25aa11fec",
"shasum": ""
},
"require": {
@@ -310,10 +555,11 @@
"php": ">=5.3.3"
},
"suggest": {
+ "ext-curl": "Improves the performance of the MediaEmbed plugin and some JavaScript minifiers",
"ext-intl": "Allows international URLs to be accepted by the URL filter",
"ext-json": "Enables the generation of a JavaScript parser",
- "ext-mbstring": "Enables some optimizations in the PHP renderer",
- "ext-tokenizer": "Enables optimizations in the PHP renderer",
+ "ext-mbstring": "Improves the performance of the PHP renderer",
+ "ext-tokenizer": "Improves the performance of the PHP renderer",
"ext-xsl": "Enables the XSLT renderer",
"ext-zlib": "Enables gzip compression when scraping content via the MediaEmbed plugin"
},
@@ -346,20 +592,20 @@
"parser",
"shortcodes"
],
- "time": "2015-12-21 11:07:20"
+ "time": "2016-02-11 14:03:12"
},
{
"name": "symfony/config",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2"
+ "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2",
- "reference": "17d4b2e64ce1c6ba7caa040f14469b3c44d7f7d2",
+ "url": "https://api.github.com/repos/symfony/config/zipball/41ee6c70758f40fa1dbf90d019ae0a66c4a09e74",
+ "reference": "41ee6c70758f40fa1dbf90d019ae0a66c4a09e74",
"shasum": ""
},
"require": {
@@ -396,20 +642,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 13:37:56"
+ "time": "2016-01-03 15:33:41"
},
{
"name": "symfony/console",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a"
+ "reference": "d0239fb42f98dd02e7d342f793c5d2cdee0c478d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/2e06a5ccb19dcf9b89f1c6a677a39a8df773635a",
- "reference": "2e06a5ccb19dcf9b89f1c6a677a39a8df773635a",
+ "url": "https://api.github.com/repos/symfony/console/zipball/d0239fb42f98dd02e7d342f793c5d2cdee0c478d",
+ "reference": "d0239fb42f98dd02e7d342f793c5d2cdee0c478d",
"shasum": ""
},
"require": {
@@ -456,20 +702,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2015-12-22 10:25:57"
+ "time": "2016-01-14 08:33:16"
},
{
"name": "symfony/debug",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "83e51a0e8940ed5e85788ba6bfa022634aa07869"
+ "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/83e51a0e8940ed5e85788ba6bfa022634aa07869",
- "reference": "83e51a0e8940ed5e85788ba6bfa022634aa07869",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/386364a0e71158615ab9ae76b74bf84efc0bac7e",
+ "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e",
"shasum": ""
},
"require": {
@@ -513,20 +759,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 13:37:56"
+ "time": "2016-01-13 10:28:07"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "c5086d186f538c2711b9af6f727be7b0446979cd"
+ "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c5086d186f538c2711b9af6f727be7b0446979cd",
- "reference": "c5086d186f538c2711b9af6f727be7b0446979cd",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ba94a914e244e0d05f0aaef460d5558d5541d2b1",
+ "reference": "ba94a914e244e0d05f0aaef460d5558d5541d2b1",
"shasum": ""
},
"require": {
@@ -575,20 +821,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 13:37:56"
+ "time": "2016-01-12 17:46:01"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc"
+ "reference": "ee278f7c851533e58ca307f66305ccb9188aceda"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5eb815363c0388e83247e7e9853e5dbc14999cc",
- "reference": "a5eb815363c0388e83247e7e9853e5dbc14999cc",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda",
+ "reference": "ee278f7c851533e58ca307f66305ccb9188aceda",
"shasum": ""
},
"require": {
@@ -635,20 +881,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2015-10-30 20:15:42"
+ "time": "2016-01-13 10:28:07"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc"
+ "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/a7ad724530a764d70c168d321ac226ba3d2f10fc",
- "reference": "a7ad724530a764d70c168d321ac226ba3d2f10fc",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/637b64d0ee10f44ae98dbad651b1ecdf35a11e8c",
+ "reference": "637b64d0ee10f44ae98dbad651b1ecdf35a11e8c",
"shasum": ""
},
"require": {
@@ -684,20 +930,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2015-12-22 10:25:57"
+ "time": "2016-01-13 10:28:07"
},
{
"name": "symfony/finder",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6"
+ "reference": "c90fabdd97e431ee19b6383999cf35334dff27da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/dd41ae57f4f737be271d944a0cc5f5f21203a7c6",
- "reference": "dd41ae57f4f737be271d944a0cc5f5f21203a7c6",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/c90fabdd97e431ee19b6383999cf35334dff27da",
+ "reference": "c90fabdd97e431ee19b6383999cf35334dff27da",
"shasum": ""
},
"require": {
@@ -733,25 +979,26 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2015-12-05 11:09:21"
+ "time": "2016-01-14 08:26:52"
},
{
"name": "symfony/http-foundation",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "dc5172ce2d01965f50b6c51bccc5ae243709b3c2"
+ "reference": "9194b33c71da8ef4d05d22964376f2f9c95a1bfd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/dc5172ce2d01965f50b6c51bccc5ae243709b3c2",
- "reference": "dc5172ce2d01965f50b6c51bccc5ae243709b3c2",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9194b33c71da8ef4d05d22964376f2f9c95a1bfd",
+ "reference": "9194b33c71da8ef4d05d22964376f2f9c95a1bfd",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
- "symfony/polyfill-php54": "~1.0"
+ "symfony/polyfill-php54": "~1.0",
+ "symfony/polyfill-php55": "~1.0"
},
"require-dev": {
"symfony/expression-language": "~2.4|~3.0.0"
@@ -786,20 +1033,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2015-12-18 15:38:35"
+ "time": "2016-01-13 10:28:07"
},
{
"name": "symfony/http-kernel",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "f276fb5049b7ec3918f37ead373b4219b5d4ce0e"
+ "reference": "dbe146efdc040dc87cc730a926c7858bb3c3b3bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f276fb5049b7ec3918f37ead373b4219b5d4ce0e",
- "reference": "f276fb5049b7ec3918f37ead373b4219b5d4ce0e",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/dbe146efdc040dc87cc730a926c7858bb3c3b3bc",
+ "reference": "dbe146efdc040dc87cc730a926c7858bb3c3b3bc",
"shasum": ""
},
"require": {
@@ -868,7 +1115,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 15:56:42"
+ "time": "2016-01-14 12:00:59"
},
{
"name": "symfony/polyfill-mbstring",
@@ -988,17 +1235,73 @@
"time": "2015-11-04 20:28:58"
},
{
+ "name": "symfony/polyfill-php55",
+ "version": "v1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php55.git",
+ "reference": "3adc962a6250c02adb508e85ecfa6fcfee9eec47"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/3adc962a6250c02adb508e85ecfa6fcfee9eec47",
+ "reference": "3adc962a6250c02adb508e85ecfa6fcfee9eec47",
+ "shasum": ""
+ },
+ "require": {
+ "ircmaxell/password-compat": "~1.0",
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php55\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2015-11-04 20:28:58"
+ },
+ {
"name": "symfony/routing",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "b3261d88bad77de60e01f05706810413cc11367d"
+ "reference": "5451a8a1874fd4e6a4dd347ea611d86cd8441735"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/b3261d88bad77de60e01f05706810413cc11367d",
- "reference": "b3261d88bad77de60e01f05706810413cc11367d",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/5451a8a1874fd4e6a4dd347ea611d86cd8441735",
+ "reference": "5451a8a1874fd4e6a4dd347ea611d86cd8441735",
"shasum": ""
},
"require": {
@@ -1059,20 +1362,20 @@
"uri",
"url"
],
- "time": "2015-12-23 07:56:26"
+ "time": "2016-01-11 16:43:36"
},
{
"name": "symfony/twig-bridge",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "39995c1dfe1d1fbfc6605df6d02774d33ac3ce3d"
+ "reference": "e33b512de4b769a1c728cd6775e22668ae89fca9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/39995c1dfe1d1fbfc6605df6d02774d33ac3ce3d",
- "reference": "39995c1dfe1d1fbfc6605df6d02774d33ac3ce3d",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e33b512de4b769a1c728cd6775e22668ae89fca9",
+ "reference": "e33b512de4b769a1c728cd6775e22668ae89fca9",
"shasum": ""
},
"require": {
@@ -1140,20 +1443,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
- "time": "2015-12-07 21:56:39"
+ "time": "2016-01-12 17:46:01"
},
{
"name": "symfony/yaml",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966"
+ "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966",
- "reference": "ac84cbb98b68a6abbc9f5149eb96ccc7b07b8966",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8",
+ "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8",
"shasum": ""
},
"require": {
@@ -1189,20 +1492,20 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 13:37:56"
+ "time": "2016-01-13 10:28:07"
},
{
"name": "twig/twig",
- "version": "v1.23.1",
+ "version": "v1.23.3",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6"
+ "reference": "ae53fc2c312fdee63773b75cb570304f85388b08"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
- "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/ae53fc2c312fdee63773b75cb570304f85388b08",
+ "reference": "ae53fc2c312fdee63773b75cb570304f85388b08",
"shasum": ""
},
"require": {
@@ -1250,47 +1553,40 @@
"keywords": [
"templating"
],
- "time": "2015-11-05 12:49:06"
+ "time": "2016-01-11 14:02:19"
}
],
"packages-dev": [
{
"name": "fabpot/goutte",
- "version": "v1.0.7",
+ "version": "v2.0.4",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/Goutte.git",
- "reference": "794b196e76bdd37b5155cdecbad311f0a3b07625"
+ "reference": "0ad3ee6dc2d0aaa832a80041a1e09bf394e99802"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/794b196e76bdd37b5155cdecbad311f0a3b07625",
- "reference": "794b196e76bdd37b5155cdecbad311f0a3b07625",
+ "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/0ad3ee6dc2d0aaa832a80041a1e09bf394e99802",
+ "reference": "0ad3ee6dc2d0aaa832a80041a1e09bf394e99802",
"shasum": ""
},
"require": {
- "ext-curl": "*",
- "guzzle/http": "~3.1",
- "php": ">=5.3.0",
+ "guzzlehttp/guzzle": ">=4,<6",
+ "php": ">=5.4.0",
"symfony/browser-kit": "~2.1",
"symfony/css-selector": "~2.1",
- "symfony/dom-crawler": "~2.1",
- "symfony/finder": "~2.1",
- "symfony/process": "~2.1"
- },
- "require-dev": {
- "guzzle/plugin-history": "~3.1",
- "guzzle/plugin-mock": "~3.1"
+ "symfony/dom-crawler": "~2.1"
},
"type": "application",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
- "psr-0": {
- "Goutte": "."
+ "psr-4": {
+ "Goutte\\": "Goutte"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1304,106 +1600,54 @@
}
],
"description": "A simple PHP Web Scraper",
- "homepage": "https://github.com/fabpot/Goutte",
+ "homepage": "https://github.com/FriendsOfPHP/Goutte",
"keywords": [
"scraper"
],
- "time": "2014-10-09 15:52:51"
+ "time": "2015-05-05 21:14:57"
},
{
- "name": "guzzle/guzzle",
- "version": "v3.9.3",
+ "name": "facebook/webdriver",
+ "version": "1.1.1",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/guzzle3.git",
- "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9"
+ "url": "https://github.com/facebook/php-webdriver.git",
+ "reference": "1c98108ba3eb435b681655764de11502a0653705"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9",
- "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9",
+ "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705",
+ "reference": "1c98108ba3eb435b681655764de11502a0653705",
"shasum": ""
},
"require": {
- "ext-curl": "*",
- "php": ">=5.3.3",
- "symfony/event-dispatcher": "~2.1"
- },
- "replace": {
- "guzzle/batch": "self.version",
- "guzzle/cache": "self.version",
- "guzzle/common": "self.version",
- "guzzle/http": "self.version",
- "guzzle/inflection": "self.version",
- "guzzle/iterator": "self.version",
- "guzzle/log": "self.version",
- "guzzle/parser": "self.version",
- "guzzle/plugin": "self.version",
- "guzzle/plugin-async": "self.version",
- "guzzle/plugin-backoff": "self.version",
- "guzzle/plugin-cache": "self.version",
- "guzzle/plugin-cookie": "self.version",
- "guzzle/plugin-curlauth": "self.version",
- "guzzle/plugin-error-response": "self.version",
- "guzzle/plugin-history": "self.version",
- "guzzle/plugin-log": "self.version",
- "guzzle/plugin-md5": "self.version",
- "guzzle/plugin-mock": "self.version",
- "guzzle/plugin-oauth": "self.version",
- "guzzle/service": "self.version",
- "guzzle/stream": "self.version"
+ "php": ">=5.3.19"
},
"require-dev": {
- "doctrine/cache": "~1.3",
- "monolog/monolog": "~1.0",
- "phpunit/phpunit": "3.7.*",
- "psr/log": "~1.0",
- "symfony/class-loader": "~2.1",
- "zendframework/zend-cache": "2.*,<2.3",
- "zendframework/zend-log": "2.*,<2.3"
+ "phpunit/phpunit": "4.6.*"
},
"suggest": {
- "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
+ "phpdocumentor/phpdocumentor": "2.*"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.9-dev"
- }
- },
"autoload": {
- "psr-0": {
- "Guzzle": "src/",
- "Guzzle\\Tests": "tests/"
+ "psr-4": {
+ "Facebook\\WebDriver\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "Apache-2.0"
],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Guzzle Community",
- "homepage": "https://github.com/guzzle/guzzle/contributors"
- }
- ],
- "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
- "homepage": "http://guzzlephp.org/",
+ "description": "A PHP client for WebDriver",
+ "homepage": "https://github.com/facebook/php-webdriver",
"keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "rest",
- "web service"
+ "facebook",
+ "php",
+ "selenium",
+ "webdriver"
],
- "time": "2015-03-18 18:23:50"
+ "time": "2015-12-31 15:58:49"
},
{
"name": "michelf/php-markdown",
@@ -1537,8 +1781,7 @@
"authors": [
{
"name": "Michiel Rook",
- "email": "mrook@php.net",
- "role": "Lead"
+ "email": "mrook@php.net"
},
{
"name": "Phing Community",
@@ -2017,7 +2260,9 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
}
],
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
@@ -2484,16 +2729,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "dd2cfb20fabd4efca14cf3b2345d40b3dd5e9aca"
+ "reference": "a93dffaf763182acad12a4c42c7efc372899891e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dd2cfb20fabd4efca14cf3b2345d40b3dd5e9aca",
- "reference": "dd2cfb20fabd4efca14cf3b2345d40b3dd5e9aca",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a93dffaf763182acad12a4c42c7efc372899891e",
+ "reference": "a93dffaf763182acad12a4c42c7efc372899891e",
"shasum": ""
},
"require": {
@@ -2537,20 +2782,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2015-12-26 13:37:56"
+ "time": "2016-01-12 17:46:01"
},
{
"name": "symfony/css-selector",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "eaa3320e32f09a01dc432c6efbe8051aee59cfef"
+ "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/eaa3320e32f09a01dc432c6efbe8051aee59cfef",
- "reference": "eaa3320e32f09a01dc432c6efbe8051aee59cfef",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/ac06d8173bd80790536c0a4a634a7d705b91f54f",
+ "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f",
"shasum": ""
},
"require": {
@@ -2590,20 +2835,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2015-12-05 17:37:59"
+ "time": "2016-01-03 15:33:41"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "a2712aff8b250d9601ad6bd23a2ff82a12730e8e"
+ "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a2712aff8b250d9601ad6bd23a2ff82a12730e8e",
- "reference": "a2712aff8b250d9601ad6bd23a2ff82a12730e8e",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/650d37aacb1fa0dcc24cced483169852b3a0594e",
+ "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e",
"shasum": ""
},
"require": {
@@ -2646,20 +2891,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2015-12-23 17:16:29"
+ "time": "2016-01-03 15:33:41"
},
{
"name": "symfony/process",
- "version": "v2.8.1",
+ "version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "62c254438b5040bc2217156e1570cf2206e8540c"
+ "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/62c254438b5040bc2217156e1570cf2206e8540c",
- "reference": "62c254438b5040bc2217156e1570cf2206e8540c",
+ "url": "https://api.github.com/repos/symfony/process/zipball/6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac",
+ "reference": "6f1979c3b0f4c22c77a8a8971afaa7dd07f082ac",
"shasum": ""
},
"require": {
@@ -2695,7 +2940,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2015-12-23 11:03:46"
+ "time": "2016-01-06 09:59:23"
}
],
"aliases": [],
diff --git a/phpBB/config/default/container/services_cron.yml b/phpBB/config/default/container/services_cron.yml
index eb7df540d7..dd3982a659 100644
--- a/phpBB/config/default/container/services_cron.yml
+++ b/phpBB/config/default/container/services_cron.yml
@@ -106,6 +106,8 @@ services:
arguments:
- '%core.root_path%'
- '@config'
+ - '@log'
+ - '@user'
calls:
- [set_name, [cron.task.core.tidy_plupload]]
tags:
diff --git a/phpBB/config/default/container/services_files.yml b/phpBB/config/default/container/services_files.yml
index 39277bcd9d..88414d89a9 100644
--- a/phpBB/config/default/container/services_files.yml
+++ b/phpBB/config/default/container/services_files.yml
@@ -49,6 +49,7 @@ services:
class: phpbb\files\types\remote
scope: prototype
arguments:
+ - '@config'
- '@files.factory'
- '@language'
- '@php_ini'
diff --git a/phpBB/config/installer/container/services_install_controller.yml b/phpBB/config/installer/container/services_install_controller.yml
index 5be28c5746..394eb95c06 100644
--- a/phpBB/config/installer/container/services_install_controller.yml
+++ b/phpBB/config/installer/container/services_install_controller.yml
@@ -49,3 +49,19 @@ services:
class: phpbb\install\controller\archive_download
arguments:
- '@installer.helper.config'
+
+ phpbb.installer.controller.convert:
+ class: phpbb\convert\controller\convertor
+ arguments:
+ - '@cache.driver'
+ - '@installer.helper.container_factory'
+ - '@installer.helper.database'
+ - '@phpbb.installer.controller.helper'
+ - '@installer.helper.install_helper'
+ - '@installer.helper.iohandler_factory'
+ - '@language'
+ - '@installer.navigation.provider'
+ - '@request'
+ - '@template'
+ - '%core.root_path%'
+ - '%core.php_ext%'
diff --git a/phpBB/config/installer/container/services_install_data.yml b/phpBB/config/installer/container/services_install_data.yml
index d119ba6ebb..df63d16d0d 100644
--- a/phpBB/config/installer/container/services_install_data.yml
+++ b/phpBB/config/installer/container/services_install_data.yml
@@ -23,6 +23,7 @@ services:
installer.install_data.add_modules:
class: phpbb\install\module\install_data\task\add_modules
arguments:
+ - '@installer.helper.config'
- '@installer.helper.iohandler'
- '@installer.helper.container_factory'
tags:
diff --git a/phpBB/config/installer/container/services_install_database.yml b/phpBB/config/installer/container/services_install_database.yml
index 8324cd6086..33f596506d 100644
--- a/phpBB/config/installer/container/services_install_database.yml
+++ b/phpBB/config/installer/container/services_install_database.yml
@@ -1,16 +1,36 @@
services:
- installer.install_database.create_schema:
- class: phpbb\install\module\install_database\task\create_schema
+ installer.install_database.create_schema_file:
+ class: phpbb\install\module\install_database\task\create_schema_file
arguments:
- '@installer.helper.config'
- '@installer.helper.database'
- '@filesystem'
- - '@installer.helper.iohandler'
- '%core.root_path%'
- '%core.php_ext%'
tags:
- { name: install_database_install, order: 10 }
+ installer.install_database.set_up_database:
+ class: phpbb\install\module\install_database\task\set_up_database
+ arguments:
+ - '@installer.helper.config'
+ - '@installer.helper.database'
+ - '@filesystem'
+ - '@installer.helper.iohandler'
+ - '%core.root_path%'
+ tags:
+ - { name: install_database_install, order: 20 }
+
+ installer.install_database.add_tables:
+ class: phpbb\install\module\install_database\task\add_tables
+ arguments:
+ - '@installer.helper.config'
+ - '@installer.helper.database'
+ - '@filesystem'
+ - '%core.root_path%'
+ tags:
+ - { name: install_database_install, order: 30 }
+
installer.install_database.add_default_data:
class: phpbb\install\module\install_database\task\add_default_data
arguments:
@@ -21,7 +41,7 @@ services:
- '@language'
- '%core.root_path%'
tags:
- - { name: install_database_install, order: 20 }
+ - { name: install_database_install, order: 40 }
installer.install_database.add_config_settings:
class: phpbb\install\module\install_database\task\add_config_settings
@@ -33,7 +53,7 @@ services:
- '@language'
- '%core.root_path%'
tags:
- - { name: install_database_install, order: 30 }
+ - { name: install_database_install, order: 50 }
installer.module.install_database_collection:
class: phpbb\di\ordered_service_collection
diff --git a/phpBB/config/installer/container/services_install_finish.yml b/phpBB/config/installer/container/services_install_finish.yml
index 854b129b69..f144cc6317 100644
--- a/phpBB/config/installer/container/services_install_finish.yml
+++ b/phpBB/config/installer/container/services_install_finish.yml
@@ -2,6 +2,7 @@ services:
installer.install_finish.populate_migrations:
class: phpbb\install\module\install_finish\task\populate_migrations
arguments:
+ - '@installer.helper.config'
- '@installer.helper.container_factory'
tags:
- { name: install_finish, order: 10 }
diff --git a/phpBB/config/installer/container/services_install_navigation.yml b/phpBB/config/installer/container/services_install_navigation.yml
index 301d6f3434..4fc6abb6eb 100644
--- a/phpBB/config/installer/container/services_install_navigation.yml
+++ b/phpBB/config/installer/container/services_install_navigation.yml
@@ -33,3 +33,10 @@ services:
tags:
- { name: installer.navigation }
+ installer.navigation.convertor_navigation:
+ class: phpbb\install\helper\navigation\convertor_navigation
+ arguments:
+ - '@installer.helper.install_helper'
+ scope: prototype
+ tags:
+ - { name: installer.navigation }
diff --git a/phpBB/config/installer/container/services_installer.yml b/phpBB/config/installer/container/services_installer.yml
index bf9d28ec65..19b1b4f08e 100644
--- a/phpBB/config/installer/container/services_installer.yml
+++ b/phpBB/config/installer/container/services_installer.yml
@@ -89,6 +89,7 @@ services:
- '@cache.driver'
- '@installer.helper.config'
- '@path_helper'
+ - '@installer.helper.container_factory'
installer.install.module_collection:
class: phpbb\di\ordered_service_collection
@@ -108,8 +109,10 @@ services:
parent: installer.installer.abstract
calls:
- [set_modules, ['@installer.install.module_collection']]
+ - [set_purge_cache_before, [false]]
installer.installer.update:
parent: installer.installer.abstract
calls:
- [set_modules, ['@installer.update.module_collection']]
+ - [set_purge_cache_before, [true]]
diff --git a/phpBB/config/installer/container/services_update_requirements.yml b/phpBB/config/installer/container/services_update_requirements.yml
index c5272ef549..6b851de78b 100644
--- a/phpBB/config/installer/container/services_update_requirements.yml
+++ b/phpBB/config/installer/container/services_update_requirements.yml
@@ -15,6 +15,7 @@ services:
arguments:
- '@installer.helper.container_factory'
- '@filesystem'
+ - '@installer.helper.config'
- '@installer.helper.iohandler'
- '@installer.helper.update_helper'
- '%core.root_path%'
diff --git a/phpBB/config/installer/routing/installer.yml b/phpBB/config/installer/routing/installer.yml
index 6190799737..1961ba8ed6 100644
--- a/phpBB/config/installer/routing/installer.yml
+++ b/phpBB/config/installer/routing/installer.yml
@@ -35,3 +35,28 @@ phpbb_installer_update_conflict_download:
path: /download/conflict
defaults:
_controller: phpbb.installer.controller.file_downloader:conflict_archive
+
+phpbb_convert_intro:
+ path: /convert/{start_new}
+ defaults:
+ _controller: phpbb.installer.controller.convert:intro
+ start_new: 0
+
+phpbb_convert_settings:
+ path: /convert/settings/{convertor}
+ defaults:
+ _controller: phpbb.installer.controller.convert:settings
+ requirements:
+ converter: "[a-zA-Z0-9_]+"
+
+phpbb_convert_convert:
+ path: /convert/in_progress/{converter}
+ defaults:
+ _controller: phpbb.installer.controller.convert:convert
+ requirements:
+ converter: "[a-zA-Z0-9_]+"
+
+phpbb_convert_finish:
+ path: /convert/finished
+ defaults:
+ _controller: phpbb.installer.controller.convert:finish
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index b77af13d08..f6e63196ee 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -49,8 +49,10 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
+ <li><a href="#v320a2">Changes since 3.2.0-a2</a></li>
<li><a href="#v320a1">Changes since 3.2.0-a1</a></li>
<li><a href="#v31x">Changes since 3.1.x</a></li>
+ <li><a href="#v317pl1">Changes since 3.1.7-PL1</a></li>
<li><a href="#v317">Changes since 3.1.7</a></li>
<li><a href="#v316">Changes since 3.1.6</a></li>
<li><a href="#v315">Changes since 3.1.5</a></li>
@@ -115,9 +117,56 @@
<div class="paragraph">
<div class="inner">
- <div class="content">
+<div class="content">
+
+ <a name="v320a2"></a><h3>Changes since 3.2.0-a2</h3>
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10628">PHPBB3-10628</a>] - http:// prepended to &quot;www.&quot; urls (but not reflected in preview)</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11875">PHPBB3-11875</a>] - mediumint(8) too small for post_id</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12221">PHPBB3-12221</a>] - URLs Containing javascript: are Garbled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14129">PHPBB3-14129</a>] - Adding custom extensions autoloaders feature slow downs the board</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14321">PHPBB3-14321</a>] - Fatal error on download the merged conflicts archive during update from 3.1.6 to 3.2-a1</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14323">PHPBB3-14323</a>] - Long urls are no longer shortened</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14368">PHPBB3-14368</a>] - Post Editors Text Should Be Black, Not Blue</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14371">PHPBB3-14371</a>] - Small fix for the aligment quick links</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14373">PHPBB3-14373</a>] - Do not use strpos() on arrays in iohandler_base::add_error_message()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14378">PHPBB3-14378</a>] - Maintain consistent template var paths in 3.2 installer</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14380">PHPBB3-14380</a>] - Maintain consistent template var paths in 3.2 installer</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14402">PHPBB3-14402</a>] - Tidy plupload cron should not rely on user id/ip being available</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14403">PHPBB3-14403</a>] - phpbb\log should still work even when no user data is given</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14405">PHPBB3-14405</a>] - Text processor parses invalid use of url bbcode</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14419">PHPBB3-14419</a>] - Update composer dependencies and fix outdated composer lock file</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14420">PHPBB3-14420</a>] - Search Results pagination not up to date / broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14428">PHPBB3-14428</a>] - Use other links for files remote test</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14431">PHPBB3-14431</a>] - Remote avatar uploading does not support https</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14432">PHPBB3-14432</a>] - The lang() function needs to handle key array</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14434">PHPBB3-14434</a>] - Schema generator fails if extensions have non-migrations in migrations dir</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14436">PHPBB3-14436</a>] - Default data type migration misses oauth_states dependency</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14442">PHPBB3-14442</a>] - Use Goutte ~2.0 after allowing PHP &gt;= 5.4</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14444">PHPBB3-14444</a>] - Fatal error in functions_messenger.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14446">PHPBB3-14446</a>] - Add predefined placeholder variables to twig</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14452">PHPBB3-14452</a>] - Undefined $progressFillerText in installer.js</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14453">PHPBB3-14453</a>] - Missing dependency in the text_reparser migration</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13454">PHPBB3-13454</a>] - Remove unused variables, globals, parameters</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13733">PHPBB3-13733</a>] - Allow non-migration files inside migrations folder</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14177">PHPBB3-14177</a>] - Catch exceptions and display a nice error page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14253">PHPBB3-14253</a>] - Show group requests pending aproval at the ACP groups summary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14377">PHPBB3-14377</a>] - Allow extensions to register custom compiler pass</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14418">PHPBB3-14418</a>] - Add missing language string PM_TOOLS</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14445">PHPBB3-14445</a>] - Force page refresh before the installer generates the schema</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14250">PHPBB3-14250</a>] - Review/bump composer dependencies</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14262">PHPBB3-14262</a>] - Move converter code into a controller</li>
+ </ul>
- <a name="v320a1"></a><h3>Changes since 3.2.0-a1</h3><h4>Bug</h4>
+ <a name="v320a1"></a><h3>Changes since 3.2.0-a1</h3>
+ <h4>Bug</h4>
<ul>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9791">PHPBB3-9791</a>] - invalid [] - chars on search URI</li>
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13451">PHPBB3-13451</a>] - A very long string inside message crashes PHP</li>
@@ -389,6 +438,42 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14265">PHPBB3-14265</a>] - Make all tables available in the container</li>
</ul>
+ <a name="v317pl1"></a><h3>Changes since 3.1.7-PL1</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12441">PHPBB3-12441</a>] - Database-size in ACP missing after update MariaDB from 5.5 to 10.0</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12618">PHPBB3-12618</a>] - Extension Version Check does not support https</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13180">PHPBB3-13180</a>] - Increase the field size of date format to allow more syntax for other calendars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13908">PHPBB3-13908</a>] - After clause in migration add_column schema tool not honored</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14046">PHPBB3-14046</a>] - Instant message (jabber) dialog says message sent on the creation screen</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14303">PHPBB3-14303</a>] - Some changes for UTF-8 variant on language pack?</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14374">PHPBB3-14374</a>] - Update dynamically generated jquery CDN script tag</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14386">PHPBB3-14386</a>] - open_basedir restriction in effect with remote upload avatar</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14387">PHPBB3-14387</a>] - Extend avatar-driver by extension in ACP not possible</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14394">PHPBB3-14394</a>] - Only purge cache in functional tests if necessary</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14396">PHPBB3-14396</a>] - Use VCHAR_UNI instead of VCHAR for user_dateformat</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14397">PHPBB3-14397</a>] - Fix @since tag in event 'core.ucp_prefs_view_after'</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14403">PHPBB3-14403</a>] - phpbb\log should still work even when no user data is given</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14407">PHPBB3-14407</a>] - Users not being removed from Newly Registered Users group</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14409">PHPBB3-14409</a>] - Update session page info before displaying online list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14411">PHPBB3-14411</a>] - Delete permanently is not working as it should be</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14423">PHPBB3-14423</a>] - Display database size for Aria storage engine</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14425">PHPBB3-14425</a>] - Database tests do not allow using socket</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14427">PHPBB3-14427</a>] - Memberlist Display Wrong</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14433">PHPBB3-14433</a>] - Functional tests fail for extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14439">PHPBB3-14439</a>] - Error page shown in Manage users -&gt; Anonymous -&gt; Select Form -&gt; Avatar when board wide all avatar settings are disabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14467">PHPBB3-14467</a>] - Automatic resize of textarea calculates wrong height</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14475">PHPBB3-14475</a>] - Do not log removal of users from newly registered group</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14289">PHPBB3-14289</a>] - Add events in navbar header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14356">PHPBB3-14356</a>] - Add template events to viewtopic around back2top link</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14412">PHPBB3-14412</a>] - Comment fixes for PHPDoc in the events</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14458">PHPBB3-14458</a>] - Explicitly state RewriteBase into .htaccess root file</li>
+ </ul>
+
<a name="v317"></a><h3>Changes since 3.1.7</h3>
<h4>Security Issue</h4>
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index f1dee8cee8..acc876ea96 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -1028,6 +1028,20 @@ navbar_header_quick_links_before
* Since: 3.1.0-RC2
* Purpose: Add links to the top of the quick-links drop-down menu in the header
+navbar_header_user_profile_append
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.8-RC1
+* Purpose: Add links to the right of the user drop down area
+
+navbar_header_user_profile_prepend
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.8-RC1
+* Purpose: Add links to the left of the notification area
+
navbar_header_username_append
===
* Locations:
@@ -2237,7 +2251,7 @@ viewtopic_body_postrow_back2top_append
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.1.8-RC1
-* Purpose: Add content to the post's bottom directly before the back to top link
+* Purpose: Add content to the post's bottom directly after the back to top link
viewtopic_body_postrow_back2top_before
===
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index dab18289c7..f958ae93c7 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -373,7 +373,7 @@ class acp_bbcodes
*
* @event core.acp_bbcodes_display_form
* @var string action Type of the action: modify|create
- * @var string sql_ary The SQL array to get custom bbcode data
+ * @var array sql_ary The SQL array to get custom bbcode data
* @var array template_data Array with form template data
* @var string u_action The u_action link
* @since 3.1.0-a3
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 26663d2a62..9d65c48bed 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -415,6 +415,7 @@ class acp_board
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'referer_validation' => array('lang' => 'REFERRER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
+ 'remote_upload_verify' => array('lang' => 'UPLOAD_CERT_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 1f965b334c..ba39a1a60c 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -930,11 +930,12 @@ class acp_groups
// used for easy access to the data within a group
$cached_group_data[$type][$row['group_id']] = $row;
$cached_group_data[$type][$row['group_id']]['total_members'] = 0;
+ $cached_group_data[$type][$row['group_id']]['pending_members'] = 0;
}
$db->sql_freeresult($result);
// How many people are in which group?
- $sql = 'SELECT COUNT(ug.user_id) AS total_members, ug.group_id
+ $sql = 'SELECT COUNT(ug.user_id) AS total_members, SUM(ug.user_pending) AS pending_members, ug.group_id
FROM ' . USER_GROUP_TABLE . ' ug
WHERE ' . $db->sql_in_set('ug.group_id', array_keys($lookup)) . '
GROUP BY ug.group_id';
@@ -944,6 +945,7 @@ class acp_groups
{
$type = $lookup[$row['group_id']];
$cached_group_data[$type][$row['group_id']]['total_members'] = $row['total_members'];
+ $cached_group_data[$type][$row['group_id']]['pending_members'] = $row['pending_members'];
}
$db->sql_freeresult($result);
@@ -972,6 +974,7 @@ class acp_groups
'GROUP_NAME' => $group_name,
'TOTAL_MEMBERS' => $row['total_members'],
+ 'PENDING_MEMBERS' => $row['pending_members']
));
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 2bec4385c3..0ee6452ada 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1929,8 +1929,12 @@ class acp_users
}
}
- // Replace "error" strings with their real, localised form
- $error = $phpbb_avatar_manager->localize_errors($user, $error);
+ // Avatar manager is not initialized if avatars are disabled
+ if (isset($phpbb_avatar_manager))
+ {
+ // Replace "error" strings with their real, localised form
+ $error = $phpbb_avatar_manager->localize_errors($user, $error);
+ }
$avatar = phpbb_get_user_avatar($user_row, 'USER_AVATAR', true);
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 8056abef00..f2b56cc84b 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.2.0-a3-dev');
+@define('PHPBB_VERSION', '3.2.0-b2-dev');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 38879caf5f..54ff51dda5 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3632,7 +3632,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
* @var string item Restrict online users to a certain
* session item, e.g. forum for
* session_forum_id
- * @var string sql_ary SQL query to obtain users online data
+ * @var array sql_ary SQL query array to obtain users online data
* @since 3.1.4-RC1
* @changed 3.1.7-RC1 Change sql query into array and adjust var accordingly. Allows extension authors the ability to adjust the sql_ary.
*/
@@ -4146,6 +4146,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
}
+ $user->update_session_infos();
+
// Generate logged in/logged out status
if ($user->data['user_id'] != ANONYMOUS)
{
@@ -4577,8 +4579,6 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
return;
}
- $user->update_session_infos();
-
phpbb_check_and_display_sql_report($request, $auth, $db);
$template->assign_vars(array(
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index d710d984b7..dc43957933 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -55,6 +55,8 @@ function adm_page_header($page_title)
return;
}
+ $user->update_session_infos();
+
// gzip_compression
if ($config['gzip_compress'])
{
@@ -166,8 +168,6 @@ function adm_page_footer($copyright_html = true)
return;
}
- $user->update_session_infos();
-
phpbb_check_and_display_sql_report($request, $auth, $db);
$template->assign_vars(array(
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 1c7e68d358..a0073ec158 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2791,9 +2791,9 @@ function get_database_size()
{
$version = $row['mysql_version'];
- if (preg_match('#(3\.23|[45]\.)#', $version))
+ if (preg_match('#(3\.23|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria)#', $version))
{
- $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
+ $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
$sql = 'SHOW TABLE STATUS
FROM ' . $db_name;
@@ -2802,7 +2802,7 @@ function get_database_size()
$database_size = 0;
while ($row = $db->sql_fetchrow($result))
{
- if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB')))
+ if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB' || $row['Engine'] == 'Aria')))
{
if ($table_prefix != '')
{
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 0aee9dd3cf..b306b9aa79 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1733,7 +1733,7 @@ function mail_encode($str, $eol = "\r\n")
*/
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
{
- global $phpbb_root_path, $phpEx;
+ global $config, $phpbb_root_path, $phpEx;
// We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
// Reference: http://bugs.php.net/bug.php?id=15841
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index e1c687551b..bbf00735af 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2764,7 +2764,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
*
* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
*/
-function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
+function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $log_action = true)
{
global $db, $auth, $config, $user, $phpbb_dispatcher, $phpbb_container, $phpbb_log;
@@ -2899,16 +2899,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
$vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary');
extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars)));
- if (!$group_name)
+ if ($log_action)
{
- $group_name = get_group_name($group_id);
- }
+ if (!$group_name)
+ {
+ $group_name = get_group_name($group_id);
+ }
- $log = 'LOG_GROUP_REMOVE';
+ $log = 'LOG_GROUP_REMOVE';
- if ($group_name)
- {
- $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log, false, array($group_name, implode(', ', $username_ary)));
+ if ($group_name)
+ {
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log, false, array($group_name, implode(', ', $username_ary)));
+ }
}
group_update_listings($group_id);
@@ -3555,8 +3558,8 @@ function remove_newly_registered($user_id, $user_data = false)
}
// We need to call group_user_del here, because this function makes sure everything is correctly changed.
- // A downside for a call within the session handler is that the language is not set up yet - so no log entry
- group_user_del($group_id, $user_id);
+ // Force function to not log the removal of users from newly registered users group
+ group_user_del($group_id, $user_id, false, false, false);
// Set user_new to 0 to let this not be triggered again
$sql = 'UPDATE ' . USERS_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 432b26ad11..aeb716c1f9 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -54,8 +54,8 @@ function mcp_front_view($id, $mode, $action)
* Allow altering the query to get the number of unapproved posts
*
* @event core.mcp_front_queue_unapproved_total_before
- * @var int sql_ary Query to get the total number of unapproved posts
- * @var array forum_list List of forums to look for unapproved posts
+ * @var array sql_ary Query array to get the total number of unapproved posts
+ * @var array forum_list List of forums to look for unapproved posts
* @since 3.1.5-RC1
*/
$vars = array('sql_ary', 'forum_list');
@@ -179,7 +179,7 @@ function mcp_front_view($id, $mode, $action)
* Alter sql query to count the number of reported posts
*
* @event core.mcp_front_reports_count_query_before
- * @var int sql The query string used to get the number of reports that exist
+ * @var string sql The query string used to get the number of reports that exist
* @var array forum_list List of forums that contain the posts
* @since 3.1.5-RC1
*/
@@ -226,8 +226,8 @@ function mcp_front_view($id, $mode, $action)
* Alter sql query to get latest reported posts
*
* @event core.mcp_front_reports_listing_query_before
- * @var int sql_ary Associative array with the query to be executed
- * @var array forum_list List of forums that contain the posts
+ * @var array sql_ary Associative array with the query to be executed
+ * @var array forum_list List of forums that contain the posts
* @since 3.1.0-RC3
*/
$vars = array('sql_ary', 'forum_list');
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 48d0e8d890..3809ea2616 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -96,7 +96,7 @@ class mcp_reports
*
* @event core.mcp_reports_report_details_query_before
* @var array sql_ary The array in the format of the query builder with the query
- * @var mixed forum_id The forum_id, the number in the f GET parameter
+ * @var int forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
* @since 3.1.5-RC1
@@ -119,10 +119,10 @@ class mcp_reports
*
* @event core.mcp_reports_report_details_query_after
* @var array sql_ary The array in the format of the query builder with the query that had been executted
- * @var mixed forum_id The forum_id, the number in the f GET parameter
+ * @var int forum_id The forum_id, the number in the f GET parameter
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
- * @var int report The query's resulting row.
+ * @var array report The query's resulting row.
* @since 3.1.5-RC1
*/
$vars = array(
diff --git a/phpBB/install/convert/controller/convertor.php b/phpBB/install/convert/controller/convertor.php
new file mode 100644
index 0000000000..a40f1d0b52
--- /dev/null
+++ b/phpBB/install/convert/controller/convertor.php
@@ -0,0 +1,866 @@
+<?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\convert\controller;
+
+use phpbb\cache\driver\driver_interface;
+use phpbb\exception\http_exception;
+use phpbb\install\controller\helper;
+use phpbb\install\helper\container_factory;
+use phpbb\install\helper\database;
+use phpbb\install\helper\install_helper;
+use phpbb\install\helper\iohandler\factory;
+use phpbb\install\helper\iohandler\iohandler_interface;
+use phpbb\install\helper\navigation\navigation_provider;
+use phpbb\language\language;
+use phpbb\request\request_interface;
+use phpbb\template\template;
+use Symfony\Component\HttpFoundation\StreamedResponse;
+
+/**
+ * Controller for forum convertors
+ *
+ * WARNING: This file did not meant to be present in a production environment, so moving
+ * this file to a location which is accessible after board installation might
+ * lead to security issues.
+ */
+class convertor
+{
+ /**
+ * @var driver_interface
+ */
+ protected $cache;
+
+ /**
+ * @var driver_interface
+ */
+ protected $installer_cache;
+
+ /**
+ * @var \phpbb\config\db
+ */
+ protected $config;
+
+ /**
+ * @var \phpbb\config_php_file
+ */
+ protected $config_php_file;
+
+ /**
+ * @var string
+ */
+ protected $config_table;
+
+ /**
+ * @var helper
+ */
+ protected $controller_helper;
+
+ /**
+ * @var database
+ */
+ protected $db_helper;
+
+ /**
+ * @var \phpbb\db\driver\driver_interface
+ */
+ protected $db;
+
+ /**
+ * @var install_helper
+ */
+ protected $install_helper;
+
+ /**
+ * @var iohandler_interface
+ */
+ protected $iohandler;
+
+ /**
+ * @var language
+ */
+ protected $language;
+
+ /**
+ * @var navigation_provider
+ */
+ protected $navigation_provider;
+
+ /**
+ * @var request_interface
+ */
+ protected $request;
+
+ /**
+ * @var string
+ */
+ protected $session_keys_table;
+
+ /**
+ * @var string
+ */
+ protected $session_table;
+
+ /**
+ * @var template
+ */
+ protected $template;
+
+ /**
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param driver_interface $cache
+ * @param container_factory $container
+ * @param database $db_helper
+ * @param helper $controller_helper
+ * @param install_helper $install_helper
+ * @param factory $iohandler
+ * @param language $language
+ * @param navigation_provider $nav
+ * @param request_interface $request
+ * @param template $template
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ */
+ public function __construct(driver_interface $cache, container_factory $container, database $db_helper, helper $controller_helper, install_helper $install_helper, factory $iohandler, language $language, navigation_provider $nav, request_interface $request, template $template, $phpbb_root_path, $php_ext)
+ {
+ $this->installer_cache = $cache;
+ $this->controller_helper = $controller_helper;
+ $this->db_helper = $db_helper;
+ $this->install_helper = $install_helper;
+ $this->language = $language;
+ $this->navigation_provider = $nav;
+ $this->request = $request;
+ $this->template = $template;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $iohandler->set_environment('ajax');
+ $this->iohandler = $iohandler->get();
+
+ if (!$this->install_helper->is_phpbb_installed() || !defined('IN_INSTALL'))
+ {
+ throw new http_exception(403, 'INSTALL_PHPBB_NOT_INSTALLED');
+ }
+
+ $this->controller_helper->handle_language_select();
+
+ $this->cache = $container->get('cache.driver');
+ $this->config = $container->get('config');
+ $this->config_php_file = new \phpbb\config_php_file($this->phpbb_root_path, $this->php_ext);
+ $this->db = $container->get('dbal.conn.driver');
+
+ $this->config_table = $container->get_parameter('tables.config');
+ $this->session_keys_table = $container->get_parameter('tables.sessions_keys');
+ $this->session_table = $container->get_parameter('tables.sessions');
+ }
+
+ /**
+ * Render the intro page
+ *
+ * @param bool|int $start_new Whether or not to force to start a new convertor
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ public function intro($start_new)
+ {
+ $this->setup_navigation('intro');
+
+ if ($start_new)
+ {
+ if ($this->request->is_ajax())
+ {
+ $response = new StreamedResponse();
+ $iohandler = $this->iohandler;
+ $url = $this->controller_helper->route('phpbb_convert_intro', array('start_new' => 'new'));
+ $response->setCallback(function() use ($iohandler, $url) {
+ $iohandler->redirect($url);
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+
+ $this->config['convert_progress'] = '';
+ $this->config['convert_db_server'] = '';
+ $this->config['convert_db_user'] = '';
+ $this->db->sql_query('DELETE FROM ' . $this->config_table . "
+ WHERE config_name = 'convert_progress'
+ OR config_name = 'convert_db_server'
+ OR config_name = 'convert_db_user'"
+ );
+ }
+
+ // Let's see if there is a conversion in the works...
+ $options = array();
+ if (!empty($this->config['convert_progress']) &&
+ !empty($this->config['convert_db_server']) &&
+ !empty($this->config['convert_db_user']) &&
+ !empty($this->config['convert_options']))
+ {
+ $options = unserialize($this->config['convert_progress']);
+ $options = array_merge($options,
+ unserialize($this->config['convert_db_server']),
+ unserialize($this->config['convert_db_user']),
+ unserialize($this->config['convert_options'])
+ );
+ }
+
+ // This information should have already been checked once, but do it again for safety
+ if (!empty($options) && !empty($options['tag']) &&
+ isset($options['dbms']) &&
+ isset($options['dbhost']) &&
+ isset($options['dbport']) &&
+ isset($options['dbuser']) &&
+ isset($options['dbpasswd']) &&
+ isset($options['dbname']) &&
+ isset($options['table_prefix']))
+ {
+ $this->template->assign_vars(array(
+ 'TITLE' => $this->language->lang('CONTINUE_CONVERT'),
+ 'BODY' => $this->language->lang('CONTINUE_CONVERT_BODY'),
+ 'S_CONTINUE' => true,
+ 'U_NEW_ACTION' => $this->controller_helper->route('phpbb_convert_intro', array('start_new' => 'new')),
+ 'U_CONTINUE_ACTION' => $this->controller_helper->route('phpbb_convert_convert', array('converter' => $options['tag'])),
+ ));
+
+ return $this->controller_helper->render('installer_convert.html', 'CONTINUE_CONVERT', true);
+ }
+
+ return $this->render_convert_list();
+ }
+
+ /**
+ * Obtain convertor settings
+ *
+ * @param string $convertor Name of the convertor
+ *
+ * @return \Symfony\Component\HttpFoundation\Response|StreamedResponse
+ */
+ public function settings($convertor)
+ {
+ $this->setup_navigation('settings');
+
+ require_once ($this->phpbb_root_path . 'includes/constants.' . $this->php_ext);
+ require_once ($this->phpbb_root_path . 'includes/functions_convert.' . $this->php_ext);
+
+ // Include convertor if available
+ $convertor_file_path = $this->phpbb_root_path . 'install/convertors/convert_' . $convertor . '.' . $this->php_ext;
+ if (!file_exists($convertor_file_path))
+ {
+ if ($this->request->is_ajax())
+ {
+ $response = new StreamedResponse();
+ $ref = $this;
+ $response->setCallback(function() use ($ref) {
+ $ref->render_error('CONVERT_NOT_EXIST');
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+
+ $this->render_error('CONVERT_NOT_EXIST');
+ return $this->controller_helper->render('installer_convert.html', 'STAGE_SETTINGS', true);
+ }
+
+ $get_info = true;
+ $phpbb_root_path = $this->phpbb_root_path; // These globals are required
+ $phpEx = $this->php_ext; // See above
+ include_once ($convertor_file_path);
+
+ // The test_file is a file that should be present in the location of the old board.
+ if (!isset($test_file))
+ {
+ if ($this->request->is_ajax())
+ {
+ $response = new StreamedResponse();
+ $ref = $this;
+ $response->setCallback(function() use ($ref) {
+ $ref->render_error('DEV_NO_TEST_FILE');
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+
+ $this->render_error('DEV_NO_TEST_FILE');
+ return $this->controller_helper->render('installer_convert.html', 'STAGE_SETTINGS', true);
+ }
+
+ if ($this->request->variable('submit', false))
+ {
+ // It must be an AJAX request at this point
+ $response = new StreamedResponse();
+ $ref = $this;
+ $response->setCallback(function() use ($ref, $convertor) {
+ $ref->proccess_settings_form($convertor);
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+ else
+ {
+ $this->template->assign_vars(array(
+ 'U_ACTION' => $this->controller_helper->route('phpbb_convert_settings', array(
+ 'convertor' => $convertor,
+ ))
+ ));
+
+ if ($this->request->is_ajax())
+ {
+ $response = new StreamedResponse();
+ $ref = $this;
+ $response->setCallback(function() use ($ref) {
+ $ref->render_settings_form();
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+
+ $this->render_settings_form();
+ }
+
+ return $this->controller_helper->render('installer_convert.html', 'STAGE_SETTINGS', true);
+ }
+
+ /**
+ * Run conversion
+ */
+ public function convert($converter)
+ {
+ $this->setup_navigation('convert');
+
+ if ($this->request->is_ajax())
+ {
+ $route = $this->controller_helper->route('phpbb_convert_convert', array('converter' => $converter));
+ $response = new StreamedResponse();
+ $ref = $this;
+ $response->setCallback(function() use ($ref, $route) {
+ $ref->redirect_to_html($route);
+ });
+ $response->headers->set('X-Accel-Buffering', 'no');
+
+ return $response;
+ }
+
+ $convertor = new \phpbb\convert\convertor($this->template, $this->controller_helper);
+ $convertor->convert_data($converter);
+
+ return $this->controller_helper->render('installer_convert.html', 'STAGE_IN_PROGRESS');
+ }
+
+ /**
+ * Render the final page of the convertor
+ */
+ public function finish()
+ {
+ $this->setup_navigation('finish');
+
+ $this->template->assign_vars(array(
+ 'TITLE' => $this->language->lang('CONVERT_COMPLETE'),
+ 'BODY' => $this->language->lang('CONVERT_COMPLETE_EXPLAIN'),
+ ));
+
+ // If we reached this step (conversion completed) we want to purge the cache and log the user out.
+ // This is for making sure the session get not screwed due to the 3.0.x users table being completely new.
+ $this->cache->purge();
+ $this->installer_cache->purge();
+
+ require_once($this->phpbb_root_path . 'includes/constants.' . $this->php_ext);
+ require_once($this->phpbb_root_path . 'includes/functions_convert.' . $this->php_ext);
+
+ $sql = 'SELECT config_value
+ FROM ' . $this->config_table . '
+ WHERE config_name = \'search_type\'';
+ $result = $this->db->sql_query($sql);
+
+ if ($this->db->sql_fetchfield('config_value') != 'fulltext_mysql')
+ {
+ $this->template->assign_vars(array(
+ 'S_ERROR_BOX' => true,
+ 'ERROR_TITLE' => $this->language->lang('SEARCH_INDEX_UNCONVERTED'),
+ 'ERROR_MSG' => $this->language->lang('SEARCH_INDEX_UNCONVERTED_EXPLAIN'),
+ ));
+ }
+
+ $this->db->sql_freeresult($result);
+
+ switch ($this->db->get_sql_layer())
+ {
+ case 'sqlite':
+ case 'sqlite3':
+ $this->db->sql_query('DELETE FROM ' . $this->session_keys_table);
+ $this->db->sql_query('DELETE FROM ' . $this->session_table);
+ break;
+
+ default:
+ $this->db->sql_query('TRUNCATE TABLE ' . $this->session_keys_table);
+ $this->db->sql_query('TRUNCATE TABLE ' . $this->session_table);
+ break;
+ }
+
+ return $this->controller_helper->render('installer_convert.html', 'CONVERT_COMPLETE');
+ }
+
+ /**
+ * Validates settings form
+ *
+ * @param string $convertor
+ */
+ public function proccess_settings_form($convertor)
+ {
+ global $phpbb_root_path, $phpEx, $get_info;
+
+ $phpbb_root_path = $this->phpbb_root_path;
+ $phpEx = $this->php_ext;
+ $get_info = true;
+
+ require_once($this->phpbb_root_path . 'includes/constants.' . $this->php_ext);
+ require_once($this->phpbb_root_path . 'includes/functions_convert.' . $this->php_ext);
+
+ // Include convertor if available
+ $convertor_file_path = $this->phpbb_root_path . 'install/convertors/convert_' . $convertor . '.' . $this->php_ext;
+ include ($convertor_file_path);
+
+ // We expect to have an AJAX request here
+ $src_dbms = $this->request->variable('src_dbms', $convertor_data['dbms']);
+ $src_dbhost = $this->request->variable('src_dbhost', $convertor_data['dbhost']);
+ $src_dbport = $this->request->variable('src_dbport', $convertor_data['dbport']);
+ $src_dbuser = $this->request->variable('src_dbuser', $convertor_data['dbuser']);
+ $src_dbpasswd = $this->request->variable('src_dbpasswd', $convertor_data['dbpasswd']);
+ $src_dbname = $this->request->variable('src_dbname', $convertor_data['dbname']);
+ $src_table_prefix = $this->request->variable('src_table_prefix', $convertor_data['table_prefix']);
+ $forum_path = $this->request->variable('forum_path', $convertor_data['forum_path']);
+ $refresh = $this->request->variable('refresh', 1);
+
+ // Default URL of the old board
+ // @todo Are we going to use this for attempting to convert URL references in posts, or should we remove it?
+ // -> We should convert old urls to the new relative urls format
+ // $src_url = $request->variable('src_url', 'Not in use at the moment');
+
+ // strip trailing slash from old forum path
+ $forum_path = (strlen($forum_path) && $forum_path[strlen($forum_path) - 1] == '/') ? substr($forum_path, 0, -1) : $forum_path;
+
+ $error = array();
+ if (!file_exists($this->phpbb_root_path . $forum_path . '/' . $test_file))
+ {
+ $error[] = $this->language->lang('COULD_NOT_FIND_PATH', $forum_path);
+ }
+
+ $connect_test = false;
+ $available_dbms = $this->db_helper->get_available_dbms(false, true, true);
+ if (!isset($available_dbms[$src_dbms]) || !$available_dbms[$src_dbms]['AVAILABLE'])
+ {
+ $error[] = $this->language->lang('INST_ERR_NO_DB');
+ }
+ else
+ {
+ $connect_test = $this->db_helper->check_database_connection($src_dbms, $src_dbhost, $src_dbport, $src_dbuser, $src_dbpasswd, $src_dbname, $src_table_prefix);
+ }
+
+ extract($this->config_php_file->get_all());
+
+ // The forum prefix of the old and the new forum can only be the same if two different databases are used.
+ if ($src_table_prefix === $table_prefix && $src_dbms === $dbms && $src_dbhost === $dbhost && $src_dbport === $dbport && $src_dbname === $dbname)
+ {
+ $error[] = $this->language->lang('TABLE_PREFIX_SAME', $src_table_prefix);
+ }
+
+ if (!$connect_test)
+ {
+ $error[] = $this->language->lang('INST_ERR_DB_CONNECT');
+ }
+
+ $src_dbms = $this->config_php_file->convert_30_dbms_to_31($src_dbms);
+
+ // Check table prefix
+ if (empty($error))
+ {
+ // initiate database connection to old db if old and new db differ
+ global $src_db, $same_db;
+ $src_db = $same_db = false;
+
+ if ($src_dbms != $dbms || $src_dbhost != $dbhost || $src_dbport != $dbport || $src_dbname != $dbname || $src_dbuser != $dbuser)
+ {
+ /** @var \phpbb\db\driver\driver_interface $src_db */
+ $src_db = new $src_dbms();
+ $src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
+ $same_db = false;
+ }
+ else
+ {
+ $src_db = $this->db;
+ $same_db = true;
+ }
+
+ $src_db->sql_return_on_error(true);
+ $this->db->sql_return_on_error(true);
+
+ // Try to select one row from the first table to see if the prefix is OK
+ $result = $src_db->sql_query_limit('SELECT * FROM ' . $src_table_prefix . $tables[0], 1);
+
+ if (!$result)
+ {
+ $prefixes = array();
+
+ $db_tools_factory = new \phpbb\db\tools\factory();
+ $db_tools = $db_tools_factory->get($src_db);
+ $tables_existing = $db_tools->sql_list_tables();
+ $tables_existing = array_map('strtolower', $tables_existing);
+ foreach ($tables_existing as $table_name)
+ {
+ compare_table($tables, $table_name, $prefixes);
+ }
+ unset($tables_existing);
+
+ foreach ($prefixes as $prefix => $count)
+ {
+ if ($count >= sizeof($tables))
+ {
+ $possible_prefix = $prefix;
+ break;
+ }
+ }
+
+ $msg = '';
+ if (!empty($convertor_data['table_prefix']))
+ {
+ $msg .= $this->language->lang_array('DEFAULT_PREFIX_IS', array($convertor_data['forum_name'], $convertor_data['table_prefix']));
+ }
+
+ if (!empty($possible_prefix))
+ {
+ $msg .= '<br />';
+ $msg .= ($possible_prefix == '*') ? $this->language->lang('BLANK_PREFIX_FOUND') : $this->language->lang_array('PREFIX_FOUND', array($possible_prefix));
+ $src_table_prefix = ($possible_prefix == '*') ? '' : $possible_prefix;
+ }
+
+ $error[] = $msg;
+ }
+
+ $src_db->sql_freeresult($result);
+ $src_db->sql_return_on_error(false);
+ }
+
+ if (empty($error))
+ {
+ // Save convertor Status
+ $this->config->set('convert_progress', serialize(array(
+ 'step' => '',
+ 'table_prefix' => $src_table_prefix,
+ 'tag' => $convertor,
+ )), false);
+ $this->config->set('convert_db_server', serialize(array(
+ 'dbms' => $src_dbms,
+ 'dbhost' => $src_dbhost,
+ 'dbport' => $src_dbport,
+ 'dbname' => $src_dbname,
+ )), false);
+ $this->config->set('convert_db_user', serialize(array(
+ 'dbuser' => $src_dbuser,
+ 'dbpasswd' => $src_dbpasswd,
+ )), false);
+
+ // Save options
+ $this->config->set('convert_options', serialize(array(
+ 'forum_path' => $this->phpbb_root_path . $forum_path,
+ 'refresh' => $refresh
+ )), false);
+
+ $url = $this->controller_helper->route('phpbb_convert_convert', array('converter' => $convertor));
+ $this->iohandler->redirect($url);
+ $this->iohandler->send_response(true);
+ }
+ else
+ {
+ $this->render_settings_form($error);
+ }
+ }
+
+ /**
+ * Renders settings form
+ *
+ * @param array $error Array of errors
+ */
+ public function render_settings_form($error = array())
+ {
+ foreach ($error as $msg)
+ {
+ $this->iohandler->add_error_message($msg);
+ }
+
+ $dbms_options = array();
+ foreach ($this->db_helper->get_available_dbms() as $dbms_key => $dbms_array)
+ {
+ $dbms_options[] = array(
+ 'value' => $dbms_key,
+ 'label' => 'DB_OPTION_' . strtoupper($dbms_key),
+ );
+ }
+
+ $form_title = 'SPECIFY_OPTIONS';
+ $form_data = array(
+ 'src_dbms' => array(
+ 'label' => 'DBMS',
+ 'type' => 'select',
+ 'options' => $dbms_options,
+ ),
+ 'src_dbhost' => array(
+ 'label' => 'DB_HOST',
+ 'description' => 'DB_HOST_EXPLAIN',
+ 'type' => 'text',
+ ),
+ 'src_dbport' => array(
+ 'label' => 'DB_PORT',
+ 'description' => 'DB_PORT_EXPLAIN',
+ 'type' => 'text',
+ ),
+ 'src_dbname' => array(
+ 'label' => 'DB_NAME',
+ 'type' => 'text',
+ ),
+ 'src_dbuser' => array(
+ 'label' => 'DB_USERNAME',
+ 'type' => 'text',
+ ),
+ 'src_dbpasswd' => array(
+ 'label' => 'DB_PASSWORD',
+ 'type' => 'password',
+ ),
+ 'src_table_prefix' => array(
+ 'label' => 'TABLE_PREFIX',
+ 'description' => 'TABLE_PREFIX_EXPLAIN',
+ 'type' => 'text',
+ ),
+ 'forum_path' => array(
+ 'label' => 'FORUM_PATH',
+ 'description' => 'FORUM_PATH_EXPLAIN',
+ 'type' => 'text',
+ ),
+ 'refresh' => array(
+ 'label' => 'REFRESH_PAGE',
+ 'description' => 'REFRESH_PAGE_EXPLAIN',
+ 'type' => 'radio',
+ 'options' => array(
+ array(
+ 'value' => 0,
+ 'label' => 'NO',
+ 'selected' => true,
+ ),
+ array(
+ 'value' => 1,
+ 'label' => 'YES',
+ 'selected' => false,
+ ),
+ ),
+ ),
+ 'submit' => array(
+ 'label' => 'SUBMIT',
+ 'type' => 'submit',
+ ),
+ );
+
+ if ($this->request->is_ajax())
+ {
+ $this->iohandler->add_user_form_group($form_title, $form_data);
+ $this->iohandler->send_response(true);
+ }
+ else
+ {
+ $rendered_form = $this->iohandler->generate_form_render_data($form_title, $form_data);
+
+ $this->template->assign_vars(array(
+ 'TITLE' => $this->language->lang('STAGE_SETTINGS'),
+ 'CONTENT' => $rendered_form,
+ ));
+ }
+ }
+
+ /**
+ * Render the list of available convertors
+ *
+ * @return \Symfony\Component\HttpFoundation\Response
+ */
+ protected function render_convert_list()
+ {
+ $this->template->assign_vars(array(
+ 'TITLE' => $this->language->lang('CONVERT_INTRO'),
+ 'BODY' => $this->language->lang('CONVERT_INTRO_BODY'),
+ 'S_LIST' => true,
+ ));
+
+ $convertors = $sort = array();
+ $get_info = true; // Global flag
+
+ $handle = @opendir($this->phpbb_root_path . 'install/convertors/');
+
+ if (!$handle)
+ {
+ die('Unable to access the convertors directory');
+ }
+
+ while ($entry = readdir($handle))
+ {
+ if (preg_match('/^convert_([a-z0-9_]+).' . $this->php_ext . '$/i', $entry, $m))
+ {
+ $phpbb_root_path = $this->phpbb_root_path; // These globals are required
+ $phpEx = $this->php_ext; // See above
+ include_once($this->phpbb_root_path . 'install/convertors/' . $entry);
+ if (isset($convertor_data))
+ {
+ $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors);
+
+ $convertors[] = array(
+ 'tag' => $m[1],
+ 'forum_name' => $convertor_data['forum_name'],
+ 'version' => $convertor_data['version'],
+ 'dbms' => $convertor_data['dbms'],
+ 'dbhost' => $convertor_data['dbhost'],
+ 'dbport' => $convertor_data['dbport'],
+ 'dbuser' => $convertor_data['dbuser'],
+ 'dbpasswd' => $convertor_data['dbpasswd'],
+ 'dbname' => $convertor_data['dbname'],
+ 'table_prefix' => $convertor_data['table_prefix'],
+ 'author' => $convertor_data['author']
+ );
+ }
+ unset($convertor_data);
+ }
+ }
+ closedir($handle);
+
+ @ksort($sort);
+
+ foreach ($sort as $void => $index)
+ {
+ $this->template->assign_block_vars('convertors', array(
+ 'AUTHOR' => $convertors[$index]['author'],
+ 'SOFTWARE' => $convertors[$index]['forum_name'],
+ 'VERSION' => $convertors[$index]['version'],
+
+ 'U_CONVERT' => $this->controller_helper->route('phpbb_convert_settings', array('convertor' => $convertors[$index]['tag'])),
+ ));
+ }
+
+ return $this->controller_helper->render('installer_convert.html', 'SUB_INTRO', true);
+ }
+
+ /**
+ * Renders an error form
+ *
+ * @param string $msg
+ * @param string|bool $desc
+ */
+ public function render_error($msg, $desc = false)
+ {
+ if ($this->request->is_ajax())
+ {
+ $this->iohandler->add_error_message($msg, $desc);
+ $this->iohandler->send_response(true);
+ }
+ else
+ {
+ $this->template->assign_vars(array(
+ 'S_ERROR_BOX' => true,
+ 'ERROR_TITLE' => $this->language->lang($msg),
+ ));
+
+ if ($desc)
+ {
+ $this->template->assign_var('ERROR_MSG', $this->language->lang($desc));
+ }
+ }
+ }
+
+ /**
+ * Redirects an AJAX request to a non-JS version
+ *
+ * @param string $url URL to redirect to
+ */
+ public function redirect_to_html($url)
+ {
+ $this->iohandler->redirect($url);
+ $this->iohandler->send_response(true);
+ }
+
+ private function setup_navigation($stage)
+ {
+ $active = true;
+ $completed = false;
+
+ switch ($stage)
+ {
+ case 'finish':
+ $this->navigation_provider->set_nav_property(
+ array('convert', 0, 'finish'),
+ array(
+ 'selected' => $active,
+ 'completed' => $completed,
+ )
+ );
+
+ $active = false;
+ $completed = true;
+ // no break;
+
+ case 'convert':
+ $this->navigation_provider->set_nav_property(
+ array('convert', 0, 'convert'),
+ array(
+ 'selected' => $active,
+ 'completed' => $completed,
+ )
+ );
+
+ $active = false;
+ $completed = true;
+ // no break;
+
+ case 'settings':
+ $this->navigation_provider->set_nav_property(
+ array('convert', 0, 'settings'),
+ array(
+ 'selected' => $active,
+ 'completed' => $completed,
+ )
+ );
+
+ $active = false;
+ $completed = true;
+ // no break;
+
+ case 'intro':
+ $this->navigation_provider->set_nav_property(
+ array('convert', 0, 'intro'),
+ array(
+ 'selected' => $active,
+ 'completed' => $completed,
+ )
+ );
+ break;
+ }
+ }
+}
diff --git a/phpBB/install/convert/convert.php b/phpBB/install/convert/convert.php
new file mode 100644
index 0000000000..03913d6ae6
--- /dev/null
+++ b/phpBB/install/convert/convert.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\convert;
+
+/**
+ * Class holding all convertor-specific details.
+ *
+ * WARNING: This file did not meant to be present in a production environment, so moving this file to a location which
+ * is accessible after board installation might lead to security issues.
+ */
+class convert
+{
+ var $options = array();
+
+ var $convertor_tag = '';
+ var $src_dbms = '';
+ var $src_dbhost = '';
+ var $src_dbport = '';
+ var $src_dbuser = '';
+ var $src_dbpasswd = '';
+ var $src_dbname = '';
+ var $src_table_prefix = '';
+
+ var $convertor_data = array();
+ var $tables = array();
+ var $config_schema = array();
+ var $convertor = array();
+ var $src_truncate_statement = 'DELETE FROM ';
+ var $truncate_statement = 'DELETE FROM ';
+
+ var $fulltext_search;
+
+ // Batch size, can be adjusted by the conversion file
+ // For big boards a value of 6000 seems to be optimal
+ var $batch_size = 2000;
+ // Number of rows to be inserted at once (extended insert) if supported
+ // For installations having enough memory a value of 60 may be good.
+ var $num_wait_rows = 20;
+
+ // Mysqls internal recoding engine messing up with our (better) functions? We at least support more encodings than mysql so should use it in favor.
+ var $mysql_convert = false;
+
+ var $p_master;
+
+ function convert($p_master)
+ {
+ $this->p_master = $p_master;
+ }
+}
diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php
new file mode 100644
index 0000000000..2dae356c26
--- /dev/null
+++ b/phpBB/install/convert/convertor.php
@@ -0,0 +1,1618 @@
+<?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\convert;
+
+use phpbb\install\controller\helper;
+use phpbb\template\template;
+
+/**
+ * Convertor backend class
+ *
+ * WARNING: This file did not meant to be present in a production environment, so moving this file to a location which
+ * is accessible after board installation might lead to security issues.
+ */
+class convertor
+{
+ /**
+ * @var helper
+ */
+ protected $controller_helper;
+
+ /**
+ * @var \phpbb\filesystem\filesystem
+ */
+ protected $filesystem;
+
+ /**
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * Constructor
+ *
+ * @param template $template
+ * @param helper $controller_helper
+ */
+ public function __construct(template $template, helper $controller_helper)
+ {
+ global $convert, $phpbb_filesystem;
+
+ $this->template = $template;
+ $this->filesystem = $phpbb_filesystem;
+ $this->controller_helper = $controller_helper;
+
+ $convert = new convert($this);
+ }
+
+ /**
+ * The function which does the actual work (or dispatches it to the relevant places)
+ */
+ function convert_data($converter)
+ {
+ global $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache, $auth;
+ global $convert, $convert_row, $message_parser, $skip_rows, $language;
+ global $request, $phpbb_dispatcher;
+
+ $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
+ extract($phpbb_config_php_file->get_all());
+
+ require_once($phpbb_root_path . 'includes/constants.' . $phpEx);
+ require_once($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
+
+ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
+
+ /** @var \phpbb\db\driver\driver_interface $db */
+ $db = new $dbms();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
+ unset($dbpasswd);
+
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE);
+
+ // Override a couple of config variables for the duration
+ $config['max_quote_depth'] = 0;
+
+ // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues
+ $config['max_post_chars'] = $config['min_post_chars'] = 0;
+
+ // Set up a user as well. We _should_ have enough of a database here at this point to do this
+ // and it helps for any core code we call
+ $user->session_begin();
+ $user->page = $user->extract_current_page($phpbb_root_path);
+
+ $convert->options = array();
+ if (isset($config['convert_progress']))
+ {
+ $convert->options = unserialize($config['convert_progress']);
+ $convert->options = array_merge($convert->options, unserialize($config['convert_db_server']), unserialize($config['convert_db_user']), unserialize($config['convert_options']));
+ }
+
+ // This information should have already been checked once, but do it again for safety
+ if (empty($convert->options) || empty($convert->options['tag']) ||
+ !isset($convert->options['dbms']) ||
+ !isset($convert->options['dbhost']) ||
+ !isset($convert->options['dbport']) ||
+ !isset($convert->options['dbuser']) ||
+ !isset($convert->options['dbpasswd']) ||
+ !isset($convert->options['dbname']) ||
+ !isset($convert->options['table_prefix']))
+ {
+ $this->error($user->lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__);
+ }
+
+ $this->template->assign_var('S_CONV_IN_PROGRESS', true);
+
+ // Make some short variables accessible, for easier referencing
+ $convert->convertor_tag = basename($convert->options['tag']);
+ $convert->src_dbms = $convert->options['dbms'];
+ $convert->src_dbhost = $convert->options['dbhost'];
+ $convert->src_dbport = $convert->options['dbport'];
+ $convert->src_dbuser = $convert->options['dbuser'];
+ $convert->src_dbpasswd = $convert->options['dbpasswd'];
+ $convert->src_dbname = $convert->options['dbname'];
+ $convert->src_table_prefix = $convert->options['table_prefix'];
+
+ // initiate database connection to old db if old and new db differ
+ global $src_db, $same_db;
+ $src_db = $same_db = null;
+ if ($convert->src_dbms != $dbms || $convert->src_dbhost != $dbhost || $convert->src_dbport != $dbport || $convert->src_dbname != $dbname || $convert->src_dbuser != $dbuser)
+ {
+ $dbms = $convert->src_dbms;
+ /** @var \phpbb\db\driver\driver $src_db */
+ $src_db = new $dbms();
+ $src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd), $convert->src_dbname, $convert->src_dbport, false, true);
+ $same_db = false;
+ }
+ else
+ {
+ $src_db = $db;
+ $same_db = true;
+ }
+
+ $convert->mysql_convert = false;
+ switch ($src_db->sql_layer)
+ {
+ case 'sqlite':
+ case 'sqlite3':
+ $convert->src_truncate_statement = 'DELETE FROM ';
+ break;
+
+ // Thanks MySQL, for silently converting...
+ case 'mysql':
+ case 'mysql4':
+ if (version_compare($src_db->sql_server_info(true, false), '4.1.3', '>='))
+ {
+ $convert->mysql_convert = true;
+ }
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+
+ case 'mysqli':
+ $convert->mysql_convert = true;
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+
+ default:
+ $convert->src_truncate_statement = 'TRUNCATE TABLE ';
+ break;
+ }
+
+ if ($convert->mysql_convert && !$same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ switch ($db->get_sql_layer())
+ {
+ case 'sqlite':
+ case 'sqlite3':
+ $convert->truncate_statement = 'DELETE FROM ';
+ break;
+
+ default:
+ $convert->truncate_statement = 'TRUNCATE TABLE ';
+ break;
+ }
+
+ $get_info = false;
+
+ // check security implications of direct inclusion
+ if (!file_exists('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx))
+ {
+ $this->error($user->lang['CONVERT_NOT_EXIST'], __LINE__, __FILE__);
+ }
+
+ if (file_exists('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx))
+ {
+ include_once('./convertors/functions_' . $convert->convertor_tag . '.' . $phpEx);
+ }
+
+ $get_info = true;
+ include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx);
+
+ // Map some variables...
+ $convert->convertor_data = $convertor_data;
+ $convert->tables = $tables;
+ $convert->config_schema = $config_schema;
+
+ // Now include the real data
+ $get_info = false;
+ include('./convertors/convert_' . $convert->convertor_tag . '.' . $phpEx);
+
+ $convert->convertor_data = $convertor_data;
+ $convert->tables = $tables;
+ $convert->config_schema = $config_schema;
+ $convert->convertor = $convertor;
+
+ // The test_file is a file that should be present in the location of the old board.
+ if (!file_exists($convert->options['forum_path'] . '/' . $test_file))
+ {
+ $this->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
+ }
+
+ $search_type = $config['search_type'];
+
+ // For conversions we are a bit less strict and set to a search backend we know exist...
+ if (!class_exists($search_type))
+ {
+ $search_type = '\phpbb\search\fulltext_native';
+ $config->set('search_type', $search_type);
+ }
+
+ if (!class_exists($search_type))
+ {
+ trigger_error('NO_SUCH_SEARCH_MODULE');
+ }
+
+ $error = false;
+ $convert->fulltext_search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
+
+ if ($error)
+ {
+ trigger_error($error);
+ }
+
+ include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
+ $message_parser = new \parse_message();
+
+ $jump = $request->variable('jump', 0);
+ $final_jump = $request->variable('final_jump', 0);
+ $sync_batch = $request->variable('sync_batch', -1);
+ $last_statement = $request->variable('last', 0);
+
+ // We are running sync...
+ if ($sync_batch >= 0)
+ {
+ $this->sync_forums($converter, $sync_batch);
+ return;
+ }
+
+ if ($jump)
+ {
+ $this->jump($converter, $jump, $last_statement);
+ return;
+ }
+
+ if ($final_jump)
+ {
+ $this->final_jump($final_jump);
+ return;
+ }
+
+ $current_table = $request->variable('current_table', 0);
+ $old_current_table = min(-1, $current_table - 1);
+ $skip_rows = $request->variable('skip_rows', 0);
+
+ if (!$current_table && !$skip_rows)
+ {
+ if (!$request->variable('confirm', false))
+ {
+ // If avatars / ranks / smilies folders are specified make sure they are writable
+ $bad_folders = array();
+
+ $local_paths = array(
+ 'avatar_path' => path($config['avatar_path']),
+ 'avatar_gallery_path' => path($config['avatar_gallery_path']),
+ 'icons_path' => path($config['icons_path']),
+ 'ranks_path' => path($config['ranks_path']),
+ 'smilies_path' => path($config['smilies_path'])
+ );
+
+ foreach ($local_paths as $folder => $local_path)
+ {
+ if (isset($convert->convertor[$folder]))
+ {
+ if (empty($convert->convertor['test_file']))
+ {
+ // test_file is mandantory at the moment so this should never be reached, but just in case...
+ $this->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__);
+ }
+
+ if (!$local_path || !$this->filesystem->is_writable($phpbb_root_path . $local_path))
+ {
+ if (!$local_path)
+ {
+ $bad_folders[] = sprintf($user->lang['CONFIG_PHPBB_EMPTY'], $folder);
+ }
+ else
+ {
+ $bad_folders[] = $local_path;
+ }
+ }
+ }
+ }
+
+ if (sizeof($bad_folders))
+ {
+ $msg = (sizeof($bad_folders) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE'];
+ sort($bad_folders);
+ $this->error(sprintf($msg, implode('<br />', $bad_folders)), __LINE__, __FILE__, true);
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['INSTALL_TEST'],
+ 'U_ACTION' => $this->controller_helper->route('phpbb_convert_convert', array('converter' => $converter)),
+ ));
+ return;
+ }
+
+ // Grab all the tables used in convertor
+ $missing_tables = $tables_list = $aliases = array();
+
+ foreach ($convert->convertor['schema'] as $schema)
+ {
+ // Skip those not used (because of addons/plugins not detected)
+ if (!$schema['target'])
+ {
+ continue;
+ }
+
+ foreach ($schema as $key => $val)
+ {
+ // we're dealing with an array like:
+ // array('forum_status', 'forums.forum_status', 'is_item_locked')
+ if (is_int($key) && !empty($val[1]))
+ {
+ $temp_data = $val[1];
+ if (!is_array($temp_data))
+ {
+ $temp_data = array($temp_data);
+ }
+
+ foreach ($temp_data as $value)
+ {
+ if (preg_match('/([a-z0-9_]+)\.([a-z0-9_]+)\)* ?A?S? ?([a-z0-9_]*?)\.?([a-z0-9_]*)$/i', $value, $m))
+ {
+ $table = $convert->src_table_prefix . $m[1];
+ $tables_list[$table] = $table;
+
+ if (!empty($m[3]))
+ {
+ $aliases[] = $convert->src_table_prefix . $m[3];
+ }
+ }
+ }
+ }
+ // 'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1'
+ else if ($key == 'left_join')
+ {
+ // Convert the value if it wasn't an array already.
+ if (!is_array($val))
+ {
+ $val = array($val);
+ }
+
+ for ($j = 0; $j < sizeof($val); ++$j)
+ {
+ if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m))
+ {
+ $table = $convert->src_table_prefix . $m[1];
+ $tables_list[$table] = $table;
+
+ if (!empty($m[2]))
+ {
+ $aliases[] = $convert->src_table_prefix . $m[2];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Remove aliased tables from $tables_list
+ foreach ($aliases as $alias)
+ {
+ unset($tables_list[$alias]);
+ }
+
+ // Check if the tables that we need exist
+ $src_db->sql_return_on_error(true);
+ foreach ($tables_list as $table => $null)
+ {
+ $sql = 'SELECT 1 FROM ' . $table;
+ $_result = $src_db->sql_query_limit($sql, 1);
+
+ if (!$_result)
+ {
+ $missing_tables[] = $table;
+ }
+ $src_db->sql_freeresult($_result);
+ }
+ $src_db->sql_return_on_error(false);
+
+ // Throw an error if some tables are missing
+ // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again
+
+ if (sizeof($missing_tables) == sizeof($tables_list))
+ {
+ $this->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
+ }
+ else if (sizeof($missing_tables))
+ {
+ $this->error(sprintf($user->lang['TABLES_MISSING'], implode($user->lang['COMMA_SEPARATOR'], $missing_tables)) . '<br /><br />' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
+ }
+
+ $url = $this->save_convert_progress($converter, 'confirm=1');
+ $msg = $user->lang['PRE_CONVERT_COMPLETE'];
+
+ if ($convert->convertor_data['author_notes'])
+ {
+ $msg .= '</p><p>' . sprintf($user->lang['AUTHOR_NOTES'], $convert->convertor_data['author_notes']);
+ }
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'BODY' => $msg,
+ 'U_ACTION' => $url,
+ ));
+
+ return;
+ } // if (!$request->variable('confirm', false)))
+
+ $this->template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['STARTING_CONVERT'],
+ ));
+
+ // Convert the config table and load the settings of the old board
+ if (!empty($convert->config_schema))
+ {
+ restore_config($convert->config_schema);
+
+ // Override a couple of config variables for the duration
+ $config['max_quote_depth'] = 0;
+
+ // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues
+ $config['max_post_chars'] = $config['min_post_chars'] = 0;
+ }
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['CONFIG_CONVERT'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ // Now process queries and execute functions that have to be executed prior to the conversion
+ if (!empty($convert->convertor['execute_first']))
+ {
+ // @codingStandardsIgnoreStart
+ eval($convert->convertor['execute_first']);
+ // @codingStandardsIgnoreEnd
+ }
+
+ if (!empty($convert->convertor['query_first']))
+ {
+ if (!is_array($convert->convertor['query_first']))
+ {
+ $convert->convertor['query_first'] = array('target', array($convert->convertor['query_first']));
+ }
+ else if (!is_array($convert->convertor['query_first'][0]))
+ {
+ $convert->convertor['query_first'] = array(array($convert->convertor['query_first'][0], $convert->convertor['query_first'][1]));
+ }
+
+ foreach ($convert->convertor['query_first'] as $query_first)
+ {
+ if ($query_first[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $src_db->sql_query($query_first[1]);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_first[1]);
+ }
+ }
+ }
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['PREPROCESS_STEP'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+ } // if (!$current_table && !$skip_rows)
+
+ $this->template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['FILLING_TABLES'],
+ ));
+
+ // This loop takes one target table and processes it
+ while ($current_table < sizeof($convert->convertor['schema']))
+ {
+ $schema = $convert->convertor['schema'][$current_table];
+
+ // The target table isn't set, this can be because a module (for example the attachement mod) is taking care of this.
+ if (empty($schema['target']))
+ {
+ $current_table++;
+ continue;
+ }
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => sprintf($user->lang['FILLING_TABLE'], $schema['target']),
+ ));
+
+ // This is only the case when we first start working on the tables.
+ if (!$skip_rows)
+ {
+ // process execute_first and query_first for this table...
+ if (!empty($schema['execute_first']))
+ {
+ // @codingStandardsIgnoreStart
+ eval($schema['execute_first']);
+ // @codingStandardsIgnoreEnd
+ }
+
+ if (!empty($schema['query_first']))
+ {
+ if (!is_array($schema['query_first']))
+ {
+ $schema['query_first'] = array('target', array($schema['query_first']));
+ }
+ else if (!is_array($schema['query_first'][0]))
+ {
+ $schema['query_first'] = array(array($schema['query_first'][0], $schema['query_first'][1]));
+ }
+
+ foreach ($schema['query_first'] as $query_first)
+ {
+ if ($query_first[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+ $src_db->sql_query($query_first[1]);
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_first[1]);
+ }
+ }
+ }
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->get_sql_layer())
+ {
+ case 'postgres':
+ $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
+ break;
+
+ case 'oracle':
+ $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $largest_id = (int) $row['max_id'];
+
+ if ($largest_id)
+ {
+ $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
+ $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
+ }
+ break;
+ }
+ }
+ }
+
+ // Process execute_always for this table
+ // This is for code which needs to be executed on every pass of this table if
+ // it gets split because of time restrictions
+ if (!empty($schema['execute_always']))
+ {
+ // @codingStandardsIgnoreStart
+ eval($schema['execute_always']);
+ // @codingStandardsIgnoreEnd
+ }
+
+ //
+ // Set up some variables
+ //
+ // $waiting_rows holds rows for multirows insertion (MySQL only)
+ // $src_tables holds unique tables with aliases to select from
+ // $src_fields will quickly refer source fields (or aliases) corresponding to the current index
+ // $select_fields holds the names of the fields to retrieve
+ //
+
+ $sql_data = array(
+ 'source_fields' => array(),
+ 'target_fields' => array(),
+ 'source_tables' => array(),
+ 'select_fields' => array(),
+ );
+
+ // This statement is building the keys for later insertion.
+ $insert_query = $this->build_insert_query($schema, $sql_data, $current_table);
+
+ // If no source table is affected, we skip the table
+ if (empty($sql_data['source_tables']))
+ {
+ $skip_rows = 0;
+ $current_table++;
+ continue;
+ }
+
+ $distinct = (!empty($schema['distinct'])) ? 'DISTINCT ' : '';
+
+ $sql = 'SELECT ' . $distinct . implode(', ', $sql_data['select_fields']) . " \nFROM " . implode(', ', $sql_data['source_tables']);
+
+ // Where
+ $sql .= (!empty($schema['where'])) ? "\nWHERE (" . $schema['where'] . ')' : '';
+
+ // Group By
+ if (!empty($schema['group_by']))
+ {
+ $schema['group_by'] = array($schema['group_by']);
+ foreach ($sql_data['select_fields'] as $select)
+ {
+ $alias = strpos(strtolower($select), ' as ');
+ $select = ($alias) ? substr($select, 0, $alias) : $select;
+ if (!in_array($select, $schema['group_by']))
+ {
+ $schema['group_by'][] = $select;
+ }
+ }
+ }
+ $sql .= (!empty($schema['group_by'])) ? "\nGROUP BY " . implode(', ', $schema['group_by']) : '';
+
+ // Having
+ $sql .= (!empty($schema['having'])) ? "\nHAVING " . $schema['having'] : '';
+
+ // Order By
+ if (empty($schema['order_by']) && !empty($schema['primary']))
+ {
+ $schema['order_by'] = $schema['primary'];
+ }
+ $sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : '';
+
+ // Counting basically holds the amount of rows processed.
+ $counting = -1;
+ $batch_time = 0;
+
+ while ($counting === -1 || ($counting >= $convert->batch_size && still_on_time()))
+ {
+ $old_current_table = $current_table;
+
+ $rows = '';
+ $waiting_rows = array();
+
+ if (!empty($batch_time))
+ {
+ $mtime = explode(' ', microtime());
+ $mtime = $mtime[0] + $mtime[1];
+ $rows = ceil($counting/($mtime - $batch_time)) . " rows/s ($counting rows) | ";
+ }
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => "skip_rows = $skip_rows",
+ 'RESULT' => $rows . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
+ ));
+
+ $mtime = explode(' ', microtime());
+ $batch_time = $mtime[0] + $mtime[1];
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ // Take skip rows into account and only fetch batch_size amount of rows
+ $___result = $src_db->sql_query_limit($sql, $convert->batch_size, $skip_rows);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+
+ // This loop processes each row
+ $counting = 0;
+
+ $convert->row = $convert_row = array();
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->get_sql_layer())
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ case 'mssqlnative':
+ $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON');
+ break;
+ }
+ }
+
+ // Now handle the rows until time is over or no more rows to process...
+ while ($counting === 0 || still_on_time())
+ {
+ $convert_row = $src_db->sql_fetchrow($___result);
+
+ if (!$convert_row)
+ {
+ // move to the next batch or table
+ break;
+ }
+
+ // With this we are able to always save the last state
+ $convert->row = $convert_row;
+
+ // Increment the counting variable, it stores the number of rows we have processed
+ $counting++;
+
+ $insert_values = array();
+
+ $sql_flag = $this->process_row($schema, $sql_data, $insert_values);
+
+ if ($sql_flag === true)
+ {
+ switch ($db->get_sql_layer())
+ {
+ // If MySQL, we'll wait to have num_wait_rows rows to submit at once
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $waiting_rows[] = '(' . implode(', ', $insert_values) . ')';
+
+ if (sizeof($waiting_rows) >= $convert->num_wait_rows)
+ {
+ $errored = false;
+
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_query . implode(', ', $waiting_rows)))
+ {
+ $errored = true;
+ }
+ $db->sql_return_on_error(false);
+
+ if ($errored)
+ {
+ $db->sql_return_on_error(true);
+
+ // Because it errored out we will try to insert the rows one by one... most of the time this
+ // is caused by duplicate entries - but we also do not want to miss one...
+ foreach ($waiting_rows as $waiting_sql)
+ {
+ if (!$db->sql_query($insert_query . $waiting_sql))
+ {
+ $this->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+ }
+
+ $db->sql_return_on_error(false);
+ }
+
+ $waiting_rows = array();
+ }
+
+ break;
+
+ default:
+ $insert_sql = $insert_query . '(' . implode(', ', $insert_values) . ')';
+
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_sql))
+ {
+ $this->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+ $db->sql_return_on_error(false);
+
+ $waiting_rows = array();
+
+ break;
+ }
+ }
+
+ $skip_rows++;
+ }
+ $src_db->sql_freeresult($___result);
+
+ // We might still have some rows waiting
+ if (sizeof($waiting_rows))
+ {
+ $errored = false;
+ $db->sql_return_on_error(true);
+
+ if (!$db->sql_query($insert_query . implode(', ', $waiting_rows)))
+ {
+ $errored = true;
+ }
+ $db->sql_return_on_error(false);
+
+ if ($errored)
+ {
+ $db->sql_return_on_error(true);
+
+ // Because it errored out we will try to insert the rows one by one... most of the time this
+ // is caused by duplicate entries - but we also do not want to miss one...
+ foreach ($waiting_rows as $waiting_sql)
+ {
+ $db->sql_query($insert_query . $waiting_sql);
+ $this->db_error($user->lang['DB_ERR_INSERT'], htmlspecialchars($insert_query . $waiting_sql) . '<br /><br />' . htmlspecialchars(print_r($db->_sql_error(), true)), __LINE__, __FILE__, true);
+ }
+
+ $db->sql_return_on_error(false);
+ }
+
+ $waiting_rows = array();
+ }
+
+ if (!empty($schema['autoincrement']))
+ {
+ switch ($db->get_sql_layer())
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ case 'mssqlnative':
+ $db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF');
+ break;
+
+ case 'postgres':
+ $db->sql_query("SELECT SETVAL('" . $schema['target'] . "_seq',(select case when max(" . $schema['autoincrement'] . ")>0 then max(" . $schema['autoincrement'] . ")+1 else 1 end from " . $schema['target'] . '));');
+ break;
+
+ case 'oracle':
+ $result = $db->sql_query('SELECT MAX(' . $schema['autoincrement'] . ') as max_id FROM ' . $schema['target']);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $largest_id = (int) $row['max_id'];
+
+ if ($largest_id)
+ {
+ $db->sql_query('DROP SEQUENCE ' . $schema['target'] . '_seq');
+ $db->sql_query('CREATE SEQUENCE ' . $schema['target'] . '_seq START WITH ' . ($largest_id + 1));
+ }
+ break;
+ }
+ }
+ }
+
+ // When we reach this point, either the current table has been processed or we're running out of time.
+ if (still_on_time() && $counting < $convert->batch_size/* && !defined('DEBUG')*/)
+ {
+ $skip_rows = 0;
+ $current_table++;
+ }
+ else
+ {/*
+ if (still_on_time() && $counting < $convert->batch_size)
+ {
+ $skip_rows = 0;
+ $current_table++;
+ }*/
+
+ // Looks like we ran out of time.
+ $url = $this->save_convert_progress($converter, 'current_table=' . $current_table . '&amp;skip_rows=' . $skip_rows);
+
+ $current_table++;
+// $percentage = ($skip_rows == 0) ? 0 : floor(100 / ($total_rows / $skip_rows));
+
+ $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, sizeof($convert->convertor['schema']));
+
+ $this->template->assign_vars(array(
+ 'BODY' => $msg,
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+
+ // Process execute_last then we'll be done
+ $url = $this->save_convert_progress($converter, 'jump=1');
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['FINAL_STEP'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * Sync function being executed at the middle, some functions need to be executed after a successful sync.
+ */
+ function sync_forums($converter, $sync_batch)
+ {
+ global $user, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ include_once ($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $this->template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['SYNC_TOPICS'],
+ ));
+
+ $batch_size = $convert->batch_size;
+
+ $sql = 'SELECT MIN(topic_id) as min_value, MAX(topic_id) AS max_value
+ FROM ' . TOPICS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Set values of minimum/maximum primary value for this table.
+ $primary_min = $row['min_value'];
+ $primary_max = $row['max_value'];
+
+ if ($sync_batch == 0)
+ {
+ $sync_batch = (int) $primary_min;
+ }
+
+ if ($sync_batch == 0)
+ {
+ $sync_batch = 1;
+ }
+
+ // Fetch a batch of rows, process and insert them.
+ while ($sync_batch <= $primary_max && still_on_time())
+ {
+ $end = ($sync_batch + $batch_size - 1);
+
+ // Sync all topics in batch mode...
+ sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $sync_batch += $batch_size;
+ }
+
+ if ($sync_batch >= $primary_max)
+ {
+ $url = $this->save_convert_progress($converter, 'final_jump=1');
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ else
+ {
+ $sync_batch--;
+ }
+
+ $url = $this->save_convert_progress($converter, 'sync_batch=' . $sync_batch);
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * Save the convertor status
+ */
+ function save_convert_progress($convertor_tag, $step)
+ {
+ global $config, $convert, $language;
+
+ // Save convertor Status
+ $config->set('convert_progress', serialize(array(
+ 'step' => $step,
+ 'table_prefix' => $convert->src_table_prefix,
+ 'tag' => $convert->convertor_tag,
+ )), false);
+
+ $config->set('convert_db_server', serialize(array(
+ 'dbms' => $convert->src_dbms,
+ 'dbhost' => $convert->src_dbhost,
+ 'dbport' => $convert->src_dbport,
+ 'dbname' => $convert->src_dbname,
+ )), false);
+
+ $config->set('convert_db_user', serialize(array(
+ 'dbuser' => $convert->src_dbuser,
+ 'dbpasswd' => $convert->src_dbpasswd,
+ )), false);
+
+ return $this->controller_helper->route('phpbb_convert_convert', array('converter' => $convertor_tag)) . '?' . $step;
+ }
+
+ /**
+ * Finish conversion, the last function to be called.
+ */
+ function finish_conversion()
+ {
+ global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user;
+ global $cache, $auth, $phpbb_container, $phpbb_log;
+
+ include_once ($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
+ WHERE config_name = 'convert_progress'
+ OR config_name = 'convert_options'
+ OR config_name = 'convert_db_server'
+ OR config_name = 'convert_db_user'");
+ $db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
+
+ @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
+ phpbb_cache_moderators($db, $cache, $auth);
+
+ // And finally, add a note to the log
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_INSTALL_CONVERTED', false, array($convert->convertor_data['forum_name'], $config['version']));
+
+ $url = $this->controller_helper->route('phpbb_convert_finish');
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['FINAL_STEP'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ /**
+ * This function marks the steps after syncing
+ */
+ function final_jump($final_jump)
+ {
+ global $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ $this->template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['PROCESS_LAST'],
+ ));
+
+ if ($final_jump == 1)
+ {
+ $db->sql_return_on_error(true);
+
+ update_topics_posted();
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['UPDATE_TOPICS_POSTED'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ if ($db->get_sql_error_triggered())
+ {
+ $this->template->assign_vars(array(
+ 'S_ERROR_BOX' => true,
+ 'ERROR_TITLE' => $user->lang['UPDATE_TOPICS_POSTED'],
+ 'ERROR_MSG' => $user->lang['UPDATE_TOPICS_POSTED_ERR'],
+ ));
+ }
+ $db->sql_return_on_error(false);
+
+ $this->finish_conversion();
+ return;
+ }
+ }
+
+ /**
+ * This function marks the steps before syncing (jump=1)
+ */
+ function jump($converter, $jump, $last_statement)
+ {
+ /** @var \phpbb\db\driver\driver_interface $src_db */
+ /** @var \phpbb\cache\driver\driver_interface $cache */
+ global $user, $src_db, $same_db, $db, $phpbb_root_path, $phpEx, $config, $cache;
+ global $convert;
+
+ include_once ($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+
+ $this->template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'LEGEND' => $user->lang['PROCESS_LAST'],
+ ));
+
+ if ($jump == 1)
+ {
+ // Execute 'last' statements/queries
+ if (!empty($convert->convertor['execute_last']))
+ {
+ if (!is_array($convert->convertor['execute_last']))
+ {
+ // @codingStandardsIgnoreStart
+ eval($convert->convertor['execute_last']);
+ // @codingStandardsIgnoreEnd
+ }
+ else
+ {
+ while ($last_statement < sizeof($convert->convertor['execute_last']))
+ {
+ // @codingStandardsIgnoreStart
+ eval($convert->convertor['execute_last'][$last_statement]);
+ // @codingStandardsIgnoreEnd
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $convert->convertor['execute_last'][$last_statement],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $last_statement++;
+ $url = $this->save_convert_progress($converter, 'jump=1&amp;last=' . $last_statement);
+
+ $percentage = ($last_statement == 0) ? 0 : floor(100 / (sizeof($convert->convertor['execute_last']) / $last_statement));
+ $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, sizeof($convert->convertor['execute_last']), $percentage);
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_LAST'],
+ 'BODY' => $msg,
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+ }
+
+ if (!empty($convert->convertor['query_last']))
+ {
+ if (!is_array($convert->convertor['query_last']))
+ {
+ $convert->convertor['query_last'] = array('target', array($convert->convertor['query_last']));
+ }
+ else if (!is_array($convert->convertor['query_last'][0]))
+ {
+ $convert->convertor['query_last'] = array(array($convert->convertor['query_last'][0], $convert->convertor['query_last'][1]));
+ }
+
+ foreach ($convert->convertor['query_last'] as $query_last)
+ {
+ if ($query_last[0] == 'src')
+ {
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'binary'");
+ }
+
+ $src_db->sql_query($query_last[1]);
+
+ if ($convert->mysql_convert && $same_db)
+ {
+ $src_db->sql_query("SET NAMES 'utf8'");
+ }
+ }
+ else
+ {
+ $db->sql_query($query_last[1]);
+ }
+ }
+ }
+
+ // Sanity check
+ $db->sql_return_on_error(false);
+ $src_db->sql_return_on_error(false);
+
+ fix_empty_primary_groups();
+
+ $sql = 'SELECT MIN(user_regdate) AS board_startdate
+ FROM ' . USERS_TABLE;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0))
+ {
+ $config->set('board_startdate', $row['board_startdate']);
+ $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS);
+ }
+
+ update_dynamic_config();
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['CLEAN_VERIFY'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ $url = $this->save_convert_progress($converter, 'jump=2');
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+
+ if ($jump == 2)
+ {
+ $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_permissions = ''");
+
+ // TODO: sync() is likely going to bomb out on forums with a considerable amount of topics.
+ // TODO: the sync function is able to handle FROM-TO values, we should use them here (batch processing)
+ sync('forum', '', '', false, true);
+ $cache->destroy('sql', FORUMS_TABLE);
+
+ $this->template->assign_block_vars('checks', array(
+ 'TITLE' => $user->lang['SYNC_FORUMS'],
+ 'RESULT' => $user->lang['DONE'],
+ ));
+
+ // Continue with synchronizing the forums...
+ $url = $this->save_convert_progress($converter, 'sync_batch=0');
+
+ $this->template->assign_vars(array(
+ 'L_SUBMIT' => $user->lang['CONTINUE_CONVERT'],
+ 'U_ACTION' => $url,
+ ));
+
+ $this->meta_refresh($url);
+ return;
+ }
+ }
+
+ function build_insert_query(&$schema, &$sql_data, $current_table)
+ {
+ global $db, $user;
+ global $convert;
+
+ // Can we use IGNORE with this DBMS?
+ $sql_ignore = (strpos($db->get_sql_layer(), 'mysql') === 0 && !defined('DEBUG')) ? 'IGNORE ' : '';
+ $insert_query = 'INSERT ' . $sql_ignore . 'INTO ' . $schema['target'] . ' (';
+
+ $aliases = array();
+
+ $sql_data = array(
+ 'source_fields' => array(),
+ 'target_fields' => array(),
+ 'source_tables' => array(),
+ 'select_fields' => array(),
+ );
+
+ foreach ($schema as $key => $val)
+ {
+ // Example: array('group_name', 'extension_groups.group_name', 'htmlspecialchars'),
+ if (is_int($key))
+ {
+ if (!empty($val[0]))
+ {
+ // Target fields
+ $sql_data['target_fields'][$val[0]] = $key;
+ $insert_query .= $val[0] . ', ';
+ }
+
+ if (!is_array($val[1]))
+ {
+ $val[1] = array($val[1]);
+ }
+
+ foreach ($val[1] as $valkey => $value_1)
+ {
+ // This should cover about any case:
+ //
+ // table.field => SELECT table.field FROM table
+ // table.field AS alias => SELECT table.field AS alias FROM table
+ // table.field AS table2.alias => SELECT table2.field AS alias FROM table table2
+ // table.field AS table2.field => SELECT table2.field FROM table table2
+ //
+ if (preg_match('/^([a-z0-9_]+)\.([a-z0-9_]+)( +AS +(([a-z0-9_]+?)\.)?([a-z0-9_]+))?$/i', $value_1, $m))
+ {
+ // There is 'AS ...' in the field names
+ if (!empty($m[3]))
+ {
+ $value_1 = ($m[2] == $m[6]) ? $m[1] . '.' . $m[2] : $m[1] . '.' . $m[2] . ' AS ' . $m[6];
+
+ // Table alias: store it then replace the source table with it
+ if (!empty($m[5]) && $m[5] != $m[1])
+ {
+ $aliases[$m[5]] = $m[1];
+ $value_1 = str_replace($m[1] . '.' . $m[2], $m[5] . '.' . $m[2], $value_1);
+ }
+ }
+ else
+ {
+ // No table alias
+ $sql_data['source_tables'][$m[1]] = (empty($convert->src_table_prefix)) ? $m[1] : $convert->src_table_prefix . $m[1] . ' ' . $m[1];
+ }
+
+ $sql_data['select_fields'][$value_1] = $value_1;
+ $sql_data['source_fields'][$key][$valkey] = (!empty($m[6])) ? $m[6] : $m[2];
+ }
+ }
+ }
+ else if ($key == 'where' || $key == 'group_by' || $key == 'order_by' || $key == 'having')
+ {
+ if (@preg_match_all('/([a-z0-9_]+)\.([a-z0-9_]+)/i', $val, $m))
+ {
+ foreach ($m[1] as $value)
+ {
+ $sql_data['source_tables'][$value] = (empty($convert->src_table_prefix)) ? $value : $convert->src_table_prefix . $value . ' ' . $value;
+ }
+ }
+ }
+ }
+
+ // Add the aliases to the list of tables
+ foreach ($aliases as $alias => $table)
+ {
+ $sql_data['source_tables'][$alias] = $convert->src_table_prefix . $table . ' ' . $alias;
+ }
+
+ // 'left_join' => 'forums LEFT JOIN forum_prune ON forums.forum_id = forum_prune.forum_id',
+ if (!empty($schema['left_join']))
+ {
+ if (!is_array($schema['left_join']))
+ {
+ $schema['left_join'] = array($schema['left_join']);
+ }
+
+ foreach ($schema['left_join'] as $left_join)
+ {
+ // This won't handle concatened LEFT JOINs
+ if (!preg_match('/([a-z0-9_]+) LEFT JOIN ([a-z0-9_]+) A?S? ?([a-z0-9_]*?) ?(ON|USING)(.*)/i', $left_join, $m))
+ {
+ $this->error(sprintf($user->lang['NOT_UNDERSTAND'], 'LEFT JOIN', $left_join, $current_table, $schema['target']), __LINE__, __FILE__);
+ }
+
+ if (!empty($aliases[$m[2]]))
+ {
+ if (!empty($m[3]))
+ {
+ $this->error(sprintf($user->lang['NAMING_CONFLICT'], $m[2], $m[3], $schema['left_join']), __LINE__, __FILE__);
+ }
+
+ $m[2] = $aliases[$m[2]];
+ $m[3] = $m[2];
+ }
+
+ $right_table = $convert->src_table_prefix . $m[2];
+ if (!empty($m[3]))
+ {
+ unset($sql_data['source_tables'][$m[3]]);
+ }
+ else if ($m[2] != $m[1])
+ {
+ unset($sql_data['source_tables'][$m[2]]);
+ }
+
+ if (strpos($sql_data['source_tables'][$m[1]], "\nLEFT JOIN") !== false)
+ {
+ $sql_data['source_tables'][$m[1]] = '(' . $sql_data['source_tables'][$m[1]] . ")\nLEFT JOIN $right_table";
+ }
+ else
+ {
+ $sql_data['source_tables'][$m[1]] .= "\nLEFT JOIN $right_table";
+ }
+
+ if (!empty($m[3]))
+ {
+ unset($sql_data['source_tables'][$m[3]]);
+ $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[3];
+ }
+ else if (!empty($convert->src_table_prefix))
+ {
+ $sql_data['source_tables'][$m[1]] .= ' AS ' . $m[2];
+ }
+ $sql_data['source_tables'][$m[1]] .= ' ' . $m[4] . $m[5];
+ }
+ }
+
+ // Remove ", " from the end of the insert query
+ $insert_query = substr($insert_query, 0, -2) . ') VALUES ';
+
+ return $insert_query;
+ }
+
+ /**
+ * Function for processing the currently handled row
+ */
+ function process_row(&$schema, &$sql_data, &$insert_values)
+ {
+ global $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache;
+ global $convert, $convert_row;
+
+ $sql_flag = false;
+
+ foreach ($schema as $key => $fields)
+ {
+ // We are only interested in the lines with:
+ // array('comment', 'attachments_desc.comment', 'htmlspecialchars'),
+ if (is_int($key))
+ {
+ if (!is_array($fields[1]))
+ {
+ $fields[1] = array($fields[1]);
+ }
+
+ $firstkey_set = false;
+ $firstkey = 0;
+
+ foreach ($fields[1] as $inner_key => $inner_value)
+ {
+ if (!$firstkey_set)
+ {
+ $firstkey = $inner_key;
+ $firstkey_set = true;
+ }
+
+ $src_field = isset($sql_data['source_fields'][$key][$inner_key]) ? $sql_data['source_fields'][$key][$inner_key] : '';
+
+ if (!empty($src_field))
+ {
+ $fields[1][$inner_key] = $convert->row[$src_field];
+ }
+ }
+
+ if (!empty($fields[0]))
+ {
+ // We have a target field, if we haven't set $sql_flag yet it will be set to TRUE.
+ // If a function has already set it to FALSE it won't change it.
+ if ($sql_flag === false)
+ {
+ $sql_flag = true;
+ }
+
+ // No function assigned?
+ if (empty($fields[2]))
+ {
+ $value = $fields[1][$firstkey];
+ }
+ else if (is_array($fields[2]) && !is_callable($fields[2]))
+ {
+ // Execute complex function/eval/typecast
+ $value = $fields[1];
+
+ foreach ($fields[2] as $type => $execution)
+ {
+ if (strpos($type, 'typecast') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+ $value = $value[0];
+ settype($value, $execution);
+ }
+ else if (strpos($type, 'function') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $value = call_user_func_array($execution, $value);
+ }
+ else if (strpos($type, 'execute') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $execution = str_replace('{RESULT}', '$value', $execution);
+ $execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
+ eval($execution);
+ // @codingStandardsIgnoreEnd
+ }
+ }
+ }
+ else
+ {
+ $value = call_user_func_array($fields[2], $fields[1]);
+ }
+
+ if (is_null($value))
+ {
+ $value = '';
+ }
+
+ $insert_values[] = $db->_sql_validate_value($value);
+ }
+ else if (!empty($fields[2]))
+ {
+ if (is_array($fields[2]))
+ {
+ // Execute complex function/eval/typecast
+ $value = '';
+
+ foreach ($fields[2] as $type => $execution)
+ {
+ if (strpos($type, 'typecast') === 0)
+ {
+ $value = settype($value, $execution);
+ }
+ else if (strpos($type, 'function') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $value = call_user_func_array($execution, $value);
+ }
+ else if (strpos($type, 'execute') === 0)
+ {
+ if (!is_array($value))
+ {
+ $value = array($value);
+ }
+
+ $execution = str_replace('{RESULT}', '$value', $execution);
+ $execution = str_replace('{VALUE}', '$value', $execution);
+ // @codingStandardsIgnoreStart
+ eval($execution);
+ // @codingStandardsIgnoreEnd
+ }
+ }
+ }
+ else
+ {
+ call_user_func_array($fields[2], $fields[1]);
+ }
+ }
+ }
+ }
+
+ return $sql_flag;
+ }
+
+ /**
+ * Own meta refresh function to be able to change the global time used
+ */
+ function meta_refresh($url)
+ {
+ global $convert;
+
+ if ($convert->options['refresh'])
+ {
+ // Because we should not rely on correct settings, we simply use the relative path here directly.
+ $this->template->assign_vars(array(
+ 'S_REFRESH' => true,
+ 'META' => '<meta http-equiv="refresh" content="5; url=' . $url . '" />')
+ );
+ }
+ }
+
+ /**
+ * Error handler function
+ *
+ * This function needs to be kept for BC
+ *
+ * @param $error
+ * @param $line
+ * @param $file
+ * @param bool|false $skip
+ */
+ public function error($error, $line, $file, $skip = false)
+ {
+ $this->template->assign_block_vars('errors', array(
+ 'TITLE' => $error,
+ 'DESCRIPTION' => 'In ' . $file . ' on line ' . $line,
+ ));
+ }
+
+ /**
+ * Database error handler function
+ *
+ * This function needs to be kept for BC
+ *
+ * @param $error
+ * @param $sql
+ * @param $line
+ * @param $file
+ * @param bool|false $skip
+ */
+ public function db_error($error, $sql, $line, $file, $skip = false)
+ {
+ $this->template->assign_block_vars('errors', array(
+ 'TITLE' => $error,
+ 'DESCRIPTION' => 'In ' . $file . ' on line ' . $line . '<br /><br /><strong>SQL:</strong> ' . $sql,
+ ));
+ }
+}
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 282b3d238a..414d23623a 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.2.0-a2',
+ 'phpbb_version' => '3.2.0-b1',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php
index 649d0c4283..70a8a9c7ea 100755
--- a/phpBB/install/phpbbcli.php
+++ b/phpBB/install/phpbbcli.php
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
define('IN_PHPBB', true);
define('IN_INSTALL', true);
define('PHPBB_ENVIRONMENT', 'production');
-define('PHPBB_VERSION', '3.2.0-a2-dev');
+define('PHPBB_VERSION', '3.2.0-b2-dev');
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json
new file mode 100644
index 0000000000..ce2263b7d1
--- /dev/null
+++ b/phpBB/install/schemas/schema.json
@@ -0,0 +1,3389 @@
+{
+ "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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "post_msg_id": [
+ "ULINT",
+ 0
+ ],
+ "topic_id": [
+ "ULINT",
+ 0
+ ],
+ "in_message": [
+ "BOOL",
+ 0
+ ],
+ "poster_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "ban_userid": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "topic_id",
+ "user_id"
+ ]
+ },
+ "phpbb_bots": {
+ "COLUMNS": {
+ "bot_id": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "bot_active": [
+ "BOOL",
+ 1
+ ],
+ "bot_name": [
+ "STEXT_UNI",
+ ""
+ ],
+ "user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "topic_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "forum_last_poster_id": [
+ "ULINT",
+ 0
+ ],
+ "forum_last_post_subject": [
+ "STEXT_UNI",
+ ""
+ ],
+ "forum_last_post_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "forum_last_poster_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "forum_last_poster_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "forum_flags": [
+ "TINT:4",
+ 32
+ ],
+ "display_on_index": [
+ "BOOL",
+ 1
+ ],
+ "enable_indexing": [
+ "BOOL",
+ 1
+ ],
+ "enable_icons": [
+ "BOOL",
+ 1
+ ],
+ "enable_prune": [
+ "BOOL",
+ 0
+ ],
+ "prune_next": [
+ "TIMESTAMP",
+ 0
+ ],
+ "prune_days": [
+ "UINT",
+ 0
+ ],
+ "prune_viewed": [
+ "UINT",
+ 0
+ ],
+ "prune_freq": [
+ "UINT",
+ 0
+ ],
+ "display_subforum_list": [
+ "BOOL",
+ 1
+ ],
+ "forum_options": [
+ "UINT:20",
+ 0
+ ],
+ "forum_posts_approved": [
+ "UINT",
+ 0
+ ],
+ "forum_posts_unapproved": [
+ "UINT",
+ 0
+ ],
+ "forum_posts_softdeleted": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_approved": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_unapproved": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_softdeleted": [
+ "UINT",
+ 0
+ ],
+ "enable_shadow_prune": [
+ "BOOL",
+ 0
+ ],
+ "prune_shadow_days": [
+ "UINT",
+ 7
+ ],
+ "prune_shadow_freq": [
+ "UINT",
+ 1
+ ],
+ "prune_shadow_next": [
+ "INT:11",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "session_id": [
+ "CHAR:32",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "forum_id",
+ "user_id",
+ "session_id"
+ ]
+ },
+ "phpbb_forums_track": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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_alt": [
+ "VCHAR",
+ ""
+ ],
+ "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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "log_type": [
+ "TINT:4",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "ULINT",
+ 0
+ ],
+ "post_id": [
+ "ULINT",
+ 0
+ ],
+ "reportee_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "provider": [
+ "VCHAR",
+ ""
+ ],
+ "oauth_provider_id": [
+ "TEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "provider"
+ ]
+ },
+ "phpbb_oauth_states": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "session_id": [
+ "CHAR:32",
+ ""
+ ],
+ "provider": [
+ "VCHAR",
+ ""
+ ],
+ "oauth_state": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "KEYS": {
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "provider": [
+ "INDEX",
+ "provider"
+ ]
+ }
+ },
+ "phpbb_oauth_tokens": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "poll_option_id": [
+ "TINT:4",
+ 0
+ ],
+ "vote_user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "topic_id": [
+ "ULINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "poster_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "root_level": [
+ "UINT",
+ 0
+ ],
+ "author_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "rule_check": [
+ "UINT",
+ 0
+ ],
+ "rule_connection": [
+ "UINT",
+ 0
+ ],
+ "rule_string": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "rule_user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "author_id": [
+ "ULINT",
+ 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:64",
+ ""
+ ],
+ "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": [
+ "ULINT",
+ 0
+ ],
+ "pf_phpbb_interests": [
+ "MTEXT",
+ ""
+ ],
+ "pf_phpbb_occupation": [
+ "MTEXT",
+ ""
+ ],
+ "pf_phpbb_icq": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_twitter": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_facebook": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_skype": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_youtube": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_location": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_googleplus": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_website": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_yahoo": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_aol": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "user_id"
+ },
+ "phpbb_profile_fields_lang": {
+ "COLUMNS": {
+ "field_id": [
+ "UINT",
+ 0
+ ],
+ "lang_id": [
+ "UINT",
+ 0
+ ],
+ "option_id": [
+ "UINT",
+ 0
+ ],
+ "field_type": [
+ "VCHAR:100",
+ ""
+ ],
+ "lang_value": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "field_id",
+ "lang_id",
+ "option_id"
+ ]
+ },
+ "phpbb_profile_lang": {
+ "COLUMNS": {
+ "field_id": [
+ "UINT",
+ 0
+ ],
+ "lang_id": [
+ "UINT",
+ 0
+ ],
+ "lang_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "lang_explain": [
+ "TEXT_UNI",
+ ""
+ ],
+ "lang_default_value": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "field_id",
+ "lang_id"
+ ]
+ },
+ "phpbb_ranks": {
+ "COLUMNS": {
+ "rank_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "rank_title": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "rank_min": [
+ "UINT",
+ 0
+ ],
+ "rank_special": [
+ "BOOL",
+ 0
+ ],
+ "rank_image": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "rank_id"
+ },
+ "phpbb_reports": {
+ "COLUMNS": {
+ "report_id": [
+ "ULINT",
+ 0
+ ],
+ "reason_id": [
+ "USINT",
+ 0
+ ],
+ "post_id": [
+ "ULINT",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "user_notify": [
+ "BOOL",
+ 0
+ ],
+ "report_closed": [
+ "BOOL",
+ 0
+ ],
+ "report_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "report_text": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "pm_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "word_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "topic_first_poster_name": [
+ "VCHAR_UNI:255",
+ "",
+ "true_sort"
+ ],
+ "topic_first_poster_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "topic_last_post_id": [
+ "ULINT",
+ 0
+ ],
+ "topic_last_poster_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "topic_id": [
+ "ULINT",
+ 0
+ ],
+ "topic_posted": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "topic_id"
+ ]
+ },
+ "phpbb_topics_track": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "topic_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 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": [
+ "ULINT",
+ 0
+ ],
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "method": [
+ "VCHAR:255",
+ ""
+ ],
+ "notify": [
+ "BOOL",
+ 1
+ ]
+ }
+ },
+ "phpbb_users": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 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:64",
+ "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": [
+ "ULINT",
+ 0
+ ],
+ "post_id": [
+ "ULINT",
+ 0
+ ],
+ "log_id": [
+ "ULINT",
+ 0
+ ],
+ "warning_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "warning_id"
+ },
+ "phpbb_words": {
+ "COLUMNS": {
+ "word_id": [
+ "ULINT",
+ null,
+ "auto_increment"
+ ],
+ "word": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "replacement": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "word_id"
+ },
+ "phpbb_zebra": {
+ "COLUMNS": {
+ "user_id": [
+ "ULINT",
+ 0
+ ],
+ "zebra_id": [
+ "ULINT",
+ 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 6e5cefc624..ede31e53e6 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -239,6 +239,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('remote_upload_verify', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
@@ -275,7 +276,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.2.0-a3-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.0-b2-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/install/startup.php b/phpBB/install/startup.php
index 927f529b73..711768f9ac 100644
--- a/phpBB/install/startup.php
+++ b/phpBB/install/startup.php
@@ -101,6 +101,8 @@ $phpbb_class_loader_new = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}
$phpbb_class_loader_new->register();
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
$phpbb_class_loader->register();
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\convert\\', "{$phpbb_root_path}install/convert/", $phpEx);
+$phpbb_class_loader->register();
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
$phpbb_class_loader_ext->register();
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index ba51595dc3..462d66a04a 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -535,6 +535,8 @@ $lang = array_merge($lang, array(
'REFERRER_VALID_EXPLAIN' => 'If enabled, the referrer of POST requests will be checked against the host/script path settings. This may cause issues with boards using several domains and or external logins.',
'TPL_ALLOW_PHP' => 'Allow php in templates',
'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, <code>PHP</code> and <code>INCLUDEPHP</code> statements will be recognised and parsed in templates.',
+ 'UPLOAD_CERT_VALID' => 'Validate upload certificate',
+ 'UPLOAD_CERT_VALID_EXPLAIN' => 'If enabled, certificates of remote uploads will be validated. This requires the CA bundle to be defined by the <samp>openssl.cafile</samp> or <samp>curl.cainfo</samp> setting in your php.ini.',
));
// Email Settings
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 421075ce5e..9d0bb5f8b9 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -130,6 +130,8 @@ $lang = array_merge($lang, array(
'NO_USERS_ADDED' => 'No users were added to the group.',
'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.',
+ 'PENDING_MEMBERS' => 'Pending',
+
'SELECT_GROUP' => 'Select a group',
'SPECIAL_GROUPS' => 'Pre-defined groups',
'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.',
diff --git a/phpBB/language/en/help/bbcode.php b/phpBB/language/en/help/bbcode.php
index e9f3562646..dc39749963 100644
--- a/phpBB/language/en/help/bbcode.php
+++ b/phpBB/language/en/help/bbcode.php
@@ -44,9 +44,9 @@ $lang = array_merge($lang, array(
'HELP_BBCODE_LINKS_BASIC_ANSWER' => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.<ul><li>The first of these uses the <strong>[url=][/url]</strong> tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:<br /><br /><strong>[url=https://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://www.phpbb.com/">Visit phpBB!</a> Please notice that the link opens in the same window or a new window depending on the users browser preferences.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><strong>[url]</strong>https://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="https://www.phpbb.com/">https://www.phpbb.com/</a></li><li>Additionally, phpBB features something called <i>Magic Links</i>, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to email addresses, you can either specify an address explicitly for example:<br /><br /><strong>[email]</strong>no.one@domain.adr<strong>[/email]</strong><br /><br />which will output <a href="mailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <strong>[img][/img]</strong> (see next entry), <strong>[b][/b]</strong>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:<br /><br /><strong>[url=https://www.phpbb.com/][img]</strong>https://www.phpbb.com/theme/images/logos/blue/160x52.png<strong>[/url][/img]</strong><br /><br />is <span style="text-decoration: underline">not</span> correct which may lead to your post being deleted so take care.',
'HELP_BBCODE_LINKS_BASIC_QUESTION' => 'Linking to another site',
- 'HELP_BBCODE_LISTS_ORDERER_ANSWER' => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>',
+ 'HELP_BBCODE_LISTS_ORDERER_ANSWER' => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=A]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=i]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=I]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>',
'HELP_BBCODE_LISTS_ORDERER_QUESTION' => 'Creating an Ordered list',
- 'HELP_BBCODE_LISTS_UNORDERER_ANSWER' => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul>',
+ 'HELP_BBCODE_LISTS_UNORDERER_ANSWER' => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul><br />Alternatively you can specify the list’s bullet style using <strong>[list=disc][/list]</strong>, <strong>[list=circle][/list]</strong>, or <strong>[list=square][/list]</strong>.',
'HELP_BBCODE_LISTS_UNORDERER_QUESTION' => 'Creating an Unordered list',
'HELP_BBCODE_OTHERS_CUSTOM_ANSWER' => 'If you are an administrator on this board and have the proper permissions, you can add further BBCodes through the Custom BBCodes section.',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 0c539a7309..31578824ef 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -91,14 +91,14 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
// Filesystem requirements
'FILE_NOT_EXISTS' => 'File not exists',
- 'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB %1$s file need to exist.',
+ 'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.',
'FILE_NOT_WRITABLE' => 'File not writable',
- 'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB %1$s file need to be writable.',
+ 'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.',
'DIRECTORY_NOT_EXISTS' => 'Directory not exists',
- 'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB %1$s directory need to exist.',
+ 'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.',
'DIRECTORY_NOT_WRITABLE' => 'Directory not writable',
- 'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB %1$s directory need to be writable.',
+ 'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.',
// Server requirements
'PHP_VERSION_REQD' => 'PHP version',
@@ -120,7 +120,11 @@ $lang = array_merge($lang, array(
// General error messages
$lang = array_merge($lang, array(
'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block.',
- 'PHPBB_ALREADY_INSTALLED' => 'phpBB is already installed.'
+
+ 'PHPBB_ALREADY_INSTALLED' => 'phpBB is already installed.',
+
+ 'TIMEOUT_DETECTED_TITLE' => 'The installer detected a timeout',
+ 'TIMEOUT_DETECTED_MESSAGE' => 'The installer has detected a timeout, you may try to refresh the page, which may lead to data corruption. We suggest that you either increase your timeout settings or try to use the CLI.',
));
// Data obtaining translations
@@ -200,6 +204,7 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_NO_SQLITE3' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 3.6.15.',
'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.',
'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
+ 'INST_SCHEMA_FILE_NOT_WRITABLE' => 'The schema file is not writable',
//
// Email data
@@ -275,9 +280,11 @@ $lang = array_merge($lang, array(
'TASK_CREATE_CONFIG_FILE' => 'Creating configuration file',
// Install database
- 'TASK_ADD_CONFIG_SETTINGS' => 'Adding configuration settings',
- 'TASK_ADD_DEFAULT_DATA' => 'Adding default settings to the database',
- 'TASK_CREATE_DATABASE_SCHEMA' => 'Creating database schema',
+ 'TASK_ADD_CONFIG_SETTINGS' => 'Adding configuration settings',
+ 'TASK_ADD_DEFAULT_DATA' => 'Adding default settings to the database',
+ 'TASK_CREATE_DATABASE_SCHEMA_FILE' => 'Creating database schema file',
+ 'TASK_SETUP_DATABASE' => 'Setting up database',
+ 'TASK_CREATE_TABLES' => 'Creating tables',
// Install data
'TASK_ADD_BOTS' => 'Registering bots',
@@ -439,3 +446,112 @@ $lang = array_merge($lang, array(
'INLINE_UPDATE_SUCCESSFUL' => 'The database update was successful.',
));
+
+// Converter
+$lang = array_merge($lang, array(
+ // Common converter messages
+ 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist.',
+ 'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source board to allow the path to it to be verified.',
+ 'COULD_NOT_FIND_PATH' => 'Could not find path to your former board. Please check your settings and try again.<br />» %s was specified as the source path.',
+ 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for “%s” is empty.',
+
+ 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:<br />»<strong>%s</strong>.',
+ 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />»<strong>%s</strong>.',
+
+ 'INSTALL_TEST' => 'Test again',
+
+ 'NO_TABLES_FOUND' => 'No tables found.',
+ 'TABLES_MISSING' => 'Could not find these tables<br />» <strong>%s</strong>.',
+ 'CHECK_TABLE_PREFIX' => 'Please check your table prefix and try again.',
+
+ // Conversion in progress
+ 'CONTINUE_CONVERT' => 'Continue conversion',
+ 'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.',
+ 'CONVERT_NEW_CONVERSION' => 'New conversion',
+ 'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
+
+ // Start conversion
+ 'SUB_INTRO' => 'Introduction',
+ 'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
+ 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.',
+ 'AVAILABLE_CONVERTORS' => 'Available convertors',
+ 'NO_CONVERTORS' => 'No convertors are available for use.',
+ 'CONVERT_OPTIONS' => 'Options',
+ 'SOFTWARE' => 'Board software',
+ 'VERSION' => 'Version',
+ 'CONVERT' => 'Convert',
+
+ // Settings
+ 'STAGE_SETTINGS' => 'Settings',
+ 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from.<br />» Specified table prefix was %s.',
+ 'DEFAULT_PREFIX_IS' => 'The convertor was not able to find tables with the specified prefix. Please make sure you have entered the correct details for the board you are converting from. The default table prefix for %1$s is <strong>%2$s</strong>.',
+ 'SPECIFY_OPTIONS' => 'Specify conversion options',
+ 'FORUM_PATH' => 'Board path',
+ 'FORUM_PATH_EXPLAIN' => 'This is the <strong>relative</strong> path on disk to your former board from the <strong>root of this phpBB3 installation</strong>.',
+ 'REFRESH_PAGE' => 'Refresh page to continue conversion',
+ 'REFRESH_PAGE_EXPLAIN' => 'If set to yes, the convertor will refresh the page to continue the conversion after having finished a step. If this is your first conversion for testing purposes and to determine any errors in advance, we suggest to set this to No.',
+
+ // Conversion
+ 'STAGE_IN_PROGRESS' => 'Conversion in progress',
+
+ 'AUTHOR_NOTES' => 'Author notes<br />» %s',
+ 'STARTING_CONVERT' => 'Starting conversion process',
+ 'CONFIG_CONVERT' => 'Converting the configuration',
+ 'DONE' => 'Done',
+ 'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
+ 'FILLING_TABLE' => 'Filling table <strong>%s</strong>',
+ 'FILLING_TABLES' => 'Filling tables',
+ 'DB_ERR_INSERT' => 'Error while processing <code>INSERT</code> query.',
+ 'DB_ERR_LAST' => 'Error while processing <var>query_last</var>.',
+ 'DB_ERR_QUERY_FIRST' => 'Error while executing <var>query_first</var>.',
+ 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing <var>query_first</var>, %s (“%s”).',
+ 'DB_ERR_SELECT' => 'Error while running <code>SELECT</code> query.',
+ 'STEP_PERCENT_COMPLETED' => 'Step <strong>%d</strong> of <strong>%d</strong>',
+ 'FINAL_STEP' => 'Process final step',
+ 'SYNC_FORUMS' => 'Starting to synchronise forums',
+ 'SYNC_POST_COUNT' => 'Synchronising post_counts',
+ 'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
+ 'SYNC_TOPICS' => 'Starting to synchronise topics',
+ 'SYNC_TOPIC_ID' => 'Synchronising topics from <var>topic_id</var> %1$s to %2$s.',
+ 'PROCESS_LAST' => 'Processing last statements',
+ 'UPDATE_TOPICS_POSTED' => 'Generating topics posted information',
+ 'UPDATE_TOPICS_POSTED_ERR' => 'An error occurred while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
+ 'CONTINUE_LAST' => 'Continue last statements',
+ 'CLEAN_VERIFY' => 'Cleaning up and verifying the final structure',
+ 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s (“%s”)',
+ 'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases<br /><br />%s',
+
+ // Finish conversion
+ 'CONVERT_COMPLETE' => 'Conversion completed',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.2. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=466">support forums</a>.',
+
+ 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.',
+ 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.',
+ 'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.',
+ 'CONV_ERROR_GET_CATEGORIES' => 'Unable to get categories.',
+ 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your board configuration.',
+ 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read “%s”.',
+ 'CONV_ERROR_GROUP_ACCESS' => 'Unable to get group authentication information.',
+ 'CONV_ERROR_INCONSISTENT_GROUPS' => 'Inconsistency in groups table detected in add_bots() - you need to add all special groups if you do it manually.',
+ 'CONV_ERROR_INSERT_BOT' => 'Unable to insert bot into users table.',
+ 'CONV_ERROR_INSERT_BOTGROUP' => 'Unable to insert bot into bots table.',
+ 'CONV_ERROR_INSERT_USER_GROUP' => 'Unable to insert user into user_group table.',
+ 'CONV_ERROR_MESSAGE_PARSER' => 'Message parser error',
+ 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
+ 'CONV_ERROR_NO_FORUM_PATH' => 'The relative path to the source board has not been specified.',
+ 'CONV_ERROR_NO_GALLERY_PATH' => 'Note to developer: you must specify $convertor[\'avatar_gallery_path\'] to use %s.',
+ 'CONV_ERROR_NO_GROUP' => 'Group “%1$s” could not be found in %2$s.',
+ 'CONV_ERROR_NO_RANKS_PATH' => 'Note to developer: you must specify $convertor[\'ranks_path\'] to use %s.',
+ 'CONV_ERROR_NO_SMILIES_PATH' => 'Note to developer: you must specify $convertor[\'smilies_path\'] to use %s.',
+ 'CONV_ERROR_NO_UPLOAD_DIR' => 'Note to developer: you must specify $convertor[\'upload_path\'] to use %s.',
+ 'CONV_ERROR_PERM_SETTING' => 'Unable to insert/update permission setting.',
+ 'CONV_ERROR_PM_COUNT' => 'Unable to select folder pm count.',
+ 'CONV_ERROR_REPLACE_CATEGORY' => 'Unable to insert new forum replacing old category.',
+ 'CONV_ERROR_REPLACE_FORUM' => 'Unable to insert new forum replacing old forum.',
+ 'CONV_ERROR_USER_ACCESS' => 'Unable to get user authentication information.',
+ 'CONV_ERROR_WRONG_GROUP' => 'Wrong group “%1$s” defined in %2$s.',
+ 'CONV_OPTIONS_BODY' => 'This page collects the data required to access the source board. Enter the database details of your former board; the converter will not change anything in the database given below. The source board should be disabled to allow a consistent conversion.',
+ 'CONV_SAVED_MESSAGES' => 'Saved messages',
+
+ 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process. Please note that you may have to manually do and adjust several things. After conversion, especially check the permissions assigned, rebuild your search index which is not converted and also make sure files got copied correctly, for example avatars and smilies.',
+));
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index c23a409ae7..759a899de1 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1231,21 +1231,19 @@ switch ($mode)
);
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_sql_query_data', compact($vars)));
- // Count the users ...
- if ($sql_where)
- {
- $sql = 'SELECT COUNT(u.user_id) AS total_users
- FROM ' . USERS_TABLE . " u$sql_from
- WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
- $sql_where";
- $result = $db->sql_query($sql);
- $total_users = (int) $db->sql_fetchfield('total_users');
- $db->sql_freeresult($result);
- }
- else
+ $user_types = array(USER_NORMAL, USER_FOUNDER);
+ if ($auth->acl_get('a_user'))
{
- $total_users = $config['num_users'];
+ $user_types[] = USER_INACTIVE;
}
+ // Count the users ...
+ $sql = 'SELECT COUNT(u.user_id) AS total_users
+ FROM ' . USERS_TABLE . " u$sql_from
+ WHERE " . $db->sql_in_set('u.user_type', $user_types) . "
+ $sql_where";
+ $result = $db->sql_query($sql);
+ $total_users = (int) $db->sql_fetchfield('total_users');
+ $db->sql_freeresult($result);
// Build a relevant pagination_url
$params = $sort_params = array();
@@ -1411,13 +1409,7 @@ switch ($mode)
);
}
- $user_types = array(USER_NORMAL, USER_FOUNDER);
- if ($auth->acl_get('a_user'))
- {
- $user_types[] = USER_INACTIVE;
- }
-
- $start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']);
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $total_users);
// Get us some users :D
$sql = "SELECT u.user_id
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php
index 55cd4668de..85762c4d95 100644
--- a/phpBB/phpbb/cache/driver/base.php
+++ b/phpBB/phpbb/cache/driver/base.php
@@ -49,6 +49,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
$this->remove_dir($fileInfo->getPathname());
}
else if (strpos($filename, 'container_') === 0 ||
+ strpos($filename, 'autoload_') === 0 ||
strpos($filename, 'url_matcher') === 0 ||
strpos($filename, 'url_generator') === 0 ||
strpos($filename, 'sql_') === 0 ||
diff --git a/phpBB/phpbb/console/command/db/migration_command.php b/phpBB/phpbb/console/command/db/migration_command.php
index d44ef8c5cb..b951560588 100644
--- a/phpBB/phpbb/console/command/db/migration_command.php
+++ b/phpBB/phpbb/console/command/db/migration_command.php
@@ -45,7 +45,7 @@ abstract class migration_command extends \phpbb\console\command\command
$this->migrator->set_migrations($migrations);
- return $migrations;
+ return $this->migrator->get_migrations();
}
protected function finalise_update()
diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php
index d7364374af..37d0e9b21a 100644
--- a/phpBB/phpbb/cron/task/core/tidy_plupload.php
+++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php
@@ -42,6 +42,12 @@ class tidy_plupload extends \phpbb\cron\task\base
*/
protected $config;
+ /** @var \phpbb\log\log_interface */
+ protected $log;
+
+ /** @var \phpbb\user */
+ protected $user;
+
/**
* Directory where plupload stores temporary files.
* @var string
@@ -53,11 +59,15 @@ class tidy_plupload extends \phpbb\cron\task\base
*
* @param string $phpbb_root_path The root path
* @param \phpbb\config\config $config The config
+ * @param \phpbb\log\log_interface $log Log
+ * @param \phpbb\user $user User object
*/
- public function __construct($phpbb_root_path, \phpbb\config\config $config)
+ public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\log\log_interface $log, \phpbb\user $user)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->config = $config;
+ $this->log = $log;
+ $this->user = $user;
$this->plupload_upload_path = $this->phpbb_root_path . $this->config['upload_path'] . '/plupload';
}
@@ -67,8 +77,6 @@ class tidy_plupload extends \phpbb\cron\task\base
*/
public function run()
{
- global $user, $phpbb_log;
-
// Remove old temporary file (perhaps failed uploads?)
$last_valid_timestamp = time() - $this->max_file_age;
try
@@ -90,7 +98,7 @@ class tidy_plupload extends \phpbb\cron\task\base
}
catch (\UnexpectedValueException $e)
{
- $phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_PLUPLOAD_TIDY_FAILED', false, array(
+ $this->log->add('critical', $this->user->data['user_id'], $this->user->ip, 'LOG_PLUPLOAD_TIDY_FAILED', false, array(
$this->plupload_upload_path,
$e->getMessage(),
$e->getTraceAsString()
diff --git a/phpBB/phpbb/db/migration/data/v31x/v318rc1.php b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
new file mode 100644
index 0000000000..8bae95c7d6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v31x/v318rc1.php
@@ -0,0 +1,32 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v31x;
+
+class v318rc1 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\increase_size_of_dateformat',
+ '\phpbb\db\migration\data\v31x\v317pl1',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.8-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v320/default_data_type_ids.php b/phpBB/phpbb/db/migration/data/v320/default_data_type_ids.php
new file mode 100644
index 0000000000..65e5b3fa73
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v320/default_data_type_ids.php
@@ -0,0 +1,361 @@
+<?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\v320;
+
+class default_data_type_ids extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v320\v320a2',
+ '\phpbb\db\migration\data\v320\oauth_states',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'acl_users' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'attachments' => array(
+ 'attach_id' => array('ULINT', null, 'auto_increment'),
+ 'post_msg_id' => array('ULINT', 0),
+ 'poster_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'banlist' => array(
+ 'ban_id' => array('ULINT', null, 'auto_increment'),
+ 'ban_userid' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'bookmarks' => array(
+ 'topic_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'bots' => array(
+ 'bot_id' => array('ULINT', null, 'auto_increment'),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'drafts' => array(
+ 'draft_id' => array('ULINT', null, 'auto_increment'),
+ 'user_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_last_post_id' => array('ULINT', 0),
+ 'forum_last_poster_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'forums_access' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'forums_track' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'forums_watch' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'log' => array(
+ 'log_id' => array('ULINT', null, 'auto_increment'),
+ 'post_id' => array('ULINT', 0),
+ 'reportee_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'login_attempts' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'moderator_cache' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'oauth_accounts' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'oauth_states' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'oauth_tokens' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'poll_options' => array(
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'poll_votes' => array(
+ 'topic_id' => array('ULINT', 0),
+ 'vote_user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_id' => array('ULINT', null, 'auto_increment'),
+ 'poster_id' => array('ULINT', 0),
+ 'post_delete_user' => array('ULINT', 0),
+ 'post_edit_user' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs' => array(
+ 'author_id' => array('ULINT', 0),
+ 'message_edit_user' => array('ULINT', 0),
+ 'msg_id' => array('ULINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'privmsgs_folder' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs_rules' => array(
+ 'rule_user_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs_to' => array(
+ 'author_id' => array('ULINT', 0),
+ 'msg_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'profile_fields_data' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'report_id' => array('ULINT', 0),
+ 'pm_id' => array('ULINT', 0),
+ 'post_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'search_wordlist' => array(
+ 'word_id' => array('ULINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'search_wordmatch' => array(
+ 'post_id' => array('ULINT', 0),
+ 'word_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'sessions' => array(
+ 'session_user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'sessions_keys' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_id' => array('ULINT', null, 'auto_increment'),
+ 'topic_poster' => array('ULINT', 0),
+ 'topic_first_post_id' => array('ULINT', 0),
+ 'topic_last_post_id' => array('ULINT', 0),
+ 'topic_last_poster_id' => array('ULINT', 0),
+ 'topic_moved_id' => array('ULINT', 0),
+ 'topic_delete_user' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'topics_track' => array(
+ 'user_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'topics_posted' => array(
+ 'user_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'topics_watch' => array(
+ 'user_id' => array('ULINT', 0),
+ 'topic_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'user_notifications' => array(
+ 'item_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'user_group' => array(
+ 'user_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'users' => array(
+ 'user_id' => array('ULINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'warnings' => array(
+ 'log_id' => array('ULINT', 0),
+ 'user_id' => array('ULINT', 0),
+ 'post_id' => array('ULINT', 0),
+ ),
+ $this->table_prefix . 'words' => array(
+ 'word_id' => array('ULINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'zebra' => array(
+ 'user_id' => array('ULINT', 0),
+ 'zebra_id' => array('ULINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'acl_users' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'attachments' => array(
+ 'attach_id' => array('UINT', null, 'auto_increment'),
+ 'post_msg_id' => array('UINT', 0),
+ 'poster_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'banlist' => array(
+ 'ban_id' => array('UINT', null, 'auto_increment'),
+ 'ban_userid' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'bookmarks' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'bots' => array(
+ 'bot_id' => array('UINT', null, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'drafts' => array(
+ 'draft_id' => array('UINT', null, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_last_post_id' => array('UINT', 0),
+ 'forum_last_poster_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'forums_access' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'forums_track' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'forums_watch' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'log' => array(
+ 'log_id' => array('UINT', null, 'auto_increment'),
+ 'post_id' => array('UINT', 0),
+ 'reportee_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'login_attempts' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'moderator_cache' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'oauth_accounts' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'oauth_states' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'oauth_tokens' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'poll_options' => array(
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'poll_votes' => array(
+ 'topic_id' => array('UINT', 0),
+ 'vote_user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_id' => array('UINT', null, 'auto_increment'),
+ 'poster_id' => array('UINT', 0),
+ 'post_delete_user' => array('UINT', 0),
+ 'post_edit_user' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs' => array(
+ 'author_id' => array('UINT', 0),
+ 'message_edit_user' => array('UINT', 0),
+ 'msg_id' => array('UINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'privmsgs_folder' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs_rules' => array(
+ 'rule_user_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'privmsgs_to' => array(
+ 'author_id' => array('UINT', 0),
+ 'msg_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'profile_fields_data' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'report_id' => array('UINT', 0),
+ 'pm_id' => array('UINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'search_wordlist' => array(
+ 'word_id' => array('UINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'search_wordmatch' => array(
+ 'post_id' => array('UINT', 0),
+ 'word_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'sessions' => array(
+ 'session_user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'sessions_keys' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_id' => array('UINT', null, 'auto_increment'),
+ 'topic_poster' => array('UINT', 0),
+ 'topic_first_post_id' => array('UINT', 0),
+ 'topic_last_post_id' => array('UINT', 0),
+ 'topic_last_poster_id' => array('UINT', 0),
+ 'topic_moved_id' => array('UINT', 0),
+ 'topic_delete_user' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'topics_track' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'topics_posted' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'topics_watch' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'user_notifications' => array(
+ 'item_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'user_group' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'users' => array(
+ 'user_id' => array('UINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'warnings' => array(
+ 'log_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'post_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'words' => array(
+ 'word_id' => array('UINT', null, 'auto_increment'),
+ ),
+ $this->table_prefix . 'zebra' => array(
+ 'user_id' => array('UINT', 0),
+ 'zebra_id' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v320/remote_upload_validation.php b/phpBB/phpbb/db/migration/data/v320/remote_upload_validation.php
new file mode 100644
index 0000000000..d61f6b96fd
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v320/remote_upload_validation.php
@@ -0,0 +1,31 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v320;
+
+class remote_upload_validation extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v320\v320a2',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('remote_upload_verify', '0')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v320/text_reparser.php b/phpBB/phpbb/db/migration/data/v320/text_reparser.php
index 1d73b74a76..ea614feb40 100644
--- a/phpBB/phpbb/db/migration/data/v320/text_reparser.php
+++ b/phpBB/phpbb/db/migration/data/v320/text_reparser.php
@@ -17,7 +17,10 @@ class text_reparser extends \phpbb\db\migration\container_aware_migration
{
static public function depends_on()
{
- return array('\phpbb\db\migration\data\v310\contact_admin_form');
+ return array(
+ '\phpbb\db\migration\data\v310\contact_admin_form',
+ '\phpbb\db\migration\data\v320\allowed_schemes_links',
+ );
}
public function effectively_installed()
@@ -78,7 +81,7 @@ class text_reparser extends \phpbb\db\migration\container_aware_migration
$end = max(1, $resume_data['current']);
$reparser->reparse_range($start, $end);
- $processed_records = $end - $start + 1;
+ $processed_records += $end - $start + 1;
$resume_data['current'] = $start - 1;
if ($start === 1)
diff --git a/phpBB/phpbb/db/migration/data/v320/v320b1.php b/phpBB/phpbb/db/migration/data/v320/v320b1.php
new file mode 100644
index 0000000000..5c3a3797cd
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v320/v320b1.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v320;
+
+class v320b1 extends \phpbb\db\migration\container_aware_migration
+{
+ public function effectively_installed()
+ {
+ return version_compare($this->config['version'], '3.2.0-b1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v31x\v317pl1',
+ '\phpbb\db\migration\data\v320\v320a2',
+ '\phpbb\db\migration\data\v31x\increase_size_of_dateformat',
+ '\phpbb\db\migration\data\v320\default_data_type_ids',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.2.0-b1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
index 2304c8e44c..4e218344f4 100644
--- a/phpBB/phpbb/db/migration/migration.php
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -20,7 +20,7 @@ namespace phpbb\db\migration;
* in a subclass. This class provides various utility methods to simplify editing
* a phpBB.
*/
-abstract class migration
+abstract class migration implements migration_interface
{
/** @var \phpbb\config\config */
protected $config;
@@ -70,9 +70,7 @@ abstract class migration
}
/**
- * Defines other migrations to be applied first
- *
- * @return array An array of migration class names
+ * {@inheritdoc}
*/
static public function depends_on()
{
@@ -80,14 +78,7 @@ abstract class migration
}
/**
- * Allows you to check if the migration is effectively installed (entirely optional)
- *
- * This is checked when a migration is installed. If true is returned, the migration will be set as
- * installed without performing the database changes.
- * This function is intended to help moving to migrations from a previous database updater, where some
- * migrations may have been installed already even though they are not yet listed in the migrations table.
- *
- * @return bool True if this migration is installed, False if this migration is not installed (checked on install)
+ * {@inheritdoc}
*/
public function effectively_installed()
{
@@ -95,9 +86,7 @@ abstract class migration
}
/**
- * Updates the database schema by providing a set of change instructions
- *
- * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ * {@inheritdoc}
*/
public function update_schema()
{
@@ -105,9 +94,7 @@ abstract class migration
}
/**
- * Reverts the database schema by providing a set of change instructions
- *
- * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ * {@inheritdoc}
*/
public function revert_schema()
{
@@ -115,9 +102,7 @@ abstract class migration
}
/**
- * Updates data by returning a list of instructions to be executed
- *
- * @return array Array of data update instructions
+ * {@inheritdoc}
*/
public function update_data()
{
@@ -125,12 +110,7 @@ abstract class migration
}
/**
- * Reverts data by returning a list of instructions to be executed
- *
- * @return array Array of data instructions that will be performed on revert
- * NOTE: calls to tools (such as config.add) are automatically reverted when
- * possible, so you should not attempt to revert those, this is mostly for
- * otherwise unrevertable calls (custom functions for example)
+ * {@inheritdoc}
*/
public function revert_data()
{
diff --git a/phpBB/phpbb/db/migration/migration_interface.php b/phpBB/phpbb/db/migration/migration_interface.php
new file mode 100644
index 0000000000..2aba5ec608
--- /dev/null
+++ b/phpBB/phpbb/db/migration/migration_interface.php
@@ -0,0 +1,70 @@
+<?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;
+
+/**
+ * Base class interface for database migrations
+ */
+interface migration_interface
+{
+ /**
+ * Defines other migrations to be applied first
+ *
+ * @return array An array of migration class names
+ */
+ static public function depends_on();
+
+ /**
+ * Allows you to check if the migration is effectively installed (entirely optional)
+ *
+ * This is checked when a migration is installed. If true is returned, the migration will be set as
+ * installed without performing the database changes.
+ * This function is intended to help moving to migrations from a previous database updater, where some
+ * migrations may have been installed already even though they are not yet listed in the migrations table.
+ *
+ * @return bool True if this migration is installed, False if this migration is not installed (checked on install)
+ */
+ public function effectively_installed();
+
+ /**
+ * Updates the database schema by providing a set of change instructions
+ *
+ * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ */
+ public function update_schema();
+
+ /**
+ * Reverts the database schema by providing a set of change instructions
+ *
+ * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ */
+ public function revert_schema();
+
+ /**
+ * Updates data by returning a list of instructions to be executed
+ *
+ * @return array Array of data update instructions
+ */
+ public function update_data();
+
+ /**
+ * Reverts data by returning a list of instructions to be executed
+ *
+ * @return array Array of data instructions that will be performed on revert
+ * NOTE: calls to tools (such as config.add) are automatically reverted when
+ * possible, so you should not attempt to revert those, this is mostly for
+ * otherwise unrevertable calls (custom functions for example)
+ */
+ public function revert_data();
+}
diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php
index 7003844bc4..c579e25824 100644
--- a/phpBB/phpbb/db/migration/schema_generator.php
+++ b/phpBB/phpbb/db/migration/schema_generator.php
@@ -77,8 +77,15 @@ class schema_generator
$check_dependencies = true;
while (!empty($migrations))
{
- foreach ($migrations as $migration_class)
+ foreach ($migrations as $key => $migration_class)
{
+ // Unset classes that are not a valid migration
+ if (\phpbb\db\migrator::is_migration($migration_class) === false)
+ {
+ unset($migrations[$key]);
+ continue;
+ }
+
$open_dependencies = array_diff($migration_class::depends_on(), $tree);
if (empty($open_dependencies))
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index d91860949a..a1e93942cd 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -170,10 +170,28 @@ class migrator
*/
public function set_migrations($class_names)
{
+ foreach ($class_names as $key => $class)
+ {
+ if (!self::is_migration($class))
+ {
+ unset($class_names[$key]);
+ }
+ }
+
$this->migrations = $class_names;
}
/**
+ * Get the list of available migration class names
+ *
+ * @return array Array of all migrations available to be run
+ */
+ public function get_migrations()
+ {
+ return $this->migrations;
+ }
+
+ /**
* Runs a single update step from the next migration to be applied.
*
* The update step can either be a schema or a (partial) data update. To
@@ -857,4 +875,27 @@ class migrator
));
}
}
+
+ /**
+ * Check if a class is a migration.
+ *
+ * @param string $migration A migration class name
+ * @return bool Return true if class is a migration, false otherwise
+ */
+ static public function is_migration($migration)
+ {
+ if (class_exists($migration))
+ {
+ // Migration classes should extend the abstract class
+ // phpbb\db\migration\migration (which implements the
+ // migration_interface) and be instantiable.
+ $reflector = new \ReflectionClass($migration);
+ if ($reflector->implementsInterface('\phpbb\db\migration\migration_interface') && $reflector->isInstantiable())
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
}
diff --git a/phpBB/phpbb/db/tools/mssql.php b/phpBB/phpbb/db/tools/mssql.php
index 6e58171040..a90a85bbb2 100644
--- a/phpBB/phpbb/db/tools/mssql.php
+++ b/phpBB/phpbb/db/tools/mssql.php
@@ -36,6 +36,7 @@ class mssql extends tools
'mssql' => array(
'INT:' => '[int]',
'BINT' => '[float]',
+ 'ULINT' => '[int]',
'UINT' => '[int]',
'UINT:' => '[int]',
'TINT:' => '[int]',
@@ -66,6 +67,7 @@ class mssql extends tools
'mssqlnative' => array(
'INT:' => '[int]',
'BINT' => '[float]',
+ 'ULINT' => '[int]',
'UINT' => '[int]',
'UINT:' => '[int]',
'TINT:' => '[int]',
diff --git a/phpBB/phpbb/db/tools/postgres.php b/phpBB/phpbb/db/tools/postgres.php
index 8b61625c3c..e2a4e668a6 100644
--- a/phpBB/phpbb/db/tools/postgres.php
+++ b/phpBB/phpbb/db/tools/postgres.php
@@ -30,6 +30,7 @@ class postgres extends tools
'postgres' => array(
'INT:' => 'INT4',
'BINT' => 'INT8',
+ 'ULINT' => 'INT4', // unsigned
'UINT' => 'INT4', // unsigned
'UINT:' => 'INT4', // unsigned
'USINT' => 'INT2', // unsigned
diff --git a/phpBB/phpbb/db/tools/tools.php b/phpBB/phpbb/db/tools/tools.php
index f06871a1d7..37ac0d0468 100644
--- a/phpBB/phpbb/db/tools/tools.php
+++ b/phpBB/phpbb/db/tools/tools.php
@@ -46,6 +46,7 @@ class tools implements tools_interface
'mysql_41' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
+ 'ULINT' => 'INT(10) UNSIGNED',
'UINT' => 'mediumint(8) UNSIGNED',
'UINT:' => 'int(%d) UNSIGNED',
'TINT:' => 'tinyint(%d)',
@@ -76,6 +77,7 @@ class tools implements tools_interface
'mysql_40' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
+ 'ULINT' => 'INT(10) UNSIGNED',
'UINT' => 'mediumint(8) UNSIGNED',
'UINT:' => 'int(%d) UNSIGNED',
'TINT:' => 'tinyint(%d)',
@@ -106,6 +108,7 @@ class tools implements tools_interface
'oracle' => array(
'INT:' => 'number(%d)',
'BINT' => 'number(20)',
+ 'ULINT' => 'number(10)',
'UINT' => 'number(8)',
'UINT:' => 'number(%d)',
'TINT:' => 'number(%d)',
@@ -136,11 +139,12 @@ class tools implements tools_interface
'sqlite' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
- 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'ULINT' => 'INTEGER UNSIGNED', // 'int(10) UNSIGNED',
+ 'UINT' => 'INTEGER UNSIGNED', // 'mediumint(8) UNSIGNED',
'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
'TINT:' => 'tinyint(%d)',
- 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
- 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'USINT' => 'INTEGER UNSIGNED', // 'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', // 'tinyint(1) UNSIGNED',
'VCHAR' => 'varchar(255)',
'VCHAR:' => 'varchar(%d)',
'CHAR:' => 'char(%d)',
@@ -152,7 +156,7 @@ class tools implements tools_interface
'STEXT_UNI' => 'text(65535)',
'TEXT_UNI' => 'text(65535)',
'MTEXT_UNI' => 'mediumtext(16777215)',
- 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', // 'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
'DECIMAL:' => 'decimal(%d,2)',
'PDECIMAL' => 'decimal(6,3)',
@@ -166,6 +170,7 @@ class tools implements tools_interface
'sqlite3' => array(
'INT:' => 'INT(%d)',
'BINT' => 'BIGINT(20)',
+ 'ULINT' => 'INTEGER UNSIGNED',
'UINT' => 'INTEGER UNSIGNED',
'UINT:' => 'INTEGER UNSIGNED',
'TINT:' => 'TINYINT(%d)',
@@ -199,7 +204,7 @@ class tools implements tools_interface
* A list of types being unsigned for better reference in some db's
* @var array
*/
- var $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
+ var $unsigned_types = array('ULINT', 'UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
/**
* This is set to true if user only wants to return the 'to-be-executed' SQL statement(s) (as an array).
@@ -1161,6 +1166,11 @@ class tools implements tools_interface
}
}
+ if (isset($column_data['after']))
+ {
+ $return_array['after'] = $column_data['after'];
+ }
+
break;
case 'oracle':
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 433847b285..9583da14f5 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -135,6 +135,11 @@ class container_builder
$config_cache = new ConfigCache($container_filename, defined('DEBUG'));
if ($this->use_cache && $config_cache->isFresh())
{
+ if ($this->use_extensions)
+ {
+ require($this->get_autoload_filename());
+ }
+
require($config_cache->getPath());
$this->container = new \phpbb_cache_container();
}
@@ -405,6 +410,15 @@ class container_builder
$extensions = $ext_container->get('ext.manager')->all_enabled();
// Load each extension found
+ $autoloaders = '<?php
+/**
+ * Loads all extensions custom auto-loaders.
+ *
+ * This file has been auto-generated
+ * by phpBB while loading the extensions.
+ */
+
+';
foreach ($extensions as $ext_name => $path)
{
$extension_class = '\\' . str_replace('/', '\\', $ext_name) . '\\di\\extension';
@@ -420,9 +434,14 @@ class container_builder
$filename = $path . 'vendor/autoload.php';
if (file_exists($filename))
{
- require $filename;
+ $autoloaders .= "require('{$filename}');\n";
}
}
+
+ $configCache = new ConfigCache($this->get_autoload_filename(), false);
+ $configCache->write($autoloaders);
+
+ require($this->get_autoload_filename());
}
else
{
@@ -540,6 +559,16 @@ class container_builder
}
/**
+ * Get the filename under which the dumped extensions autoloader will be stored.
+ *
+ * @return string Path for dumped extensions autoloader
+ */
+ protected function get_autoload_filename()
+ {
+ return $this->get_cache_dir() . 'autoload_' . md5($this->phpbb_root_path) . '.' . $this->php_ext;
+ }
+
+ /**
* Return the name of the current environment.
*
* @return string
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index 5bb530bad4..c7778cfed1 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -24,7 +24,7 @@ class base implements \phpbb\extension\extension_interface
protected $container;
/** @var \phpbb\finder */
- protected $finder;
+ protected $extension_finder;
/** @var \phpbb\db\migrator */
protected $migrator;
@@ -73,9 +73,7 @@ class base implements \phpbb\extension\extension_interface
*/
public function enable_step($old_state)
{
- $migrations = $this->get_migration_file_list();
-
- $this->migrator->set_migrations($migrations);
+ $this->get_migration_file_list();
$this->migrator->update();
@@ -103,8 +101,6 @@ class base implements \phpbb\extension\extension_interface
{
$migrations = $this->get_migration_file_list();
- $this->migrator->set_migrations($migrations);
-
foreach ($migrations as $migration)
{
while ($this->migrator->migration_state($migration) !== false)
@@ -137,6 +133,10 @@ class base implements \phpbb\extension\extension_interface
$migrations = $this->extension_finder->get_classes_from_files($migrations);
+ $this->migrator->set_migrations($migrations);
+
+ $migrations = $this->migrator->get_migrations();
+
return $migrations;
}
}
diff --git a/phpBB/phpbb/files/types/remote.php b/phpBB/phpbb/files/types/remote.php
index 33cbfb00ae..1fdba0ca32 100644
--- a/phpBB/phpbb/files/types/remote.php
+++ b/phpBB/phpbb/files/types/remote.php
@@ -14,6 +14,7 @@
namespace phpbb\files\types;
use bantu\IniGetWrapper\IniGetWrapper;
+use phpbb\config\config;
use phpbb\files\factory;
use phpbb\files\filespec;
use phpbb\language\language;
@@ -21,6 +22,9 @@ use phpbb\request\request_interface;
class remote extends base
{
+ /** @var config phpBB config */
+ protected $config;
+
/** @var factory Files factory */
protected $factory;
@@ -42,14 +46,16 @@ class remote extends base
/**
* Construct a form upload type
*
+ * @param config $config phpBB config
* @param factory $factory Files factory
* @param language $language Language class
* @param IniGetWrapper $php_ini ini_get() wrapper
* @param request_interface $request Request object
* @param string $phpbb_root_path phpBB root path
*/
- public function __construct(factory $factory, language $language, IniGetWrapper $php_ini, request_interface $request, $phpbb_root_path)
+ public function __construct(config $config, factory $factory, language $language, IniGetWrapper $php_ini, request_interface $request, $phpbb_root_path)
{
+ $this->config = $config;
$this->factory = $factory;
$this->language = $language;
$this->php_ini = $php_ini;
@@ -86,10 +92,6 @@ class remote extends base
$url = parse_url($upload_url);
- $host = $url['host'];
- $path = $url['path'];
- $port = (!empty($url['port'])) ? (int) $url['port'] : 80;
-
$upload_ary['type'] = 'application/octet-stream';
$url['path'] = explode('.', $url['path']);
@@ -97,108 +99,55 @@ class remote extends base
$url['path'] = implode('', $url['path']);
$upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : '');
- $filesize = 0;
$remote_max_filesize = $this->get_max_file_size();
- $errno = 0;
- $errstr = '';
+ $guzzle_options = [
+ 'timeout' => $this->upload->upload_timeout,
+ 'connect_timeout' => $this->upload->upload_timeout,
+ 'verify' => !empty($this->config['remote_upload_verify']) ? (bool) $this->config['remote_upload_verify'] : false,
+ ];
+ $client = new \GuzzleHttp\Client($guzzle_options);
- if (!($fsock = @fsockopen($host, $port, $errno, $errstr)))
+ try
{
- return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'NOT_UPLOADED'));
+ $response = $client->get($upload_url, $guzzle_options);
}
-
- // Make sure $path not beginning with /
- if (strpos($path, '/') === 0)
+ catch (\GuzzleHttp\Exception\ClientException $clientException)
{
- $path = substr($path, 1);
+ return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'URL_NOT_FOUND');
}
-
- fputs($fsock, 'GET /' . $path . " HTTP/1.1\r\n");
- fputs($fsock, "HOST: " . $host . "\r\n");
- fputs($fsock, "Connection: close\r\n\r\n");
-
- // Set a proper timeout for the socket
- socket_set_timeout($fsock, $this->upload->upload_timeout);
-
- $get_info = false;
- $data = '';
- $length = false;
- $timer_stop = time() + $this->upload->upload_timeout;
-
- while ((!$length || $filesize < $length) && !@feof($fsock))
+ catch (\GuzzleHttp\Exception\RequestException $requestException)
{
- if ($get_info)
+ if (strpos($requestException->getMessage(), 'cURL error 28') !== false || preg_match('/408|504/', $requestException->getCode()))
{
- if ($length)
- {
- // Don't attempt to read past end of file if server indicated length
- $block = @fread($fsock, min($length - $filesize, 1024));
- }
- else
- {
- $block = @fread($fsock, 1024);
- }
-
- $filesize += strlen($block);
-
- if ($remote_max_filesize && $filesize > $remote_max_filesize)
- {
- $max_filesize = get_formatted_filesize($remote_max_filesize, false);
-
- return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'WRONG_FILESIZE', $max_filesize['value'], $max_filesize['unit']));
- }
-
- $data .= $block;
+ return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'REMOTE_UPLOAD_TIMEOUT');
}
else
{
- $line = @fgets($fsock, 1024);
-
- if ($line == "\r\n")
- {
- $get_info = true;
- }
- else
- {
- if (stripos($line, 'content-type: ') !== false)
- {
- $upload_ary['type'] = rtrim(str_replace('content-type: ', '', strtolower($line)));
- }
- else if ($this->upload->max_filesize && stripos($line, 'content-length: ') !== false)
- {
- $length = (int) str_replace('content-length: ', '', strtolower($line));
-
- if ($remote_max_filesize && $length && $length > $remote_max_filesize)
- {
- $max_filesize = get_formatted_filesize($remote_max_filesize, false);
-
- return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'WRONG_FILESIZE', $max_filesize['value'], $max_filesize['unit']));
- }
- }
- else if (stripos($line, '404 not found') !== false)
- {
- return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'URL_NOT_FOUND');
- }
- }
+ return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'NOT_UPLOADED'));
}
+ }
+ catch (\Exception $e)
+ {
+ return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'NOT_UPLOADED'));
+ }
- $stream_meta_data = stream_get_meta_data($fsock);
+ $content_length = $response->getBody()->getSize();
+ if ($remote_max_filesize && $content_length > $remote_max_filesize)
+ {
+ $max_filesize = get_formatted_filesize($remote_max_filesize, false);
- // Cancel upload if we exceed timeout
- if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
- {
- return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'REMOTE_UPLOAD_TIMEOUT');
- }
+ return $this->factory->get('filespec')->set_error($this->language->lang($this->upload->error_prefix . 'WRONG_FILESIZE', $max_filesize['value'], $max_filesize['unit']));
}
- @fclose($fsock);
- if (empty($data))
+ if ($content_length == 0)
{
return $this->factory->get('filespec')->set_error($this->upload->error_prefix . 'EMPTY_REMOTE_DATA');
}
+ $data = $response->getBody();
+
$filename = tempnam(sys_get_temp_dir(), unique_id() . '-');
if (!($fp = @fopen($filename, 'wb')))
diff --git a/phpBB/phpbb/install/controller/archive_download.php b/phpBB/phpbb/install/controller/archive_download.php
index a0f0ba181d..eabc0a9976 100644
--- a/phpBB/phpbb/install/controller/archive_download.php
+++ b/phpBB/phpbb/install/controller/archive_download.php
@@ -46,9 +46,9 @@ class archive_download
*/
public function conflict_archive()
{
- $filename = $this->installer_config->get('update_file_conflict_archive', false);
+ $filename = $this->installer_config->get('update_file_conflict_archive', '');
- if (!$filename)
+ if (empty($filename))
{
throw new http_exception(404, 'URL_NOT_FOUND');
}
@@ -65,7 +65,7 @@ class archive_download
{
$filename = $this->installer_config->get('update_file_archive', '');
- if (!$filename)
+ if (empty($filename))
{
throw new http_exception(404, 'URL_NOT_FOUND');
}
diff --git a/phpBB/phpbb/install/controller/helper.php b/phpBB/phpbb/install/controller/helper.php
index 2dad42b4b6..ff7e691224 100644
--- a/phpBB/phpbb/install/controller/helper.php
+++ b/phpBB/phpbb/install/controller/helper.php
@@ -160,12 +160,13 @@ class helper
* Returns path from route name
*
* @param string $route_name
+ * @param array $parameters
*
* @return string
*/
- public function route($route_name)
+ public function route($route_name, $parameters = array())
{
- $url = $this->router->generate($route_name);
+ $url = $this->router->generate($route_name, $parameters);
return $url;
}
@@ -182,11 +183,6 @@ class helper
if (!empty($submit))
{
$lang = $this->phpbb_request->variable('language', '');
-
- if (!empty($lang))
- {
- $this->language_cookie = $lang;
- }
}
// Retrieve language from cookie
@@ -194,10 +190,10 @@ class helper
if (empty($lang) && !empty($lang_cookie))
{
$lang = $lang_cookie;
- $this->language_cookie = $lang;
}
$lang = (!empty($lang) && strpos($lang, '/') === false) ? $lang : null;
+ $this->language_cookie = $lang;
$this->render_language_select($lang);
diff --git a/phpBB/phpbb/install/controller/install.php b/phpBB/phpbb/install/controller/install.php
index b987d91c6a..92506872a3 100644
--- a/phpBB/phpbb/install/controller/install.php
+++ b/phpBB/phpbb/install/controller/install.php
@@ -123,6 +123,7 @@ class install
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
+ $this->controller_helper->handle_language_select();
if ($this->request->is_ajax())
{
@@ -142,8 +143,6 @@ class install
// Determine whether the installation was started or not
if (true)
{
- $this->controller_helper->handle_language_select();
-
// Set active stage
$this->menu_provider->set_nav_property(
array('install', 0, 'introduction'),
diff --git a/phpBB/phpbb/install/controller/update.php b/phpBB/phpbb/install/controller/update.php
index 9fff11cae8..6b88827940 100644
--- a/phpBB/phpbb/install/controller/update.php
+++ b/phpBB/phpbb/install/controller/update.php
@@ -122,6 +122,7 @@ class update
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
+ $this->controller_helper->handle_language_select();
// Render the intro page
if ($this->request->is_ajax())
@@ -140,8 +141,6 @@ class update
}
else
{
- $this->controller_helper->handle_language_select();
-
// Set active stage
$this->menu_provider->set_nav_property(
array('update', 0, 'introduction'),
diff --git a/phpBB/phpbb/install/helper/config.php b/phpBB/phpbb/install/helper/config.php
index 0f0840f470..fad6749019 100644
--- a/phpBB/phpbb/install/helper/config.php
+++ b/phpBB/phpbb/install/helper/config.php
@@ -96,7 +96,8 @@ class config
$this->system_data = array();
$this->progress_data = array(
'last_task_module_name' => '', // Stores the service name of the latest finished module
- 'last_task_name' => '', // Stores the service name of the latest finished task
+ 'last_task_module_index' => 0, // Stores the index of the latest finished module
+ 'last_task_index' => 0, // Stores the index of the latest finished task
'max_task_progress' => 0,
'current_task_progress' => 0,
'_restart_points' => array(),
@@ -157,10 +158,10 @@ class config
{
if ($this->system_data['max_execution_time'] <= 0)
{
- return 1;
+ return PHP_INT_MAX;
}
- return ($this->system_data['start_time'] + $this->system_data['max_execution_time']) - time();
+ return ($this->system_data['start_time'] + $this->system_data['max_execution_time']) - microtime(true);
}
/**
@@ -187,21 +188,23 @@ class config
/**
* Saves the latest executed task
*
- * @param string $task_service_name Name of the installer task service
+ * @param int $task_service_index Index of the installer task service in the module
*/
- public function set_finished_task($task_service_name)
+ public function set_finished_task($task_service_index)
{
- $this->progress_data['last_task_name'] = $task_service_name;
+ $this->progress_data['last_task_index'] = $task_service_index;
}
/**
* Set active module
*
* @param string $module_service_name Name of the installer module service
+ * @param int $module_service_index Index of the installer module service
*/
- public function set_active_module($module_service_name)
+ public function set_active_module($module_service_name, $module_service_index)
{
$this->progress_data['last_task_module_name'] = $module_service_name;
+ $this->progress_data['last_task_module_index'] = $module_service_index;
}
/**
@@ -227,18 +230,22 @@ class config
$file_content = @file_get_contents($this->install_config_file);
$serialized_data = trim(substr($file_content, 8));
- $this->installer_config = array();
- $this->progress_data = array();
- $this->navigation_data = array();
+ $installer_config = array();
+ $progress_data = array();
+ $navigation_data = array();
if (!empty($serialized_data))
{
$unserialized_data = json_decode($serialized_data, true);
- $this->installer_config = (is_array($unserialized_data['installer_config'])) ? $unserialized_data['installer_config'] : array();
- $this->progress_data = (is_array($unserialized_data['progress_data'])) ? $unserialized_data['progress_data'] : array();
- $this->navigation_data = (is_array($unserialized_data['navigation_data'])) ? $unserialized_data['navigation_data'] : array();
+ $installer_config = (is_array($unserialized_data['installer_config'])) ? $unserialized_data['installer_config'] : array();
+ $progress_data = (is_array($unserialized_data['progress_data'])) ? $unserialized_data['progress_data'] : array();
+ $navigation_data = (is_array($unserialized_data['navigation_data'])) ? $unserialized_data['navigation_data'] : array();
}
+
+ $this->installer_config = array_merge($this->installer_config, $installer_config);
+ $this->progress_data = array_merge($this->progress_data, $progress_data);
+ $this->navigation_data = array_merge($this->navigation_data, $navigation_data);
}
/**
@@ -387,6 +394,11 @@ class config
*/
public function set_finished_navigation_stage($nav_path)
{
+ if (isset($this->navigation_data['finished']) && in_array($nav_path, $this->navigation_data['finished']))
+ {
+ return;
+ }
+
$this->navigation_data['finished'][] = $nav_path;
}
@@ -430,7 +442,7 @@ class config
$this->system_data['max_execution_time'] = $execution_time;
// Set start time
- $this->system_data['start_time'] = time();
+ $this->system_data['start_time'] = microtime(true);
// Get memory limit
$this->system_data['memory_limit'] = $this->php_ini->getBytes('memory_limit');
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php
index 6c1ecd2d02..5cf4f8a283 100644
--- a/phpBB/phpbb/install/helper/container_factory.php
+++ b/phpBB/phpbb/install/helper/container_factory.php
@@ -13,7 +13,6 @@
namespace phpbb\install\helper;
-use phpbb\cache\driver\dummy;
use phpbb\install\exception\cannot_build_container_exception;
use phpbb\language\language;
use phpbb\request\request;
@@ -157,25 +156,20 @@ class container_factory
->with_environment('production')
->with_config($phpbb_config_php_file)
->with_config_path($config_path)
- ->without_cache()
->without_compiled_container()
->get_container();
// Setting request is required for the compatibility globals as those are generated from
// this container
- $this->container->register('request')->setSynthetic(true);
- $this->container->set('request', $this->request);
-
- $this->container->register('language')->setSynthetic(true);
- $this->container->set('language', $this->language);
-
- // Replace cache service, as config gets cached, and we don't want that when we are installing
- if (!is_dir($other_config_path))
+ if (!$this->container->isFrozen())
{
- $this->container->register('cache.driver')->setSynthetic(true);
- $this->container->set('cache.driver', new dummy());
+ $this->container->register('request')->setSynthetic(true);
+ $this->container->register('language')->setSynthetic(true);
}
+ $this->container->set('request', $this->request);
+ $this->container->set('language', $this->language);
+
$this->container->compile();
$phpbb_container = $this->container;
diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
index 1342ffa30f..8c62ec7bd0 100644
--- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
@@ -72,6 +72,11 @@ class ajax_iohandler extends iohandler_base
protected $download;
/**
+ * @var array
+ */
+ protected $redirect_url;
+
+ /**
* Constructor
*
* @param path_helper $path_helper
@@ -89,6 +94,7 @@ class ajax_iohandler extends iohandler_base
$this->nav_data = array();
$this->cookies = array();
$this->download = array();
+ $this->redirect_url = array();
$this->file_status = '';
parent::__construct();
@@ -131,6 +137,14 @@ class ajax_iohandler extends iohandler_base
*/
public function add_user_form_group($title, $form)
{
+ $this->form = $this->generate_form_render_data($title, $form);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate_form_render_data($title, $form)
+ {
$this->template->assign_block_vars('options', array(
'LEGEND' => $this->language->lang($title),
'S_LEGEND' => true,
@@ -189,15 +203,21 @@ class ajax_iohandler extends iohandler_base
'form_install' => 'installer_form.html',
));
- $this->form = $this->template->assign_display('form_install');
+ return $this->template->assign_display('form_install');
}
/**
* {@inheritdoc}
*/
- public function send_response()
+ public function send_response($no_more_output = false)
{
- $json_data_array = $this->prepare_json_array();
+ $json_data_array = $this->prepare_json_array($no_more_output);
+
+ if (empty($json_data_array))
+ {
+ return;
+ }
+
$json_data = json_encode($json_data_array);
// Try to push content to the browser
@@ -209,23 +229,43 @@ class ajax_iohandler extends iohandler_base
/**
* Prepares iohandler's data to be sent out to the client.
*
+ * @param bool $no_more_output Whether or not there will be more output in this response
+ *
* @return array
*/
- protected function prepare_json_array()
+ protected function prepare_json_array($no_more_output = false)
{
- $json_array = array(
- 'errors' => $this->errors,
- 'warnings' => $this->warnings,
- 'logs' => $this->logs,
- 'success' => $this->success,
- 'download' => $this->download,
- );
+ $json_array = array();
+
+ if (!empty($this->errors))
+ {
+ $json_array['errors'] = $this->errors;
+ $this->errors = array();
+ }
+
+ if (!empty($this->warnings))
+ {
+ $json_array['warnings'] = $this->warnings;
+ $this->warnings = array();
+ }
+
+ if (!empty($this->logs))
+ {
+ $json_array['logs'] = $this->logs;
+ $this->logs = array();
+ }
- $this->errors = array();
- $this->warnings = array();
- $this->logs = array();
- $this->success = array();
- $this->download = array();
+ if (!empty($this->success))
+ {
+ $json_array['success'] = $this->success;
+ $this->success = array();
+ }
+
+ if (!empty($this->download))
+ {
+ $json_array['download'] = $this->download;
+ $this->download = array();
+ }
if (!empty($this->form))
{
@@ -273,6 +313,17 @@ class ajax_iohandler extends iohandler_base
$this->cookies = array();
}
+ if (!empty($this->redirect_url))
+ {
+ $json_array['redirect'] = $this->redirect_url;
+ $this->redirect_url = array();
+ }
+
+ if ($no_more_output)
+ {
+ $json_array['over'] = true;
+ }
+
return $json_array;
}
@@ -373,6 +424,15 @@ class ajax_iohandler extends iohandler_base
}
/**
+ * {@inheritdoc}
+ */
+ public function redirect($url, $use_ajax = false)
+ {
+ $this->redirect_url = array('url' => $url, 'use_ajax' => $use_ajax);
+ $this->send_response(true);
+ }
+
+ /**
* Callback function for language replacing
*
* @param array $matches
diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
index 89f3594378..94550d2db0 100644
--- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php
@@ -114,7 +114,7 @@ class cli_iohandler extends iohandler_base
/**
* {@inheritdoc}
*/
- public function send_response()
+ public function send_response($no_more_output = false)
{
}
@@ -289,4 +289,11 @@ class cli_iohandler extends iohandler_base
public function render_update_file_status($status_array)
{
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function redirect($url, $use_ajax = false)
+ {
+ }
}
diff --git a/phpBB/phpbb/install/helper/iohandler/factory.php b/phpBB/phpbb/install/helper/iohandler/factory.php
index 52d24e49b2..1e8395760a 100644
--- a/phpBB/phpbb/install/helper/iohandler/factory.php
+++ b/phpBB/phpbb/install/helper/iohandler/factory.php
@@ -75,7 +75,5 @@ class factory
throw new iohandler_not_implemented_exception();
break;
}
-
- throw new iohandler_not_implemented_exception();
}
}
diff --git a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php
index 7271fe9bc0..fed4bc101f 100644
--- a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php
+++ b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php
@@ -170,6 +170,14 @@ abstract class iohandler_base implements iohandler_interface
}
/**
+ * {@inheritdoc}
+ */
+ public function generate_form_render_data($title, $form)
+ {
+ return '';
+ }
+
+ /**
* Localize message.
*
* Note: When an array is passed into the parameters below, it will be
diff --git a/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php b/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
index 00aab3283e..f22f33d9cb 100644
--- a/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
+++ b/phpBB/phpbb/install/helper/iohandler/iohandler_interface.php
@@ -20,8 +20,10 @@ interface iohandler_interface
{
/**
* Renders or returns response message
+ *
+ * @param bool $no_more_output Whether or not there will be more output in this output unit
*/
- public function send_response();
+ public function send_response($no_more_output = false);
/**
* Returns input variable
@@ -124,6 +126,16 @@ interface iohandler_interface
public function add_user_form_group($title, $form);
/**
+ * Returns the rendering information for the form
+ *
+ * @param string $title Language variable with the title of the form
+ * @param array $form An array describing the required data (options etc)
+ *
+ * @return string Information to render the form
+ */
+ public function generate_form_render_data($title, $form);
+
+ /**
* Sets the number of tasks belonging to the installer in the current mode.
*
* @param int $task_count Number of tasks
@@ -175,6 +187,14 @@ interface iohandler_interface
public function add_download_link($route, $title, $msg = null);
/**
+ * Redirects the user to a new page
+ *
+ * @param string $url URL to redirect to
+ * @param bool $use_ajax Whether or not to use AJAX redirect
+ */
+ public function redirect($url, $use_ajax = false);
+
+ /**
* Renders the status of update files
*
* @param array $status_array Array containing files in groups to render
diff --git a/phpBB/phpbb/install/helper/navigation/convertor_navigation.php b/phpBB/phpbb/install/helper/navigation/convertor_navigation.php
new file mode 100644
index 0000000000..54cab83b1d
--- /dev/null
+++ b/phpBB/phpbb/install/helper/navigation/convertor_navigation.php
@@ -0,0 +1,78 @@
+<?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\install\helper\navigation;
+
+use phpbb\install\helper\install_helper;
+
+class convertor_navigation implements navigation_interface
+{
+ /**
+ * @var install_helper
+ */
+ private $install_helper;
+
+ /**
+ * Constructor
+ *
+ * @param install_helper $install_helper
+ */
+ public function __construct(install_helper $install_helper)
+ {
+ $this->install_helper = $install_helper;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get()
+ {
+ if (!$this->install_helper->is_phpbb_installed())
+ {
+ return array();
+ }
+
+ return array(
+ 'convert' => array(
+ 'label' => 'CONVERT',
+ 'route' => 'phpbb_convert_intro',
+ 'order' => 3,
+ array(
+ 'intro' => array(
+ 'label' => 'SUB_INTRO',
+ 'stage' => true,
+ 'order' => 0,
+ ),
+ 'settings' => array(
+ 'label' => 'STAGE_SETTINGS',
+ 'stage' => true,
+ 'route' => 'phpbb_convert_settings',
+ 'order' => 1,
+ ),
+ 'convert' => array(
+ 'label' => 'STAGE_IN_PROGRESS',
+ 'stage' => true,
+ 'route' => 'phpbb_convert_convert',
+ 'order' => 2,
+ ),
+ 'finish' => array(
+ 'label' => 'CONVERT_COMPLETE',
+ 'stage' => true,
+ 'route' => 'phpbb_convert_finish',
+ 'order' => 3,
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php
index a41b4cd6a6..b5709e96c7 100644
--- a/phpBB/phpbb/install/installer.php
+++ b/phpBB/phpbb/install/installer.php
@@ -15,11 +15,13 @@ namespace phpbb\install;
use phpbb\cache\driver\driver_interface;
use phpbb\di\ordered_service_collection;
+use phpbb\install\exception\cannot_build_container_exception;
use phpbb\install\exception\installer_config_not_writable_exception;
use phpbb\install\exception\jump_to_restart_point_exception;
use phpbb\install\exception\resource_limit_reached_exception;
use phpbb\install\exception\user_interaction_required_exception;
use phpbb\install\helper\config;
+use phpbb\install\helper\container_factory;
use phpbb\install\helper\iohandler\cli_iohandler;
use phpbb\install\helper\iohandler\iohandler_interface;
use phpbb\path_helper;
@@ -32,12 +34,17 @@ class installer
protected $cache;
/**
+ * @var container_factory
+ */
+ protected $container_factory;
+
+ /**
* @var config
*/
protected $install_config;
/**
- * @var array
+ * @var ordered_service_collection
*/
protected $installer_modules;
@@ -59,18 +66,26 @@ class installer
protected $module_step_count;
/**
+ * @var bool
+ */
+ protected $purge_cache_before;
+
+ /**
* Constructor
*
* @param driver_interface $cache Cache service
* @param config $config Installer config handler
* @param path_helper $path_helper Path helper
+ * @param container_factory $container Container
*/
- public function __construct(driver_interface $cache, config $config, path_helper $path_helper)
+ public function __construct(driver_interface $cache, config $config, path_helper $path_helper, container_factory $container)
{
$this->cache = $cache;
$this->install_config = $config;
+ $this->container_factory = $container;
$this->installer_modules = null;
$this->web_root = $path_helper->get_web_root_path();
+ $this->purge_cache_before = false;
}
/**
@@ -97,6 +112,16 @@ class installer
}
/**
+ * Sets whether to purge cache before the installation process
+ *
+ * @param bool $purge_cache_before
+ */
+ public function set_purge_cache_before($purge_cache_before)
+ {
+ $this->purge_cache_before = $purge_cache_before;
+ }
+
+ /**
* Run phpBB installer
*/
public function run()
@@ -104,9 +129,16 @@ class installer
// Load install progress
$this->install_config->load_config();
+ if (!$this->install_config->get('cache_purged_before', false) && $this->purge_cache_before)
+ {
+ /** @var \phpbb\cache\driver\driver_interface $cache */
+ $cache = $this->container_factory->get('cache.driver');
+ $cache->purge();
+ $this->install_config->set('cache_purged_before', true);
+ }
+
// Recover install progress
- $module_name = $this->recover_progress();
- $module_found = false;
+ $module_index = $this->recover_progress();
// Variable used to check if the install process have been finished
$install_finished = false;
@@ -141,29 +173,13 @@ class installer
try
{
- foreach ($this->installer_modules as $name => $module)
- {
- // Skip forward until the current task is reached
- if (!$module_found)
- {
- if ($module_name === $name || empty($module_name))
- {
- $module_found = true;
- }
- else
- {
- continue;
- }
- }
+ $iterator = $this->installer_modules->getIterator();
+ $iterator->seek($module_index);
- // Log progress
- $this->install_config->set_active_module($name);
-
- // Run until there are available resources
- if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
- {
- throw new resource_limit_reached_exception();
- }
+ while ($iterator->valid())
+ {
+ $module = $iterator->current();
+ $name = $iterator->key();
// Check if module should be executed
if (!$module->is_essential() && !$module->check_requirements())
@@ -176,17 +192,31 @@ class installer
$name,
));
$this->install_config->increment_current_task_progress($this->module_step_count[$name]);
- continue;
+ }
+ else
+ {
+ // Set the correct stage in the navigation bar
+ $this->install_config->set_active_navigation_stage($module->get_navigation_stage_path());
+ $this->iohandler->set_active_stage_menu($module->get_navigation_stage_path());
+
+ $this->iohandler->send_response();
+
+ $module->run();
+
+ $this->install_config->set_finished_navigation_stage($module->get_navigation_stage_path());
+ $this->iohandler->set_finished_stage_menu($module->get_navigation_stage_path());
}
- // Set the correct stage in the navigation bar
- $this->install_config->set_active_navigation_stage($module->get_navigation_stage_path());
- $this->iohandler->set_active_stage_menu($module->get_navigation_stage_path());
+ $module_index++;
+ $iterator->next();
- $module->run();
+ // Save progress
+ $this->install_config->set_active_module($name, $module_index);
- $this->install_config->set_finished_navigation_stage($module->get_navigation_stage_path());
- $this->iohandler->set_finished_stage_menu($module->get_navigation_stage_path());
+ if ($iterator->valid() && ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0))
+ {
+ throw new resource_limit_reached_exception();
+ }
}
// Installation finished
@@ -208,7 +238,7 @@ class installer
}
catch (user_interaction_required_exception $e)
{
- // Do nothing
+ $this->iohandler->send_response(true);
}
catch (resource_limit_reached_exception $e)
{
@@ -222,7 +252,7 @@ class installer
catch (\Exception $e)
{
$this->iohandler->add_error_message($e->getMessage());
- $this->iohandler->send_response();
+ $this->iohandler->send_response(true);
$fail_cleanup = true;
}
@@ -230,11 +260,12 @@ class installer
{
// Send install finished message
$this->iohandler->set_progress('INSTALLER_FINISHED', $this->install_config->get_task_progress_count());
+ $this->iohandler->send_response(true);
}
else if ($send_refresh)
{
$this->iohandler->request_refresh();
- $this->iohandler->send_response();
+ $this->iohandler->send_response(true);
}
// Save install progress
@@ -244,6 +275,17 @@ class installer
{
$this->install_config->clean_up_config_file();
$this->cache->purge();
+
+ try
+ {
+ /** @var \phpbb\cache\driver\driver_interface $cache */
+ $cache = $this->container_factory->get('cache.driver');
+ $cache->purge();
+ }
+ catch (cannot_build_container_exception $e)
+ {
+ // Do not do anything, this just means there is no config.php yet
+ }
}
else
{
@@ -270,6 +312,6 @@ class installer
protected function recover_progress()
{
$progress_array = $this->install_config->get_progress_data();
- return $progress_array['last_task_module_name'];
+ return $progress_array['last_task_module_index'];
}
}
diff --git a/phpBB/phpbb/install/module/install_data/task/add_bots.php b/phpBB/phpbb/install/module/install_data/task/add_bots.php
index 2ee641ff63..d45a6839a0 100644
--- a/phpBB/phpbb/install/module/install_data/task/add_bots.php
+++ b/phpBB/phpbb/install/module/install_data/task/add_bots.php
@@ -13,6 +13,8 @@
namespace phpbb\install\module\install_data\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+
class add_bots extends \phpbb\install\task_base
{
/**
@@ -179,7 +181,10 @@ class add_bots extends \phpbb\install\task_base
$this->io_handler->add_error_message('NO_GROUP');
}
- foreach ($this->bot_list as $bot_name => $bot_ary)
+ $i = $this->install_config->get('add_bot_index', 0);
+ $bot_list = array_slice($this->bot_list, $i);
+
+ foreach ($bot_list as $bot_name => $bot_ary)
{
$user_row = array(
'user_type' => USER_IGNORE,
@@ -221,6 +226,21 @@ class add_bots extends \phpbb\install\task_base
));
$this->db->sql_query($sql);
+
+ $i++;
+
+ // Stop execution if resource limit is reached
+ if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
+ {
+ break;
+ }
+ }
+
+ $this->install_config->set('add_bot_index', $i);
+
+ if ($i < sizeof($this->bot_list))
+ {
+ throw new resource_limit_reached_exception();
}
}
diff --git a/phpBB/phpbb/install/module/install_data/task/add_modules.php b/phpBB/phpbb/install/module/install_data/task/add_modules.php
index bfbe6282bc..d21a5be823 100644
--- a/phpBB/phpbb/install/module/install_data/task/add_modules.php
+++ b/phpBB/phpbb/install/module/install_data/task/add_modules.php
@@ -13,9 +13,19 @@
namespace phpbb\install\module\install_data\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+use phpbb\install\helper\config;
+use phpbb\install\helper\container_factory;
+use phpbb\install\helper\iohandler\iohandler_interface;
+
class add_modules extends \phpbb\install\task_base
{
/**
+ * @var config
+ */
+ protected $config;
+
+ /**
* @var \phpbb\db\driver\driver_interface
*/
protected $db;
@@ -136,12 +146,13 @@ class add_modules extends \phpbb\install\task_base
/**
* Constructor
*
- * @param \phpbb\install\helper\iohandler\iohandler_interface $iohandler Installer's input-output handler
- * @param \phpbb\install\helper\container_factory $container Installer's DI container
+ * @parma config $config Installer's config
+ * @param iohandler_interface $iohandler Installer's input-output handler
+ * @param container_factory $container Installer's DI container
*/
- public function __construct(\phpbb\install\helper\iohandler\iohandler_interface $iohandler,
- \phpbb\install\helper\container_factory $container)
+ public function __construct(config $config, iohandler_interface $iohandler, container_factory $container)
{
+ $this->config = $config;
$this->db = $container->get('dbal.conn');
$this->extension_manager = $container->get('ext.manager');
$this->iohandler = $iohandler;
@@ -158,11 +169,19 @@ class add_modules extends \phpbb\install\task_base
$this->db->sql_return_on_error(true);
$module_classes = array('acp', 'mcp', 'ucp');
+ $total = sizeof($module_classes);
+ $i = $this->config->get('module_class_index', 0);
+ $module_classes = array_slice($module_classes, $i);
+
foreach ($module_classes as $module_class)
{
- $categories = array();
+ $categories = $this->config->get('module_categories_array', array());
+
+ $k = $this->config->get('module_categories_index', 0);
+ $module_categories = array_slice($this->module_categories[$module_class], $k);
+ $timed_out = false;
- foreach ($this->module_categories[$module_class] as $cat_name => $subs)
+ foreach ($module_categories as $cat_name => $subs)
{
// Check if this sub-category has a basename. If it has, use it.
$basename = (isset($this->module_categories_basenames[$cat_name])) ? $this->module_categories_basenames[$cat_name] : '';
@@ -221,11 +240,31 @@ class add_modules extends \phpbb\install\task_base
$categories[$level2_name]['parent_id'] = (int) $categories[$cat_name]['id'];
}
}
+
+ $k++;
+
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ $timed_out = true;
+ break;
+ }
+ }
+
+ $this->config->set('module_categories_array', $categories);
+ $this->config->set('module_categories_index', $k);
+
+ if ($timed_out)
+ {
+ throw new resource_limit_reached_exception();
}
// Get the modules we want to add... returned sorted by name
$module_info = $this->module_manager->get_module_infos($module_class);
+ $k = $this->config->get('module_info_index', 0);
+ $module_info = array_slice($module_info, $k);
+
foreach ($module_info as $module_basename => $fileinfo)
{
foreach ($fileinfo['modes'] as $module_mode => $row)
@@ -258,189 +297,256 @@ class add_modules extends \phpbb\install\task_base
}
}
}
- }
- // Move some of the modules around since the code above will put them in the wrong place
- if ($module_class === 'acp')
- {
- // Move main module 4 up...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'acp_main'
- AND module_class = 'acp'
- AND module_mode = 'main'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ $k++;
- $this->module_manager->move_module_by($row, 'acp', 'move_up', 4);
-
- // Move permissions intro screen module 4 up...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'acp_permissions'
- AND module_class = 'acp'
- AND module_mode = 'intro'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ $timed_out = true;
+ break;
+ }
+ }
- $this->module_manager->move_module_by($row, 'acp', 'move_up', 4);
+ $this->config->set('module_info_index', $k);
- // Move manage users screen module 5 up...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'acp_users'
- AND module_class = 'acp'
- AND module_mode = 'overview'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
-
- $this->module_manager->move_module_by($row, 'acp', 'move_up', 5);
+ // Stop execution if resource limit is reached
+ if ($timed_out)
+ {
+ throw new resource_limit_reached_exception();
+ }
- // 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 = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ // Move some of the modules around since the code above will put them in the wrong place
+ if (!$this->config->get('modules_ordered', false))
+ {
+ $this->order_modules($module_class);
+ $this->config->set('modules_ordered', true);
- $this->module_manager->move_module_by($row, 'acp', 'move_up', 1);
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ throw new resource_limit_reached_exception();
+ }
}
- if ($module_class == 'mcp')
+ // And now for the special ones
+ // (these are modules which appear in multiple categories and thus get added manually
+ // to some for more control)
+ if (isset($this->module_extras[$module_class]))
{
- // Move pm report details module 3 down...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'mcp_pm_reports'
- AND module_class = 'mcp'
- AND module_mode = 'pm_report_details'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ $this->add_module_extras($module_class);
+ }
- $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+ $this->module_manager->remove_cache_file($module_class);
- // Move closed pm reports module 3 down...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'mcp_pm_reports'
- AND module_class = 'mcp'
- AND module_mode = 'pm_reports_closed'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ $i++;
- $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+ $this->config->set('module_class_index', $i);
+ $this->config->set('module_categories_index', 0);
+ $this->config->set('module_info_index', 0);
+ $this->config->set('added_extra_modules', false);
+ $this->config->set('modules_ordered', false);
+ $this->config->set('module_categories_array', array());
- // Move open pm reports module 3 down...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'mcp_pm_reports'
- AND module_class = 'mcp'
- AND module_mode = 'pm_reports'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
-
- $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ break;
}
+ }
- if ($module_class == 'ucp')
- {
- // Move attachment module 4 down...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'ucp_attachments'
- AND module_class = 'ucp'
- AND module_mode = 'attachments'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ if ($i < $total)
+ {
+ throw new resource_limit_reached_exception();
+ }
+ }
- $this->module_manager->move_module_by($row, 'ucp', 'move_down', 4);
+ /**
+ * Move modules to their correct place
+ *
+ * @param string $module_class
+ */
+ protected function order_modules($module_class)
+ {
+ if ($module_class == 'acp')
+ {
+ // Move main module 4 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'acp_main'
+ AND module_class = 'acp'
+ AND module_mode = 'main'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'acp', 'move_up', 4);
+
+ // Move permissions intro screen module 4 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'acp_permissions'
+ AND module_class = 'acp'
+ AND module_mode = 'intro'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'acp', 'move_up', 4);
+
+ // Move manage users screen module 5 up...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'acp_users'
+ AND module_class = 'acp'
+ AND module_mode = 'overview'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'acp', '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 = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'acp', 'move_up', 1);
+ }
- // Move notification options module 4 down...
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'ucp_notifications'
- AND module_class = 'ucp'
- AND module_mode = 'notification_options'";
- $result = $this->db->sql_query($sql);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
+ if ($module_class == 'mcp')
+ {
+ // Move pm report details module 3 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'mcp_pm_reports'
+ AND module_class = 'mcp'
+ AND module_mode = 'pm_report_details'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+
+ // Move closed pm reports module 3 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'mcp_pm_reports'
+ AND module_class = 'mcp'
+ AND module_mode = 'pm_reports_closed'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+
+ // Move open pm reports module 3 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'mcp_pm_reports'
+ AND module_class = 'mcp'
+ AND module_mode = 'pm_reports'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'mcp', 'move_down', 3);
+ }
- $this->module_manager->move_module_by($row, 'ucp', 'move_down', 4);
+ if ($module_class == 'ucp')
+ {
+ // Move attachment module 4 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'ucp_attachments'
+ AND module_class = 'ucp'
+ AND module_mode = 'attachments'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'ucp', 'move_down', 4);
+
+ // Move notification options module 4 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'ucp_notifications'
+ AND module_class = 'ucp'
+ AND module_mode = 'notification_options'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'ucp', 'move_down', 4);
+
+ // Move OAuth module 5 down...
+ $sql = 'SELECT *
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'ucp_auth_link'
+ AND module_class = 'ucp'
+ AND module_mode = 'auth_link'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->module_manager->move_module_by($row, 'ucp', 'move_down', 5);
+ }
+ }
- // Move OAuth module 5 down...
+ /**
+ * Add extra modules
+ *
+ * @param string $module_class
+ */
+ protected function add_module_extras($module_class)
+ {
+ foreach ($this->module_extras[$module_class] as $cat_name => $mods)
+ {
+ $sql = 'SELECT module_id, left_id, right_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_langname = '" . $this->db->sql_escape($cat_name) . "'
+ AND module_class = '" . $this->db->sql_escape($module_class) . "'";
+ $result = $this->db->sql_query_limit($sql, 1);
+ $row2 = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ foreach ($mods as $mod_name)
+ {
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'ucp_auth_link'
- AND module_class = 'ucp'
- AND module_mode = 'auth_link'";
- $result = $this->db->sql_query($sql);
+ WHERE module_langname = '" . $this->db->sql_escape($mod_name) . "'
+ AND module_class = '" . $this->db->sql_escape($module_class) . "'
+ AND module_basename <> ''";
+ $result = $this->db->sql_query_limit($sql, 1);
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
- $this->module_manager->move_module_by($row, 'ucp', 'move_down', 5);
- }
-
- // And now for the special ones
- // (these are modules which appear in multiple categories and thus get added manually
- // to some for more control)
- if (isset($this->module_extras[$module_class]))
- {
- foreach ($this->module_extras[$module_class] as $cat_name => $mods)
- {
- $sql = 'SELECT module_id, left_id, right_id
- FROM ' . MODULES_TABLE . "
- WHERE module_langname = '" . $this->db->sql_escape($cat_name) . "'
- AND module_class = '" . $this->db->sql_escape($module_class) . "'";
- $result = $this->db->sql_query_limit($sql, 1);
- $row2 = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
-
- foreach ($mods as $mod_name)
- {
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_langname = '" . $this->db->sql_escape($mod_name) . "'
- AND module_class = '" . $this->db->sql_escape($module_class) . "'
- AND module_basename <> ''";
- $result = $this->db->sql_query_limit($sql, 1);
- $row = $this->db->sql_fetchrow($result);
- $this->db->sql_freeresult($result);
-
- $module_data = array(
- 'module_basename' => $row['module_basename'],
- 'module_enabled' => (int) $row['module_enabled'],
- 'module_display' => (int) $row['module_display'],
- 'parent_id' => (int) $row2['module_id'],
- 'module_class' => $row['module_class'],
- 'module_langname' => $row['module_langname'],
- 'module_mode' => $row['module_mode'],
- 'module_auth' => $row['module_auth'],
- );
+ $module_data = array(
+ 'module_basename' => $row['module_basename'],
+ 'module_enabled' => (int) $row['module_enabled'],
+ 'module_display' => (int) $row['module_display'],
+ 'parent_id' => (int) $row2['module_id'],
+ 'module_class' => $row['module_class'],
+ 'module_langname' => $row['module_langname'],
+ 'module_mode' => $row['module_mode'],
+ 'module_auth' => $row['module_auth'],
+ );
- $this->module_manager->update_module_data($module_data);
+ $this->module_manager->update_module_data($module_data);
- // Check for last sql error happened
- if ($this->db->get_sql_error_triggered())
- {
- $error = $this->db->sql_error($this->db->get_sql_error_sql());
- $this->iohandler->add_error_message('INST_ERR_DB', $error['message']);
- }
- }
+ // Check for last sql error happened
+ if ($this->db->get_sql_error_triggered())
+ {
+ $error = $this->db->sql_error($this->db->get_sql_error_sql());
+ $this->iohandler->add_error_message('INST_ERR_DB', $error['message']);
}
}
-
- $this->module_manager->remove_cache_file($module_class);
}
}
diff --git a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
index 6fb03ff73d..20b7679ec1 100644
--- a/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
+++ b/phpBB/phpbb/install/module/install_database/task/add_config_settings.php
@@ -13,6 +13,8 @@
namespace phpbb\install\module\install_database\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+
/**
* Create database schema
*/
@@ -313,6 +315,10 @@ class add_config_settings extends \phpbb\install\task_base
WHERE config_name = 'allow_avatar_upload'";
}
+ $i = $this->install_config->get('add_config_settings_index', 0);
+ $total = sizeof($sql_ary);
+ $sql_ary = array_slice($sql_ary, $i);
+
foreach ($sql_ary as $sql)
{
if (!$this->db->sql_query($sql))
@@ -320,6 +326,20 @@ class add_config_settings extends \phpbb\install\task_base
$error = $this->db->sql_error($this->db->get_sql_error_sql());
$this->iohandler->add_error_message('INST_ERR_DB', $error['message']);
}
+
+ $i++;
+
+ // Stop execution if resource limit is reached
+ if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
+ {
+ break;
+ }
+ }
+
+ if ($i < $total)
+ {
+ $this->install_config->set('add_config_settings_index', $i);
+ throw new resource_limit_reached_exception();
}
}
diff --git a/phpBB/phpbb/install/module/install_database/task/add_default_data.php b/phpBB/phpbb/install/module/install_database/task/add_default_data.php
index 3d73a74618..f5157637ee 100644
--- a/phpBB/phpbb/install/module/install_database/task/add_default_data.php
+++ b/phpBB/phpbb/install/module/install_database/task/add_default_data.php
@@ -13,6 +13,8 @@
namespace phpbb\install\module\install_database\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+
/**
* Create database schema
*/
@@ -96,6 +98,10 @@ class add_default_data extends \phpbb\install\task_base
$sql_query = $this->database_helper->remove_comments($sql_query);
$sql_query = $this->database_helper->split_sql_file($sql_query, $dbms_info[$dbms]['DELIM']);
+ $i = $this->config->get('add_default_data_index', 0);
+ $total = sizeof($sql_query);
+ $sql_query = array_slice($sql_query, $i);
+
foreach ($sql_query as $sql)
{
if (!$this->db->sql_query($sql))
@@ -103,6 +109,21 @@ class add_default_data extends \phpbb\install\task_base
$error = $this->db->sql_error($this->db->get_sql_error_sql());
$this->iohandler->add_error_message('INST_ERR_DB', $error['message']);
}
+
+ $i++;
+
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ break;
+ }
+ }
+
+ $this->config->set('add_default_data_index', $i);
+
+ if ($i < $total)
+ {
+ throw new resource_limit_reached_exception();
}
}
diff --git a/phpBB/phpbb/install/module/install_database/task/add_tables.php b/phpBB/phpbb/install/module/install_database/task/add_tables.php
new file mode 100644
index 0000000000..f344f91582
--- /dev/null
+++ b/phpBB/phpbb/install/module/install_database/task/add_tables.php
@@ -0,0 +1,151 @@
+<?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\install\module\install_database\task;
+
+use phpbb\install\exception\resource_limit_reached_exception;
+
+/**
+ * Create tables
+ */
+class add_tables extends \phpbb\install\task_base
+{
+ /**
+ * @var \phpbb\install\helper\config
+ */
+ protected $config;
+
+ /**
+ * @var \phpbb\db\driver\driver_interface
+ */
+ protected $db;
+
+ /**
+ * @var \phpbb\db\tools\tools_interface
+ */
+ protected $db_tools;
+
+ /**
+ * @var \phpbb\filesystem\filesystem_interface
+ */
+ protected $filesystem;
+
+ /**
+ * @var string
+ */
+ protected $schema_file_path;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\install\helper\config $config
+ * @param \phpbb\install\helper\database $db_helper
+ * @param \phpbb\filesystem\filesystem_interface $filesystem
+ * @param string $phpbb_root_path
+ */
+ public function __construct(\phpbb\install\helper\config $config,
+ \phpbb\install\helper\database $db_helper,
+ \phpbb\filesystem\filesystem_interface $filesystem,
+ $phpbb_root_path)
+ {
+ $dbms = $db_helper->get_available_dbms($config->get('dbms'));
+ $dbms = $dbms[$config->get('dbms')]['DRIVER'];
+ $factory = new \phpbb\db\tools\factory();
+
+ $this->db = new $dbms();
+ $this->db->sql_connect(
+ $config->get('dbhost'),
+ $config->get('dbuser'),
+ $config->get('dbpasswd'),
+ $config->get('dbname'),
+ $config->get('dbport'),
+ false,
+ false
+ );
+
+ $this->config = $config;
+ $this->db_tools = $factory->get($this->db);
+ $this->filesystem = $filesystem;
+ $this->schema_file_path = $phpbb_root_path . 'store/schema.json';
+
+ parent::__construct(true);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function run()
+ {
+ $this->db->sql_return_on_error(true);
+
+ $table_prefix = $this->config->get('table_prefix');
+ $change_prefix = $this->config->get('change_table_prefix', true);
+
+ if (!defined('CONFIG_TABLE'))
+ {
+ // CONFIG_TABLE is required by sql_create_index() to check the
+ // length of index names. However table_prefix is not defined
+ // here yet, so we need to create the constant ourselves.
+ define('CONFIG_TABLE', $table_prefix . 'config');
+ }
+
+ $db_table_schema = @file_get_contents($this->schema_file_path);
+ $db_table_schema = json_decode($db_table_schema, true);
+ $total = sizeof($db_table_schema);
+ $i = $this->config->get('add_table_index', 0);
+ $db_table_schema = array_slice($db_table_schema, $i);
+
+ foreach ($db_table_schema as $table_name => $table_data)
+ {
+ $i++;
+
+ $this->db_tools->sql_create_table(
+ ( ($change_prefix) ? ($table_prefix . substr($table_name, 6)) : $table_name ),
+ $table_data
+ );
+
+ // Stop execution if resource limit is reached
+ if ($this->config->get_time_remaining() <= 0 || $this->config->get_memory_remaining() <= 0)
+ {
+ break;
+ }
+ }
+
+ $this->config->set('add_table_index', $i);
+
+ if ($i < $total)
+ {
+ throw new resource_limit_reached_exception();
+ }
+ else
+ {
+ @unlink($this->schema_file_path);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ static public function get_step_count()
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_task_lang_name()
+ {
+ return 'TASK_CREATE_TABLES';
+ }
+}
diff --git a/phpBB/phpbb/install/module/install_database/task/create_schema.php b/phpBB/phpbb/install/module/install_database/task/create_schema.php
index cabb78787f..a5635d5dbe 100644
--- a/phpBB/phpbb/install/module/install_database/task/create_schema.php
+++ b/phpBB/phpbb/install/module/install_database/task/create_schema.php
@@ -13,6 +13,8 @@
namespace phpbb\install\module\install_database\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+
/**
* Create database schema
*/
@@ -106,6 +108,17 @@ class create_schema extends \phpbb\install\task_base
*/
public function run()
{
+ // As this task may take a large amount of time to complete refreshing the page might be necessary for some
+ // server configurations with limited resources
+ if (!$this->config->get('pre_schema_forced_refresh'))
+ {
+ if ($this->config->get_time_remaining() < 5)
+ {
+ $this->config->set('pre_schema_forced_refresh', true);
+ throw new resource_limit_reached_exception();
+ }
+ }
+
$this->db->sql_return_on_error(true);
$dbms = $this->config->get('dbms');
diff --git a/phpBB/phpbb/install/module/install_database/task/create_schema_file.php b/phpBB/phpbb/install/module/install_database/task/create_schema_file.php
new file mode 100644
index 0000000000..b6d6ece17f
--- /dev/null
+++ b/phpBB/phpbb/install/module/install_database/task/create_schema_file.php
@@ -0,0 +1,164 @@
+<?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\install\module\install_database\task;
+
+use phpbb\install\exception\resource_limit_reached_exception;
+
+/**
+ * Create database schema
+ */
+class create_schema_file extends \phpbb\install\task_base
+{
+ /**
+ * @var \phpbb\install\helper\config
+ */
+ protected $config;
+
+ /**
+ * @var \phpbb\db\driver\driver_interface
+ */
+ protected $db;
+
+ /**
+ * @var \phpbb\filesystem\filesystem_interface
+ */
+ protected $filesystem;
+
+ /**
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\install\helper\config $config Installer's config provider
+ * @param \phpbb\install\helper\database $db_helper Installer's database helper
+ * @param \phpbb\filesystem\filesystem_interface $filesystem Filesystem service
+ * @param string $phpbb_root_path Path phpBB's root
+ * @param string $php_ext Extension of PHP files
+ */
+ public function __construct(\phpbb\install\helper\config $config,
+ \phpbb\install\helper\database $db_helper,
+ \phpbb\filesystem\filesystem_interface $filesystem,
+ $phpbb_root_path,
+ $php_ext)
+ {
+ $dbms = $db_helper->get_available_dbms($config->get('dbms'));
+ $dbms = $dbms[$config->get('dbms')]['DRIVER'];
+
+ $this->db = new $dbms();
+ $this->db->sql_connect(
+ $config->get('dbhost'),
+ $config->get('dbuser'),
+ $config->get('dbpasswd'),
+ $config->get('dbname'),
+ $config->get('dbport'),
+ false,
+ false
+ );
+
+ $this->config = $config;
+ $this->filesystem = $filesystem;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ parent::__construct(true);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function run()
+ {
+ // Generate database schema
+ if ($this->filesystem->exists($this->phpbb_root_path . 'install/schemas/schema.json'))
+ {
+ $db_table_schema = @file_get_contents($this->phpbb_root_path . 'install/schemas/schema.json');
+ $this->config->set('change_table_prefix', true);
+ }
+ else
+ {
+ global $table_prefix;
+
+ // As this task may take a large amount of time to complete refreshing the page might be necessary for some
+ // server configurations with limited resources
+ if (!$this->config->get('pre_schema_forced_refresh', false))
+ {
+ if ($this->config->get_time_remaining() < 5)
+ {
+ $this->config->set('pre_schema_forced_refresh', true);
+ throw new resource_limit_reached_exception();
+ }
+ }
+
+ $table_prefix = $this->config->get('table_prefix');
+
+ 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 ($this->phpbb_root_path . 'includes/constants.' . $this->php_ext);
+ }
+
+ $finder = new \phpbb\finder($this->filesystem, $this->phpbb_root_path, null, $this->php_ext);
+ $migrator_classes = $finder->core_path('phpbb/db/migration/data/')->get_classes();
+ $factory = new \phpbb\db\tools\factory();
+ $db_tools = $factory->get($this->db, true);
+ $schema_generator = new \phpbb\db\migration\schema_generator(
+ $migrator_classes,
+ new \phpbb\config\config(array()),
+ $this->db,
+ $db_tools,
+ $this->phpbb_root_path,
+ $this->php_ext,
+ $table_prefix
+ );
+ $db_table_schema = $schema_generator->get_schema();
+ $db_table_schema = json_encode($db_table_schema, JSON_PRETTY_PRINT);
+
+ $this->config->set('change_table_prefix', false);
+ }
+
+ $fp = @fopen($this->phpbb_root_path . 'store/schema.json', 'wb');
+ if (!$fp)
+ {
+ throw new \Exception('INST_SCHEMA_FILE_NOT_WRITABLE');
+ }
+
+ fwrite($fp, $db_table_schema);
+ fclose($fp);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ static public function get_step_count()
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_task_lang_name()
+ {
+ return 'TASK_CREATE_DATABASE_SCHEMA_FILE';
+ }
+}
diff --git a/phpBB/phpbb/install/module/install_database/task/set_up_database.php b/phpBB/phpbb/install/module/install_database/task/set_up_database.php
new file mode 100644
index 0000000000..49c8ea23ad
--- /dev/null
+++ b/phpBB/phpbb/install/module/install_database/task/set_up_database.php
@@ -0,0 +1,164 @@
+<?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\install\module\install_database\task;
+
+/**
+ * Set up database for table generation
+ */
+class set_up_database extends \phpbb\install\task_base
+{
+ /**
+ * @var \phpbb\install\helper\config
+ */
+ protected $config;
+
+ /**
+ * @var \phpbb\db\driver\driver_interface
+ */
+ protected $db;
+
+ /**
+ * @var \phpbb\install\helper\database
+ */
+ protected $database_helper;
+
+ /**
+ * @var \phpbb\filesystem\filesystem_interface
+ */
+ protected $filesystem;
+
+ /**
+ * @var \phpbb\install\helper\iohandler\iohandler_interface
+ */
+ protected $iohandler;
+
+ /**
+ * @var string
+ */
+ protected $schema_file_path;
+
+ /**
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\install\helper\config $config
+ * @param \phpbb\install\helper\database $db_helper
+ * @param \phpbb\filesystem\filesystem_interface $filesystem
+ * @param \phpbb\install\helper\iohandler\iohandler_interface $iohandler
+ * @param string $phpbb_root_path
+ */
+ public function __construct(\phpbb\install\helper\config $config,
+ \phpbb\install\helper\database $db_helper,
+ \phpbb\filesystem\filesystem_interface $filesystem,
+ \phpbb\install\helper\iohandler\iohandler_interface $iohandler,
+ $phpbb_root_path)
+ {
+ $dbms = $db_helper->get_available_dbms($config->get('dbms'));
+ $dbms = $dbms[$config->get('dbms')]['DRIVER'];
+
+ $this->db = new $dbms();
+ $this->db->sql_connect(
+ $config->get('dbhost'),
+ $config->get('dbuser'),
+ $config->get('dbpasswd'),
+ $config->get('dbname'),
+ $config->get('dbport'),
+ false,
+ false
+ );
+
+ $this->config = $config;
+ $this->database_helper = $db_helper;
+ $this->filesystem = $filesystem;
+ $this->iohandler = $iohandler;
+ $this->phpbb_root_path = $phpbb_root_path;
+
+ parent::__construct(false);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check_requirements()
+ {
+ $dbms = $this->config->get('dbms');
+ $dbms_info = $this->database_helper->get_available_dbms($dbms);
+ $schema_name = $dbms_info[$dbms]['SCHEMA'];
+
+ if ($dbms === 'mysql')
+ {
+ if (version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
+ {
+ $schema_name .= '_41';
+ }
+ else
+ {
+ $schema_name .= '_40';
+ }
+ }
+
+ $this->schema_file_path = $this->phpbb_root_path . 'install/schemas/' . $schema_name . '_schema.sql';
+
+ return $this->filesystem->exists($this->schema_file_path);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function run()
+ {
+ $this->db->sql_return_on_error(true);
+
+ $dbms = $this->config->get('dbms');
+ $dbms_info = $this->database_helper->get_available_dbms($dbms);
+ $delimiter = $dbms_info[$dbms]['DELIM'];
+ $table_prefix = $this->config->get('table_prefix');
+
+ $sql_query = @file_get_contents($this->schema_file_path);
+ $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
+ $sql_query = $this->database_helper->remove_comments($sql_query);
+ $sql_query = $this->database_helper->split_sql_file($sql_query, $delimiter);
+
+ foreach ($sql_query as $sql)
+ {
+ if (!$this->db->sql_query($sql))
+ {
+ $error = $this->db->sql_error($this->db->get_sql_error_sql());
+ $this->iohandler->add_error_message('INST_ERR_DB', $error['message']);
+ }
+ }
+
+ unset($sql_query);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ static public function get_step_count()
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_task_lang_name()
+ {
+ return 'TASK_SETUP_DATABASE';
+ }
+}
diff --git a/phpBB/phpbb/install/module/install_filesystem/task/create_config_file.php b/phpBB/phpbb/install/module/install_filesystem/task/create_config_file.php
index e0890a929c..5bc425b929 100644
--- a/phpBB/phpbb/install/module/install_filesystem/task/create_config_file.php
+++ b/phpBB/phpbb/install/module/install_filesystem/task/create_config_file.php
@@ -129,7 +129,6 @@ class create_config_file extends \phpbb\install\task_base
else
{
$this->iohandler->add_error_message('UNABLE_TO_WRITE_CONFIG_FILE');
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
@@ -139,7 +138,6 @@ class create_config_file extends \phpbb\install\task_base
{
// We were unable to create the lock file - abort
$this->iohandler->add_error_message('UNABLE_TO_WRITE_LOCK');
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
@fclose($fp);
diff --git a/phpBB/phpbb/install/module/install_finish/task/notify_user.php b/phpBB/phpbb/install/module/install_finish/task/notify_user.php
index 5268b85a42..292be57f5f 100644
--- a/phpBB/phpbb/install/module/install_finish/task/notify_user.php
+++ b/phpBB/phpbb/install/module/install_finish/task/notify_user.php
@@ -87,9 +87,13 @@ class notify_user extends \phpbb\install\task_base
$this->php_ext = $php_ext;
// We need to reload config for cases when it doesn't have all values
+ /** @var \phpbb\cache\driver\driver_interface $cache */
+ $cache = $container->get('cache.driver');
+ $cache->destroy('config');
+
$this->config = new db(
$container->get('dbal.conn'),
- $container->get('cache.driver'),
+ $cache,
$container->get_parameter('tables.config')
);
diff --git a/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php b/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
index 8629d9aea3..34541c361e 100644
--- a/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
+++ b/phpBB/phpbb/install/module/install_finish/task/populate_migrations.php
@@ -13,12 +13,21 @@
namespace phpbb\install\module\install_finish\task;
+use phpbb\install\exception\resource_limit_reached_exception;
+use phpbb\install\helper\config;
+use phpbb\install\helper\container_factory;
+
/**
* Populates migrations
*/
class populate_migrations extends \phpbb\install\task_base
{
/**
+ * @var config
+ */
+ protected $config;
+
+ /**
* @var \phpbb\extension\manager
*/
protected $extension_manager;
@@ -31,10 +40,12 @@ class populate_migrations extends \phpbb\install\task_base
/**
* Constructor
*
- * @param \phpbb\install\helper\container_factory $container phpBB's DI contianer
+ * @param config $config Installer's config
+ * @param container_factory $container phpBB's DI contianer
*/
- public function __construct(\phpbb\install\helper\container_factory $container)
+ public function __construct(config $config, container_factory $container)
{
+ $this->config = $config;
$this->extension_manager = $container->get('ext.manager');
$this->migrator = $container->get('migrator');
@@ -46,6 +57,15 @@ class populate_migrations extends \phpbb\install\task_base
*/
public function run()
{
+ if (!$this->config->get('populate_migration_refresh_before', false))
+ {
+ if ($this->config->get_time_remaining() < 1)
+ {
+ $this->config->set('populate_migration_refresh_before', true);
+ throw new resource_limit_reached_exception();
+ }
+ }
+
$finder = $this->extension_manager->get_finder();
$migrations = $finder
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php
index ac305e8ab5..d1f1af6b83 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_admin_data.php
@@ -136,7 +136,6 @@ class obtain_admin_data extends \phpbb\install\task_base implements \phpbb\insta
$this->io_handler->add_user_form_group('ADMIN_CONFIG', $admin_form);
// Require user interaction
- $this->io_handler->send_response();
throw new user_interaction_required_exception();
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php
index 6c54561d14..ff2a0a2f86 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_board_data.php
@@ -164,7 +164,6 @@ class obtain_board_data extends \phpbb\install\task_base implements \phpbb\insta
$this->io_handler->add_user_form_group('BOARD_CONFIG', $board_form);
- $this->io_handler->send_response();
throw new user_interaction_required_exception();
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php
index 3458aab63e..ce720dbf76 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php
@@ -188,7 +188,6 @@ class obtain_database_data extends \phpbb\install\task_base implements \phpbb\in
$this->io_handler->add_user_form_group('DB_CONFIG', $database_form);
// Require user interaction
- $this->io_handler->send_response();
throw new user_interaction_required_exception();
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php
index b04b8e353f..606e4a2ddd 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_email_data.php
@@ -144,7 +144,6 @@ class obtain_email_data extends \phpbb\install\task_base implements \phpbb\insta
$this->io_handler->add_user_form_group('EMAIL_CONFIG', $email_form);
- $this->io_handler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_file_updater_method.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_file_updater_method.php
index 9bcb73a6a9..d5a8855c37 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_file_updater_method.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_file_updater_method.php
@@ -115,7 +115,6 @@ class obtain_file_updater_method extends task_base
),
));
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_server_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_server_data.php
index 654b5534a9..1ef70eae08 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_server_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_server_data.php
@@ -180,7 +180,6 @@ class obtain_server_data extends \phpbb\install\task_base implements \phpbb\inst
$this->io_handler->add_user_form_group('SERVER_CONFIG', $server_form);
- $this->io_handler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_ftp_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_ftp_data.php
index a4d362a0f1..f31472fc58 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_ftp_data.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_ftp_data.php
@@ -141,7 +141,6 @@ class obtain_update_ftp_data extends task_base
),
));
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
index 6a98721e77..c139b70fa4 100644
--- a/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
+++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_update_settings.php
@@ -57,22 +57,35 @@ class obtain_update_settings extends task_base
}
else
{
+ if ($this->installer_config->get('disable_filesystem_update', false))
+ {
+ $options[] = array(
+ 'value' => 'db_only',
+ 'label' => 'UPDATE_TYPE_DB_ONLY',
+ 'selected' => true,
+ );
+ }
+ else
+ {
+ $options = array(
+ array(
+ 'value' => 'all',
+ 'label' => 'UPDATE_TYPE_ALL',
+ 'selected' => true,
+ ),
+ array(
+ 'value' => 'db_only',
+ 'label' => 'UPDATE_TYPE_DB_ONLY',
+ 'selected' => false,
+ ),
+ );
+ }
+
$this->iohandler->add_user_form_group('UPDATE_TYPE', array(
'update_type' => array(
'label' => 'UPDATE_TYPE',
'type' => 'radio',
- 'options' => array(
- array(
- 'value' => 'all',
- 'label' => 'UPDATE_TYPE_ALL',
- 'selected' => true,
- ),
- array(
- 'value' => 'db_only',
- 'label' => 'UPDATE_TYPE_DB_ONLY',
- 'selected' => false,
- ),
- ),
+ 'options' => $options,
),
'submit_update' => array(
'label' => 'SUBMIT',
@@ -80,7 +93,6 @@ class obtain_update_settings extends task_base
),
));
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/requirements/abstract_requirements_module.php b/phpBB/phpbb/install/module/requirements/abstract_requirements_module.php
index 26593e6777..121b4ff4e5 100644
--- a/phpBB/phpbb/install/module/requirements/abstract_requirements_module.php
+++ b/phpBB/phpbb/install/module/requirements/abstract_requirements_module.php
@@ -13,7 +13,6 @@
namespace phpbb\install\module\requirements;
-use phpbb\install\exception\resource_limit_reached_exception;
use phpbb\install\exception\user_interaction_required_exception;
use phpbb\install\module_base;
@@ -25,41 +24,8 @@ abstract class abstract_requirements_module extends module_base
public function run()
{
$tests_passed = true;
-
- // Recover install progress
- $task_name = $this->recover_progress();
- $task_found = false;
-
- /**
- * @var string $name ID of the service
- * @var \phpbb\install\task_interface $task Task object
- */
foreach ($this->task_collection as $name => $task)
{
- // Run until there are available resources
- if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
- {
- throw new resource_limit_reached_exception();
- }
-
- // Skip forward until the next task is reached
- if (!$task_found)
- {
- if ($name === $task_name || empty($task_name))
- {
- $task_found = true;
-
- if ($name === $task_name)
- {
- continue;
- }
- }
- else
- {
- continue;
- }
- }
-
// Check if we can run the task
if (!$task->is_essential() && !$task->check_requirements())
{
@@ -76,7 +42,7 @@ abstract class abstract_requirements_module extends module_base
}
// Module finished, so clear task progress
- $this->install_config->set_finished_task('');
+ $this->install_config->set_finished_task(0);
// Check if tests have failed
if (!$tests_passed)
@@ -91,7 +57,6 @@ abstract class abstract_requirements_module extends module_base
));
// Send the response and quit
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/requirements/task/check_update.php b/phpBB/phpbb/install/module/requirements/task/check_update.php
index c986c76810..4e9124ff47 100644
--- a/phpBB/phpbb/install/module/requirements/task/check_update.php
+++ b/phpBB/phpbb/install/module/requirements/task/check_update.php
@@ -14,6 +14,7 @@
namespace phpbb\install\module\requirements\task;
use phpbb\filesystem\filesystem;
+use phpbb\install\helper\config;
use phpbb\install\helper\container_factory;
use phpbb\install\helper\iohandler\iohandler_interface;
use phpbb\install\helper\update_helper;
@@ -35,6 +36,11 @@ class check_update extends task_base
protected $filesystem;
/**
+ * @var config
+ */
+ protected $installer_config;
+
+ /**
* @var iohandler_interface
*/
protected $iohandler;
@@ -69,14 +75,16 @@ class check_update extends task_base
*
* @param container_factory $container
* @param filesystem $filesystem
+ * @param config $config
* @param iohandler_interface $iohandler
* @param update_helper $update_helper
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(container_factory $container, filesystem $filesystem, iohandler_interface $iohandler, update_helper $update_helper, $phpbb_root_path, $php_ext)
+ public function __construct(container_factory $container, filesystem $filesystem, config $config, iohandler_interface $iohandler, update_helper $update_helper, $phpbb_root_path, $php_ext)
{
$this->filesystem = $filesystem;
+ $this->installer_config = $config;
$this->iohandler = $iohandler;
$this->update_helper = $update_helper;
$this->phpbb_root_path = $phpbb_root_path;
@@ -117,8 +125,10 @@ class check_update extends task_base
$this->iohandler->add_error_message('UPDATE_FILES_NOT_FOUND');
$this->set_test_passed(false);
- // If there are no update files, we can't check the version
- return false;
+ // If there are no update files, we can't check the version etc
+ // However, we can let the users run migrations if they really want to...
+ $this->installer_config->set('disable_filesystem_update', true);
+ return true;
}
// Recover version numbers
diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php
index 84ec6f73f5..4b2baf2c23 100644
--- a/phpBB/phpbb/install/module/update_database/task/update.php
+++ b/phpBB/phpbb/install/module/update_database/task/update.php
@@ -140,7 +140,7 @@ class update extends task_base
->get_classes();
$this->migrator->set_migrations($migrations);
- $migration_count = count($migrations);
+ $migration_count = count($this->migrator->get_migrations());
$this->iohandler->set_task_count($migration_count, true);
$progress_count = $this->installer_config->get('database_update_count', 0);
diff --git a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
index 9271e8fd50..f911b7ac62 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
@@ -101,7 +101,6 @@ class download_updated_files extends task_base
),
));
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
}
diff --git a/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php b/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php
index e712b8ad6a..c46c05500a 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/show_file_status.php
@@ -136,7 +136,6 @@ class show_file_status extends task_base
));
// Show results to the user
- $this->iohandler->send_response();
throw new user_interaction_required_exception();
}
else
diff --git a/phpBB/phpbb/install/module_base.php b/phpBB/phpbb/install/module_base.php
index fb68c3aca2..527447b4a1 100644
--- a/phpBB/phpbb/install/module_base.php
+++ b/phpBB/phpbb/install/module_base.php
@@ -105,47 +105,23 @@ abstract class module_base implements module_interface
public function run()
{
// Recover install progress
- $task_name = $this->recover_progress();
- $task_found = false;
-
- /**
- * @var string $name ID of the service
- * @var \phpbb\install\task_interface $task Task object
- */
- foreach ($this->task_collection as $name => $task)
- {
- // Run until there are available resources
- if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
- {
- throw new resource_limit_reached_exception();
- }
+ $task_index = $this->recover_progress();
+ $iterator = $this->task_collection->getIterator();
- // Skip forward until the next task is reached
- if (!$task_found)
- {
- if ($name === $task_name || empty($task_name))
- {
- $task_found = true;
-
- if ($name === $task_name)
- {
- continue;
- }
- }
- else
- {
- continue;
- }
- }
+ if ($task_index < $iterator->count())
+ {
+ $iterator->seek($task_index);
+ }
+ else
+ {
+ $this->install_config->set_finished_task(0);
+ return;
+ }
- // Send progress information
- if ($this->allow_progress_bar)
- {
- $this->iohandler->set_progress(
- $task->get_task_lang_name(),
- $this->install_config->get_current_task_progress()
- );
- }
+ while ($iterator->valid())
+ {
+ $task = $iterator->current();
+ $name = $iterator->key();
// Check if we can run the task
if (!$task->is_essential() && !$task->check_requirements())
@@ -156,20 +132,33 @@ abstract class module_base implements module_interface
));
$this->install_config->increment_current_task_progress($this->task_step_count[$name]);
- continue;
}
-
- if ($this->allow_progress_bar)
+ else
{
- // Only increment progress by one, as if a task has more than one steps
- // then that should be incremented in the task itself
- $this->install_config->increment_current_task_progress();
- }
+ // Send progress information
+ if ($this->allow_progress_bar)
+ {
+ $this->iohandler->set_progress(
+ $task->get_task_lang_name(),
+ $this->install_config->get_current_task_progress()
+ );
+
+ $this->iohandler->send_response();
+ }
+
+ $task->run();
- $task->run();
+ if ($this->allow_progress_bar)
+ {
+ // Only increment progress by one, as if a task has more than one steps
+ // then that should be incremented in the task itself
+ $this->install_config->increment_current_task_progress();
+ }
+ }
- // Log install progress
- $this->install_config->set_finished_task($name);
+ $task_index++;
+ $this->install_config->set_finished_task($task_index);
+ $iterator->next();
// Send progress information
if ($this->allow_progress_bar)
@@ -181,10 +170,16 @@ abstract class module_base implements module_interface
}
$this->iohandler->send_response();
+
+ // Stop execution if resource limit is reached
+ if ($this->install_config->get_time_remaining() <= 0 || $this->install_config->get_memory_remaining() <= 0)
+ {
+ throw new resource_limit_reached_exception();
+ }
}
// Module finished, so clear task progress
- $this->install_config->set_finished_task('');
+ $this->install_config->set_finished_task(0);
}
/**
@@ -195,7 +190,7 @@ abstract class module_base implements module_interface
protected function recover_progress()
{
$progress_array = $this->install_config->get_progress_data();
- return $progress_array['last_task_name'];
+ return $progress_array['last_task_index'];
}
/**
diff --git a/phpBB/phpbb/language/language.php b/phpBB/phpbb/language/language.php
index 382d4db89e..42429c2c07 100644
--- a/phpBB/phpbb/language/language.php
+++ b/phpBB/phpbb/language/language.php
@@ -246,14 +246,14 @@ class language
}
/**
- * Act like lang() but takes a key and an array of parameters instead of using variadic
+ * Returns the raw value associated to a language key or the language key no translation is available.
+ * No parameter substitution is performed, can be a string or an array.
*
* @param string|array $key Language key
- * @param array $args Parameters
*
* @return array|string
*/
- public function lang_array($key, $args = array())
+ public function lang_raw($key)
{
// Load common language files if they not loaded yet
if (!$this->common_language_files_loaded)
@@ -281,6 +281,26 @@ class language
return $key;
}
+ return $lang;
+ }
+
+ /**
+ * Act like lang() but takes a key and an array of parameters instead of using variadic
+ *
+ * @param string|array $key Language key
+ * @param array $args Parameters
+ *
+ * @return string
+ */
+ public function lang_array($key, $args = array())
+ {
+ $lang = $this->lang_raw($key);
+
+ if ($lang === $key)
+ {
+ return $key;
+ }
+
// If the language entry is a string, we simply mimic sprintf() behaviour
if (is_string($lang))
{
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 7b0d6f0fba..154361ef64 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -100,11 +100,18 @@ class path_helper
*/
public function update_web_root_path($path)
{
+ $web_root_path = $this->get_web_root_path();
+
+ // Removes the web root path if it is already present
+ if (strpos($path, $web_root_path) === 0)
+ {
+ $path = $this->phpbb_root_path . substr($path, strlen($web_root_path));
+ }
+
if (strpos($path, $this->phpbb_root_path) === 0)
{
$path = substr($path, strlen($this->phpbb_root_path));
- $web_root_path = $this->get_web_root_path();
if (substr($web_root_path, -8) === 'app.php/' && substr($path, 0, 7) === 'app.php')
{
$path = substr($path, 8);
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 3f7146c59b..12031bda03 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1600,6 +1600,8 @@ class session
$db->sql_return_on_error(false);
+ $this->data = array_merge($this->data, $sql_ary);
+
if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts'])
{
$this->leave_newly_registered();
diff --git a/phpBB/phpbb/template/assets_bag.php b/phpBB/phpbb/template/assets_bag.php
new file mode 100644
index 0000000000..9013061b96
--- /dev/null
+++ b/phpBB/phpbb/template/assets_bag.php
@@ -0,0 +1,95 @@
+<?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\template;
+
+class assets_bag
+{
+ /** @var asset[] */
+ protected $stylesheets = [];
+
+ /** @var asset[] */
+ protected $scripts = [];
+
+ /**
+ * Add a css asset to the bag
+ *
+ * @param asset $asset
+ */
+ public function add_stylesheet(asset $asset)
+ {
+ $this->stylesheets[] = $asset;
+ }
+
+ /**
+ * Add a js script asset to the bag
+ *
+ * @param asset $asset
+ */
+ public function add_script(asset $asset)
+ {
+ $this->scripts[] = $asset;
+ }
+
+ /**
+ * Returns all css assets
+ *
+ * @return asset[]
+ */
+ public function get_stylesheets()
+ {
+ return $this->stylesheets;
+ }
+
+ /**
+ * Returns all js assets
+ *
+ * @return asset[]
+ */
+ public function get_scripts()
+ {
+ return $this->scripts;
+ }
+
+ /**
+ * Returns the HTML code to includes all css assets
+ *
+ * @return string
+ */
+ public function get_stylesheets_content()
+ {
+ $output = '';
+ foreach ($this->stylesheets as $stylesheet)
+ {
+ $output .= "<link href=\"{$stylesheet->get_url()}\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n";
+ }
+
+ return $output;
+ }
+
+ /**
+ * Returns the HTML code to includes all js assets
+ *
+ * @return string
+ */
+ public function get_scripts_content()
+ {
+ $output = '';
+ foreach ($this->scripts as $script)
+ {
+ $output .= "<script type=\"text/javascript\" src=\"{$script->get_url()}\"></script>\n";
+ }
+
+ return $output;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/definition.php b/phpBB/phpbb/template/twig/definition.php
index cb3c953692..205f0e68ee 100644
--- a/phpBB/phpbb/template/twig/definition.php
+++ b/phpBB/phpbb/template/twig/definition.php
@@ -19,7 +19,10 @@ namespace phpbb\template\twig;
class definition
{
/** @var array **/
- protected $definitions = array();
+ protected $definitions = array(
+ 'SCRIPTS' => '__SCRIPTS_PLACEHOLDER__',
+ 'STYLESHEETS' => '__STYLESHEETS_PLACEHOLDER__'
+ );
/**
* Get a DEFINE'd variable
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php
index 6e75403159..5660ddc3a4 100644
--- a/phpBB/phpbb/template/twig/environment.php
+++ b/phpBB/phpbb/template/twig/environment.php
@@ -13,6 +13,8 @@
namespace phpbb\template\twig;
+use phpbb\template\assets_bag;
+
class environment extends \Twig_Environment
{
/** @var \phpbb\config\config */
@@ -39,6 +41,9 @@ class environment extends \Twig_Environment
/** @var array **/
protected $namespace_look_up_order = array('__main__');
+ /** @var assets_bag */
+ protected $assets_bag;
+
/**
* Constructor
*
@@ -63,6 +68,8 @@ class environment extends \Twig_Environment
$this->phpbb_root_path = $this->phpbb_path_helper->get_phpbb_root_path();
$this->web_root_path = $this->phpbb_path_helper->get_web_root_path();
+ $this->assets_bag = new assets_bag();
+
$options = array_merge(array(
'cache' => (defined('IN_INSTALL')) ? false : $cache_path,
'debug' => false,
@@ -151,6 +158,16 @@ class environment extends \Twig_Environment
}
/**
+ * Gets the assets bag
+ *
+ * @return assets_bag
+ */
+ public function get_assets_bag()
+ {
+ return $this->assets_bag;
+ }
+
+ /**
* Get the namespace look up order
*
* @return array
@@ -174,6 +191,58 @@ class environment extends \Twig_Environment
}
/**
+ * {@inheritdoc}
+ */
+ public function render($name, array $context = [])
+ {
+ $output = parent::render($name, $context);
+
+ return $this->inject_assets($output);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function display($name, array $context = [])
+ {
+ $level = ob_get_level();
+ ob_start();
+
+ try
+ {
+ parent::display($name, $context);
+ }
+ catch (\Exception $e)
+ {
+ while (ob_get_level() > $level)
+ {
+ ob_end_clean();
+ }
+
+ throw $e;
+ }
+
+ $output = ob_get_clean();
+
+ echo $this->inject_assets($output);
+ }
+
+ /**
+ * Injects the assets (from INCLUDECSS/JS) in the output.
+ *
+ * @param string $output
+ *
+ * @return string
+ */
+ private function inject_assets($output)
+ {
+ $output = str_replace('__STYLESHEETS_PLACEHOLDER__', $this->assets_bag->get_stylesheets_content(), $output);
+ $output = str_replace('__SCRIPTS_PLACEHOLDER__', $this->assets_bag->get_scripts_content(), $output);
+
+ return $output;
+ }
+
+ /**
* Loads a template by name.
*
* @param string $name The template name
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php
index 324823b8d7..6d50eafc9d 100644
--- a/phpBB/phpbb/template/twig/node/includeasset.php
+++ b/phpBB/phpbb/template/twig/node/includeasset.php
@@ -49,33 +49,18 @@ abstract class includeasset extends \Twig_Node
->write("\$local_file = \$this->getEnvironment()->findTemplate(\$asset_path);\n")
->write("\$asset->set_path(\$local_file, true);\n")
->outdent()
- ->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
- ->write("\$asset_file = \$asset->get_url();\n")
->write("}\n")
+ ->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
->outdent()
->write("}\n")
- ->write("\$context['definition']->append('{$this->get_definition_name()}', '")
- ;
-
- $this->append_asset($compiler);
-
- $compiler
- ->raw("\n');\n")
+ ->write("\$this->getEnvironment()->get_assets_bag()->add_{$this->get_setters_name()}(\$asset);")
;
}
/**
- * Get the definition name
+ * Get the name of the assets bag setter
*
- * @return string (e.g. 'SCRIPTS')
- */
- abstract public function get_definition_name();
-
- /**
- * Append the output code for the asset
- *
- * @param \Twig_Compiler A Twig_Compiler instance
- * @return null
+ * @return string (e.g. 'script')
*/
- abstract protected function append_asset(\Twig_Compiler $compiler);
+ abstract public function get_setters_name();
}
diff --git a/phpBB/phpbb/template/twig/node/includecss.php b/phpBB/phpbb/template/twig/node/includecss.php
index 2dac154036..2e97d4972d 100644
--- a/phpBB/phpbb/template/twig/node/includecss.php
+++ b/phpBB/phpbb/template/twig/node/includecss.php
@@ -18,20 +18,8 @@ class includecss extends \phpbb\template\twig\node\includeasset
/**
* {@inheritdoc}
*/
- public function get_definition_name()
+ public function get_setters_name()
{
- return 'STYLESHEETS';
- }
-
- /**
- * {@inheritdoc}
- */
- public function append_asset(\Twig_Compiler $compiler)
- {
- $compiler
- ->raw("<link href=\"' . ")
- ->raw("\$asset_file . '\"")
- ->raw(' rel="stylesheet" type="text/css" media="screen" />')
- ;
+ return 'stylesheet';
}
}
diff --git a/phpBB/phpbb/template/twig/node/includejs.php b/phpBB/phpbb/template/twig/node/includejs.php
index e77f2afeed..505b49757b 100644
--- a/phpBB/phpbb/template/twig/node/includejs.php
+++ b/phpBB/phpbb/template/twig/node/includejs.php
@@ -18,20 +18,8 @@ class includejs extends \phpbb\template\twig\node\includeasset
/**
* {@inheritdoc}
*/
- public function get_definition_name()
+ public function get_setters_name()
{
- return 'SCRIPTS';
- }
-
- /**
- * {@inheritdoc}
- */
- protected function append_asset(\Twig_Compiler $compiler)
- {
- $compiler
- ->raw("<script type=\"text/javascript\" src=\"' . ")
- ->raw("\$asset_file")
- ->raw(". '\"></script>\n")
- ;
+ return 'script';
}
}
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 3174626f6b..6cfb877f75 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -482,7 +482,7 @@ if ($mode == 'delete' || $mode == 'soft_delete')
}
$delete_reason = $request->variable('delete_reason', '', true);
- phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete'), $delete_reason);
+ phpbb_handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete' && !$request->is_set_post('delete_permanent')), $delete_reason);
return;
}
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index 21951b7b0d..ec7d8d2e27 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.2.0-a2
-phpbb_version = 3.2.0-a2
+style_version = 3.2.0-b1
+phpbb_version = 3.2.0-b1
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html
index f0a7ab2bdb..6cbb87afe3 100644
--- a/phpBB/styles/prosilver/template/confirm_delete_body.html
+++ b/phpBB/styles/prosilver/template/confirm_delete_body.html
@@ -58,7 +58,7 @@
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
- <input type="submit" name="confirm" value="{L_YES}" class="button1" />&nbsp;
+ <input type="submit" name="confirm" value="{L_YES}" class="button1" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
</fieldset>
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index 0bbaa9beb3..5cbb177455 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -36,10 +36,10 @@
<!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="row-item-link"></a><!-- ENDIF -->
<div class="list-inner">
<!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED -->
- <!--
+ <!--
<a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}">
<i class="icon fa-rss-square fa-fw icon-orange" aria-hidden="true"></i><span class="sr-only">{L_FEED} - {forumrow.FORUM_NAME}</span>
- </a>
+ </a>
-->
<!-- ENDIF -->
<!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
@@ -81,23 +81,23 @@
<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
<a href="{forumrow.U_UNAPPROVED_TOPICS}" title="{TOPICS_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{TOPICS_UNAPPROVED}</span>
- </a>
+ </a>
<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
<a href="{forumrow.U_UNAPPROVED_POSTS}" title="{POSTS_UNAPPROVED_FORUM}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{POSTS_UNAPPROVED_FORUM}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF forumrow.LAST_POST_TIME -->
<dfn>{L_LAST_POST}</dfn>
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
<!-- EVENT forumlist_body_last_post_title_prepend -->
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
- <!-- ENDIF -->
+ <!-- ENDIF -->
{L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
<!-- IF not S_IS_BOT -->
<a href="{forumrow.U_LAST_POST}" title="{VIEW_LATEST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
<br />{forumrow.LAST_POST_TIME}
<!-- ELSE -->
diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html
index 14472bcf4f..ed68085484 100644
--- a/phpBB/styles/prosilver/template/mcp_approve.html
+++ b/phpBB/styles/prosilver/template/mcp_approve.html
@@ -66,7 +66,7 @@
</fieldset>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html
index 5a7eaa7840..5b798d9b6c 100644
--- a/phpBB/styles/prosilver/template/mcp_ban.html
+++ b/phpBB/styles/prosilver/template/mcp_ban.html
@@ -74,7 +74,7 @@
<dl>
<dt><label for="banexclude0">{L_BAN_EXCLUDE}{L_COLON}</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
<dd>
- <label for="banexclude1"><input type="radio" name="banexclude" id="banexclude1" value="1" /> {L_YES}</label>
+ <label for="banexclude1"><input type="radio" name="banexclude" id="banexclude1" value="1" /> {L_YES}</label>
<label for="banexclude0"><input type="radio" name="banexclude" id="banexclude0" value="0" checked="checked" /> {L_NO}</label>
</dd>
</dl>
@@ -85,7 +85,7 @@
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="bansubmit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
@@ -122,7 +122,7 @@
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="unbansubmit" value="{L_SUBMIT}" class="button1" />
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index 147afff0f5..da0d3a4ddf 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -53,7 +53,7 @@
<!-- IF topicrow.S_TOPIC_DELETED or topicrow.S_POSTS_DELETED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_DELETED">
<i class="icon fa-recycle fa-fw icon-green" aria-hidden="true"></i><span class="sr-only">{TOPIC_DELETED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
<a href="{topicrow.U_MCP_REPORT}" title="{TOPIC_REPORTED}">
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html
index a50bd95ccd..03216b4f38 100644
--- a/phpBB/styles/prosilver/template/mcp_logs.html
+++ b/phpBB/styles/prosilver/template/mcp_logs.html
@@ -11,9 +11,9 @@
{L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
<div class="pagination">
{TOTAL}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -56,9 +56,9 @@
<div class="pagination">
{TOTAL}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html
index d028fffeb4..876829a088 100644
--- a/phpBB/styles/prosilver/template/mcp_move.html
+++ b/phpBB/styles/prosilver/template/mcp_move.html
@@ -54,7 +54,7 @@
</fieldset>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html
index db10284bce..11f362376d 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_front.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_front.html
@@ -19,7 +19,7 @@
</div>
<fieldset class="submit-buttons">
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
index 6a9d88389c..62d0562a46 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_user.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -54,9 +54,9 @@
{L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
<div class="pagination">
{TOTAL_REPORTS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -95,9 +95,9 @@
<div class="pagination">
{TOTAL_REPORTS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
index ce58d110e1..c82aae5f8c 100644
--- a/phpBB/styles/prosilver/template/mcp_queue.html
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -19,9 +19,9 @@
<div class="action-bar bar-top">
<div class="pagination">
{TOTAL}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -79,9 +79,9 @@
<div class="pagination">
{TOTAL}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html
index 4131d9f2f3..e7e0a5c9ba 100644
--- a/phpBB/styles/prosilver/template/mcp_reports.html
+++ b/phpBB/styles/prosilver/template/mcp_reports.html
@@ -21,9 +21,9 @@
<div class="action-bar bar-top">
<div class="pagination">
{TOTAL_REPORTS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -85,9 +85,9 @@
<div class="pagination">
{TOTAL_REPORTS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 5f11e763e1..0c0ecfaa07 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -115,7 +115,7 @@
<p class="author">
<a href="#pr{postrow.POST_ID}" title="{postrow.MINI_POST}">
<i class="icon fa-file fa-fw icon-lightgray icon-tiny" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
- </a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF -->
+ </a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF -->
</p>
<!-- IF postrow.S_POST_UNAPPROVED -->
<p class="post-notice unapproved">
diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html
index 668a0d81a8..9b188b52ac 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_front.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_front.html
@@ -21,7 +21,7 @@
</div>
<fieldset class="submit-buttons">
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html
index 215e155d5c..29a2d29e8f 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_list.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_list.html
@@ -13,9 +13,9 @@
<div class="action-bar bar-top">
<div class="pagination">
{TOTAL_USERS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -48,9 +48,9 @@
<div class="pagination">
{TOTAL_USERS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html
index 59c7d0d495..5e39480658 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_post.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_post.html
@@ -69,7 +69,7 @@
<!-- EVENT mcp_warn_post_add_warning_field_after -->
<fieldset class="submit-buttons">
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html
index 1ad6df7ade..f4dbf2819e 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_user.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_user.html
@@ -53,7 +53,7 @@
<!-- EVENT mcp_warn_user_add_warning_field_after -->
<fieldset class="submit-buttons">
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 997147f492..255e6746e1 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -36,12 +36,12 @@
<!-- END first_char -->
</strong>
</div>
-
+
<div class="pagination">
{TOTAL_USERS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -148,9 +148,9 @@
<div class="action-bar bar-bottom">
<div class="pagination">
{TOTAL_USERS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/memberlist_team.html b/phpBB/styles/prosilver/template/memberlist_team.html
index b7f2d66d94..63349064bb 100644
--- a/phpBB/styles/prosilver/template/memberlist_team.html
+++ b/phpBB/styles/prosilver/template/memberlist_team.html
@@ -36,7 +36,7 @@
<!-- END user -->
</tbody>
</table>
-
+
</div>
</div>
<!-- END group -->
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index a02ec45830..788989f4c5 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -28,7 +28,7 @@
</a>
</li>
<!-- ENDIF -->
- <!-- IF S_LOAD_UNREADS -->
+ <!-- IF S_LOAD_UNREADS -->
<li>
<a href="{U_SEARCH_UNREAD}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-red" aria-hidden="true"></i><span>{L_SEARCH_UNREAD}</span>
@@ -100,6 +100,7 @@
<!-- ENDIF -->
<!-- IF S_REGISTERED_USER -->
+ <!-- EVENT navbar_header_user_profile_prepend -->
<li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true">
<!-- EVENT navbar_header_username_prepend -->
<div class="header-profile dropdown-container">
@@ -114,7 +115,7 @@
</a>
</li>
<!-- ENDIF -->
-
+
<!-- EVENT navbar_header_profile_list_before -->
<li>
@@ -127,9 +128,9 @@
<i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span>
</a>
</li>
-
+
<!-- EVENT navbar_header_profile_list_after -->
-
+
<li class="separator"></li>
<li>
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
@@ -156,6 +157,7 @@
<!-- INCLUDE notification_dropdown.html -->
</li>
<!-- ENDIF -->
+ <!-- EVENT navbar_header_user_profile_append -->
<!-- ELSE -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 0573abec64..39468201e5 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -50,7 +50,7 @@
(function($){
var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(),
$span = $('<span class="fa" style="display:none"></span>').appendTo('body');
- if ($span.css('fontFamily') !== 'FontAwesome' ) {
+ if ($span.css('fontFamily') !== 'FontAwesome' ) {
$fa_cdn.after('<link href="{T_ASSETS_PATH}/css/font-awesome.min.css" rel="stylesheet">');
$fa_cdn.remove();
}
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index 81e3186de1..da527e9a75 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -2,12 +2,12 @@
<div class="inner">
<p>{L_ADD_ATTACHMENT_EXPLAIN} <span class="hidden" id="drag-n-drop-message">{L_PLUPLOAD_DRAG_TEXTAREA}</span></p>
-
+
<fieldset class="fields2" id="attach-panel-basic">
<dl>
<dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
<dd>
- <input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" />
+ <input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" />
<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 45290251a6..14185ed66b 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -116,7 +116,7 @@
<!-- ENDIF -->
<!-- ENDIF -->
</select>
-
+
<!-- EVENT posting_editor_buttons_custom_tags_before -->
<!-- BEGIN custom_tags -->
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 9376ae8be7..ae7bc4a6a7 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -36,7 +36,7 @@
<!-- INCLUDE posting_buttons.html -->
<div id="smiley-box" class="smiley-box">
- <!-- EVENT posting_editor_smilies_before -->
+ <!-- EVENT posting_editor_smilies_before -->
<!-- IF S_SMILIES_ALLOWED and .smiley -->
<strong>{L_SMILIES}</strong><br />
<!-- BEGIN smiley -->
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html
index 22da32076c..bca9195f0e 100644
--- a/phpBB/styles/prosilver/template/posting_layout.html
+++ b/phpBB/styles/prosilver/template/posting_layout.html
@@ -9,14 +9,14 @@
<!-- IF S_FORUM_RULES -->
<div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
<div class="inner">
-
+
<!-- IF U_FORUM_RULES -->
<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
<!-- ELSE -->
<strong>{L_FORUM_RULES}</strong><br />
{FORUM_RULES}
<!-- ENDIF -->
-
+
</div>
</div>
<!-- ENDIF -->
@@ -26,10 +26,10 @@
<!-- IF S_DRAFT_LOADED -->
<div class="panel">
<div class="inner">
-
+
<h3>{L_INFORMATION}</h3>
<p>{L_DRAFT_LOADED}</p>
-
+
</div>
</div>
<!-- ENDIF -->
@@ -48,7 +48,7 @@
<dt><label for="to_forum_id">{L_MOVE}{L_COLON}</label></dt>
<dd><select id="to_forum_id" name="to_forum_id">{S_FORUM_SELECT}</select></dd>
</dl>
-
+
<dl>
<dt>&nbsp;</dt>
<dd><input class="button1" type="submit" name="post" value="{L_CONFIRM}" /> <input class="button2" type="submit" name="cancel_unglobalise" value="{L_CANCEL}" /></dd>
@@ -63,7 +63,7 @@
<div class="panel" id="postingbox">
<div class="inner">
-
+
<h3>{L_POST_A}</h3>
<!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
diff --git a/phpBB/styles/prosilver/template/posting_pm_layout.html b/phpBB/styles/prosilver/template/posting_pm_layout.html
index 7f4a0ea8d7..316fa791e4 100644
--- a/phpBB/styles/prosilver/template/posting_pm_layout.html
+++ b/phpBB/styles/prosilver/template/posting_pm_layout.html
@@ -3,10 +3,10 @@
<!-- IF S_DRAFT_LOADED -->
<div class="panel">
<div class="inner">
-
+
<h3>{L_INFORMATION}</h3>
<p>{L_DRAFT_LOADED_PM}</p>
-
+
</div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html
index 3bd51275ec..54e82a58bc 100644
--- a/phpBB/styles/prosilver/template/posting_smilies.html
+++ b/phpBB/styles/prosilver/template/posting_smilies.html
@@ -11,13 +11,13 @@
<h2>{L_SMILIES}</h2>
<div class="panel">
<div class="inner">
- <!-- BEGIN smiley -->
- <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
+ <!-- BEGIN smiley -->
+ <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
<!-- END smiley -->
-
+
</div>
</div>
-<!-- IF .pagination -->
+<!-- IF .pagination -->
<div class="pagination">
<!-- INCLUDE pagination.html -->
</div>
diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html
index 2a5e6c9d0e..285e8ec8d7 100644
--- a/phpBB/styles/prosilver/template/report_body.html
+++ b/phpBB/styles/prosilver/template/report_body.html
@@ -8,7 +8,7 @@
<div class="content">
<p><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></p>
-
+
<fieldset>
<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
<dl class="fields2">
@@ -19,7 +19,7 @@
<dl class="fields2">
<dt><label for="notify1">{L_REPORT_NOTIFY}{L_COLON}</label><br /><span>{L_REPORT_NOTIFY_EXPLAIN}</span></dt>
<dd>
- <label for="notify1"><input type="radio" name="notify" id="notify1" value="1" <!-- IF not S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notify1"><input type="radio" name="notify" id="notify1" value="1" <!-- IF not S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notify0"><input type="radio" name="notify" id="notify0" value="0" <!-- IF S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index cd8ce66a74..ea558fd7ae 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -78,27 +78,25 @@
<!-- EVENT search_results_topic_before -->
<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="row-item {searchresults.TOPIC_IMG_STYLE}">
- <dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
+ <dt<!-- IF searchresults.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
<!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{searchresults.U_NEWEST_POST}" class="row-item-link"></a><!-- ENDIF -->
<div class="list-inner">
-
<!-- EVENT topiclist_row_prepend -->
<!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{searchresults.U_NEWEST_POST}">
<i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
-
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
<a href="{searchresults.U_MCP_QUEUE}" title="{TOPIC_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{TOPIC_UNAPPROVED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF searchresults.S_TOPIC_DELETED -->
<a href="{searchresults.U_MCP_QUEUE}" title="{TOPIC_DELETED}">
<i class="icon fa-recycle fa-fw icon-green" aria-hidden="true"></i><span class="sr-only">{TOPIC_DELETED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF searchresults.S_TOPIC_REPORTED -->
<a href="{searchresults.U_MCP_REPORT}" title="{TOPIC_REPORTED}">
@@ -106,8 +104,24 @@
</a>
<!-- ENDIF -->
<br />
+
+ <!-- IF not S_IS_BOT -->
+ <div class="responsive-show" style="display: none;">
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL} &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{searchresults.LAST_POST_TIME}</a>
+ <br />{L_POSTED} {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ </div>
+ <!-- IF searchresults.TOPIC_REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></span><!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <div class="responsive-hide">
+ <!-- IF searchresults.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i><!-- ENDIF -->
+ <!-- IF searchresults.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ </div>
+
<!-- IF .searchresults.pagination -->
<div class="pagination">
+ <span><i class="icon fa-clone fa-fw" aria-hidden="true"></i></span>
<ul>
<!-- BEGIN pagination -->
<!-- IF searchresults.pagination.S_IS_PREV -->
@@ -120,26 +134,20 @@
</ul>
</div>
<!-- ENDIF -->
- <!-- IF searchresults.S_HAS_POLL --><i class="icon fa-bar-chart fa-fw" aria-hidden="true"></i> <!-- ENDIF -->
- <!-- IF searchresults.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i><!-- ENDIF -->
- {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
- <!-- EVENT topiclist_row_append -->
+ <!-- EVENT topiclist_row_append -->
</div>
</dt>
- <dd class="posts">{searchresults.TOPIC_REPLIES}</dd>
- <dd class="views">{searchresults.TOPIC_VIEWS}</dd>
+ <dd class="posts">{searchresults.TOPIC_REPLIES} <dfn>{L_REPLIES}</dfn></dd>
+ <dd class="views">{searchresults.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost">
- <span>
- {L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
+ <span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
<!-- IF not S_IS_BOT -->
<a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
- <br />
- {searchresults.LAST_POST_TIME}
- <br />
+ <br />{searchresults.LAST_POST_TIME}
</span>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index 9de08f17b9..696f621116 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -6,21 +6,21 @@
<div class="panel">
<div class="inner">
-
+
<p>{L_ATTACHMENTS_EXPLAIN}</p>
<!-- IF .attachrow -->
<div class="action-bar top">
<div class="pagination">
{NUM_ATTACHMENTS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
</div>
-
+
<ul class="topiclist">
<li class="header">
<dl>
@@ -56,9 +56,9 @@
<div class="pagination">
{TOTAL_ATTACHMENTS} {L_TITLE}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -70,9 +70,9 @@
</div>
</div>
-
+
<!-- IF S_ATTACHMENT_ROWS -->
- <fieldset class="display-actions">
+ <fieldset class="display-actions">
<input class="button2" type="submit" name="delete" value="{L_DELETE_MARKED}" />
<div><a href="#" onclick="marklist('ucp', 'attachment', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 'attachment', false); return false;">{L_UNMARK_ALL}</a></div>
{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
index b1076c2d14..d08345130e 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
@@ -5,7 +5,7 @@
<dl>
<dt><label for="avatar_gravatar_width">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></dt>
<dd>
- <label for="avatar_gravatar_width"><input type="text" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_gravatar_width"><input type="text" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
<label for="avatar_gravatar_height"><input type="text" name="avatar_gravatar_height" id="avatar_gravatar_height" size="3" value="{AVATAR_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
index a8f6135fb2..014a76aff8 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
@@ -5,7 +5,7 @@
<dl>
<dt><label for="avatar_remote_width">{L_LINK_REMOTE_SIZE}{L_COLON}</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
<dd>
- <label for="avatar_remote_width"><input type="text" name="avatar_remote_width" id="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_remote_width"><input type="text" name="avatar_remote_width" id="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
<label for="avatar_remote_height"><input type="text" name="avatar_remote_height" id="avatar_remote_height" size="3" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html
index 223493ff38..f2b4f003e0 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_manage.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html
@@ -33,9 +33,9 @@
<dl>
<dt><label for="group_type1">{L_GROUP_TYPE}{L_COLON}</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
<dd>
- <label for="group_type1"><input type="radio" class="radio" name="group_type" id="group_type1" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
- <label for="group_type2"><input type="radio" class="radio" name="group_type" id="group_type2" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
- <label for="group_type3"><input type="radio" class="radio" name="group_type" id="group_type3" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED}</label>
+ <label for="group_type1"><input type="radio" class="radio" name="group_type" id="group_type1" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
+ <label for="group_type2"><input type="radio" class="radio" name="group_type" id="group_type2" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
+ <label for="group_type3"><input type="radio" class="radio" name="group_type" id="group_type3" value="{GROUP_TYPE_CLOSED}"{GROUP_CLOSED} /> {L_GROUP_CLOSED}</label>
<label for="group_type4"><input type="radio" class="radio" name="group_type" id="group_type4" value="{GROUP_TYPE_HIDDEN}"{GROUP_HIDDEN} /> {L_GROUP_HIDDEN}</label>
</dd>
</dl>
@@ -74,7 +74,7 @@
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
@@ -161,7 +161,7 @@
<!-- IF .pagination -->
<div class="action-bar bar-bottom">
- <div class="pagination">
+ <div class="pagination">
<!-- INCLUDE pagination.html -->
</div>
</div>
@@ -170,7 +170,7 @@
</div>
</div>
-<fieldset class="display-actions">
+<fieldset class="display-actions">
<select name="action"><option value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
<input class="button2" type="submit" name="update" value="{L_SUBMIT}" />
<div><a href="#" onclick="marklist('ucp', 'mark', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 'mark', false); return false;">{L_UNMARK_ALL}</a></div>
@@ -187,7 +187,7 @@
<dl>
<dt><label for="default0">{L_USER_GROUP_DEFAULT}{L_COLON}</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
<dd>
- <label for="default1"><input type="radio" name="default" id="default1" value="1" /> {L_YES}</label>
+ <label for="default1"><input type="radio" name="default" id="default1" value="1" /> {L_YES}</label>
<label for="default0"><input type="radio" name="default" id="default0" value="0" checked="checked" /> {L_NO}</label>
</dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html
index d7df3b02c2..e824a7b867 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_membership.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html
@@ -55,7 +55,7 @@
<!-- BEGIN member -->
<!-- IF not member.GROUP_SPECIAL -->
<!-- DEFINE $SHOW_BUTTONS = 1 -->
- <!-- ENDIF -->
+ <!-- ENDIF -->
<li class="row<!-- IF member.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
@@ -73,11 +73,11 @@
</ul>
<!-- ENDIF -->
</div>
-</div>
+</div>
<!-- IF .pending -->
<div class="panel">
- <div class="inner">
+ <div class="inner">
<ul class="topiclist two-columns">
<li class="header">
<dl>
@@ -91,7 +91,7 @@
<!-- BEGIN pending -->
<!-- IF not pending.GROUP_SPECIAL -->
<!-- DEFINE $SHOW_BUTTONS = 1 -->
- <!-- ENDIF -->
+ <!-- ENDIF -->
<li class="row<!-- IF pending.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
@@ -125,7 +125,7 @@
<!-- BEGIN nonmember -->
<!-- IF nonmember.S_CAN_JOIN -->
<!-- DEFINE $SHOW_BUTTONS = 1 -->
- <!-- ENDIF -->
+ <!-- ENDIF -->
<li class="row<!-- IF nonmember.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
@@ -143,7 +143,7 @@
</div>
</div>
<!-- ENDIF -->
-
+
<!-- IF S_CHANGE_DEFAULT or $SHOW_BUTTONS eq 1 -->
<fieldset>
@@ -156,7 +156,7 @@
<!-- IF $SHOW_BUTTONS eq 1 -->
<div class="right-box">
- <label for="action">{L_SELECT}{L_COLON}</label>
+ <label for="action">{L_SELECT}{L_COLON}</label>
<select name="action" id="action">
<option value="join">{L_JOIN_SELECTED}</option>
<option value="resign">{L_RESIGN_SELECTED}</option>
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
index 71e54c12eb..c4b7abdd55 100644
--- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -46,7 +46,7 @@
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{TOPIC_UNAPPROVED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
<a href="{topicrow.U_MCP_REPORT}" title="{TOPIC_REPORTED}">
@@ -82,7 +82,7 @@
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<br />{topicrow.LAST_POST_TIME}</span>
</dd>
<dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
@@ -95,9 +95,9 @@
<div class="action-bar bar-bottom">
<div class="pagination">
{TOTAL_TOPICS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
index aaeb55729f..a3100524ce 100644
--- a/phpBB/styles/prosilver/template/ucp_main_front.html
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -20,7 +20,7 @@
<!-- IF topicrow.S_UNREAD -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
<i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
<!-- IF .topicrow.pagination -->
@@ -51,7 +51,7 @@
<span>{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<br />{topicrow.LAST_POST_TIME}
</span>
</dd>
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index 6cf23bdf31..03c06b84e2 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -40,7 +40,7 @@
<span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL}
<a href="{forumrow.U_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<br />{forumrow.LAST_POST_TIME}</span>
<!-- ELSE -->
{L_NO_POSTS}<br />&nbsp;
@@ -89,7 +89,7 @@
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{TOPIC_UNAPPROVED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
<a href="{topicrow.U_MCP_REPORT}" title="{TOPIC_REPORTED}">
@@ -124,7 +124,7 @@
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<br />{topicrow.LAST_POST_TIME}</span>
</dd>
<dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
@@ -136,9 +136,9 @@
<div class="action-bar bar-bottom">
<div class="pagination">
{TOTAL_TOPICS}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html
index a7eb7fc8fb..32efae17fd 100644
--- a/phpBB/styles/prosilver/template/ucp_notifications.html
+++ b/phpBB/styles/prosilver/template/ucp_notifications.html
@@ -66,12 +66,12 @@
<li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF --><!-- IF notification_list.STYLING --> {notification_list.STYLING}<!-- ENDIF -->">
<dl>
<dt>
- <div class="list-inner">
+ <div class="list-inner">
<!-- IF notification_list.AVATAR -->{notification_list.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
<div class="notifications">
<!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
<p class="notifications_title">{notification_list.FORMATTED_TITLE}<!-- IF notification_list.REFERENCE --> {notification_list.REFERENCE}<!-- ENDIF --></p>
- <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ <!-- IF notification_list.URL --></a><!-- ENDIF -->
<!-- IF notification_list.FORUM --><p class="notifications_forum">{notification_list.FORUM}</p><!-- ENDIF -->
<!-- IF notification_list.REASON --><p class="notifications_reason">{notification_list.REASON}</p><!-- ENDIF -->
<p class="notifications_time">{notification_list.TIME}</p>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index a3d58c8749..a290313df7 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -104,18 +104,18 @@
<select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button2" type="submit" name="submit_mark" value="{L_GO}" />
<div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
</fieldset>
-
+
<hr />
-
+
<div class="action-bar bottom">
<!-- INCLUDE display_options.html -->
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<div class="pagination">
{TOTAL_MESSAGES}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html
index 891e49af6f..169d41bf72 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_post.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html
@@ -12,39 +12,39 @@
<dl>
<dt><label for="bbcode1">{L_DEFAULT_BBCODE}{L_COLON}</label></dt>
<dd>
- <label for="bbcode1"><input type="radio" name="bbcode" id="bbcode1" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="bbcode1"><input type="radio" name="bbcode" id="bbcode1" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="bbcode0"><input type="radio" name="bbcode" id="bbcode0" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="smilies1">{L_DEFAULT_SMILIES}{L_COLON}</label></dt>
<dd>
- <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="sig1">{L_DEFAULT_ADD_SIG}{L_COLON}</label></dt>
<dd>
- <label for="sig1"><input type="radio" name="sig" id="sig1" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="sig1"><input type="radio" name="sig" id="sig1" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="sig0"><input type="radio" name="sig" id="sig0" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="notify1">{L_DEFAULT_NOTIFY}{L_COLON}</label></dt>
<dd>
- <label for="notify1"><input type="radio" name="notify" id="notify1" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="notify1"><input type="radio" name="notify" id="notify1" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notify0"><input type="radio" name="notify" id="notify0" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<!-- EVENT ucp_prefs_post_append -->
</fieldset>
-
+
</div>
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html
index 7f8d0a344c..4b7142fbea 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_view.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html
@@ -13,35 +13,35 @@
<dl>
<dt><label for="images1">{L_VIEW_IMAGES}{L_COLON}</label></dt>
<dd>
- <label for="images1"><input type="radio" name="images" id="images1" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="images1"><input type="radio" name="images" id="images1" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="images0"><input type="radio" name="images" id="images0" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="flash0">{L_VIEW_FLASH}{L_COLON}</label></dt>
<dd>
- <label for="flash1"><input type="radio" name="flash" id="flash1" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="flash1"><input type="radio" name="flash" id="flash1" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="flash0"><input type="radio" name="flash" id="flash0" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="smilies1">{L_VIEW_SMILIES}{L_COLON}</label></dt>
<dd>
- <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="sigs1">{L_VIEW_SIGS}{L_COLON}</label></dt>
<dd>
- <label for="sigs1"><input type="radio" name="sigs" id="sigs1" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="sigs1"><input type="radio" name="sigs" id="sigs1" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="sigs0"><input type="radio" name="sigs" id="sigs0" value="0"<!-- IF not S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="avatars1">{L_VIEW_AVATARS}{L_COLON}</label></dt>
<dd>
- <label for="avatars1"><input type="radio" name="avatars" id="avatars1" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="avatars1"><input type="radio" name="avatars" id="avatars1" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="avatars0"><input type="radio" name="avatars" id="avatars0" value="0"<!-- IF not S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
@@ -49,7 +49,7 @@
<dl>
<dt><label for="wordcensor1">{L_DISABLE_CENSORS}{L_COLON}</label></dt>
<dd>
- <label for="wordcensor1"><input type="radio" name="wordcensor" id="wordcensor1" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="wordcensor1"><input type="radio" name="wordcensor" id="wordcensor1" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="wordcensor0"><input type="radio" name="wordcensor" id="wordcensor0" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
@@ -89,7 +89,7 @@
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
index 462a7f8f20..f62d3cf37d 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
@@ -31,7 +31,7 @@
<dd><input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{PASSWORD_CONFIRM}" class="inputbox" title="{L_CONFIRM_PASSWORD}" autocomplete="off" /></dd>
</dl>
<!-- ENDIF -->
- <!-- EVENT ucp_profile_register_details_after -->
+ <!-- EVENT ucp_profile_register_details_after -->
</fieldset>
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
index 712479dc18..2a0f6e0dea 100644
--- a/phpBB/styles/prosilver/template/ucp_zebra_foes.html
+++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
@@ -32,7 +32,7 @@
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
index fac0a18706..e584d876b8 100644
--- a/phpBB/styles/prosilver/template/ucp_zebra_friends.html
+++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
@@ -34,7 +34,7 @@
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index c17d99be74..05f57ee8a6 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -161,19 +161,19 @@
<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT -->
<a class="unread" href="{topicrow.U_NEWEST_POST}">
<i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
<a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_UNAPPROVED}">
<i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{TOPIC_UNAPPROVED}</span>
- </a>
+ </a>
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_DELETED -->
- <a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_DELETED">
+ <a href="{topicrow.U_MCP_QUEUE}" title="{TOPIC_DELETED}">
<i class="icon fa-recycle fa-fw icon-green" aria-hidden="true"></i><span class="sr-only">{TOPIC_DELETED}</span>
- </a>
- <!-- ENDIF -->
+ </a>
+ <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
<a href="{topicrow.U_MCP_REPORT}" title="{TOPIC_REPORTED}">
<i class="icon fa-exclamation fa-fw icon-red" aria-hidden="true"></i><span class="sr-only">{TOPIC_REPORTED}</span>
@@ -222,7 +222,7 @@
<!-- IF not S_IS_BOT -->
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
- </a>
+ </a>
<!-- ENDIF -->
<br />{topicrow.LAST_POST_TIME}
</span>
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
index 52733afbcf..dd0ca72502 100644
--- a/phpBB/styles/prosilver/template/viewonline_body.html
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -5,9 +5,9 @@
<div class="action-bar bar-top">
<div class="pagination">
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -15,7 +15,7 @@
<div class="forumbg forumbg-table">
<div class="inner">
-
+
<table class="table1">
<!-- IF .user_row -->
@@ -43,7 +43,7 @@
<!-- ENDIF -->
</tbody>
</table>
-
+
</div>
</div>
@@ -51,9 +51,9 @@
<div class="action-bar bar-bottom">
<div class="pagination">
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
{PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 0df6956181..522151cf7d 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -288,7 +288,7 @@
<i class="icon fa-file fa-fw <!-- IF postrow.S_UNREAD_POST -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
</a>
<!-- ENDIF -->
- <span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span>{postrow.POST_DATE}
+ <span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span>{postrow.POST_DATE}
</p>
<!-- EVENT viewtopic_body_postrow_post_details_after -->
@@ -421,7 +421,7 @@
</div>
</div>
<!-- ENDIF -->
-
+
<!-- EVENT viewtopic_dropdown_bottom_custom -->
<!-- IF .pagination or TOTAL_POSTS -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
index 96c514f1d9..397c807bb3 100644
--- a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
+++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
@@ -1,6 +1,6 @@
<!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or U_EMAIL_TOPIC or U_PRINT_TOPIC or S_DISPLAY_TOPIC_TOOLS) -->
<div class="dropdown-container dropdown-button-control topic-tools">
- <span title="{L_PM_TOOLS}" class="button button-secondary dropdown-trigger dropdown-select">
+ <span title="{L_TOPIC_TOOLS}" class="button button-secondary dropdown-trigger dropdown-select">
<i class="icon fa-wrench fa-fw" aria-hidden="true"></i>
<span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
</span>
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index 7f93dbdf89..4c8283fdc0 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -158,7 +158,7 @@ button::-moz-focus-inner {
border: 0
}
-/* Deprecated as of version 3.2
+/* Deprecated as of version 3.2
-------------------------------------------------*/
.small-icon {
background-position: 0 50%;
@@ -178,7 +178,7 @@ button::-moz-focus-inner {
ul.linklist.bulletin > li.small-icon:before {
display: none;
}
-
+
.dropdown .small-icon > a {
display: block;
}
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 4458a59502..d76fd0852a 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -255,7 +255,7 @@ dl.details dd {
color: #FFFFFF;
}
-.jumpbox-cat-link:hover {
+.jumpbox-cat-link:hover {
background-color: #12A3EB;
border-top-color: #12A3EB;
color: #FFFFFF;
diff --git a/phpBB/styles/prosilver/theme/icons.css b/phpBB/styles/prosilver/theme/icons.css
index f5d1b00795..9fb7244f4b 100644
--- a/phpBB/styles/prosilver/theme/icons.css
+++ b/phpBB/styles/prosilver/theme/icons.css
@@ -2,11 +2,11 @@
$Icons
-------------------------------------------------------------- */
-/* Global module setup
+/* Global module setup
--------------------------------*/
/* Renamed version of .fa class for agnostic useage of icon fonts.
- * Just change the name of the font after the 14/1 to the name of
+ * Just change the name of the font after the 14/1 to the name of
* the font you wish to use.
*/
.icon, .button .icon {
@@ -31,7 +31,7 @@
/* Icon size classes - Default size is 14px, use these for small variations */
.icon.icon-xl {
- font-size: 20px;
+ font-size: 20px;
}
.icon.icon-lg {
@@ -61,7 +61,7 @@
.arrow-right .icon {
float: right;
-}
+}
.arrow-right:hover .icon {
margin-left: 5px;
diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css
index a018bbc792..6da14c9326 100644
--- a/phpBB/styles/prosilver/theme/links.css
+++ b/phpBB/styles/prosilver/theme/links.css
@@ -8,7 +8,7 @@ a {
text-decoration: none;
/* we use links inline more often then not so to address several bugs with
IE and some other browsers we render all links as inlineblock by default */
- display: inline-block;
+ display: inline-block;
}
@@ -151,7 +151,7 @@ a.lastsubject:hover {
}
.arrow-up:hover {
-
+
}
.arrow-down {
@@ -159,7 +159,7 @@ a.lastsubject:hover {
}
.arrow-down:hover {
-
+
}
.arrow-left:hover {
diff --git a/phpBB/styles/prosilver/theme/normalize.css b/phpBB/styles/prosilver/theme/normalize.css
index a7ebfad424..23d84492c8 100644
--- a/phpBB/styles/prosilver/theme/normalize.css
+++ b/phpBB/styles/prosilver/theme/normalize.css
@@ -421,4 +421,4 @@ table {
td,
th {
padding: 0;
-} \ No newline at end of file
+}
diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css
index 4fe97d144b..f235f6030e 100644
--- a/phpBB/styles/prosilver/theme/stylesheet.css
+++ b/phpBB/styles/prosilver/theme/stylesheet.css
@@ -1,7 +1,7 @@
/* phpBB3 Style Sheet
--------------------------------------------------------------
Style name: prosilver (the default phpBB 3.1.x style)
- Based on style:
+ Based on style:
Original author: Tom Beddard ( http://www.subblue.com/ )
Modified by: phpBB Limited ( https://www.phpbb.com/ )
--------------------------------------------------------------
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 765599f165..e8698d9916 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -88,6 +88,8 @@ if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
page_footer();
}
+$user->update_session_infos();
+
// Forum info
$sql_ary = array(
'SELECT' => 'f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id',
diff --git a/tests/composer.json b/tests/composer.json
deleted file mode 100644
index 69512f30a6..0000000000
--- a/tests/composer.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "require-dev": {
- "facebook/webdriver": "dev-master"
- }
-}
diff --git a/tests/composer.lock b/tests/composer.lock
deleted file mode 100644
index f714495d84..0000000000
--- a/tests/composer.lock
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
- ],
- "hash": "cf1d8a4841e5e669b148e0df6645a788",
- "packages": [
-
- ],
- "packages-dev": [
- {
- "name": "facebook/webdriver",
- "version": "dev-master",
- "source": {
- "type": "git",
- "url": "https://github.com/facebook/php-webdriver.git",
- "reference": "b6e002e5bf811a8edba393ce6872322c1b7cf796"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/b6e002e5bf811a8edba393ce6872322c1b7cf796",
- "reference": "b6e002e5bf811a8edba393ce6872322c1b7cf796",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.19"
- },
- "require-dev": {
- "phpdocumentor/phpdocumentor": "2.*",
- "phpunit/phpunit": "3.7.*"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "lib/"
- ]
- },
- "notification-url": "http://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "description": "A php client for WebDriver",
- "homepage": "https://github.com/facebook/php-webdriver",
- "keywords": [
- "facebook",
- "php",
- "selenium",
- "webdriver"
- ],
- "time": "2014-08-05 02:55:46"
- }
- ],
- "aliases": [
-
- ],
- "minimum-stability": "stable",
- "stability-flags": {
- "facebook/webdriver": 20
- },
- "platform": [
-
- ],
- "platform-dev": [
-
- ]
-}
diff --git a/tests/extension/ext/vendor2/bar/migrations/bar.php b/tests/extension/ext/vendor2/bar/migrations/bar.php
new file mode 100644
index 0000000000..ea5ddb6b8b
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/migrations/bar.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo\migrations;
+
+class bar
+{
+}
diff --git a/tests/extension/ext/vendor2/bar/migrations/foo.php b/tests/extension/ext/vendor2/bar/migrations/foo.php
new file mode 100644
index 0000000000..d727c2f954
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/migrations/foo.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace vendor2\foo\migrations;
+
+class foo implements \phpbb\db\migration\migration_interface
+{
+ /**
+ * {@inheritdoc}
+ */
+ static public function depends_on()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function effectively_installed()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function update_schema()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function revert_schema()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function update_data()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function revert_data()
+ {
+ return array();
+ }
+}
diff --git a/tests/extension/extension_base_test.php b/tests/extension/extension_base_test.php
index eee38186db..775a23e198 100644
--- a/tests/extension/extension_base_test.php
+++ b/tests/extension/extension_base_test.php
@@ -11,6 +11,9 @@
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/bar.php';
+require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/foo.php';
+require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/migration.php';
class phpbb_extension_extension_base_test extends phpbb_test_case
{
@@ -61,9 +64,7 @@ class phpbb_extension_extension_base_test extends phpbb_test_case
return array(
array(
'vendor2/bar',
- array(
- '\vendor2\bar\migrations\migration',
- ),
+ array('\vendor2\bar\migrations\migration'),
),
);
}
@@ -74,6 +75,8 @@ class phpbb_extension_extension_base_test extends phpbb_test_case
public function test_suffix_get_classes($extension_name, $expected)
{
$extension = $this->extension_manager->get_extension($extension_name);
- $this->assertEquals($expected, self::$reflection_method_get_migration_file_list->invoke($extension));
+ $migration_classes = self::$reflection_method_get_migration_file_list->invoke($extension);
+ sort($migration_classes);
+ $this->assertEquals($expected, $migration_classes);
}
}
diff --git a/tests/files/types_remote_test.php b/tests/files/types_remote_test.php
index a85844ee78..476d8ed3ba 100644
--- a/tests/files/types_remote_test.php
+++ b/tests/files/types_remote_test.php
@@ -20,6 +20,9 @@ class phpbb_files_types_remote_test extends phpbb_test_case
private $filesystem;
+ /** @var \phpbb\config\config */
+ protected $config;
+
/** @var \Symfony\Component\DependencyInjection\ContainerInterface */
protected $container;
@@ -43,6 +46,8 @@ class phpbb_files_types_remote_test extends phpbb_test_case
global $config, $phpbb_root_path, $phpEx;
$config = new \phpbb\config\config(array());
+ $this->config = $config;
+ $this->config->set('remote_upload_verify', 0);
$this->request = $this->getMock('\phpbb\request\request');
$this->filesystem = new \phpbb\filesystem\filesystem();
@@ -67,7 +72,7 @@ class phpbb_files_types_remote_test extends phpbb_test_case
public function test_upload_fsock_fail()
{
- $type_remote = new \phpbb\files\types\remote($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
+ $type_remote = new \phpbb\files\types\remote($this->config, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload->set_allowed_extensions(array('png'));
$type_remote->set_upload($upload);
@@ -85,8 +90,8 @@ class phpbb_files_types_remote_test extends phpbb_test_case
array('500k', 'http://example.com/foo/bar.png'),
array('500M', 'http://example.com/foo/bar.png'),
array('500m', 'http://example.com/foo/bar.png'),
- array('500k', 'http://google.com/.png', 'DISALLOWED_CONTENT'),
- array('1', 'http://google.com/.png', 'WRONG_FILESIZE'),
+ array('500k', 'http://google.com/?.png', array('DISALLOWED_EXTENSION', 'DISALLOWED_CONTENT')),
+ array('1', 'http://google.com/?.png', array('WRONG_FILESIZE')),
array('500g', 'http://example.com/foo/bar.png'),
array('foobar', 'http://example.com/foo/bar.png'),
array('-5k', 'http://example.com/foo/bar.png'),
@@ -96,44 +101,31 @@ class phpbb_files_types_remote_test extends phpbb_test_case
/**
* @dataProvider data_get_max_file_size
*/
- public function test_get_max_file_size($max_file_size, $link, $expected = 'URL_NOT_FOUND')
+ public function test_get_max_file_size($max_file_size, $link, $expected = array('URL_NOT_FOUND'))
{
$php_ini = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper', array('getString'));
$php_ini->expects($this->any())
->method('getString')
->willReturn($max_file_size);
- $type_remote = new \phpbb\files\types\remote($this->factory, $this->language, $php_ini, $this->request, $this->phpbb_root_path);
+ $type_remote = new \phpbb\files\types\remote($this->config, $this->factory, $this->language, $php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload->set_allowed_extensions(array('png'));
$type_remote->set_upload($upload);
$file = $type_remote->upload($link);
- $this->assertSame(array($expected), $file->error);
- }
-
- public function test_upload_timeout()
- {
- $type_remote = new \phpbb\files\types\remote($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
- $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
- $upload->set_allowed_extensions(array('png'));
- $type_remote->set_upload($upload);
- $upload->upload_timeout = -5;
-
- $file = $type_remote->upload('http://google.com/.png');
-
- $this->assertSame(array('REMOTE_UPLOAD_TIMEOUT'), $file->error);
+ $this->assertSame($expected, $file->error);
}
public function test_upload_wrong_path()
{
- $type_remote = new \phpbb\files\types\foo($this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
+ $type_remote = new \phpbb\files\types\foo($this->config, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->php_ini, $this->request, $this->phpbb_root_path);
$upload->set_allowed_extensions(array('png'));
$type_remote->set_upload($upload);
$type_remote::$tempnam_path = $this->phpbb_root_path . 'cache/wrong/path';
- $file = $type_remote->upload('http://google.com/.png');
+ $file = $type_remote->upload('http://google.com/?.png');
$this->assertSame(array('NOT_UPLOADED'), $file->error);
$type_remote::$tempnam_path = '';
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
index 7e0f192b40..b70d49cddd 100644
--- a/tests/functional/fileupload_remote_test.php
+++ b/tests/functional/fileupload_remote_test.php
@@ -45,11 +45,12 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
if (!is_array($config))
{
- $config = array();
+ $config = new \phpbb\config\config(array());
}
$config['rand_seed'] = '';
$config['rand_seed_last_update'] = time() + 600;
+ $config['remote_upload_verify'] = 0;
$this->filesystem = new \phpbb\filesystem\filesystem();
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
@@ -60,7 +61,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
$container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->language, $this->php_ini, new \FastImageSize\FastImageSize(), $this->phpbb_root_path));
$this->factory = new \phpbb\files\factory($container);
$container->set('files.factory', $this->factory);
- $container->set('files.types.remote', new \phpbb\files\types\remote($this->factory, $this->language, $this->php_ini, $this->request, $phpbb_root_path));
+ $container->set('files.types.remote', new \phpbb\files\types\remote($config, $this->factory, $this->language, $this->php_ini, $this->request, $phpbb_root_path));
$this->phpbb_root_path = $phpbb_root_path;
}
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
index d358681ad1..9d284a7e57 100644
--- a/tests/functional/plupload_test.php
+++ b/tests/functional/plupload_test.php
@@ -107,11 +107,11 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
if ($i < self::CHUNKS - 1)
{
- $this->assertContains('{"jsonrpc":"2.0","id":"id","result":null}', self::$client->getResponse()->getContent());
+ $this->assertContains('{"jsonrpc":"2.0","id":"id","result":null}', self::get_content());
}
else
{
- $response = json_decode(self::$client->getResponse()->getContent(), true);
+ $response = json_decode(self::get_content(), true);
$this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
}
@@ -134,7 +134,8 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
'error' => UPLOAD_ERR_OK,
);
- $crawler = self::$client->request(
+ self::$client->setServerParameter('HTTP_X_PHPBB_USING_PLUPLOAD', '1');
+ self::$client->request(
'POST',
$url . '&sid=' . $this->sid,
array(
@@ -144,11 +145,10 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
'real_filename' => 'valid.jpg',
'add_file' => $this->lang('ADD_FILE'),
),
- array('fileupload' => $file),
- array('X-PHPBB-USING-PLUPLOAD' => '1')
+ array('fileupload' => $file)
);
- $response = json_decode(self::$client->getResponse()->getContent(), true);
+ $response = json_decode(self::get_content(), true);
$this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
}
}
diff --git a/tests/installer/installer_config_test.php b/tests/installer/installer_config_test.php
index c8e482e260..13ac325a79 100644
--- a/tests/installer/installer_config_test.php
+++ b/tests/installer/installer_config_test.php
@@ -52,8 +52,8 @@ class phpbb_installer_config_test extends phpbb_test_case
public function test_progress_tracking()
{
- $this->config->set_finished_task('foo');
- $this->config->set_active_module('bar');
+ $this->config->set_finished_task(0);
+ $this->config->set_active_module('bar', 5);
$this->config->set_task_progress_count(10);
$this->config->increment_current_task_progress();
@@ -66,7 +66,8 @@ class phpbb_installer_config_test extends phpbb_test_case
$result = $this->config->get_progress_data();
$expected_result = array(
'last_task_module_name' => 'bar',
- 'last_task_name' => 'foo',
+ 'last_task_module_index' => 5,
+ 'last_task_index' => 0,
'max_task_progress' => 10,
'current_task_progress' => 3,
);
diff --git a/tests/language/language_test.php b/tests/language/language_test.php
index 6a814e39dc..29b4873dcb 100644
--- a/tests/language/language_test.php
+++ b/tests/language/language_test.php
@@ -53,6 +53,25 @@ class phpbb_language_test extends phpbb_test_case
$this->assertFalse($this->lang->is_set(array('PHPBB', 'PHP')));
}
+ public function test_lang_raw()
+ {
+ $this->assertEquals($this->lang->lang_raw('FOO'), 'BAR');
+ $this->assertEquals($this->lang->lang_raw('VOID'), 'VOID');
+ $this->assertEquals($this->lang->lang_raw('ARRY'), array(
+ 0 => 'No posts', // 0
+ 1 => '1 post', // 1
+ 2 => '%d posts', // 2+
+ ));
+ }
+
+ public function test_lang_array()
+ {
+ $this->assertEquals($this->lang->lang_array('FOO'), 'BAR');
+ $this->assertEquals($this->lang->lang_array('VOID'), 'VOID');
+ $this->assertEquals($this->lang->lang_array('ARRY', [0]), 'No posts');
+ $this->assertEquals($this->lang->lang_array('FOO', [2, 3, 'BARZ']), 'BAR');
+ }
+
public function test_lang()
{
// No param
diff --git a/tests/mock/migrator.php b/tests/mock/migrator.php
index 293f115335..4d1aca0a0a 100644
--- a/tests/mock/migrator.php
+++ b/tests/mock/migrator.php
@@ -21,10 +21,6 @@ class phpbb_mock_migrator extends \phpbb\db\migrator
{
}
- public function set_migrations($class_names)
- {
- }
-
public function update()
{
}
diff --git a/tests/mock/phpbb_di_container_builder.php b/tests/mock/phpbb_di_container_builder.php
index 59cdf0bb2b..23dc3d1e8b 100644
--- a/tests/mock/phpbb_di_container_builder.php
+++ b/tests/mock/phpbb_di_container_builder.php
@@ -17,4 +17,14 @@ class phpbb_mock_phpbb_di_container_builder extends \phpbb\di\container_builder
{
return $this->phpbb_root_path . '../../tmp/container.' . $this->php_ext;
}
+
+ /**
+ * Get the filename under which the dumped extensions autoloader will be stored.
+ *
+ * @return string Path for dumped extensions autoloader
+ */
+ protected function get_autoload_filename()
+ {
+ return $this->phpbb_root_path . '../../tmp/autoload.' . $this->php_ext;
+ }
}
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php
index 007441bc92..49dd40fbec 100644
--- a/tests/path_helper/path_helper_test.php
+++ b/tests/path_helper/path_helper_test.php
@@ -135,6 +135,43 @@ class phpbb_path_helper_test extends phpbb_test_case
'/phpbb3-fork/phpBB/app.php',
'./../',
),
+
+ // No correction if the path is already prepend by the web root path
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '//',
+ null,
+ null,
+ '',
+ ),
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '//',
+ 'foo/bar.php',
+ 'bar.php',
+ '',
+ ),
+ array(
+ './../../' . $this->phpbb_root_path . 'test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/app.php/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
+ array(
+ './../' . $this->phpbb_root_path . 'test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
+ array(
+ './../'.$this->phpbb_root_path . 'test.php',
+ '/',
+ '/phpbb3-fork/phpBB/app.php/',
+ '/phpbb3-fork/phpBB/app.php',
+ '',
+ ),
);
}
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index fa50d89a70..27ac64e21d 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -84,11 +84,18 @@ class phpbb_database_test_connection_manager
break;
default:
- $dsn .= 'host=' . $this->config['dbhost'];
-
- if ($this->config['dbport'])
+ if (!empty($this->config['dbport']) && !is_numeric($this->config['dbport']) && $this->dbms['PDO'] != 'pgsql')
+ {
+ $dsn .= 'unix_socket=' . $this->config['dbport'];
+ }
+ else
{
- $dsn .= ';port=' . $this->config['dbport'];
+ $dsn .= 'host=' . $this->config['dbhost'];
+
+ if ($this->config['dbport'])
+ {
+ $dsn .= ';port=' . $this->config['dbport'];
+ }
}
if ($use_db)
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index b91894f9c0..53519617b3 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -16,9 +16,11 @@ require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php';
class phpbb_functional_test_case extends phpbb_test_case
{
+ /** @var \Goutte\Client */
static protected $client;
static protected $cookieJar;
static protected $root_url;
+ static protected $install_success = false;
protected $cache = null;
protected $db = null;
@@ -77,13 +79,15 @@ class phpbb_functional_test_case extends phpbb_test_case
{
parent::setUp();
+ if (!self::$install_success)
+ {
+ $this->fail('Installing phpBB has failed.');
+ }
+
$this->bootstrap();
self::$cookieJar = new CookieJar;
self::$client = new Goutte\Client(array(), null, self::$cookieJar);
- // Reset the curl handle because it is 0 at this point and not a valid
- // resource
- self::$client->getClient()->getCurlMulti()->reset(true);
// Clear the language array so that things
// that were added in other tests are gone
@@ -94,6 +98,8 @@ class phpbb_functional_test_case extends phpbb_test_case
foreach (static::setup_extensions() as $extension)
{
+ $this->purge_cache();
+
$sql = 'SELECT ext_active
FROM ' . EXT_TABLE . "
WHERE ext_name = '" . $db->sql_escape($extension). "'";
@@ -167,7 +173,7 @@ class phpbb_functional_test_case extends phpbb_test_case
*/
static public function get_content()
{
- return self::$client->getResponse()->getContent();
+ return (string) self::$client->getResponse()->getContent();
}
// bootstrap, called after board is set up
@@ -360,17 +366,21 @@ class phpbb_functional_test_case extends phpbb_test_case
$iohandler->set_input('script_path', $parseURL['path']);
$iohandler->set_input('submit_server', 'submit');
- do
- {
- $installer->run();
- }
- while (file_exists($phpbb_root_path . 'store/install_config.php'));
+ $installer->run();
copy($config_file, $config_file_test);
+ self::$install_success = true;
+
+ if (file_exists($phpbb_root_path . 'store/install_config.php'))
+ {
+ self::$install_success = false;
+ @unlink($phpbb_root_path . 'store/install_config.php');
+ }
+
if (file_exists($phpbb_root_path . 'cache/install_lock'))
{
- unlink($phpbb_root_path . 'cache/install_lock');
+ @unlink($phpbb_root_path . 'cache/install_lock');
}
global $phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;
@@ -841,7 +851,7 @@ class phpbb_functional_test_case extends phpbb_test_case
static public function assert_response_html($status_code = 200)
{
// Any output before the doc type means there was an error
- $content = self::$client->getResponse()->getContent();
+ $content = self::get_content();
self::assertNotContains('[phpBB Debug]', $content);
self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.');
@@ -862,7 +872,7 @@ class phpbb_functional_test_case extends phpbb_test_case
static public function assert_response_xml($status_code = 200)
{
// Any output before the xml opening means there was an error
- $content = self::$client->getResponse()->getContent();
+ $content = self::get_content();
self::assertNotContains('[phpBB Debug]', $content);
self::assertStringStartsWith('<?xml', trim($content), 'Output found before XML specification.');
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index e118801972..8b60096081 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -11,6 +11,11 @@
*
*/
+use Facebook\WebDriver\WebDriverBy;
+use Facebook\WebDriver\Exception\WebDriverCurlException;
+use Facebook\WebDriver\Remote\RemoteWebDriver;
+use Facebook\WebDriver\Remote\DesiredCapabilities;
+
require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php';
class phpbb_ui_test_case extends phpbb_test_case
@@ -19,13 +24,15 @@ class phpbb_ui_test_case extends phpbb_test_case
static protected $port = 8910;
/**
- * @var \RemoteWebDriver
+ * @var RemoteWebDriver
*/
static protected $webDriver;
static protected $config;
static protected $root_url;
static protected $already_installed = false;
+ static protected $install_success = false;
+ static protected $db;
static public function setUpBeforeClass()
{
@@ -35,7 +42,7 @@ class phpbb_ui_test_case extends phpbb_test_case
{
self::markTestSkipped('UI test case requires at least PHP 5.3.19.');
}
- else if (!class_exists('\RemoteWebDriver'))
+ else if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
{
self::markTestSkipped(
'Could not find RemoteWebDriver class. ' .
@@ -60,7 +67,7 @@ class phpbb_ui_test_case extends phpbb_test_case
if (!self::$webDriver)
{
try {
- $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox');
+ $capabilities = DesiredCapabilities::firefox();
self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
} catch (WebDriverCurlException $e) {
self::markTestSkipped('PhantomJS webserver is not running.');
@@ -74,6 +81,25 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
+ public function setUp()
+ {
+ if (!self::$install_success)
+ {
+ $this->fail('Installing phpBB has failed.');
+ }
+ }
+
+ protected function tearDown()
+ {
+ parent::tearDown();
+
+ if (self::$db instanceof \phpbb\db\driver\driver_interface)
+ {
+ // Close the database connections again this test
+ self::$db->sql_close();
+ }
+ }
+
static public function visit($path)
{
self::$webDriver->get(self::$root_url . $path);
@@ -98,10 +124,12 @@ class phpbb_ui_test_case extends phpbb_test_case
static public function install_board()
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $db;
self::recreate_database(self::$config);
+ $db = self::get_db();
+
$config_file = $phpbb_root_path . "config.$phpEx";
$config_file_dev = $phpbb_root_path . "config_dev.$phpEx";
$config_file_test = $phpbb_root_path . "config_test.$phpEx";
@@ -194,21 +222,40 @@ class phpbb_ui_test_case extends phpbb_test_case
$iohandler->set_input('script_path', $parseURL['path']);
$iohandler->set_input('submit_server', 'submit');
- do
- {
- $installer->run();
- }
- while (file_exists($phpbb_root_path . 'store/install_config.php'));
+ $installer->run();
copy($config_file, $config_file_test);
+ self::$install_success = true;
+
+ if (file_exists($phpbb_root_path . 'store/install_config.php'))
+ {
+ self::$install_success = false;
+ @unlink($phpbb_root_path . 'store/install_config.php');
+ }
+
if (file_exists($phpbb_root_path . 'cache/install_lock'))
{
- unlink($phpbb_root_path . 'cache/install_lock');
+ @unlink($phpbb_root_path . 'cache/install_lock');
}
global $phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;
$phpbb_container->reset();
unset($phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template);
}
+
+ static protected function get_db()
+ {
+ global $phpbb_root_path, $phpEx;
+ // so we don't reopen an open connection
+ if (!(self::$db instanceof \phpbb\db\driver\driver_interface))
+ {
+ $dbms = self::$config['dbms'];
+ /** @var \phpbb\db\driver\driver_interface $db */
+ $db = new $dbms();
+ $db->sql_connect(self::$config['dbhost'], self::$config['dbuser'], self::$config['dbpasswd'], self::$config['dbname'], self::$config['dbport']);
+ self::$db = $db;
+ }
+ return self::$db;
+ }
}
diff --git a/tests/ui/quick_links_test.php b/tests/ui/quick_links_test.php
index 5bddb44a8b..582aeafcae 100644
--- a/tests/ui/quick_links_test.php
+++ b/tests/ui/quick_links_test.php
@@ -16,7 +16,6 @@
*/
class quick_links_test extends phpbb_ui_test_case
{
-
public function test_quick_links()
{
$this->visit('index.php');
diff --git a/travis/install-phpbb-test-dependencies.sh b/travis/install-phpbb-test-dependencies.sh
deleted file mode 100755
index 25743ff2b1..0000000000
--- a/travis/install-phpbb-test-dependencies.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-set -e
-set -x
-
-cd tests
-php ../composer.phar install --dev --no-interaction --prefer-source
-cd ..
diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh
index 30f79ee0cb..0beaa9ec8c 100755
--- a/travis/setup-phpbb.sh
+++ b/travis/setup-phpbb.sh
@@ -34,7 +34,6 @@ fi
if [ "$NOTESTS" != '1' ]
then
travis/setup-webserver.sh
- travis/install-phpbb-test-dependencies.sh
fi
cd phpBB