aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml1
-rw-r--r--phpBB/adm/style/acp_forums.html8
-rw-r--r--phpBB/adm/style/install_update.html210
-rw-r--r--phpBB/assets/javascript/core.js18
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/composer.json9
-rw-r--r--phpBB/composer.lock162
-rw-r--r--phpBB/config/migrator.yml7
-rw-r--r--phpBB/config/services.yml12
-rw-r--r--phpBB/develop/add_permissions.php2
-rw-r--r--phpBB/develop/benchmark.php2
-rw-r--r--phpBB/develop/merge_attachment_tables.php2
-rw-r--r--phpBB/develop/merge_post_tables.php4
-rw-r--r--phpBB/docs/CREDITS.txt1
-rw-r--r--phpBB/docs/events.md55
-rw-r--r--phpBB/download/file.php7
-rw-r--r--phpBB/includes/acp/acp_database.php28
-rw-r--r--phpBB/includes/acp/acp_extensions.php12
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/acp/acp_icons.php2
-rw-r--r--phpBB/includes/acp/acp_main.php4
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php6
-rw-r--r--phpBB/includes/acp/acp_permissions.php2
-rw-r--r--phpBB/includes/acp/acp_profile.php4
-rw-r--r--phpBB/includes/acp/acp_prune.php4
-rw-r--r--phpBB/includes/acp/acp_reasons.php2
-rw-r--r--phpBB/includes/acp/acp_users.php4
-rw-r--r--phpBB/includes/acp/auth.php2
-rw-r--r--phpBB/includes/functions.php36
-rw-r--r--phpBB/includes/functions_admin.php16
-rw-r--r--phpBB/includes/functions_container.php14
-rw-r--r--phpBB/includes/functions_content.php25
-rw-r--r--phpBB/includes/functions_convert.php4
-rw-r--r--phpBB/includes/functions_install.php2
-rw-r--r--phpBB/includes/functions_user.php2
-rw-r--r--phpBB/includes/message_parser.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php11
-rw-r--r--phpBB/includes/ucp/ucp_profile.php5
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php8
-rw-r--r--phpBB/install/database_update.php2
-rw-r--r--phpBB/install/index.php2
-rw-r--r--phpBB/install/install_convert.php16
-rw-r--r--phpBB/install/install_install.php32
-rw-r--r--phpBB/language/en/acp/forums.php4
-rw-r--r--phpBB/language/en/acp/search.php1
-rw-r--r--phpBB/language/en/common.php16
-rw-r--r--phpBB/language/en/help_faq.php6
-rw-r--r--phpBB/language/en/install.php2
-rw-r--r--phpBB/memberlist.php23
-rw-r--r--phpBB/phpbb/auth/auth.php4
-rw-r--r--phpBB/phpbb/cache/service.php2
-rw-r--r--phpBB/phpbb/console/command/extension/disable.php2
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php2
-rw-r--r--phpBB/phpbb/console/command/extension/purge.php2
-rw-r--r--phpBB/phpbb/controller/helper.php17
-rw-r--r--phpBB/phpbb/cron/task/core/prune_shadow_topics.php4
-rw-r--r--phpBB/phpbb/db/driver/driver.php96
-rw-r--r--phpBB/phpbb/db/driver/driver_interface.php84
-rw-r--r--phpBB/phpbb/db/driver/factory.php435
-rw-r--r--phpBB/phpbb/db/driver/sqlite3.php7
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php2
-rw-r--r--phpBB/phpbb/db/migration/migration.php6
-rw-r--r--phpBB/phpbb/db/migration/tool/config_text.php125
-rw-r--r--phpBB/phpbb/db/migrator.php2
-rw-r--r--phpBB/phpbb/db/sql_insert_buffer.php2
-rw-r--r--phpBB/phpbb/db/tools.php8
-rw-r--r--phpBB/phpbb/event/dispatcher.php5
-rw-r--r--phpBB/phpbb/event/dispatcher_interface.php40
-rw-r--r--phpBB/phpbb/extension/manager.php42
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php4
-rw-r--r--phpBB/phpbb/log/log.php6
-rw-r--r--phpBB/phpbb/path_helper.php103
-rw-r--r--phpBB/phpbb/permissions.php6
-rw-r--r--phpBB/phpbb/profilefields/manager.php37
-rw-r--r--phpBB/phpbb/profilefields/type/type_bool.php18
-rw-r--r--phpBB/phpbb/profilefields/type/type_date.php13
-rw-r--r--phpBB/phpbb/profilefields/type/type_dropdown.php18
-rw-r--r--phpBB/phpbb/profilefields/type/type_int.php12
-rw-r--r--phpBB/phpbb/profilefields/type/type_interface.php9
-rw-r--r--phpBB/phpbb/profilefields/type/type_string_common.php13
-rw-r--r--phpBB/phpbb/search/base.php4
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php8
-rw-r--r--phpBB/phpbb/search/fulltext_native.php10
-rw-r--r--phpBB/phpbb/search/fulltext_postgres.php35
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php6
-rw-r--r--phpBB/phpbb/template/twig/lexer.php2
-rw-r--r--phpBB/phpbb/viewonline_helper.php54
-rw-r--r--phpBB/search.php8
-rw-r--r--phpBB/styles/prosilver/template/ajax.js31
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js296
-rw-r--r--phpBB/styles/prosilver/template/index_body.html28
-rw-r--r--phpBB/styles/prosilver/template/jumpbox.html28
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html13
-rw-r--r--phpBB/styles/prosilver/template/memberlist_search.html18
-rw-r--r--phpBB/styles/prosilver/template/navbar_footer.html18
-rw-r--r--phpBB/styles/prosilver/template/navbar_header.html136
-rw-r--r--phpBB/styles/prosilver/template/pagination.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html27
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html32
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_topic_tools.html8
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css53
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css26
-rw-r--r--phpBB/styles/prosilver/theme/colours.css152
-rw-r--r--phpBB/styles/prosilver/theme/common.css196
-rw-r--r--phpBB/styles/prosilver/theme/content.css12
-rw-r--r--phpBB/styles/prosilver/theme/cp.css10
-rw-r--r--phpBB/styles/prosilver/theme/forms.css28
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_acp.gifbin0 -> 389 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_delete_cookies.gifbin0 -> 108 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_mcp.gifbin0 -> 342 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_profile.gifbin0 -> 538 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_team.gifbin0 -> 1009 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icons_button.pngbin5690 -> 6478 bytes
-rw-r--r--phpBB/styles/prosilver/theme/links.css47
-rw-r--r--phpBB/styles/prosilver/theme/print.css10
-rw-r--r--phpBB/styles/prosilver/theme/responsive.css41
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css10
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_search.html8
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_view.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/viewonline.php9
-rw-r--r--phpBB/viewtopic.php17
-rw-r--r--tests/avatar/manager_test.php1
-rw-r--r--tests/controller/helper_route_test.php1
-rw-r--r--tests/dbal/fixtures/migrator_config_text.xml7
-rw-r--r--tests/dbal/migrator_tool_config_text_test.php75
-rw-r--r--tests/dbal/order_lower_test.php2
-rw-r--r--tests/dbal/select_test.php4
-rw-r--r--tests/dbal/sql_insert_buffer_test.php8
-rw-r--r--tests/extension/ext/barfoo/composer.json8
-rw-r--r--tests/extension/ext/vendor/moo/composer.json8
-rw-r--r--tests/extension/ext/vendor2/bar/composer.json8
-rw-r--r--tests/extension/ext/vendor2/foo/composer.json8
-rw-r--r--tests/extension/manager_test.php46
-rw-r--r--tests/extension/metadata_manager_test.php325
-rw-r--r--tests/functional/download_test.php6
-rw-r--r--tests/functional/feed_test.php6
-rw-r--r--tests/functional/fixtures/ext/foo/bar/composer.json8
-rw-r--r--tests/functional/jumpbox_test.php20
-rw-r--r--tests/functional/mcp_test.php6
-rw-r--r--tests/functional/visibility_softdelete_test.php40
-rw-r--r--tests/functions/build_url_test.php3
-rw-r--r--tests/functions/obtain_online_test.php8
-rw-r--r--tests/functions_content/get_username_string_test.php14
-rw-r--r--tests/log/function_view_log_test.php26
-rw-r--r--tests/mock/controller_helper.php5
-rw-r--r--tests/notification/user_list_trim_test.php8
-rw-r--r--tests/path_helper/path_helper_test.php56
-rw-r--r--tests/profilefields/type_bool_test.php56
-rw-r--r--tests/profilefields/type_date_test.php36
-rw-r--r--tests/profilefields/type_dropdown_test.php48
-rw-r--r--tests/profilefields/type_int_test.php60
-rw-r--r--tests/profilefields/type_string_test.php54
-rw-r--r--tests/profilefields/type_url_test.php30
-rw-r--r--tests/security/redirect_test.php1
-rw-r--r--tests/template/template_events_test.php1
-rw-r--r--tests/template/template_test.php7
-rw-r--r--tests/template/template_test_case.php1
-rw-r--r--tests/template/template_test_case_with_tree.php1
-rw-r--r--tests/template/templates/if_nested_tags.html1
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php27
-rw-r--r--tests/test_framework/phpbb_session_test_case.php1
-rw-r--r--tests/viewonline/helper_test.php46
-rwxr-xr-xtravis/ext-sniff.sh27
171 files changed, 3074 insertions, 1362 deletions
diff --git a/build/build.xml b/build/build.xml
index f2668e2101..7d0068bec9 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -102,6 +102,7 @@
--extensions=php
--standard=build/code_sniffer/ruleset-php-extensions.xml
--ignore=${project.basedir}/phpBB/ext/*/tests/*
+ --ignore=${project.basedir}/phpBB/ext/*/vendor/*
phpBB/ext"
dir="." returnProperty="retval-php-ext" passthru="true" />
<if>
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index f8ea284acb..af79791ff8 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -284,12 +284,12 @@
<label><input type="radio" class="radio" name="enable_shadow_prune" value="0"<!-- IF not S_PRUNE_SHADOW_ENABLE --> id="enable_shadow_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="prune_shadow_freq">{L_AUTO_PRUNE_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
- <dd><input type="number" id="prune_shadow_freq" name="prune_shadow_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
+ <dt><label for="prune_shadow_freq">{L_AUTO_PRUNE_SHADOW_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_FREQ_EXPLAIN}</span></dt>
+ <dd><input type="number" id="prune_shadow_freq" name="prune_shadow_freq" value="{PRUNE_SHADOW_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
- <dt><label for="prune_shadow_days">{L_AUTO_PRUNE_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
- <dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
+ <dt><label for="prune_shadow_days">{L_AUTO_PRUNE_SHADOW_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_DAYS_EXPLAIN}</span></dt>
+ <dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
</fieldset>
</div>
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index 2faa2bb6fa..898233f72d 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -184,72 +184,105 @@
<form id="install_update" method="post" action="{U_UPDATE_ACTION}">
- <!-- IF .up_to_date -->
- <h2>{L_FILES_UP_TO_DATE}</h2>
- <p>{L_FILES_UP_TO_DATE_EXPLAIN}</p>
+ <!-- IF .deleted -->
+ <h2>{L_FILES_DELETED}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('deleted', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_DELETED_EXPLAIN}</p>
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_up_to_date.gif" alt="{L_STATUS_UP_TO_DATE}" /></legend>
- <!-- BEGIN up_to_date -->
+ <fieldset id="deleted">
+ <legend><img src="{T_IMAGE_PATH}icon_delete.gif" alt="{L_STATUS_DELETED}" /></legend>
+ <!-- BEGIN deleted -->
<dl>
- <dd class="full" style="text-align: {S_CONTENT_FLOW_BEGIN};"><strong>{up_to_date.FILENAME}</strong></dd>
+ <dt style="width: 60%;"><strong><!-- IF deleted.DIR_PART -->{deleted.DIR_PART}<br /><!-- ENDIF -->{deleted.FILE_PART}</strong></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">
+ <!-- IF not deleted.S_BINARY -->[<a href="{deleted.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{deleted.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
</dl>
- <!-- END up_to_date -->
+ <!-- END deleted -->
</fieldset>
<!-- ENDIF -->
- <!-- IF .new -->
- <h2>{L_FILES_NEW}</h2>
- <p>{L_FILES_NEW_EXPLAIN}</p>
+ <!-- IF .conflict -->
+ <h2>{L_FILES_CONFLICT}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('conflict', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_CONFLICT_EXPLAIN}</p>
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_new.gif" alt="{L_STATUS_NEW}" /></legend>
- <!-- BEGIN new -->
+ <!-- BEGIN conflict -->
+ <fieldset id="conflict">
+ <legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
<dl>
- <dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
- <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
- </dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
- <!-- IF not new.S_BINARY -->[<a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
- </dd>
- <!-- IF new.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
- <!-- ENDIF -->
+ <dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
+ <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}{L_COLON} {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
+ <!-- IF not conflict.S_BINARY -->[<a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a>]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
+ <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF conflict.S_CUSTOM -->
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
</dl>
- <!-- END new -->
+ <!-- IF conflict.S_BINARY -->
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">&nbsp;</dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
+ <dl>
+ <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ </dl>
+ <!-- ENDIF -->
</fieldset>
+ <!-- END conflict -->
<!-- ENDIF -->
- <!-- IF .not_modified -->
- <h2>{L_FILES_NOT_MODIFIED}</h2>
- <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
- <p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
+ <!-- IF .new_conflict -->
+ <h2>{L_FILES_NEW_CONFLICT}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('new_conflict', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_NEW_CONFLICT_EXPLAIN}</p>
- <fieldset id="not_modified" style="display: none;">
- <legend><img src="{T_IMAGE_PATH}file_not_modified.gif" alt="{L_STATUS_NOT_MODIFIED}" /></legend>
- <!-- BEGIN not_modified -->
+ <fieldset id="new_conflict">
+ <legend><img src="{T_IMAGE_PATH}file_new_conflict.gif" alt="{L_STATUS_NEW_CONFLICT}" /></legend>
+ <!-- BEGIN new_conflict -->
<dl>
- <dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
- <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
- </dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
- <!-- IF not_modified.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
- <!-- ENDIF -->
+ <dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
+ <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ </dt>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
+ <!-- IF not new_conflict.S_BINARY -->[<a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ </dd>
+ <!-- IF new_conflict.S_CUSTOM -->
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- ENDIF -->
</dl>
- <!-- END not_modified -->
+ <!-- END new_conflict -->
</fieldset>
<!-- ENDIF -->
<!-- IF .modified -->
<h2>{L_FILES_MODIFIED}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
<p>{L_FILES_MODIFIED_EXPLAIN}</p>
<!-- BEGIN modified -->
- <fieldset>
+ <fieldset id="modified">
<legend><img src="{T_IMAGE_PATH}file_modified.gif" alt="{L_STATUS_MODIFIED}" /></legend>
<dl>
<dt style="width: 60%;"><strong><!-- IF modified.DIR_PART -->{modified.DIR_PART}<br /><!-- ENDIF -->{modified.FILE_PART}</strong>
@@ -277,91 +310,64 @@
<!-- ENDIF -->
- <!-- IF .new_conflict -->
- <h2>{L_FILES_NEW_CONFLICT}</h2>
- <p>{L_FILES_NEW_CONFLICT_EXPLAIN}</p>
+ <!-- IF .new -->
+ <h2>{L_FILES_NEW}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('new_files', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_NEW_EXPLAIN}</p>
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_new_conflict.gif" alt="{L_STATUS_NEW_CONFLICT}" /></legend>
- <!-- BEGIN new_conflict -->
+ <fieldset id="new_files" style="display: none;">
+ <legend><img src="{T_IMAGE_PATH}file_new.gif" alt="{L_STATUS_NEW}" /></legend>
+ <!-- BEGIN new -->
<dl>
- <dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
- <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
+ <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
- <!-- IF not new_conflict.S_BINARY -->[<a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
+ <!-- IF not new.S_BINARY -->[<a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
</dd>
- <!-- IF new_conflict.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <!-- IF new.S_CUSTOM -->
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
- <!-- END new_conflict -->
+ <!-- END new -->
</fieldset>
<!-- ENDIF -->
- <!-- IF .conflict -->
- <h2>{L_FILES_CONFLICT}</h2>
- <p>{L_FILES_CONFLICT_EXPLAIN}</p>
+ <!-- IF .not_modified -->
+ <h2>{L_FILES_NOT_MODIFIED}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
- <!-- BEGIN conflict -->
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
+ <fieldset id="not_modified" style="display: none;">
+ <legend><img src="{T_IMAGE_PATH}file_not_modified.gif" alt="{L_STATUS_NOT_MODIFIED}" /></legend>
+ <!-- BEGIN not_modified -->
<dl>
- <dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
- <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
- <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}{L_COLON} {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
+ <dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
+ <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
- <!-- IF not conflict.S_BINARY -->[<a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a>]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
- <!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
- </dd>
- <!-- IF conflict.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <!-- IF not_modified.S_CUSTOM -->
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
- <!-- IF conflict.S_BINARY -->
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">&nbsp;</dd>
- </dl>
- <!-- ELSE -->
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
- </dl>
- <dl>
- <dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
- </dl>
- <!-- ENDIF -->
+ <!-- END not_modified -->
</fieldset>
- <!-- END conflict -->
<!-- ENDIF -->
- <!-- IF .deleted -->
- <h2>{L_FILES_DELETED}</h2>
- <p>{L_FILES_DELETED_EXPLAIN}</p>
+ <!-- IF .up_to_date -->
+ <h2>{L_FILES_UP_TO_DATE}</h2>
+ <div style="float: {S_CONTENT_FLOW_END};">&raquo; <a href="#" onclick="phpbb.toggleDisplay('up_to_date', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
+ <p>{L_FILES_UP_TO_DATE_EXPLAIN}</p>
- <fieldset>
- <legend><img src="{T_IMAGE_PATH}icon_delete.gif" alt="{L_STATUS_DELETED}" /></legend>
- <!-- BEGIN deleted -->
+ <fieldset id="up_to_date" style="display: none;">
+ <legend><img src="{T_IMAGE_PATH}file_up_to_date.gif" alt="{L_STATUS_UP_TO_DATE}" /></legend>
+ <!-- BEGIN up_to_date -->
<dl>
- <dt style="width: 60%;"><strong><!-- IF deleted.DIR_PART -->{deleted.DIR_PART}<br /><!-- ENDIF -->{deleted.FILE_PART}</strong></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">
- <!-- IF not deleted.S_BINARY -->[<a href="{deleted.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{deleted.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
- </dd>
+ <dd class="full" style="text-align: {S_CONTENT_FLOW_BEGIN};"><strong>{up_to_date.FILENAME}</strong></dd>
</dl>
- <!-- END deleted -->
+ <!-- END up_to_date -->
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 785aa141f0..2c35875dca 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -1296,11 +1296,29 @@ phpbb.toggleDropdown = function() {
else if ((offset + width + 2) > windowWidth) {
$this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
}
+
+ // Check whether the vertical scrollbar is present.
+ $this.toggleClass('dropdown-nonscroll', this.scrollHeight === $this.innerHeight());
+
});
var freeSpace = parent.offset().left - 4;
if (direction == 'left') {
options.dropdown.css('margin-left', '-' + freeSpace + 'px');
+
+ // Try to position the notification dropdown correctly in RTL-responsive mode
+ if (options.dropdown.hasClass('dropdown-extended')) {
+ var contentWidth,
+ fullFreeSpace = freeSpace + parent.outerWidth();
+
+ options.dropdown.find('.dropdown-contents').each(function() {
+ contentWidth = parseInt($(this).outerWidth());
+ $(this).css({marginLeft: 0, left: 0});
+ });
+
+ var maxOffset = Math.min(contentWidth, fullFreeSpace) + 'px';
+ options.dropdown.css({'width': maxOffset, 'margin-left': '-' + maxOffset});
+ }
} else {
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
}
diff --git a/phpBB/common.php b/phpBB/common.php
index 4b06cd1eda..e96a34938a 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -95,6 +95,8 @@ $phpbb_class_loader->register();
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
$phpbb_class_loader_ext->register();
+phpbb_load_extensions_autoloaders($phpbb_root_path);
+
// Set up container
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 53d2f873f1..9b473a3bb7 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -22,6 +22,13 @@
"phpunit/phpunit": "4.1.*",
"phing/phing": "2.4.*",
"sami/sami": "1.*",
- "squizlabs/php_codesniffer": "1.*"
+ "squizlabs/php_codesniffer": "1.*",
+ "symfony/browser-kit": "2.3.*",
+ "symfony/debug": "2.3.*",
+ "symfony/dom-crawler": "2.3.*",
+ "symfony/filesystem": "2.3.*",
+ "symfony/finder": "2.3.*",
+ "symfony/http-foundation": "2.3.*",
+ "symfony/process": "2.3.*"
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 89973b93d4..751cd0695f 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "300d29b350ca2d75b1fa169fe46470f0",
+ "hash": "dcd46c1373cfc4dacd2e1f8a79da0b91",
"packages": [
{
"name": "lusitanian/oauth",
@@ -108,17 +108,17 @@
},
{
"name": "symfony/config",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Config",
"source": {
"type": "git",
"url": "https://github.com/symfony/Config.git",
- "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21"
+ "reference": "259722b5f2e87d3f487630abfd40f922cf2f6900"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Config/zipball/91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21",
- "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21",
+ "url": "https://api.github.com/repos/symfony/Config/zipball/259722b5f2e87d3f487630abfd40f922cf2f6900",
+ "reference": "259722b5f2e87d3f487630abfd40f922cf2f6900",
"shasum": ""
},
"require": {
@@ -154,21 +154,21 @@
],
"description": "Symfony Config Component",
"homepage": "http://symfony.com",
- "time": "2014-03-31 10:15:50"
+ "time": "2014-04-22 08:09:28"
},
{
"name": "symfony/console",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
- "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7"
+ "reference": "c6c5a354a9945a5e9a9a6a495ca19558eb8639e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Console/zipball/df17996d37eb113a5675ca4cc2ac45f4fc057cb7",
- "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7",
+ "url": "https://api.github.com/repos/symfony/Console/zipball/c6c5a354a9945a5e9a9a6a495ca19558eb8639e9",
+ "reference": "c6c5a354a9945a5e9a9a6a495ca19558eb8639e9",
"shasum": ""
},
"require": {
@@ -209,21 +209,21 @@
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
- "time": "2014-03-01 17:25:29"
+ "time": "2014-05-14 13:35:53"
},
{
"name": "symfony/debug",
- "version": "v2.4.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Debug",
"source": {
"type": "git",
"url": "https://github.com/symfony/Debug.git",
- "reference": "6a8eb9aba50595014fef52d6b4d99b31dfaa6f02"
+ "reference": "ca764f8af9cc4ba5d81b598c1b18b30db5508e18"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Debug/zipball/6a8eb9aba50595014fef52d6b4d99b31dfaa6f02",
- "reference": "6a8eb9aba50595014fef52d6b4d99b31dfaa6f02",
+ "url": "https://api.github.com/repos/symfony/Debug/zipball/ca764f8af9cc4ba5d81b598c1b18b30db5508e18",
+ "reference": "ca764f8af9cc4ba5d81b598c1b18b30db5508e18",
"shasum": ""
},
"require": {
@@ -234,13 +234,14 @@
"symfony/http-kernel": "~2.1"
},
"suggest": {
+ "symfony/class-loader": "",
"symfony/http-foundation": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.4-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -266,21 +267,21 @@
],
"description": "Symfony Debug Component",
"homepage": "http://symfony.com",
- "time": "2014-04-16 10:34:42"
+ "time": "2014-04-29 19:42:43"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/DependencyInjection",
"source": {
"type": "git",
"url": "https://github.com/symfony/DependencyInjection.git",
- "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30"
+ "reference": "5ebd813eac59b4051705a2e29e32f211a966b6ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/41e9e2078e8edf261c11be478300c8fcddb64e30",
- "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30",
+ "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/5ebd813eac59b4051705a2e29e32f211a966b6ca",
+ "reference": "5ebd813eac59b4051705a2e29e32f211a966b6ca",
"shasum": ""
},
"require": {
@@ -324,21 +325,21 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "http://symfony.com",
- "time": "2014-03-27 18:14:33"
+ "time": "2014-05-02 22:42:57"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "15645237c6ff70e74a28e8836362d82492765055"
+ "reference": "cb7cd38c081507d10997553c4c522956a4d2afab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/15645237c6ff70e74a28e8836362d82492765055",
- "reference": "15645237c6ff70e74a28e8836362d82492765055",
+ "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb7cd38c081507d10997553c4c522956a4d2afab",
+ "reference": "cb7cd38c081507d10997553c4c522956a4d2afab",
"shasum": ""
},
"require": {
@@ -380,21 +381,21 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com",
- "time": "2014-02-11 10:29:24"
+ "time": "2014-04-16 10:30:19"
},
{
"name": "symfony/filesystem",
- "version": "v2.4.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Filesystem",
"source": {
"type": "git",
"url": "https://github.com/symfony/Filesystem.git",
- "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4"
+ "reference": "69e476c4db31c43ab7ab797adc5fc73d20aa5571"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a3af8294bcce4a7c1b2892363b0c9d8109affad4",
- "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4",
+ "url": "https://api.github.com/repos/symfony/Filesystem/zipball/69e476c4db31c43ab7ab797adc5fc73d20aa5571",
+ "reference": "69e476c4db31c43ab7ab797adc5fc73d20aa5571",
"shasum": ""
},
"require": {
@@ -403,7 +404,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.4-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -429,33 +430,30 @@
],
"description": "Symfony Filesystem Component",
"homepage": "http://symfony.com",
- "time": "2014-04-16 10:34:31"
+ "time": "2014-04-16 10:30:19"
},
{
"name": "symfony/http-foundation",
- "version": "v2.4.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpFoundation.git",
- "reference": "22c4dee84271ad0cd08d19f26d89f2878e11159b"
+ "reference": "ad7891d4dfe221c5a9edca64b71bdb500f5b026a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/22c4dee84271ad0cd08d19f26d89f2878e11159b",
- "reference": "22c4dee84271ad0cd08d19f26d89f2878e11159b",
+ "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/ad7891d4dfe221c5a9edca64b71bdb500f5b026a",
+ "reference": "ad7891d4dfe221c5a9edca64b71bdb500f5b026a",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
- "require-dev": {
- "symfony/expression-language": "~2.4"
- },
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.4-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -484,21 +482,21 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com",
- "time": "2014-04-18 21:02:05"
+ "time": "2014-05-22 16:20:26"
},
{
"name": "symfony/http-kernel",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpKernel.git",
- "reference": "48d61b3622ca35dd924b167441a9810ad55906ce"
+ "reference": "d8c00747f592183692afaacf622c444c36092613"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/48d61b3622ca35dd924b167441a9810ad55906ce",
- "reference": "48d61b3622ca35dd924b167441a9810ad55906ce",
+ "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/d8c00747f592183692afaacf622c444c36092613",
+ "reference": "d8c00747f592183692afaacf622c444c36092613",
"shasum": ""
},
"require": {
@@ -557,21 +555,21 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com",
- "time": "2014-04-03 05:42:39"
+ "time": "2014-05-31 02:04:21"
},
{
"name": "symfony/routing",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
- "reference": "08afcafd9af22a24a8055669f85d63b863c4711b"
+ "reference": "6e4c9024a04340b83e456a1a24597dba066dcdc9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Routing/zipball/08afcafd9af22a24a8055669f85d63b863c4711b",
- "reference": "08afcafd9af22a24a8055669f85d63b863c4711b",
+ "url": "https://api.github.com/repos/symfony/Routing/zipball/6e4c9024a04340b83e456a1a24597dba066dcdc9",
+ "reference": "6e4c9024a04340b83e456a1a24597dba066dcdc9",
"shasum": ""
},
"require": {
@@ -617,21 +615,21 @@
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
- "time": "2014-03-28 10:34:27"
+ "time": "2014-04-23 13:35:47"
},
{
"name": "symfony/yaml",
- "version": "v2.3.12",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
- "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d"
+ "reference": "2e257c292cfce88bf6c894a03d0fe8d782055aee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/3acf34f6993db3d873fa77ac2cb6e595db00b88d",
- "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d",
+ "url": "https://api.github.com/repos/symfony/Yaml/zipball/2e257c292cfce88bf6c894a03d0fe8d782055aee",
+ "reference": "2e257c292cfce88bf6c894a03d0fe8d782055aee",
"shasum": ""
},
"require": {
@@ -666,7 +664,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com",
- "time": "2014-03-04 16:04:39"
+ "time": "2014-05-12 09:13:35"
},
{
"name": "twig/twig",
@@ -2170,17 +2168,17 @@
},
{
"name": "symfony/browser-kit",
- "version": "v2.3.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/BrowserKit",
"source": {
"type": "git",
"url": "https://github.com/symfony/BrowserKit.git",
- "reference": "2639dc4eec81f92760e05396a93bb78000b4f5ca"
+ "reference": "bc6cb0fe5196ecfe183483791928ed525ac41728"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/2639dc4eec81f92760e05396a93bb78000b4f5ca",
- "reference": "2639dc4eec81f92760e05396a93bb78000b4f5ca",
+ "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/bc6cb0fe5196ecfe183483791928ed525ac41728",
+ "reference": "bc6cb0fe5196ecfe183483791928ed525ac41728",
"shasum": ""
},
"require": {
@@ -2223,21 +2221,21 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "http://symfony.com",
- "time": "2013-07-21 12:12:18"
+ "time": "2014-04-22 14:58:51"
},
{
"name": "symfony/css-selector",
- "version": "v2.3.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/CssSelector",
"source": {
"type": "git",
"url": "https://github.com/symfony/CssSelector.git",
- "reference": "885544201cb24e79754da1dbd61bd779c2e4353e"
+ "reference": "2ff53e8a7870b453836e879b083b971d455e174d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/CssSelector/zipball/885544201cb24e79754da1dbd61bd779c2e4353e",
- "reference": "885544201cb24e79754da1dbd61bd779c2e4353e",
+ "url": "https://api.github.com/repos/symfony/CssSelector/zipball/2ff53e8a7870b453836e879b083b971d455e174d",
+ "reference": "2ff53e8a7870b453836e879b083b971d455e174d",
"shasum": ""
},
"require": {
@@ -2276,21 +2274,21 @@
],
"description": "Symfony CssSelector Component",
"homepage": "http://symfony.com",
- "time": "2013-07-21 12:12:18"
+ "time": "2014-05-12 09:13:35"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.3.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/DomCrawler",
"source": {
"type": "git",
"url": "https://github.com/symfony/DomCrawler.git",
- "reference": "e05e07fe8958a304b5e135f8e65d4ae6148cf59b"
+ "reference": "5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/e05e07fe8958a304b5e135f8e65d4ae6148cf59b",
- "reference": "e05e07fe8958a304b5e135f8e65d4ae6148cf59b",
+ "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8",
+ "reference": "5dd259d7842480fa7c5d4a45c4f911bd6fb60bc8",
"shasum": ""
},
"require": {
@@ -2331,21 +2329,21 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com",
- "time": "2013-07-21 12:12:18"
+ "time": "2014-05-26 22:15:18"
},
{
"name": "symfony/finder",
- "version": "v2.3.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Finder",
"source": {
"type": "git",
"url": "https://github.com/symfony/Finder.git",
- "reference": "4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1"
+ "reference": "32949721cc76afd75e4ac60d14ac3cf55b10a768"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Finder/zipball/4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1",
- "reference": "4a0fee5b86f5bbd9dfdc11ec124eba2915737ce1",
+ "url": "https://api.github.com/repos/symfony/Finder/zipball/32949721cc76afd75e4ac60d14ac3cf55b10a768",
+ "reference": "32949721cc76afd75e4ac60d14ac3cf55b10a768",
"shasum": ""
},
"require": {
@@ -2380,21 +2378,21 @@
],
"description": "Symfony Finder Component",
"homepage": "http://symfony.com",
- "time": "2013-08-13 20:18:00"
+ "time": "2014-05-22 13:42:36"
},
{
"name": "symfony/process",
- "version": "v2.3.4",
+ "version": "v2.3.16",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
"url": "https://github.com/symfony/Process.git",
- "reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b"
+ "reference": "2cd7d075df6cb0d564c069a66408b3877c07d4e3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Process/zipball/1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b",
- "reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b",
+ "url": "https://api.github.com/repos/symfony/Process/zipball/2cd7d075df6cb0d564c069a66408b3877c07d4e3",
+ "reference": "2cd7d075df6cb0d564c069a66408b3877c07d4e3",
"shasum": ""
},
"require": {
@@ -2429,7 +2427,7 @@
],
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
- "time": "2013-08-22 06:42:25"
+ "time": "2014-05-17 21:49:26"
}
],
"aliases": [
diff --git a/phpBB/config/migrator.yml b/phpBB/config/migrator.yml
index 202421c09f..cd04eea5c2 100644
--- a/phpBB/config/migrator.yml
+++ b/phpBB/config/migrator.yml
@@ -29,6 +29,13 @@ services:
tags:
- { name: migrator.tool }
+ migrator.tool.config_text:
+ class: phpbb\db\migration\tool\config_text
+ arguments:
+ - @config_text
+ tags:
+ - { name: migrator.tool }
+
migrator.tool.module:
class: phpbb\db\migration\tool\module
arguments:
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index 72eeae9b15..a44d2e1aed 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -96,6 +96,7 @@ services:
- @config
- @controller.provider
- @ext.manager
+ - @symfony_request
- %core.root_path%
- %core.php_ext%
@@ -139,6 +140,11 @@ services:
- @service_container
dbal.conn:
+ class: phpbb\db\driver\factory
+ arguments:
+ - @service_container
+
+ dbal.conn.driver:
class: %dbal.driver.class%
calls:
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
@@ -299,6 +305,7 @@ services:
arguments:
- @symfony_request
- @filesystem
+ - @request
- %core.root_path%
- %core.php_ext%
- %core.adm_relative_path%
@@ -354,3 +361,8 @@ services:
- @cache
- @config
- @user
+
+ viewonline_helper:
+ class: phpbb\viewonline_helper
+ arguments:
+ - @filesystem
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
index 7639256cfd..fd419a7dde 100644
--- a/phpBB/develop/add_permissions.php
+++ b/phpBB/develop/add_permissions.php
@@ -371,7 +371,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
switch ($sql_type)
{
case 'insert':
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php
index 27176c97d3..c3cf90773e 100644
--- a/phpBB/develop/benchmark.php
+++ b/phpBB/develop/benchmark.php
@@ -313,7 +313,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
else
{
// Rollback
- if($db->sql_layer == "mysql")
+ if($db->get_sql_layer() == "mysql")
{
$sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $new_post_id";
diff --git a/phpBB/develop/merge_attachment_tables.php b/phpBB/develop/merge_attachment_tables.php
index a23db829e5..dd6e12172e 100644
--- a/phpBB/develop/merge_attachment_tables.php
+++ b/phpBB/develop/merge_attachment_tables.php
@@ -48,7 +48,7 @@ $sql = "CREATE TABLE {$table_prefix}attachments
AND a.post_id = p.post_id";
$db->sql_query($sql);
-switch ($db->sql_layer)
+switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
diff --git a/phpBB/develop/merge_post_tables.php b/phpBB/develop/merge_post_tables.php
index 700c509782..9e81917108 100644
--- a/phpBB/develop/merge_post_tables.php
+++ b/phpBB/develop/merge_post_tables.php
@@ -46,7 +46,7 @@ $sql = "CREATE TABLE {$table_prefix}posts
WHERE pt.post_id = p.post_id";
$db->sql_query($sql);
-switch ($db->sql_layer)
+switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
@@ -142,7 +142,7 @@ while ($row = $db->sql_fetchrow($result))
}
$db->sql_freeresult($result);
-switch ($db->sql_layer)
+switch ($db->get_sql_layer())
{
case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt
index a4ba4cb87c..edb6361b2a 100644
--- a/phpBB/docs/CREDITS.txt
+++ b/phpBB/docs/CREDITS.txt
@@ -28,6 +28,7 @@ phpBB Developers: bantu (Andreas Fischer)
imkingdavid (David King)
marc1706 (Marc Alexander)
nickvergessen (Joas Schilling)
+ nicofuma (Tristan Darricau)
prototech (Cesar Gallegos)
For a list of phpBB Team members, please see:
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 34f2c4b6ec..f1c03672c3 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -246,21 +246,21 @@ index_body_block_stats_prepend
* Since: 3.1.0-b3
* Purpose: Prepend content to the statistics list on the Board index
-index_body_linklist_after
+index_body_markforums_after
===
* Locations:
+ styles/prosilver/template/index_body.html
+ styles/subsilver2/template/index_body.html
-* Since: 3.1.0-a3
-* Purpose: Add content after the linklist above the forum list on Board index
+* Since: 3.1.0-RC2
+* Purpose: Add content after the mark-read link above the forum list on Board index
-index_body_linklist_before
+index_body_markforums_before
===
* Locations:
+ styles/prosilver/template/index_body.html
+ styles/subsilver2/template/index_body.html
-* Since: 3.1.0-a3
-* Purpose: Add content before the linklist above the forum list on Board index
+* Since: 3.1.0-RC2
+* Purpose: Add content before the mark-read link above the forum list on Board index
index_body_stat_blocks_after
===
@@ -344,25 +344,54 @@ memberlist_view_user_statistics_before
* Since: 3.1.0-a1
* Purpose: Add entries before the user statistics part of any user profile
-navbar_header_username_append
+navbar_header_logged_out_content
===
* Locations:
+ styles/prosilver/template/navbar_header.html
-* Since: 3.1.0-b4
-* Purpose: Add text and HTMl after the username shown in the navbar.
+* Since: 3.1.0-RC1
+* Purpose: Add text and HTML in place of the username when not logged in.
-navbar_header_logged_out_content
+navbar_header_profile_list_after
===
* Locations:
+ styles/prosilver/template/navbar_header.html
-* Since: 3.1.0-b4
-* Purpose: Add text and HTML in place of the username when not logged in.
+* Since: 3.1.0-RC2
+* Purpose: Add links to the bottom of the profile drop-down menu in the header navbar
+
+navbar_header_profile_list_before
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-RC2
+* Purpose: Add links to the top of the profile drop-down menu in the header navbar
+
+navbar_header_quick_links_after
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-RC2
+* Purpose: Add links to the bottom of the quick-links drop-down menu in the header
+
+navbar_header_quick_links_before
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-RC2
+* Purpose: Add links to the top of the quick-links drop-down menu in the header
+
+navbar_header_username_append
+===
+* Locations:
+ + styles/prosilver/template/navbar_header.html
+* Since: 3.1.0-RC1
+* Purpose: Add text and HTMl after the username shown in the navbar.
navbar_header_username_prepend
===
* Locations:
+ styles/prosilver/template/navbar_header.html
-* Since: 3.1.0-b4
+* Since: 3.1.0-RC1
+* Purpose: Add text and HTMl before the username shown in the navbar.
overall_footer_after
===
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index ce2855473b..abafeee667 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -59,6 +59,8 @@ if (isset($_GET['avatar']))
$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
$phpbb_class_loader_ext->register();
+ phpbb_load_extensions_autoloaders($phpbb_root_path);
+
// Set up container
$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
@@ -73,11 +75,6 @@ if (isset($_GET['avatar']))
$db = $phpbb_container->get('dbal.conn');
$phpbb_log = $phpbb_container->get('log');
- // Connect to DB
- if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
- {
- exit;
- }
unset($dbpasswd);
request_var('', 0, false, false, $request);
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 76da43341d..8f9c155ffc 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -90,7 +90,7 @@ class acp_database
$time = time();
$filename = 'backup_' . $time . '_' . unique_id();
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysqli':
case 'mysql4':
@@ -133,7 +133,7 @@ class acp_database
else
{
// We might wanna empty out all that junk :D
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -320,7 +320,7 @@ class acp_database
break;
}
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
@@ -365,10 +365,10 @@ class acp_database
{
trigger_error($user->lang['RESTORE_FAILURE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- pg_put_line($db->db_connect_id, $sub . "\n");
+ pg_put_line($db->get_db_connect_id(), $sub . "\n");
}
- pg_put_line($db->db_connect_id, "\\.\n");
- pg_end_copy($db->db_connect_id);
+ pg_put_line($db->get_db_connect_id(), "\\.\n");
+ pg_end_copy($db->get_db_connect_id());
}
}
break;
@@ -623,7 +623,7 @@ class mysql_extractor extends base_extractor
if ($new_extract === null)
{
- if ($db->sql_layer === 'mysqli' || version_compare($db->sql_server_info(true), '3.23.20', '>='))
+ if ($db->get_sql_layer() === 'mysqli' || version_compare($db->sql_server_info(true), '3.23.20', '>='))
{
$new_extract = true;
}
@@ -646,7 +646,7 @@ class mysql_extractor extends base_extractor
function write_data($table_name)
{
global $db;
- if ($db->sql_layer === 'mysqli')
+ if ($db->get_sql_layer() === 'mysqli')
{
$this->write_data_mysqli($table_name);
}
@@ -661,7 +661,7 @@ class mysql_extractor extends base_extractor
global $db;
$sql = "SELECT *
FROM $table_name";
- $result = mysqli_query($db->db_connect_id, $sql, MYSQLI_USE_RESULT);
+ $result = mysqli_query($db->get_db_connect_id(), $sql, MYSQLI_USE_RESULT);
if ($result != false)
{
$fields_cnt = mysqli_num_fields($result);
@@ -740,7 +740,7 @@ class mysql_extractor extends base_extractor
global $db;
$sql = "SELECT *
FROM $table_name";
- $result = mysql_unbuffered_query($sql, $db->db_connect_id);
+ $result = mysql_unbuffered_query($sql, $db->get_db_connect_id());
if ($result != false)
{
@@ -993,11 +993,11 @@ class sqlite_extractor extends base_extractor
{
global $db;
- $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name);
+ $col_types = sqlite_fetch_column_types($db->get_db_connect_id(), $table_name);
$sql = "SELECT *
FROM $table_name";
- $result = sqlite_unbuffered_query($db->db_connect_id, $sql);
+ $result = sqlite_unbuffered_query($db->get_db_connect_id(), $sql);
$rows = sqlite_fetch_all($result, SQLITE_ASSOC);
$sql_insert = 'INSERT INTO ' . $table_name . ' (' . implode(', ', array_keys($col_types)) . ') VALUES (';
foreach ($rows as $row)
@@ -1553,11 +1553,11 @@ class mssql_extractor extends base_extractor
{
global $db;
- if ($db->sql_layer === 'mssql')
+ if ($db->get_sql_layer() === 'mssql')
{
$this->write_data_mssql($table_name);
}
- else if($db->sql_layer === 'mssqlnative')
+ else if($db->get_sql_layer() === 'mssqlnative')
{
$this->write_data_mssqlnative($table_name);
}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index b2a6820461..aba9caaece 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -137,7 +137,7 @@ class acp_extensions
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- if ($phpbb_extension_manager->enabled($ext_name))
+ if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
@@ -162,7 +162,7 @@ class acp_extensions
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- if ($phpbb_extension_manager->enabled($ext_name))
+ if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
@@ -194,7 +194,7 @@ class acp_extensions
break;
case 'disable_pre':
- if (!$phpbb_extension_manager->enabled($ext_name))
+ if (!$phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
@@ -209,7 +209,7 @@ class acp_extensions
break;
case 'disable':
- if (!$phpbb_extension_manager->enabled($ext_name))
+ if (!$phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
@@ -234,7 +234,7 @@ class acp_extensions
break;
case 'delete_data_pre':
- if ($phpbb_extension_manager->enabled($ext_name))
+ if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
@@ -248,7 +248,7 @@ class acp_extensions
break;
case 'delete_data':
- if ($phpbb_extension_manager->enabled($ext_name))
+ if ($phpbb_extension_manager->is_enabled($ext_name))
{
redirect($this->u_action);
}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index f8c463e158..adf5de44f5 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1827,7 +1827,7 @@ class acp_forums
}
$db->sql_freeresult($result);
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql4':
case 'mysqli':
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index b9a6ef17ce..028025b547 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -538,7 +538,7 @@ class acp_icons
// The user has already selected a smilies_pak file
if ($current == 'delete')
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 247460ec8e..0d0d49774c 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -269,7 +269,7 @@ class acp_main
break;
case 'db_track':
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -374,7 +374,7 @@ class acp_main
foreach ($tables as $table)
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 9715b9bce8..cd3616208d 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -253,7 +253,7 @@ class acp_permission_roles
{
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->get_any_char()) . "
AND auth_option <> '{$permission_type}'
ORDER BY auth_option_id";
$result = $db->sql_query($sql);
@@ -315,7 +315,7 @@ class acp_permission_roles
// We need to fill the auth options array with ACL_NO options ;)
$sql = 'SELECT auth_option_id, auth_option
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . "
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->get_any_char()) . "
AND auth_option <> '{$permission_type}'
ORDER BY auth_option_id";
$result = $db->sql_query($sql);
@@ -519,7 +519,7 @@ class acp_permission_roles
// Get complete auth array
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->get_any_char());
$result = $db->sql_query($sql);
$auth_settings = array();
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 6540173433..cb408e304f 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -1238,7 +1238,7 @@ class acp_permissions
$sql = 'SELECT auth_option_id
FROM ' . ACL_OPTIONS_TABLE . '
- WHERE auth_option ' . $db->sql_like_expression($permission_type . $db->any_char);
+ WHERE auth_option ' . $db->sql_like_expression($permission_type . $db->get_any_char());
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index c291ee43c8..fda6ef25ec 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -112,7 +112,7 @@ class acp_profile
$db->sql_query('DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . " WHERE field_id = $field_id");
$db->sql_query('DELETE FROM ' . PROFILE_LANG_TABLE . " WHERE field_id = $field_id");
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -1196,7 +1196,7 @@ class acp_profile
{
global $db;
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 2ddda28afc..a10b248324 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -436,8 +436,8 @@ class acp_prune
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
$where_sql = '';
- $where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
- $where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
+ $where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
+ $where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
$where_sql .= $joined_sql;
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 9cb5efdbe0..3d7ccf422c 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -219,7 +219,7 @@ class acp_reasons
$other_reason_id = (int) $db->sql_fetchfield('reason_id');
$db->sql_freeresult($result);
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
// The ugly one!
case 'mysqli':
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index d07120a65f..71880c2267 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2384,7 +2384,7 @@ class acp_users
// Select auth options
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . '
- WHERE auth_option ' . $db->sql_like_expression($db->any_char . '_') . '
+ WHERE auth_option ' . $db->sql_like_expression($db->get_any_char() . '_') . '
AND is_global = 1
ORDER BY auth_option';
$result = $db->sql_query($sql);
@@ -2404,7 +2404,7 @@ class acp_users
{
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option " . $db->sql_like_expression($db->any_char . '_') . "
+ WHERE auth_option " . $db->sql_like_expression($db->get_any_char() . '_') . "
AND is_local = 1
ORDER BY is_global DESC, auth_option";
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 7bb8e824d6..7ff3212b72 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -1024,7 +1024,7 @@ class auth_admin extends \phpbb\auth\auth
// Get permission type
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char);
+ WHERE auth_option " . $db->sql_like_expression($permission_type . $db->get_any_char());
$result = $db->sql_query($sql);
$auth_id_ary = array();
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 32acb0c9ff..9d5770069d 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -21,6 +21,37 @@ if (!defined('IN_PHPBB'))
// Common global functions
/**
+* Load the autoloaders added by the extensions.
+*
+* @param string $phpbb_root_path Path to the phpbb root directory.
+*/
+function phpbb_load_extensions_autoloaders($phpbb_root_path)
+{
+ $iterator = new \RecursiveIteratorIterator(
+ new \phpbb\recursive_dot_prefix_filter_iterator(
+ new \RecursiveDirectoryIterator(
+ $phpbb_root_path . 'ext/',
+ \FilesystemIterator::SKIP_DOTS
+ )
+ ),
+ \RecursiveIteratorIterator::SELF_FIRST
+ );
+ $iterator->setMaxDepth(2);
+
+ foreach ($iterator as $file_info)
+ {
+ if ($file_info->getFilename() === 'vendor' && $iterator->getDepth() === 2)
+ {
+ $filename = $file_info->getRealPath() . '/autoload.php';
+ if (file_exists($filename))
+ {
+ require $filename;
+ }
+ }
+ }
+}
+
+/**
* Casts a variable to the given type.
*
* @deprecated
@@ -3998,7 +4029,7 @@ function obtain_guest_count($item_id = 0, $item = 'forum')
// Get number of online guests
- if ($db->sql_layer === 'sqlite' || $db->sql_layer === 'sqlite3')
+ if ($db->get_sql_layer() === 'sqlite' || $db->get_sql_layer() === 'sqlite3')
{
$sql = 'SELECT COUNT(session_ip) as num_guests
FROM (
@@ -4881,6 +4912,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0,
'CURRENT_USER_AVATAR' => phpbb_get_user_avatar($user->data),
+ 'CURRENT_USERNAME_SIMPLE' => get_username_string('no_profile', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
'CURRENT_USERNAME_FULL' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
@@ -5064,7 +5096,7 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb
if (isset($GLOBALS['starttime']))
{
$totaltime = microtime(true) - $GLOBALS['starttime'];
- $debug_info[] = sprintf('<abbr title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</abbr>', $db->sql_time, ($totaltime - $db->sql_time), $totaltime);
+ $debug_info[] = sprintf('<abbr title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</abbr>', $db->get_sql_time(), ($totaltime - $db->get_sql_time()), $totaltime);
}
$debug_info[] = sprintf('<abbr title="Cached: %d">Queries: %d</abbr>', $db->sql_num_queries(true), $db->sql_num_queries());
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 6bf8ce2c81..accc8a6a83 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1435,7 +1435,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
{
case 'topic_moved':
$db->sql_transaction('begin');
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql4':
case 'mysqli':
@@ -2441,7 +2441,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
// Clear table
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -2491,7 +2491,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
AND NOT (ug.group_leader = 1 AND g.group_skip_auth = 1)
AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
AND ug.user_pending = 0
- AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char),
+ AND o.auth_option " . $db->sql_like_expression('m_' . $db->get_any_char()),
);
$sql = $db->sql_build_query('SELECT', $sql_ary_deny);
$result = $db->sql_query($sql);
@@ -2697,11 +2697,11 @@ function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
return;
}
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysqli':
case 'mysql4':
- $sql = 'DELETE ' . (($db->sql_layer === 'mysqli' || version_compare($db->sql_server_info(true), '4.1', '>=')) ? 'z.*' : ZEBRA_TABLE) . '
+ $sql = 'DELETE ' . (($db->get_sql_layer() === 'mysqli' || version_compare($db->sql_server_info(true), '4.1', '>=')) ? 'z.*' : ZEBRA_TABLE) . '
FROM ' . ZEBRA_TABLE . ' z, ' . USER_GROUP_TABLE . ' ug
WHERE z.zebra_id = ug.user_id
AND z.foe = 1
@@ -2854,7 +2854,7 @@ function get_database_size()
$database_size = false;
// This code is heavily influenced by a similar routine in phpMyAdmin 2.2.0
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
@@ -2870,7 +2870,7 @@ function get_database_size()
if (preg_match('#(3\.23|[45]\.)#', $version))
{
- $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname;
+ $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
$sql = 'SHOW TABLE STATUS
FROM ' . $db_name;
@@ -2946,7 +2946,7 @@ function get_database_size()
if ($row['proname'] == 'pg_database_size')
{
- $database = $db->dbname;
+ $database = $db->get_db_name();
if (strpos($database, '.') !== false)
{
list($database, ) = explode('.', $database);
diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php
index 5794d2f403..a00613c26b 100644
--- a/phpBB/includes/functions_container.php
+++ b/phpBB/includes/functions_container.php
@@ -64,9 +64,10 @@ function phpbb_bootstrap_table_prefix($config_file)
*
* @param string $config_file
* @param string $phpbb_root_path
+* @param \phpbb\db\driver\driver_interface $db The generated connection
* @return array enabled extensions
*/
-function phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path)
+function phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path, &$db)
{
$db = phpbb_bootstrap_db_connection($config_file);
$table_prefix = phpbb_bootstrap_table_prefix($config_file);
@@ -133,7 +134,7 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext)
$container->setParameter('core.php_ext', $php_ext);
$container->setParameter('core.table_prefix', '');
- $container->register('dbal.conn')->setSynthetic(true);
+ $container->register('dbal.conn.driver')->setSynthetic(true);
$container->setAlias('cache.driver', 'cache.driver.install');
@@ -259,9 +260,10 @@ function phpbb_create_dumped_container_unless_debug($config_file, array $extensi
function phpbb_create_default_container($phpbb_root_path, $php_ext)
{
$config_file = $phpbb_root_path . 'config.' . $php_ext;
- $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
+ $db = null;
+ $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path, $db);
- return phpbb_create_dumped_container_unless_debug(
+ $container = phpbb_create_dumped_container_unless_debug(
$config_file,
array(
new \phpbb\di\extension\config($config_file),
@@ -275,6 +277,10 @@ function phpbb_create_default_container($phpbb_root_path, $php_ext)
$phpbb_root_path,
$php_ext
);
+
+ $container->get('dbal.conn')->set_driver($db);
+
+ return $container;
}
/**
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 74b3e0c70f..ee78364083 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -174,8 +174,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
$template->assign_block_vars('jumpbox_forums', array(
'FORUM_ID' => ($select_all) ? 0 : -1,
'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'],
- 'S_FORUM_COUNT' => $iteration)
- );
+ 'S_FORUM_COUNT' => $iteration,
+ 'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $forum_id)),
+ ));
$iteration++;
$display_jumpbox = true;
@@ -188,8 +189,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
'S_FORUM_COUNT' => $iteration,
'S_IS_CAT' => ($row['forum_type'] == FORUM_CAT) ? true : false,
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
- 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false)
- );
+ 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false,
+ 'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $row['forum_id'])),
+ ));
for ($i = 0; $i < $padding; $i++)
{
@@ -1334,9 +1336,9 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
global $phpbb_root_path, $phpEx;
$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u={USER_ID}');
- $_profile_cache['tpl_noprofile'] = '{USERNAME}';
+ $_profile_cache['tpl_noprofile'] = '<span class="username">{USERNAME}</span>';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
- $_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>';
+ $_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}" class="username">{USERNAME}</a>';
$_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';
}
@@ -1452,16 +1454,19 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
/**
* Add an option to the quick-mod tools.
*
+ * @param string $url The recepting URL for the quickmod actions.
* @param string $option The language key for the value of the option.
* @param string $lang_string The language string to use.
*/
-function phpbb_add_quickmod_option($option, $lang_string)
+function phpbb_add_quickmod_option($url, $option, $lang_string)
{
- global $template, $user;
+ global $template, $user, $phpbb_path_helper;
+
$lang_string = $user->lang($lang_string);
$template->assign_block_vars('quickmod', array(
- 'VALUE' => $option,
- 'TITLE' => $lang_string,
+ 'VALUE' => $option,
+ 'TITLE' => $lang_string,
+ 'LINK' => $phpbb_path_helper->append_url_params($url, array('action' => $option)),
));
}
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 864a43c6e7..9d480692e9 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1647,7 +1647,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
switch ($sql_type)
{
case 'insert':
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
@@ -2041,7 +2041,7 @@ function update_topics_posted()
{
global $db, $config;
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index b5d1573d12..06f49e4b50 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -290,7 +290,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
switch ($dbms_details['DRIVER'])
{
case 'phpbb\db\driver\mysqli':
- if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<'))
+ if (version_compare(mysqli_get_server_info($db->get_db_connect_id()), '4.1.3', '<'))
{
$error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index d11193e4b0..d39be50251 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1137,7 +1137,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
// Update log
$log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_';
- // Add to moderator log, admin log and user notes
+ // Add to admin log, moderator log and user notes
add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
if ($mode == 'user')
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 8d926ec70a..da27d8900d 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1350,7 +1350,7 @@ class parse_message extends bbcode_firstpass
// NOTE: obtain_* function? chaching the table contents?
// For now setting the ttl to 10 minutes
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index f42200d249..94383b935f 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -85,7 +85,16 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Editing information
if ($message_row['message_edit_count'] && $config['display_last_edited'])
{
- $l_edited_by = '<br /><br />' . $user->lang('EDITED_TIMES_TOTAL', (int) $message_row['message_edit_count'], (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true));
+ if (!$message_row['message_edit_user'])
+ {
+ $display_username = get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour']);
+ }
+ else
+ {
+ $edit_user_info = get_user_information($message_row['message_edit_user'], false);
+ $display_username = get_username_string('full', $message_row['message_edit_user'], $edit_user_info['username'], $edit_user_info['user_colour']);
+ }
+ $l_edited_by = '<br /><br />' . $user->lang('EDITED_TIMES_TOTAL', (int) $message_row['message_edit_count'], $display_username, $user->format_date($message_row['message_edit_time'], false, true));
}
else
{
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 5ba5f1e830..a315b167d7 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -393,8 +393,9 @@ class ucp_profile
}
$template->assign_vars(array(
- 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'JABBER' => $data['jabber'],
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'S_JABBER_ENABLED' => $config['jab_enable'],
+ 'JABBER' => $data['jabber'],
));
// Get additional profile fields and assign them to the template block var 'profile_fields'
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 84e9e8c462..01447a6232 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -92,7 +92,7 @@ function phpbb_insert_forums()
$src_db->sql_query("SET NAMES 'utf8'");
}
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
@@ -289,7 +289,7 @@ function phpbb_insert_forums()
}
$src_db->sql_freeresult($result);
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'postgres':
$db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));');
@@ -1768,7 +1768,7 @@ function phpbb_create_userconv_table()
global $db, $src_db, $convert, $table_prefix, $user, $lang;
$map_dbms = '';
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mysql':
$map_dbms = 'mysql_40';
@@ -1796,7 +1796,7 @@ function phpbb_create_userconv_table()
break;
default:
- $map_dbms = $db->sql_layer;
+ $map_dbms = $db->get_sql_layer();
break;
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index c349d71563..63e4e8f4ac 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -176,7 +176,7 @@ header('Content-type: text/html; charset=UTF-8');
<br />
- <p><?php echo $user->lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
+ <p><?php echo $user->lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->get_sql_layer(); ?></strong><br />
<?php echo $user->lang['PREVIOUS_VERSION']; ?> :: <strong><?php echo $config['version']; ?></strong><br />
<?php
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index bff7b75b18..c8a745825a 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -688,7 +688,7 @@ class module
));
// Rollback if in transaction
- if ($db->transaction)
+ if ($db->get_transaction())
{
$db->sql_transaction('rollback');
}
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index a0d5e802e6..6109f5e28b 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -248,7 +248,7 @@ class install_convert extends module
));
}
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -727,7 +727,7 @@ class install_convert extends module
$src_db->sql_query("SET NAMES 'binary'");
}
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -1129,7 +1129,7 @@ class install_convert extends module
if (!empty($schema['autoincrement']))
{
- switch ($db->sql_layer)
+ 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'] . '));');
@@ -1268,7 +1268,7 @@ class install_convert extends module
if (!empty($schema['autoincrement']))
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
@@ -1301,7 +1301,7 @@ class install_convert extends module
if ($sql_flag === true)
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
// If MySQL, we'll wait to have num_wait_rows rows to submit at once
case 'mysql':
@@ -1396,7 +1396,7 @@ class install_convert extends module
if (!empty($schema['autoincrement']))
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
@@ -1635,7 +1635,7 @@ class install_convert extends module
'RESULT' => $user->lang['DONE'],
));
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
$template->assign_vars(array(
'S_ERROR_BOX' => true,
@@ -1808,7 +1808,7 @@ class install_convert extends module
global $convert;
// Can we use IGNORE with this DBMS?
- $sql_ignore = (strpos($db->sql_layer, 'mysql') === 0 && !defined('DEBUG')) ? 'IGNORE ' : '';
+ $sql_ignore = (strpos($db->get_sql_layer(), 'mysql') === 0 && !defined('DEBUG')) ? 'IGNORE ' : '';
$insert_query = 'INSERT ' . $sql_ignore . 'INTO ' . $schema['target'] . ' (';
$aliases = array();
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 5f8c0c277c..43fd6eaf07 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1532,10 +1532,10 @@ class install_install extends module
$_module->update_module_data($module_data, true);
// Check for last sql error happened
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ $error = $db->sql_error($db->get_sql_error_sql());
+ $this->p_master->db_error($error['message'], $db->get_sql_error_sql(), __LINE__, __FILE__);
}
$categories[$cat_name]['id'] = (int) $module_data['module_id'];
@@ -1566,10 +1566,10 @@ class install_install extends module
$_module->update_module_data($module_data, true);
// Check for last sql error happened
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ $error = $db->sql_error($db->get_sql_error_sql());
+ $this->p_master->db_error($error['message'], $db->get_sql_error_sql(), __LINE__, __FILE__);
}
$categories[$level2_name]['id'] = (int) $module_data['module_id'];
@@ -1606,10 +1606,10 @@ class install_install extends module
$_module->update_module_data($module_data, true);
// Check for last sql error happened
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ $error = $db->sql_error($db->get_sql_error_sql());
+ $this->p_master->db_error($error['message'], $db->get_sql_error_sql(), __LINE__, __FILE__);
}
}
}
@@ -1772,10 +1772,10 @@ class install_install extends module
$_module->update_module_data($module_data, true);
// Check for last sql error happened
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ $error = $db->sql_error($db->get_sql_error_sql());
+ $this->p_master->db_error($error['message'], $db->get_sql_error_sql(), __LINE__, __FILE__);
}
}
}
@@ -1824,10 +1824,10 @@ class install_install extends module
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack));
$installed_languages[] = (int) $db->sql_nextid();
- if ($db->sql_error_triggered)
+ if ($db->get_sql_error_triggered())
{
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
+ $error = $db->sql_error($db->get_sql_error_sql());
+ $this->p_master->db_error($error['message'], $db->get_sql_error_sql(), __LINE__, __FILE__);
}
}
}
@@ -1913,7 +1913,7 @@ class install_install extends module
if (!$user_id)
{
// If we can't insert this user then continue to the next one to avoid inconsistent data
- $this->p_master->db_error('Unable to insert bot into users table', $db->sql_error_sql, __LINE__, __FILE__, true);
+ $this->p_master->db_error('Unable to insert bot into users table', $db->get_sql_error_sql(), __LINE__, __FILE__, true);
continue;
}
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index b4f0f060e9..541d05c255 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -44,6 +44,10 @@ $lang = array_merge($lang, array(
'AUTO_PRUNE_FREQ_EXPLAIN' => 'Time in days between pruning events.',
'AUTO_PRUNE_VIEWED' => 'Auto-prune post viewed age',
'AUTO_PRUNE_VIEWED_EXPLAIN' => 'Number of days since topic was viewed after which topic is removed.',
+ 'AUTO_PRUNE_SHADOW_FREQ' => 'Auto-prune shadow topics frequency',
+ 'AUTO_PRUNE_SHADOW_DAYS' => 'Auto-prune shadow topics age',
+ 'AUTO_PRUNE_SHADOW_DAYS_EXPLAIN' => 'Number of days after which shadow topic is removed.',
+ 'AUTO_PRUNE_SHADOW_FREQ_EXPLAIN' => 'Time in days between pruning events.',
'CONTINUE' => 'Continue',
'COPY_PERMISSIONS' => 'Copy permissions from',
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index f5bec89c2f..564d9dd04c 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -60,7 +60,6 @@ $lang = array_merge($lang, array(
'FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.',
'FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.',
- 'FULLTEXT_POSTGRES_TS_NOT_USABLE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL 8.3 and above.',
'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts',
'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version',
'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 61baef663b..dbef16c5f2 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -64,7 +64,7 @@ $lang = array_merge($lang, array(
'ACCOUNT_DEACTIVATED' => 'Your account has been manually deactivated and is only able to be reactivated by an administrator.',
'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet.',
'ACP' => 'Administration Control Panel',
- 'ACP_SHORT' => 'Administer',
+ 'ACP_SHORT' => 'ACP',
'ACTIVE' => 'active',
'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.',
'ADMINISTRATOR' => 'Administrator',
@@ -393,7 +393,7 @@ $lang = array_merge($lang, array(
'MB' => 'MB',
'MIB' => 'MiB',
'MCP' => 'Moderator Control Panel',
- 'MCP_SHORT' => 'Moderate',
+ 'MCP_SHORT' => 'MCP',
'MEMBERLIST' => 'Members',
'MEMBERLIST_EXPLAIN' => 'View complete list of members',
'MERGE' => 'Merge',
@@ -595,6 +595,8 @@ $lang = array_merge($lang, array(
'PRIVATE_MESSAGING' => 'Private messaging',
'PROFILE' => 'User Control Panel',
+ 'QUICK_LINKS' => 'Quick links',
+
'RANK' => 'Rank',
'READING_FORUM' => 'Viewing topics in %s',
'READING_GLOBAL_ANNOUNCE' => 'Reading global announcement',
@@ -661,15 +663,15 @@ $lang = array_merge($lang, array(
'SEARCH_ADV_EXPLAIN' => 'View the advanced search options',
'SEARCH_KEYWORDS' => 'Search for keywords',
'SEARCHING_FORUMS' => 'Searching forums',
- 'SEARCH_ACTIVE_TOPICS' => 'View active topics',
+ 'SEARCH_ACTIVE_TOPICS' => 'Active topics',
'SEARCH_FOR' => 'Search for',
'SEARCH_FORUM' => 'Search this forum…',
- 'SEARCH_NEW' => 'View new posts',
+ 'SEARCH_NEW' => 'New posts',
'SEARCH_POSTS_BY' => 'Search posts by',
- 'SEARCH_SELF' => 'View your posts',
+ 'SEARCH_SELF' => 'Your posts',
'SEARCH_TOPIC' => 'Search this topic…',
- 'SEARCH_UNANSWERED' => 'View unanswered posts',
- 'SEARCH_UNREAD' => 'View unread posts',
+ 'SEARCH_UNANSWERED' => 'Unanswered posts',
+ 'SEARCH_UNREAD' => 'Unread posts',
'SEARCH_USER_POSTS' => 'Search user’s posts',
'SECONDS' => 'Seconds',
'SEE_ALL' => 'See All',
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index 102dffcd5b..904dc92080 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -121,7 +121,7 @@ $help = array(
),
array(
0 => 'How do I add a signature to my post?',
- 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the <em>Attach a signature</em> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in your profile. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.'
+ 1 => 'To add a signature to a post you must first create one via your User Control Panel. Once created, you can check the <em>Attach a signature</em> box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio button in the User Control Panel. If you do so, you can still prevent a signature being added to individual posts by un-checking the add signature box within the posting form.'
),
array(
0 => 'How do I create a poll?',
@@ -153,7 +153,7 @@ $help = array(
),
array(
0 => 'What is the “Save” button for in topic posting?',
- 1 => 'This allows you to save passages to be completed and submitted at a later date. To reload a saved passage, visit the User Control Panel.'
+ 1 => 'This allows you to save drafts to be completed and submitted at a later date. To reload a saved draft, visit the User Control Panel.'
),
array(
0 => 'Why does my post need to be approved?',
@@ -254,7 +254,7 @@ $help = array(
),
array(
0 => 'I keep getting unwanted private messages!',
- 1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.'
+ 1 => 'You can automatically delete private messages from a user by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, report the messages to the moderators; they have the power to prevent a user from sending private messages.'
),
array(
0 => 'I have received a spamming or abusive email from someone on this board!',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 39e4a42611..65448e3299 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -345,7 +345,7 @@ $lang = array_merge($lang, array(
'SUB_LICENSE' => 'License',
'SUB_SUPPORT' => 'Support',
'SUCCESSFUL_CONNECT' => 'Successful connection',
- 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&amp;t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
+ 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=486">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>Extensions / Styles</h2><p>For issues relating to Extensions, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=451">Extensions Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=471">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&amp;t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/documentation/3.1/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
'SYNC_FORUMS' => 'Starting to synchronise forums',
'SYNC_POST_COUNT' => 'Synchronising post_counts',
'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 63541dbee6..4f4dcb1b41 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -799,7 +799,7 @@ switch ($mode)
$sql = 'SELECT username, user_id, user_colour
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_type', array(USER_NORMAL, USER_FOUNDER)) . '
- AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->any_char);
+ AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
$result = $db->sql_query_limit($sql, 10);
$user_list = array();
@@ -829,8 +829,14 @@ switch ($mode)
$pagination = $phpbb_container->get('pagination');
// Sorting
- $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'k' => $user->lang['JABBER']);
- $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber');
+ $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']);
+ $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts');
+
+ if ($config['jab_enable'])
+ {
+ $sort_key_text['k'] = $user->lang['JABBER'];
+ $sort_key_sql['k'] = 'u.user_jabber';
+ }
if ($auth->acl_get('a_user'))
{
@@ -920,9 +926,9 @@ switch ($mode)
$s_find_active_time .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
}
- $sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
- $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
- $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
+ $sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
+ $sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
+ $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
if (isset($find_key_match[$joined_select]) && sizeof($joined) == 3)
@@ -1016,12 +1022,12 @@ switch ($mode)
{
for ($i = 97; $i < 123; $i++)
{
- $sql_where .= ' AND u.username_clean NOT ' . $db->sql_like_expression(chr($i) . $db->any_char);
+ $sql_where .= ' AND u.username_clean NOT ' . $db->sql_like_expression(chr($i) . $db->get_any_char());
}
}
else if ($first_char)
{
- $sql_where .= ' AND u.username_clean ' . $db->sql_like_expression(substr($first_char, 0, 1) . $db->any_char);
+ $sql_where .= ' AND u.username_clean ' . $db->sql_like_expression(substr($first_char, 0, 1) . $db->get_any_char());
}
// Are we looking at a usergroup? If so, fetch additional info
@@ -1286,6 +1292,7 @@ switch ($mode)
'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false,
+ 'S_JABBER_ENABLED' => $config['jab_enable'],
'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)),
'S_FORM_NAME' => $form,
diff --git a/phpBB/phpbb/auth/auth.php b/phpBB/phpbb/auth/auth.php
index 20c60364d8..65249275d4 100644
--- a/phpBB/phpbb/auth/auth.php
+++ b/phpBB/phpbb/auth/auth.php
@@ -1043,7 +1043,7 @@ class auth
{
if (strpos($auth_options, '%') !== false)
{
- $sql_opts = "AND $key " . $db->sql_like_expression(str_replace('%', $db->any_char, $auth_options));
+ $sql_opts = "AND $key " . $db->sql_like_expression(str_replace('%', $db->get_any_char(), $auth_options));
}
else
{
@@ -1074,7 +1074,7 @@ class auth
{
if (strpos($option, '%') !== false)
{
- $sql[] = $key . ' ' . $db->sql_like_expression(str_replace('%', $db->any_char, $option));
+ $sql[] = $key . ' ' . $db->sql_like_expression(str_replace('%', $db->get_any_char(), $option));
}
else
{
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index e47177758a..d6bf150384 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -305,7 +305,7 @@ class service
{
if (($bots = $this->driver->get('_bots')) === false)
{
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mssql':
case 'mssql_odbc':
diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php
index 5f0e74b984..c04848aa01 100644
--- a/phpBB/phpbb/console/command/extension/disable.php
+++ b/phpBB/phpbb/console/command/extension/disable.php
@@ -37,7 +37,7 @@ class disable extends command
$this->manager->disable($name);
$this->manager->load_extensions();
- if ($this->manager->enabled($name))
+ if ($this->manager->is_enabled($name))
{
$output->writeln("<error>Could not disable extension $name</error>");
return 1;
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index 05e1d927c6..86a034cdf4 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -37,7 +37,7 @@ class enable extends command
$this->manager->enable($name);
$this->manager->load_extensions();
- if ($this->manager->enabled($name))
+ if ($this->manager->is_enabled($name))
{
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_ENABLE', time(), array($name));
$output->writeln("<info>Successfully enabled extension $name</info>");
diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php
index 4e57641d83..841598b90a 100644
--- a/phpBB/phpbb/console/command/extension/purge.php
+++ b/phpBB/phpbb/console/command/extension/purge.php
@@ -37,7 +37,7 @@ class purge extends command
$this->manager->purge($name);
$this->manager->load_extensions();
- if ($this->manager->enabled($name))
+ if ($this->manager->is_enabled($name))
{
$output->writeln("<error>Could not purge extension $name</error>");
return 1;
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index 930bc42a98..e330fb5b6d 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -40,6 +40,9 @@ class helper
*/
protected $config;
+ /* @var \phpbb\symfony_request */
+ protected $symfony_request;
+
/**
* phpBB root path
* @var string
@@ -60,14 +63,16 @@ class helper
* @param \phpbb\config\config $config Config object
* @param \phpbb\controller\provider $provider Path provider
* @param \phpbb\extension\manager $manager Extension manager object
+ * @param \phpbb\symfony_request $symfony_request Symfony Request object
* @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP extension
*/
- public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, \phpbb\symfony_request $symfony_request, $phpbb_root_path, $php_ext)
{
$this->template = $template;
$this->user = $user;
$this->config = $config;
+ $this->symfony_request = $symfony_request;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$provider->find_routing_files($manager->get_finder());
@@ -151,4 +156,14 @@ class helper
return $this->render('message_body.html', $this->user->lang('INFORMATION'), $code);
}
+
+ /**
+ * Return the current url
+ *
+ * @return string
+ */
+ public function get_current_url()
+ {
+ return generate_board_url(true) . $this->symfony_request->getRequestUri();
+ }
}
diff --git a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
index 381483c798..83a2460454 100644
--- a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
+++ b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
@@ -45,11 +45,11 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
* @param string $phpbb_root_path The root path
* @param string $php_ext The PHP extension
* @param \phpbb\config\config $config The config
- * @param \phpbb\db\driver\driver $db The db connection
+ * @param \phpbb\db\driver\driver_interface $db The db connection
* @param \phpbb\log\log $log The phpBB log system
* @param \phpbb\user $user The phpBB user object
*/
- public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\log\log $log, \phpbb\user $user)
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\log\log $log, \phpbb\user $user)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 3d4aa95606..3e9110d8bc 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -87,6 +87,102 @@ abstract class driver implements driver_interface
}
/**
+ * {@inheritdoc}
+ */
+ public function get_sql_layer()
+ {
+ return $this->sql_layer;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_db_name()
+ {
+ return $this->dbname;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_any_char()
+ {
+ return $this->any_char;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_one_char()
+ {
+ return $this->one_char;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_db_connect_id()
+ {
+ return $this->db_connect_id;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_triggered()
+ {
+ return $this->sql_error_triggered;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_sql()
+ {
+ return $this->sql_error_sql;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_transaction()
+ {
+ return $this->transaction;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_time()
+ {
+ return $this->sql_time;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_returned()
+ {
+ return $this->sql_error_returned;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_multi_insert()
+ {
+ return $this->multi_insert;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_multi_insert($multi_insert)
+ {
+ $this->multi_insert = $multi_insert;
+ }
+
+ /**
* {@inheritDoc}
*/
function sql_return_on_error($fail = false)
diff --git a/phpBB/phpbb/db/driver/driver_interface.php b/phpBB/phpbb/db/driver/driver_interface.php
index 7f7d341e2d..6722d059a5 100644
--- a/phpBB/phpbb/db/driver/driver_interface.php
+++ b/phpBB/phpbb/db/driver/driver_interface.php
@@ -16,6 +16,90 @@ namespace phpbb\db\driver;
interface driver_interface
{
/**
+ * Gets the name of the sql layer.
+ *
+ * @return string
+ */
+ public function get_sql_layer();
+
+ /**
+ * Gets the name of the database.
+ *
+ * @return string
+ */
+ public function get_db_name();
+
+ /**
+ * Wildcards for matching any (%) character within LIKE expressions
+ *
+ * @return string
+ */
+ public function get_any_char();
+
+ /**
+ * Wildcards for matching exactly one (_) character within LIKE expressions
+ *
+ * @return string
+ */
+ public function get_one_char();
+
+ /**
+ * Gets the time spent into the queries
+ *
+ * @return int
+ */
+ public function get_sql_time();
+
+ /**
+ * Gets the connect ID.
+ *
+ * @return mixed
+ */
+ public function get_db_connect_id();
+
+ /**
+ * Indicates if an error was triggered.
+ *
+ * @return bool
+ */
+ public function get_sql_error_triggered();
+
+ /**
+ * Gets the last faulty query
+ *
+ * @return string
+ */
+ public function get_sql_error_sql();
+
+ /**
+ * Indicates if we are in a transaction.
+ *
+ * @return bool
+ */
+ public function get_transaction();
+
+ /**
+ * Gets the returned error.
+ *
+ * @return array
+ */
+ public function get_sql_error_returned();
+
+ /**
+ * Indicates if multiple insertion can be used
+ *
+ * @return bool
+ */
+ public function get_multi_insert();
+
+ /**
+ * Set if multiple insertion can be used
+ *
+ * @param bool $multi_insert
+ */
+ public function set_multi_insert($multi_insert);
+
+ /**
* Gets the exact number of rows in a specified table.
*
* @param string $table_name Table name
diff --git a/phpBB/phpbb/db/driver/factory.php b/phpBB/phpbb/db/driver/factory.php
new file mode 100644
index 0000000000..f0fa18051b
--- /dev/null
+++ b/phpBB/phpbb/db/driver/factory.php
@@ -0,0 +1,435 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\driver;
+
+use \Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+* Database Abstraction Layer
+*/
+class factory implements driver_interface
+{
+ /**
+ * @var driver_interface
+ */
+ protected $driver = null;
+
+ /**
+ * @var ContainerInterface
+ */
+ protected $container;
+
+ /**
+ * Constructor.
+ *
+ * @param ContainerInterface $container A ContainerInterface instance
+ */
+ public function __construct(ContainerInterface $container)
+ {
+ $this->container = $container;
+ }
+
+ /**
+ * Return the current driver (and retrieved it from the container if necessary)
+ *
+ * @return driver_interface
+ */
+ protected function get_driver()
+ {
+ if ($this->driver === null)
+ {
+ $this->driver = $this->container->get('dbal.conn.driver');
+ }
+
+ return $this->driver;
+ }
+
+ /**
+ * Set the current driver
+ *
+ * @param driver_interface $driver
+ */
+ public function set_driver(driver_interface $driver)
+ {
+ $this->driver = $driver;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_layer()
+ {
+ return $this->get_driver()->get_sql_layer();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_db_name()
+ {
+ return $this->get_driver()->get_db_name();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_any_char()
+ {
+ return $this->get_driver()->get_any_char();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_one_char()
+ {
+ return $this->get_driver()->get_one_char();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_db_connect_id()
+ {
+ return $this->get_driver()->get_db_connect_id();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_triggered()
+ {
+ return $this->get_driver()->get_sql_error_triggered();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_sql()
+ {
+ return $this->get_driver()->get_sql_error_sql();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_transaction()
+ {
+ return $this->get_driver()->get_transaction();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_time()
+ {
+ return $this->get_driver()->get_sql_time();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_sql_error_returned()
+ {
+ return $this->get_driver()->get_sql_error_returned();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_multi_insert()
+ {
+ return $this->get_driver()->get_multi_insert();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_multi_insert($multi_insert)
+ {
+ $this->get_driver()->set_multi_insert($multi_insert);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_row_count($table_name)
+ {
+ return $this->get_driver()->get_row_count($table_name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_estimated_row_count($table_name)
+ {
+ return $this->get_driver()->get_estimated_row_count($table_name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_lower_text($column_name)
+ {
+ return $this->get_driver()->sql_lower_text($column_name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_error($sql = '')
+ {
+ return $this->get_driver()->sql_error($sql);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_buffer_nested_transactions()
+ {
+ return $this->get_driver()->sql_buffer_nested_transactions();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_bit_or($column_name, $bit, $compare = '')
+ {
+ return $this->get_driver()->sql_bit_or($column_name, $bit, $compare);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_server_info($raw = false, $use_cache = true)
+ {
+ return $this->get_driver()->sql_server_info($raw, $use_cache);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_return_on_error($fail = false)
+ {
+ return $this->get_driver()->sql_return_on_error($fail);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_build_array($query, $assoc_ary = array())
+ {
+ return $this->get_driver()->sql_build_array($query, $assoc_ary);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_fetchrowset($query_id = false)
+ {
+ return $this->get_driver()->sql_fetchrowset($query_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_transaction($status = 'begin')
+ {
+ return $this->get_driver()->sql_transaction($status);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return $this->get_driver()->sql_concatenate($expr1, $expr2);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_case($condition, $action_true, $action_false = false)
+ {
+ return $this->get_driver()->sql_case($condition, $action_true, $action_false);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_build_query($query, $array)
+ {
+ return $this->get_driver()->sql_build_query($query, $array);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_fetchfield($field, $rownum = false, $query_id = false)
+ {
+ return $this->get_driver()->sql_fetchfield($field, $rownum, $query_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_fetchrow($query_id = false)
+ {
+ return $this->get_driver()->sql_fetchrow($query_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function cast_expr_to_bigint($expression)
+ {
+ return $this->get_driver()->cast_expr_to_bigint($expression);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_nextid()
+ {
+ return $this->get_driver()->sql_nextid();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_add_num_queries($cached = false)
+ {
+ return $this->get_driver()->sql_add_num_queries($cached);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ return $this->get_driver()->sql_query_limit($query, $total, $offset, $cache_ttl);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_query($query = '', $cache_ttl = 0)
+ {
+ return $this->get_driver()->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function cast_expr_to_string($expression)
+ {
+ return $this->get_driver()->cast_expr_to_string($expression);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
+ {
+ throw new \Exception('Disabled method.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_bit_and($column_name, $bit, $compare = '')
+ {
+ return $this->get_driver()->sql_bit_and($column_name, $bit, $compare);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_freeresult($query_id = false)
+ {
+ return $this->get_driver()->sql_freeresult($query_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_num_queries($cached = false)
+ {
+ return $this->get_driver()->sql_num_queries($cached);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_multi_insert($table, $sql_ary)
+ {
+ return $this->get_driver()->sql_multi_insert($table, $sql_ary);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_affectedrows()
+ {
+ return $this->get_driver()->sql_affectedrows();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_close()
+ {
+ return $this->get_driver()->sql_close();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_rowseek($rownum, &$query_id)
+ {
+ return $this->get_driver()->sql_rowseek($rownum, $query_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_escape($msg)
+ {
+ return $this->get_driver()->sql_escape($msg);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_like_expression($expression)
+ {
+ return $this->get_driver()->sql_like_expression($expression);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_report($mode, $query = '')
+ {
+ return $this->get_driver()->sql_report($mode, $query);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
+ {
+ return $this->get_driver()->sql_in_set($field, $array, $negate, $allow_empty_set);
+ }
+}
diff --git a/phpBB/phpbb/db/driver/sqlite3.php b/phpBB/phpbb/db/driver/sqlite3.php
index 6511c755a0..0922229e0a 100644
--- a/phpBB/phpbb/db/driver/sqlite3.php
+++ b/phpBB/phpbb/db/driver/sqlite3.php
@@ -50,9 +50,10 @@ class sqlite3 extends \phpbb\db\driver\driver
$this->dbo = new \SQLite3($this->server, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
$this->db_connect_id = true;
}
- catch (Exception $e)
+ catch (\Exception $e)
{
- return array('message' => $e->getMessage());
+ $this->connect_error = $e->getMessage();
+ return array('message' => $this->connect_error);
}
return true;
@@ -280,7 +281,7 @@ class sqlite3 extends \phpbb\db\driver\driver
*/
protected function _sql_error()
{
- if (class_exists('SQLite3', false))
+ if (class_exists('SQLite3', false) && isset($this->dbo))
{
$error = array(
'message' => $this->dbo->lastErrorMsg(),
diff --git a/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
index edcc69e1bf..648ae9ce96 100644
--- a/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
+++ b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
@@ -37,7 +37,7 @@ class local_url_bbcode extends \phpbb\db\migration\migration
{
$sql = 'SELECT *
FROM ' . BBCODES_TABLE . '
- WHERE bbcode_match ' . $this->db->sql_like_expression($this->db->any_char . 'LOCAL_URL' . $this->db->any_char);
+ WHERE bbcode_match ' . $this->db->sql_like_expression($this->db->get_any_char() . 'LOCAL_URL' . $this->db->get_any_char());
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php
index db3c587f82..9b08da0125 100644
--- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php
@@ -36,7 +36,7 @@ class release_3_0_4 extends \phpbb\db\migration\migration
public function rename_log_delete_topic()
{
- if ($this->db->sql_layer == 'oracle')
+ if ($this->db->get_sql_layer() == 'oracle')
{
// log_operation is CLOB - but we can change this later
$sql = 'UPDATE ' . $this->table_prefix . "log
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php
index d86c4d6986..1843c3f262 100644
--- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php
@@ -76,7 +76,7 @@ class release_3_0_7_rc1 extends \phpbb\db\migration\migration
{
// Delete all text-templates from the template_data
$sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
- WHERE template_filename ' . $this->db->sql_like_expression($this->db->any_char . '.txt');
+ WHERE template_filename ' . $this->db->sql_like_expression($this->db->get_any_char() . '.txt');
$this->sql_query($sql);
}
}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php
index 24340c8cf1..06e46d522f 100644
--- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php
@@ -89,7 +89,7 @@ class release_3_0_9_rc1 extends \phpbb\db\migration\migration
// Update file extension group names to use language strings, again.
$sql = 'SELECT group_id, group_name
FROM ' . EXTENSION_GROUPS_TABLE . '
- WHERE group_name ' . $this->db->sql_like_expression('EXT_GROUP_' . $this->db->any_char);
+ WHERE group_name ' . $this->db->sql_like_expression('EXT_GROUP_' . $this->db->get_any_char());
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php
index df1560f5b1..4530ebe285 100644
--- a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php
+++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php
@@ -18,7 +18,7 @@ class mysql_fulltext_drop extends \phpbb\db\migration\migration
public function effectively_installed()
{
// This migration is irrelevant for all non-MySQL DBMSes.
- return strpos($this->db->sql_layer, 'mysql') === false;
+ return strpos($this->db->get_sql_layer(), 'mysql') === false;
}
static public function depends_on()
diff --git a/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php
index ca784656e7..ea442dfb1b 100644
--- a/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php
+++ b/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php
@@ -18,7 +18,7 @@ class postgres_fulltext_drop extends \phpbb\db\migration\migration
public function effectively_installed()
{
// This migration is irrelevant for all non-PostgreSQL DBMSes.
- return strpos($this->db->sql_layer, 'postgres') === false;
+ return strpos($this->db->get_sql_layer(), 'postgres') === false;
}
static public function depends_on()
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
index fdfc31da3a..5f120333e1 100644
--- a/phpBB/phpbb/db/migration/migration.php
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -160,11 +160,11 @@ abstract class migration
else
{
$result = $this->db->sql_query($sql);
- if ($this->db->sql_error_triggered)
+ if ($this->db->get_sql_error_triggered())
{
$this->errors[] = array(
- 'sql' => $this->db->sql_error_sql,
- 'code' => $this->db->sql_error_returned,
+ 'sql' => $this->db->get_sql_error_sql(),
+ 'code' => $this->db->get_sql_error_returned(),
);
}
}
diff --git a/phpBB/phpbb/db/migration/tool/config_text.php b/phpBB/phpbb/db/migration/tool/config_text.php
new file mode 100644
index 0000000000..bf8ac55023
--- /dev/null
+++ b/phpBB/phpbb/db/migration/tool/config_text.php
@@ -0,0 +1,125 @@
+<?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\tool;
+
+/**
+* Migration config_text tool
+*/
+class config_text implements \phpbb\db\migration\tool\tool_interface
+{
+ /** @var \phpbb\config\db_text */
+ protected $config_text;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\db_text $config_text
+ */
+ public function __construct(\phpbb\config\db_text $config_text)
+ {
+ $this->config_text = $config_text;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_name()
+ {
+ return 'config_text';
+ }
+
+ /**
+ * Add a config_text setting.
+ *
+ * @param string $config_name The name of the config_text setting
+ * you would like to add
+ * @param mixed $config_value The value of the config_text setting
+ * @return null
+ */
+ public function add($config_name, $config_value)
+ {
+ if (!is_null($this->config_text->get($config_name)))
+ {
+ return;
+ }
+
+ $this->config_text->set($config_name, $config_value);
+ }
+
+ /**
+ * Update an existing config_text setting.
+ *
+ * @param string $config_name The name of the config_text setting you would
+ * like to update
+ * @param mixed $config_value The value of the config_text setting
+ * @return null
+ * @throws \phpbb\db\migration\exception
+ */
+ public function update($config_name, $config_value)
+ {
+ if (is_null($this->config_text->get($config_name)))
+ {
+ throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
+ }
+
+ $this->config_text->set($config_name, $config_value);
+ }
+
+ /**
+ * Remove an existing config_text setting.
+ *
+ * @param string $config_name The name of the config_text setting you would
+ * like to remove
+ * @return null
+ */
+ public function remove($config_name)
+ {
+ if (is_null($this->config_text->get($config_name)))
+ {
+ return;
+ }
+
+ $this->config_text->delete($config_name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reverse()
+ {
+ $arguments = func_get_args();
+ $original_call = array_shift($arguments);
+
+ $call = false;
+ switch ($original_call)
+ {
+ case 'add':
+ $call = 'remove';
+ break;
+
+ case 'remove':
+ $call = 'add';
+ if (sizeof($arguments) == 1)
+ {
+ $arguments[] = '';
+ }
+ break;
+ }
+
+ if ($call)
+ {
+ return call_user_func_array(array(&$this, $call), $arguments);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index c2f7b5ab23..8b089a060f 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -110,7 +110,7 @@ class migrator
FROM " . $this->migrations_table;
$result = $this->db->sql_query($sql);
- if (!$this->db->sql_error_triggered)
+ if (!$this->db->get_sql_error_triggered())
{
while ($migration = $this->db->sql_fetchrow($result))
{
diff --git a/phpBB/phpbb/db/sql_insert_buffer.php b/phpBB/phpbb/db/sql_insert_buffer.php
index 6b6f556571..14e3c54f09 100644
--- a/phpBB/phpbb/db/sql_insert_buffer.php
+++ b/phpBB/phpbb/db/sql_insert_buffer.php
@@ -92,7 +92,7 @@ class sql_insert_buffer
// Flush buffer if it is full or when DB does not support multi inserts.
// In the later case, the buffer will always only contain one row.
- if (!$this->db->multi_insert || sizeof($this->buffer) >= $this->max_buffered_rows)
+ if (!$this->db->get_multi_insert() || sizeof($this->buffer) >= $this->max_buffered_rows)
{
return $this->flush();
}
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 2ec46ed239..18defc4535 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -323,7 +323,7 @@ class tools
$this->dbms_type_map = self::get_dbms_type_map();
// Determine mapping database type
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mysql':
$this->sql_layer = 'mysql_40';
@@ -354,7 +354,7 @@ class tools
break;
default:
- $this->sql_layer = $this->db->sql_layer;
+ $this->sql_layer = $this->db->get_sql_layer();
break;
}
}
@@ -377,7 +377,7 @@ class tools
*/
function sql_list_tables()
{
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mysql':
case 'mysql4':
@@ -711,7 +711,7 @@ class tools
$sqlite = false;
// For SQLite we need to perform the schema changes in a much more different way
- if (($this->db->sql_layer == 'sqlite' || $this->db->sql_layer == 'sqlite3') && $this->return_statements)
+ if (($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3') && $this->return_statements)
{
$sqlite_data = array();
$sqlite = true;
diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php
index 6a2f9008be..9a786022c2 100644
--- a/phpBB/phpbb/event/dispatcher.php
+++ b/phpBB/phpbb/event/dispatcher.php
@@ -29,8 +29,11 @@ use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
* extract($phpbb_dispatcher->trigger_event('core.index', compact($vars)));
*
*/
-class dispatcher extends ContainerAwareEventDispatcher
+class dispatcher extends ContainerAwareEventDispatcher implements dispatcher_interface
{
+ /**
+ * {@inheritdoc}
+ */
public function trigger_event($eventName, $data = array())
{
$event = new \phpbb\event\data($data);
diff --git a/phpBB/phpbb/event/dispatcher_interface.php b/phpBB/phpbb/event/dispatcher_interface.php
new file mode 100644
index 0000000000..50a3ef9101
--- /dev/null
+++ b/phpBB/phpbb/event/dispatcher_interface.php
@@ -0,0 +1,40 @@
+<?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\event;
+
+/**
+* Extension of the Symfony2 EventDispatcher
+*
+* It provides an additional `trigger_event` method, which
+* gives some syntactic sugar for dispatching events. Instead
+* of creating the event object, the method will do that for
+* you.
+*
+* Example:
+*
+* $vars = array('page_title');
+* extract($phpbb_dispatcher->trigger_event('core.index', compact($vars)));
+*
+*/
+interface dispatcher_interface extends \Symfony\Component\EventDispatcher\EventDispatcherInterface
+{
+ /**
+ * Construct and dispatch an event
+ *
+ * @param string $eventName The event name
+ * @param array $data An array containing the variables sending with the event
+ * @return mixed
+ */
+ public function trigger_event($eventName, $data = array());
+}
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index 4130e8455a..b19eb9f8a3 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -515,7 +515,7 @@ class manager
* @param string $name Extension name to check NOTE: Can be user input
* @return bool Depending on whether or not the extension is available
*/
- public function available($name)
+ public function is_available($name)
{
return file_exists($this->get_extension_path($name, true));
}
@@ -526,12 +526,50 @@ class manager
* @param string $name Extension name to check
* @return bool Depending on whether or not the extension is enabled
*/
- public function enabled($name)
+ public function is_enabled($name)
{
return isset($this->extensions[$name]) && $this->extensions[$name]['ext_active'];
}
/**
+ * Check to see if a given extension is disabled
+ *
+ * @param string $name Extension name to check
+ * @return bool Depending on whether or not the extension is disabled
+ */
+ public function is_disabled($name)
+ {
+ return isset($this->extensions[$name]) && !$this->extensions[$name]['ext_active'];
+ }
+
+ /**
+ * Check to see if a given extension is configured
+ *
+ * All enabled and disabled extensions are considered configured. A purged
+ * extension that is no longer in the database is not configured.
+ *
+ * @param string $name Extension name to check
+ * @return bool Depending on whether or not the extension is configured
+ */
+ public function is_configured($name)
+ {
+ return isset($this->extensions[$name]);
+ }
+
+ /**
+ * Check to see if a given extension is purged
+ *
+ * An extension is purged if it is available, not enabled and not disabled.
+ *
+ * @param string $name Extension name to check
+ * @return bool Depending on whether or not the extension is purged
+ */
+ public function is_purged($name)
+ {
+ return $this->is_available($name) && !$this->is_configured($name);
+ }
+
+ /**
* Instantiates a \phpbb\finder.
*
* @param bool $use_all_available Should we load all extensions, or just enabled ones
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
index 014d8c79c7..1051021ea7 100644
--- a/phpBB/phpbb/extension/metadata_manager.php
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -306,7 +306,7 @@ class metadata_manager
*/
public function validate_require_phpbb()
{
- if (!isset($this->metadata['require']['phpbb/phpbb']))
+ if (!isset($this->metadata['extra']['soft-require']['phpbb/phpbb']))
{
return false;
}
@@ -369,7 +369,7 @@ class metadata_manager
'META_REQUIRE_PHP' => (isset($this->metadata['require']['php'])) ? htmlspecialchars($this->metadata['require']['php']) : '',
'META_REQUIRE_PHP_FAIL' => !$this->validate_require_php(),
- 'META_REQUIRE_PHPBB' => (isset($this->metadata['require']['phpbb/phpbb'])) ? htmlspecialchars($this->metadata['require']['phpbb/phpbb']) : '',
+ 'META_REQUIRE_PHPBB' => (isset($this->metadata['extra']['soft-require']['phpbb/phpbb'])) ? htmlspecialchars($this->metadata['extra']['soft-require']['phpbb/phpbb']) : '',
'META_REQUIRE_PHPBB_FAIL' => !$this->validate_require_phpbb(),
'META_DISPLAY_NAME' => (isset($this->metadata['extra']['display-name'])) ? htmlspecialchars($this->metadata['extra']['display-name']) : '',
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index bf0bfe0ae1..c522c3273f 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -70,7 +70,7 @@ class log implements \phpbb\log\log_interface
/**
* Event dispatcher object
- * @var \phpbb\event\dispatcher
+ * @var \phpbb\event\dispatcher_interface
*/
protected $dispatcher;
@@ -98,7 +98,7 @@ class log implements \phpbb\log\log_interface
* @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object
* @param \phpbb\auth\auth $auth Auth object
- * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher
+ * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher
* @param string $phpbb_root_path Root path
* @param string $relative_admin_path Relative admin root path
* @param string $php_ext PHP Extension
@@ -737,7 +737,7 @@ class log implements \phpbb\log\log_interface
for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
{
$keywords_pattern[] = preg_quote($keywords[$i], '#');
- $keywords[$i] = $this->db->sql_like_expression($this->db->any_char . $keywords[$i] . $this->db->any_char);
+ $keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char());
}
$keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index b592cc4460..a8592eac6c 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -24,6 +24,9 @@ class path_helper
/** @var \phpbb\filesystem */
protected $filesystem;
+ /** @var \phpbb\request\request_interface */
+ protected $request;
+
/** @var string */
protected $phpbb_root_path;
@@ -41,13 +44,16 @@ class path_helper
*
* @param \phpbb\symfony_request $symfony_request
* @param \phpbb\filesystem $filesystem
+ * @param \phpbb\request\request_interface $request
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $php_ext PHP extension (php)
+ * @param mixed $adm_relative_path Relative path admin path to adm/ root
*/
- public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext, $adm_relative_path = null)
+ public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, \phpbb\request\request_interface $request, $phpbb_root_path, $php_ext, $adm_relative_path = null)
{
$this->symfony_request = $symfony_request;
$this->filesystem = $filesystem;
+ $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->adm_relative_path = $adm_relative_path;
@@ -98,7 +104,13 @@ class path_helper
{
$path = substr($path, strlen($this->phpbb_root_path));
- return $this->filesystem->clean_path($this->get_web_root_path() . $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);
+ }
+
+ return $this->filesystem->clean_path($web_root_path . $path);
}
return $path;
@@ -170,6 +182,34 @@ class path_helper
return $this->web_root_path = $this->phpbb_root_path;
}
+ /*
+ * Check AJAX request:
+ * If the current request is a AJAX we need to fix the paths.
+ * We need to get the root path based on the Referer, so we can use
+ * the generated URLs in the template of the Referer. If we do not
+ * generate the relative path based on the Referer, but based on the
+ * currently requested URL, the generated URLs will not point to the
+ * intended locations:
+ * Referer desired URL desired relative root path
+ * memberlist.php faq.php ./
+ * memberlist.php app.php/foo/bar ./
+ * app.php/foo memberlist.php ../
+ * app.php/foo app.php/fox ../
+ * app.php/foo/bar memberlist.php ../../
+ * ../page.php memberlist.php ./phpBB/
+ * ../sub/page.php memberlist.php ./../phpBB/
+ *
+ * The referer must be specified as a parameter in the query.
+ */
+ if ($this->request->is_ajax() && $this->symfony_request->get('_referer'))
+ {
+ $referer_web_root_path = $this->get_web_root_path_from_ajax_referer(
+ $this->symfony_request->get('_referer'),
+ $this->symfony_request->getSchemeAndHttpHost() . $this->symfony_request->getBasePath()
+ );
+ return $this->web_root_path = $this->phpbb_root_path . $referer_web_root_path;
+ }
+
// How many corrections might we need?
$corrections = substr_count($path_info, '/');
@@ -191,6 +231,65 @@ class path_helper
}
/**
+ * Get the web root path of the referer form an ajax request
+ *
+ * @param string $absolute_referer_url
+ * @param string $absolute_board_url
+ * @return string
+ */
+ public function get_web_root_path_from_ajax_referer($absolute_referer_url, $absolute_board_url)
+ {
+ // If the board URL is in the beginning of the referer, this means
+ // we the referer is in the board URL or a subdirectory of it.
+ // So we just need to count the / (slashes) in the left over part of
+ // the referer and prepend ../ the the current root_path, to get the
+ // web root path of the referer.
+ if (strpos($absolute_referer_url, $absolute_board_url) === 0)
+ {
+ $relative_referer_path = substr($absolute_referer_url, strlen($absolute_board_url));
+ $has_params = strpos($relative_referer_path, '?');
+ if ($has_params !== false)
+ {
+ $relative_referer_path = substr($relative_referer_path, 0, $has_params);
+ }
+ $corrections = substr_count($relative_referer_path, '/');
+ return $this->phpbb_root_path . str_repeat('../', $corrections - 1);
+ }
+
+ // If not, it's a bit more complicated. We go to the parent directory
+ // of the referer until we find the remaining referer in the board URL.
+ // Foreach directory we need to add a ../ to the fixed root_path.
+ // When we finally found it, we need to remove the remaining referer
+ // from the board URL, to get the boards root path.
+ // If the then append these two strings, we get our fixed web root path.
+ $fixed_root_path = '';
+ $referer_dir = $absolute_referer_url;
+ $has_params = strpos($referer_dir, '?');
+ if ($has_params !== false)
+ {
+ $referer_dir = substr($referer_dir, 0, $has_params);
+ }
+
+ // If we do not find a slash at the end of the referer, we come
+ // from a file. So the first dirname() does not need a traversal
+ // path correction.
+ if (substr($referer_dir, -1) !== '/')
+ {
+ $referer_dir = dirname($referer_dir);
+ }
+
+ while (strpos($absolute_board_url, $referer_dir) !== 0)
+ {
+ $fixed_root_path .= '../';
+ $referer_dir = dirname($referer_dir);
+ }
+
+ $fixed_root_path .= substr($absolute_board_url, strlen($referer_dir) + 1);
+ // Add trailing slash
+ return $this->phpbb_root_path . $fixed_root_path . '/';
+ }
+
+ /**
* Eliminates useless . and .. components from specified URL
*
* @param string $url URL to clean
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index 3f51016c93..9b3dcadf32 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -17,7 +17,7 @@ class permissions
{
/**
* Event dispatcher object
- * @var \phpbb\event\dispatcher
+ * @var \phpbb\event\dispatcher_interface
*/
protected $dispatcher;
@@ -30,10 +30,10 @@ class permissions
/**
* Constructor
*
- * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher
+ * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher
* @param \phpbb\user $user User Object
*/
- public function __construct(\phpbb\event\dispatcher $phpbb_dispatcher, \phpbb\user $user)
+ public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\user $user)
{
$this->dispatcher = $phpbb_dispatcher;
$this->user = $user;
diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php
index 490db0419a..f3b1676799 100644
--- a/phpBB/phpbb/profilefields/manager.php
+++ b/phpBB/phpbb/profilefields/manager.php
@@ -32,7 +32,7 @@ class manager
/**
* Event dispatcher object
- * @var \phpbb\event\dispatcher
+ * @var \phpbb\event\dispatcher_interface
*/
protected $dispatcher;
@@ -73,7 +73,7 @@ class manager
*
* @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\db\driver\driver_interface $db Database object
- * @param \phpbb\event\dispatcher $dispatcher Event dispatcher object
+ * @param \phpbb\event\dispatcher_interface $dispatcher Event dispatcher object
* @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object
* @param \phpbb\di\service_collection $type_collection
@@ -82,7 +82,7 @@ class manager
* @param string $fields_language_table
* @param string $fields_data_table
*/
- public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table)
+ public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table)
{
$this->auth = $auth;
$this->db = $db;
@@ -389,6 +389,7 @@ class manager
{
$profile_field = $this->type_collection[$ident_ary['data']['field_type']];
$value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']);
+ $value_raw = $profile_field->get_profile_value_raw($ident_ary['value'], $ident_ary['data']);
if ($value === null)
{
@@ -412,26 +413,28 @@ class manager
}
$tpl_fields['row'] += array(
- 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident,
- 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value,
- 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url,
- 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc,
- 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'],
- 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
- 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']),
+ 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident,
+ 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value,
+ 'PROFILE_' . strtoupper($ident) . '_VALUE_RAW' => $value_raw,
+ 'PROFILE_' . strtoupper($ident) . '_CONTACT' => $contact_url,
+ 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc,
+ 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
+ 'PROFILE_' . strtoupper($ident) . '_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']),
'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'],
'S_PROFILE_' . strtoupper($ident) => true,
);
$tpl_fields['blockrow'][] = array(
- 'PROFILE_FIELD_IDENT' => $ident,
- 'PROFILE_FIELD_VALUE' => $value,
- 'PROFILE_FIELD_CONTACT' => $contact_url,
- 'PROFILE_FIELD_DESC' => $field_desc,
- 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],
- 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
- 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']),
+ 'PROFILE_FIELD_IDENT' => $ident,
+ 'PROFILE_FIELD_VALUE' => $value,
+ 'PROFILE_FIELD_VALUE_RAW' => $value_raw,
+ 'PROFILE_FIELD_CONTACT' => $contact_url,
+ 'PROFILE_FIELD_DESC' => $field_desc,
+ 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
+ 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']),
'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'],
'S_PROFILE_' . strtoupper($ident) => true,
diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php
index f67e58ee3a..0582722833 100644
--- a/phpBB/phpbb/profilefields/type/type_bool.php
+++ b/phpBB/phpbb/profilefields/type/type_bool.php
@@ -180,6 +180,24 @@ class type_bool extends type_base
/**
* {@inheritDoc}
*/
+ public function get_profile_value_raw($field_value, $field_data)
+ {
+ if ($field_value == $field_data['field_novalue'] && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ if (!$field_value && $field_data['field_show_novalue'])
+ {
+ $field_value = $field_data['field_novalue'];
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function generate_field($profile_row, $preview_options = false)
{
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
diff --git a/phpBB/phpbb/profilefields/type/type_date.php b/phpBB/phpbb/profilefields/type/type_date.php
index 158eec6a0c..90ac9a6703 100644
--- a/phpBB/phpbb/profilefields/type/type_date.php
+++ b/phpBB/phpbb/profilefields/type/type_date.php
@@ -208,6 +208,19 @@ class type_date extends type_base
/**
* {@inheritDoc}
*/
+ public function get_profile_value_raw($field_value, $field_data)
+ {
+ if (($field_value === '' || $field_value === null) && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function generate_field($profile_row, $preview_options = false)
{
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
diff --git a/phpBB/phpbb/profilefields/type/type_dropdown.php b/phpBB/phpbb/profilefields/type/type_dropdown.php
index 118ddf1f37..17ae89e1b2 100644
--- a/phpBB/phpbb/profilefields/type/type_dropdown.php
+++ b/phpBB/phpbb/profilefields/type/type_dropdown.php
@@ -189,6 +189,24 @@ class type_dropdown extends type_base
/**
* {@inheritDoc}
*/
+ public function get_profile_value_raw($field_value, $field_data)
+ {
+ if ($field_value == $field_data['field_novalue'] && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ if (!$field_value && $field_data['field_show_novalue'])
+ {
+ $field_value = $field_data['field_novalue'];
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function generate_field($profile_row, $preview_options = false)
{
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php
index 78f1c7d2c9..dd08df94c1 100644
--- a/phpBB/phpbb/profilefields/type/type_int.php
+++ b/phpBB/phpbb/profilefields/type/type_int.php
@@ -154,6 +154,18 @@ class type_int extends type_base
/**
* {@inheritDoc}
*/
+ public function get_profile_value_raw($field_value, $field_data)
+ {
+ if (($field_value === '' || $field_value === null) && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+ return (int) $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function generate_field($profile_row, $preview_options = false)
{
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php
index 489e916fd5..2dd13fa480 100644
--- a/phpBB/phpbb/profilefields/type/type_interface.php
+++ b/phpBB/phpbb/profilefields/type/type_interface.php
@@ -94,6 +94,15 @@ interface type_interface
public function get_profile_value($field_value, $field_data);
/**
+ * Get Profile Value ID for display (the raw, unprocessed user data)
+ *
+ * @param mixed $field_value Field value as stored in the database
+ * @param array $field_data Array with requirements of the field
+ * @return mixed Field value ID to display
+ */
+ public function get_profile_value_raw($field_value, $field_data);
+
+ /**
* Get Profile Value for display
*
* When displaying a contact field, we don't want to have links already parsed and more
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php
index b48e3c5add..c2b951b6c9 100644
--- a/phpBB/phpbb/profilefields/type/type_string_common.php
+++ b/phpBB/phpbb/profilefields/type/type_string_common.php
@@ -112,6 +112,19 @@ abstract class type_string_common extends type_base
/**
* {@inheritDoc}
*/
+ public function get_profile_value_raw($field_value, $field_data)
+ {
+ if (!$field_value && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function get_profile_contact_value($field_value, $field_data)
{
if (!$field_value && !$field_data['field_show_novalue'])
diff --git a/phpBB/phpbb/search/base.php b/phpBB/phpbb/search/base.php
index 861b1f9328..9395b6a273 100644
--- a/phpBB/phpbb/search/base.php
+++ b/phpBB/phpbb/search/base.php
@@ -282,7 +282,7 @@ class base
$sql_where = '';
foreach ($words as $word)
{
- $sql_where .= " OR search_keywords " . $db->sql_like_expression($db->any_char . $word . $db->any_char);
+ $sql_where .= " OR search_keywords " . $db->sql_like_expression($db->get_any_char() . $word . $db->get_any_char());
}
$sql = 'SELECT search_key
@@ -303,7 +303,7 @@ class base
$sql_where = '';
foreach ($authors as $author)
{
- $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char);
+ $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->get_any_char() . ' ' . (int) $author . ' ' . $db->get_any_char());
}
$sql = 'SELECT search_key
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index 3e8e492cd8..d4e7de31e5 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -140,7 +140,7 @@ class fulltext_mysql extends \phpbb\search\base
*/
public function init()
{
- if ($this->db->sql_layer != 'mysql4' && $this->db->sql_layer != 'mysqli')
+ if ($this->db->get_sql_layer() != 'mysql4' && $this->db->get_sql_layer() != 'mysqli')
{
return $this->user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE'];
}
@@ -764,7 +764,7 @@ class fulltext_mysql extends \phpbb\search\base
if (!isset($this->stats['post_subject']))
{
- if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
+ if ($this->db->get_sql_layer() == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
{
$alter[] = 'MODIFY post_subject varchar(255) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL';
}
@@ -777,7 +777,7 @@ class fulltext_mysql extends \phpbb\search\base
if (!isset($this->stats['post_content']))
{
- if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
+ if ($this->db->get_sql_layer() == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
{
$alter[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL';
}
@@ -872,7 +872,7 @@ class fulltext_mysql extends \phpbb\search\base
*/
protected function get_stats()
{
- if (strpos($this->db->sql_layer, 'mysql') === false)
+ if (strpos($this->db->get_sql_layer(), 'mysql') === false)
{
$this->stats = array();
return;
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 2fbff57990..48b0f077c7 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -758,7 +758,7 @@ class fulltext_native extends \phpbb\search\base
);
}
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mysql4':
case 'mysqli':
@@ -978,7 +978,7 @@ class fulltext_native extends \phpbb\search\base
// If the cache was completely empty count the results
if (!$total_results)
{
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'mysql4':
case 'mysqli':
@@ -1000,7 +1000,7 @@ class fulltext_native extends \phpbb\search\base
}
else
{
- if ($this->db->sql_layer == 'sqlite' || $this->db->sql_layer == 'sqlite3')
+ if ($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3')
{
$sql = 'SELECT COUNT(topic_id) as total_results
FROM (SELECT DISTINCT t.topic_id';
@@ -1017,7 +1017,7 @@ class fulltext_native extends \phpbb\search\base
$post_visibility
$sql_fora
AND t.topic_id = p.topic_id
- $sql_time" . (($this->db->sql_layer == 'sqlite' || $this->db->sql_layer == 'sqlite3') ? ')' : '');
+ $sql_time" . (($this->db->get_sql_layer() == 'sqlite' || $this->db->get_sql_layer() == 'sqlite3') ? ')' : '');
}
$result = $this->db->sql_query($sql);
@@ -1481,7 +1481,7 @@ class fulltext_native extends \phpbb\search\base
*/
public function delete_index($acp_module, $u_action)
{
- switch ($this->db->sql_layer)
+ switch ($this->db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php
index bdb5a86009..b3e7f51f87 100644
--- a/phpBB/phpbb/search/fulltext_postgres.php
+++ b/phpBB/phpbb/search/fulltext_postgres.php
@@ -31,18 +31,6 @@ class fulltext_postgres extends \phpbb\search\base
protected $split_words = array();
/**
- * True if PostgreSQL version supports tsearch
- * @var boolean
- */
- protected $tsearch_usable = false;
-
- /**
- * Stores the PostgreSQL version
- * @var string
- */
- protected $version;
-
- /**
* Stores the tsearch query
* @var string
*/
@@ -107,16 +95,6 @@ class fulltext_postgres extends \phpbb\search\base
$this->word_length = array('min' => $this->config['fulltext_postgres_min_word_len'], 'max' => $this->config['fulltext_postgres_max_word_len']);
- if ($this->db->sql_layer == 'postgres')
- {
- $pgsql_version = explode(',', substr($this->db->sql_server_info(), 10));
- $this->version = trim($pgsql_version[0]);
- if (version_compare($this->version, '8.3', '>='))
- {
- $this->tsearch_usable = true;
- }
- }
-
/**
* Load the UTF tools
*/
@@ -185,16 +163,11 @@ class fulltext_postgres extends \phpbb\search\base
*/
public function init()
{
- if ($this->db->sql_layer != 'postgres')
+ if ($this->db->get_sql_layer() != 'postgres')
{
return $this->user->lang['FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE'];
}
- if (!$this->tsearch_usable)
- {
- return $this->user->lang['FULLTEXT_POSTGRES_TS_NOT_USABLE'];
- }
-
return false;
}
@@ -869,7 +842,7 @@ class fulltext_postgres extends \phpbb\search\base
*/
protected function get_stats()
{
- if ($this->db->sql_layer != 'postgres')
+ if ($this->db->get_sql_layer() != 'postgres')
{
$this->stats = array();
return;
@@ -913,13 +886,13 @@ class fulltext_postgres extends \phpbb\search\base
$tpl = '
<dl>
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->tsearch_usable) ? $this->user->lang['YES'] : $this->user->lang['NO']) . ' (PostgreSQL ' . $this->version . ')</dd>
+ <dd>' . (($this->db->get_sql_layer() == 'postgres') ? $this->user->lang['YES'] : $this->user->lang['NO']) . '</dd>
</dl>
<dl>
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '</span></dt>
<dd><select name="config[fulltext_postgres_ts_name]">';
- if ($this->db->sql_layer == 'postgres' && $this->tsearch_usable)
+ if ($this->db->get_sql_layer() == 'postgres')
{
$sql = 'SELECT cfgname AS ts_name
FROM pg_ts_config';
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index 9008af338b..78c11f1180 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -199,7 +199,7 @@ class fulltext_sphinx
*/
public function init()
{
- if ($this->db->sql_layer != 'mysql' && $this->db->sql_layer != 'mysql4' && $this->db->sql_layer != 'mysqli' && $this->db->sql_layer != 'postgres')
+ if ($this->db->get_sql_layer() != 'mysql' && $this->db->get_sql_layer() != 'mysql4' && $this->db->get_sql_layer() != 'mysqli' && $this->db->get_sql_layer() != 'postgres')
{
return $this->user->lang['FULLTEXT_SPHINX_WRONG_DATABASE'];
}
@@ -218,11 +218,11 @@ class fulltext_sphinx
protected function config_generate()
{
// Check if Database is supported by Sphinx
- if ($this->db->sql_layer =='mysql' || $this->db->sql_layer == 'mysql4' || $this->db->sql_layer == 'mysqli')
+ if ($this->db->get_sql_layer() =='mysql' || $this->db->get_sql_layer() == 'mysql4' || $this->db->get_sql_layer() == 'mysqli')
{
$this->dbtype = 'mysql';
}
- else if ($this->db->sql_layer == 'postgres')
+ else if ($this->db->get_sql_layer() == 'postgres')
{
$this->dbtype = 'pgsql';
}
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index cceefda7ef..c5dc7273ba 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -285,7 +285,7 @@ class lexer extends \Twig_Lexer
return "<!-- {$matches[1]}IF{$inner}-->";
};
- return preg_replace_callback('#<!-- (ELSE)?IF((.*?) \(*!?[\$|\.]([^\s]+)(.*?))-->#', $callback, $code);
+ return preg_replace_callback('#<!-- (ELSE)?IF((.*?) (?:\(*!?[\$|\.]([^\s]+)(.*?))?)-->#', $callback, $code);
}
/**
diff --git a/phpBB/phpbb/viewonline_helper.php b/phpBB/phpbb/viewonline_helper.php
new file mode 100644
index 0000000000..b722f9d911
--- /dev/null
+++ b/phpBB/phpbb/viewonline_helper.php
@@ -0,0 +1,54 @@
+<?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;
+
+/**
+* Class to handle viewonline related tasks
+*/
+class viewonline_helper
+{
+ /** @var \phpbb\filesystem */
+ protected $filesystem;
+
+ /**
+ * @param \phpbb\filesystem $filesystem
+ */
+ public function __construct(\phpbb\filesystem $filesystem)
+ {
+ $this->filesystem = $filesystem;
+ }
+
+ /**
+ * Get user page
+ *
+ * @param string $session_page User's session page
+ * @return array Match array filled by preg_match()
+ */
+ public function get_user_page($session_page)
+ {
+ $session_page = $this->filesystem->clean_path($session_page);
+ if (strpos($session_page, './') === 0)
+ {
+ $session_page = substr($session_page, 2);
+ }
+
+ preg_match('#^((\.\./)*([a-z0-9/_-]+))#i', $session_page, $on_page);
+ if (empty($on_page))
+ {
+ $on_page[1] = '';
+ }
+
+ return $on_page;
+ }
+}
diff --git a/phpBB/search.php b/phpBB/search.php
index c01fcfede7..071db30f3d 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -145,7 +145,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
trigger_error($user->lang('TOO_FEW_AUTHOR_CHARS', (int) $config['min_search_author_chars']));
}
- $sql_where = (strpos($author, '*') !== false) ? ' username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " username_clean = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+ $sql_where = (strpos($author, '*') !== false) ? ' username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($author))) : " username_clean = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
$sql = 'SELECT user_id
FROM ' . USERS_TABLE . "
@@ -159,7 +159,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
$db->sql_freeresult($result);
- $sql_where = (strpos($author, '*') !== false) ? ' post_username ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " post_username = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+ $sql_where = (strpos($author, '*') !== false) ? ' post_username ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($author))) : " post_username = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
$sql = 'SELECT 1 as guest_post
FROM ' . POSTS_TABLE . "
@@ -172,7 +172,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($found_guest_post)
{
$author_id_ary[] = ANONYMOUS;
- $sql_author_match = (strpos($author, '*') !== false) ? ' ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
+ $sql_author_match = (strpos($author, '*') !== false) ? ' ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($author))) : " = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
}
if (!sizeof($author_id_ary))
@@ -1296,7 +1296,7 @@ $template->assign_vars(array(
if ($auth->acl_get('a_search'))
{
// Handle large objects differently for Oracle and MSSQL
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'oracle':
$sql = 'SELECT search_time, search_keywords
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index e9f8064b9e..70bc703582 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -356,37 +356,6 @@ $('.display_post').click(function(e) {
$('#post_hidden' + post_id).hide();
});
-
-
-/**
- * This AJAXifies the quick-mod tools. The reason it cannot be a standard
- * callback / data attribute is that it requires filtering - some of the options
- * can be ajaxified, while others cannot.
- */
-phpbb.ajaxify({
- selector: '#quickmodform',
- refresh: true,
- filter: function (data) {
- var action = $('#quick-mod-select').val();
-
- if (action === 'make_normal') {
- return $(this).find('select option[value="make_global"]').length > 0;
- } else if (action === 'lock' || action === 'unlock') {
- return true;
- }
-
- if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
- return true;
- }
-
- return false;
- }
-});
-
-$('#quick-mod-select').change(function () {
- $('#quickmodform').submit();
-});
-
$('#delete_permanent').click(function () {
if ($(this).prop('checked')) {
$('#delete_reason').hide();
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index ea2b815e77..4929e14ef7 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -382,10 +382,7 @@ function parse_document(container)
*/
if (oldBrowser) {
// Fix .linklist.bulletin lists
- container.find('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin');
-
- // Do not run functions below for old browsers
- return;
+ container.find('ul.linklist.bulletin > li:first-child, ul.linklist.bulletin > li.rightside:last-child').addClass('no-bulletin');
}
/**
@@ -483,6 +480,167 @@ function parse_document(container)
});
/**
+ * Responsive link lists
+ */
+ container.find('.linklist:not(.navlinks, [data-skip-responsive]), .postbody .post-buttons:not([data-skip-responsive])').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ filterSkip = '.breadcrumbs, [data-skip-responsive]',
+ filterLast = '.edit-icon, .quote-icon, [data-last-responsive]',
+ persist = $this.attr('id') == 'nav-main',
+ allLinks = $this.children(),
+ links = allLinks.not(filterSkip),
+ html = '<li class="responsive-menu" style="display:none;"><a href="javascript:void(0);" class="responsive-menu-link">&nbsp;</a><div class="dropdown" style="display:none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>',
+ filterLastList = links.filter(filterLast),
+ slack = 1; // Vertical slack space (in pixels). Determines how sensitive the script is in determining whether a line-break has occured.
+
+ if (!persist) {
+ if (links.is('.rightside'))
+ {
+ links.filter('.rightside:first').before(html);
+ $this.children('.responsive-menu').addClass('rightside');
+ }
+ else
+ {
+ $this.append(html);
+ }
+ }
+
+ var item = $this.children('.responsive-menu'),
+ menu = item.find('.dropdown-contents'),
+ lastWidth = false,
+ compact = false,
+ responsive = false,
+ copied = false;
+
+ function check() {
+ var width = $body.width();
+ if (responsive && width <= lastWidth) {
+ return;
+ }
+
+ // Unhide the quick-links menu if it has content
+ if (persist) {
+ item.addClass('hidden');
+ if (menu.find('li:not(.separator, .clone)').length || (responsive && menu.find('li.clone').length)) {
+ item.removeClass('hidden');
+ }
+ }
+
+ // Reset responsive and compact layout
+ if (responsive) {
+ responsive = false;
+ $this.removeClass('responsive');
+ links.css('display', '');
+ if (!persist) item.css('display', 'none');
+ }
+
+ if (compact) {
+ compact = false;
+ $this.removeClass('compact');
+ }
+
+ // Find tallest element
+ var maxHeight = 0;
+ allLinks.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if (maxHeight < 1) {
+ return;
+ }
+
+ // Nothing to resize if block's height is not bigger than tallest element's height
+ if ($this.height() <= (maxHeight + slack)) {
+ return;
+ }
+
+ // Enable compact layout, find tallest element, compare to height of whole block
+ compact = true;
+ $this.addClass('compact');
+
+ var compactMaxHeight = 0;
+ allLinks.each(function() {
+ if (!$(this).height()) return;
+ compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= (maxHeight + slack)) {
+ return;
+ }
+
+ // Compact layout did not resize block enough, switch to responsive layout
+ compact = false;
+ $this.removeClass('compact');
+ responsive = true;
+
+ if (!copied) {
+ var clone = links.clone(true);
+ clone.filter('.rightside').each(function() {
+ if (persist) $(this).addClass('clone');
+ menu.prepend(this);
+ });
+
+ if (persist) {
+ menu.prepend(clone.not('.rightside').addClass('clone'));
+ } else {
+ menu.prepend(clone.not('.rightside'));
+ }
+
+ menu.find('li.leftside, li.rightside').removeClass('leftside rightside');
+ menu.find('.inputbox').parents('li:first').css('white-space', 'normal');
+
+ if ($this.hasClass('post-buttons')) {
+ $('.button', menu).removeClass('button icon-button');
+ $('.responsive-menu-link', item).addClass('button icon-button').prepend('<span></span>');
+ }
+ copied = true;
+ }
+ else {
+ menu.children().css('display', '');
+ }
+
+ item.css('display', '');
+ $this.addClass('responsive');
+
+ // Try to not hide filtered items
+ if (filterLastList.length) {
+ links.not(filterLast).css('display', 'none');
+
+ maxHeight = 0;
+ filterLastList.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= (maxHeight + slack)) {
+ menu.children().filter(filterLast).css('display', 'none');
+ return;
+ }
+ }
+
+ // If even responsive isn't enough, use both responsive and compact at same time
+ compact = true;
+ $this.addClass('compact');
+
+ links.css('display', 'none');
+ }
+
+ if (!persist) phpbb.registerDropdown(item.find('a.responsive-menu-link'), item.find('.dropdown'));
+
+ check();
+ $(window).resize(check);
+ });
+
+ /**
+ * Do not run functions below for old browsers
+ */
+ if (oldBrowser) {
+ return;
+ }
+
+ /**
* Adjust topiclist lists with check boxes
*/
container.find('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark');
@@ -667,136 +825,6 @@ function parse_document(container)
});
/**
- * Responsive link lists
- */
- container.find('.linklist:not(.navlinks, [data-skip-responsive]), .postbody .post-buttons:not([data-skip-responsive])').each(function() {
- var $this = $(this),
- $body = $('body'),
- filterSkip = '.breadcrumbs, [data-skip-responsive]',
- filterLast = '.pagination, .icon-notifications, .icon-pm, .icon-logout, .icon-login, .mark-read, .edit-icon, .quote-icon',
- allLinks = $this.children(),
- links = allLinks.not(filterSkip),
- html = '<li class="responsive-menu" style="display:none;"><a href="javascript:void(0);" class="responsive-menu-link">&nbsp;</a><div class="dropdown" style="display:none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>',
- filterLastList = links.filter(filterLast);
-
- if (links.is('.rightside'))
- {
- links.filter('.rightside:first').before(html);
- }
- else
- {
- $this.append(html);
- }
-
- var item = $this.children('.responsive-menu'),
- menu = item.find('.dropdown-contents'),
- lastWidth = false,
- compact = false,
- responsive = false,
- copied = false;
-
- function check() {
- var width = $body.width();
- if (responsive && width <= lastWidth) {
- return;
- }
-
- // Reset responsive and compact layout
- if (responsive) {
- responsive = false;
- $this.removeClass('responsive');
- links.css('display', '');
- item.css('display', 'none');
- }
-
- if (compact) {
- compact = false;
- $this.removeClass('compact');
- }
-
- // Find tallest element
- var maxHeight = 0;
- allLinks.each(function() {
- if (!$(this).height()) return;
- maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
- });
-
- if (maxHeight < 1) {
- return;
- }
-
- // Nothing to resize if block's height is not bigger than tallest element's height
- if ($this.height() <= maxHeight) {
- return;
- }
-
- // Enable compact layout, find tallest element, compare to height of whole block
- compact = true;
- $this.addClass('compact');
-
- var compactMaxHeight = 0;
- allLinks.each(function() {
- if (!$(this).height()) return;
- compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true));
- });
-
- if ($this.height() <= maxHeight) {
- return;
- }
-
- // Compact layout did not resize block enough, switch to responsive layout
- compact = false;
- $this.removeClass('compact');
- responsive = true;
-
- if (!copied) {
- var clone = links.clone(true);
- clone.filter('.rightside').each(function() {
- menu.prepend(this);
- });
- menu.prepend(clone.not('.rightside'));
- menu.find('li.leftside, li.rightside').removeClass('leftside rightside');
- menu.find('.inputbox').parents('li:first').css('white-space', 'normal');
-
- if ($this.hasClass('post-buttons')) {
- $('.button', menu).removeClass('button icon-button');
- $('.responsive-menu-link', item).addClass('button icon-button').prepend('<span></span>');
- }
- copied = true;
- }
- else {
- menu.children().css('display', '');
- }
-
- item.css('display', '');
- $this.addClass('responsive');
-
- // Try to not hide filtered items
- if (filterLastList.length) {
- links.not(filterLast).css('display', 'none');
-
- maxHeight = 0;
- filterLastList.each(function() {
- if (!$(this).height()) return;
- maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
- });
-
- if ($this.height() <= maxHeight) {
- menu.children().filter(filterLast).css('display', 'none');
- return;
- }
- }
-
- links.css('display', 'none');
- }
-
- phpbb.registerDropdown(item.find('a.responsive-menu-link'), item.find('.dropdown'));
-
- check();
- $(window).resize(check);
- });
-
- /**
* Responsive tabs
*/
container.find('#tabs, #minitabs').not('[data-skip-responsive]').each(function() {
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index f9c5b4cf20..1e1eb22c6f 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -1,27 +1,15 @@
<!-- INCLUDE overall_header.html -->
-<p class="{S_CONTENT_FLOW_END} responsive-center<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
-<!-- IF S_USER_LOGGED_IN --><p class="responsive-center">{CURRENT_TIME}<!-- IF U_MCP or U_ACP --> <br />[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]<!-- ENDIF --></p><!-- ENDIF -->
+<p class="{S_CONTENT_FLOW_END} responsive-center time<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
+<!-- IF S_USER_LOGGED_IN --><p class="responsive-center time">{CURRENT_TIME}</p><!-- ENDIF -->
-<!-- EVENT index_body_linklist_before -->
-
-<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
-<ul class="linklist bulletin">
- <!-- IF S_DISPLAY_SEARCH -->
- <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></li>
- <!-- IF S_LOAD_UNREADS -->
- <li><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a></li>
- <!-- ENDIF -->
- <!-- IF S_USER_LOGGED_IN -->
- <li><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a></li>
- <!-- ENDIF -->
- <li><a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
- <!-- ENDIF -->
- <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside mark-read"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
-</ul>
+<!-- EVENT index_body_markforums_before -->
+<!-- IF U_MARK_FORUMS -->
+ <div class="action-bar compact">
+ <a href="{U_MARK_FORUMS}" class="mark-read rightside" accesskey="m" data-ajax="mark_forums_read">{L_MARK_FORUMS_READ}</a>
+ </div>
<!-- ENDIF -->
-
-<!-- EVENT index_body_linklist_after -->
+<!-- EVENT index_body_markforums_after -->
<!-- INCLUDE forumlist_body.html -->
diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html
index 47d322407d..44b479ab3f 100644
--- a/phpBB/styles/prosilver/template/jumpbox.html
+++ b/phpBB/styles/prosilver/template/jumpbox.html
@@ -10,24 +10,22 @@
<!-- ENDIF -->
<!-- IF S_DISPLAY_JUMPBOX -->
- <form method="get" id="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(this.f.value == -1){return false;}">
- <!-- IF $CUSTOM_FIELDSET_CLASS -->
- <fieldset class="{$CUSTOM_FIELDSET_CLASS}">
- <!-- ELSE -->
- <fieldset class="jumpbox">
- <!-- ENDIF -->
- {HIDDEN_FIELDS_FOR_JUMPBOX}
- <label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->{L_COLON}</label>
- <select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
+ <div class="dropdown-container dropdown-container-{S_CONTENT_FLOW_END}<!-- IF not S_IN_MCP --> dropdown-up<!-- ENDIF --> dropdown-{S_CONTENT_FLOW_BEGIN} dropdown-button-control" id="jumpbox">
+ <span title="<!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->" class="dropdown-trigger button dropdown-select">
+ <!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->
+ </span>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
<!-- BEGIN jumpbox_forums -->
- <!-- IF jumpbox_forums.S_FORUM_COUNT == 1 --><option value="-1">------------------</option><!-- ENDIF -->
- <option value="{jumpbox_forums.FORUM_ID}"{jumpbox_forums.SELECTED}><!-- BEGIN level -->&nbsp; &nbsp;<!-- END level -->{jumpbox_forums.FORUM_NAME}</option>
+ <!-- IF jumpbox_forums.FORUM_ID neq -1 -->
+ <li><!-- BEGIN level -->&nbsp; &nbsp;<!-- END level --><a href="{jumpbox_forums.LINK}">{jumpbox_forums.FORUM_NAME}</a></li>
+ <!-- ENDIF -->
<!-- END jumpbox_forums -->
- </select>
- <input type="submit" value="{L_GO}" class="button2" />
- </fieldset>
- </form>
+ </ul>
+ </div>
+ </div>
<!-- ELSE -->
<br /><br />
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index c9f81a4099..8fdec01212 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -48,6 +48,13 @@
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->&nbsp;<a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF -->
<br />
+
+ <div class="responsive-show" style="display: none;">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; {topicrow.LAST_POST_TIME}<br />
+ </div>
+ <span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span>
+
<!-- IF .topicrow.pagination -->
<div class="pagination">
<ul>
@@ -62,15 +69,11 @@
</ul>
</div>
<!-- ENDIF -->
+
<div class="responsive-hide">
<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
</div>
- <div class="responsive-show" style="display: none;">
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
- {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; {topicrow.LAST_POST_TIME}<br />
- {L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong>
- </div>
</div>
</dt>
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html
index 4c14baf2b6..4fba966151 100644
--- a/phpBB/styles/prosilver/template/memberlist_search.html
+++ b/phpBB/styles/prosilver/template/memberlist_search.html
@@ -29,18 +29,20 @@
<dd><input type="text" name="email" id="email" value="{EMAIL}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
+<!-- IF S_JABBER_ENABLED -->
<dl>
<dt><label for="jabber">{L_JABBER}:</label></dt>
<dd><input type="text" name="jabber" id="jabber" value="{JABBER}" class="inputbox" /></dd>
</dl>
- <dl>
- <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt>
- <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd>
- </dl>
- <dl>
- <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt>
- <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd>
- </dl>
+<!-- ENDIF -->
+ <dl>
+ <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt>
+ <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt>
+ <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd>
+ </dl>
</fieldset>
<fieldset class="fields1 column2">
diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html
index e2259e8712..675322c56c 100644
--- a/phpBB/styles/prosilver/template/navbar_footer.html
+++ b/phpBB/styles/prosilver/template/navbar_footer.html
@@ -1,23 +1,25 @@
<div class="navbar">
<div class="inner">
- <ul class="linklist bulletin">
- <li class="small-icon icon-home breadcrumbs">
+ <ul id="nav-footer" class="linklist bulletin" role="menubar">
+ <li class="small-icon icon-home breadcrumbs" role="navigation">
<!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}" data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->
<span class="crumb"><a href="{U_INDEX}" data-navbar-reference="index">{L_INDEX}</a></span>
<!-- EVENT overall_footer_breadcrumb_append -->
</li>
- <!-- IF not S_IS_BOT -->
- <!-- IF U_WATCH_FORUM_LINK --><li class="small-icon icon-<!-- IF S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->"><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
- <!-- ENDIF -->
+ <!-- IF U_WATCH_FORUM_LINK and not S_IS_BOT --><li class="small-icon icon-<!-- IF S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-last-responsive="true"><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
+
<!-- EVENT overall_footer_timezone_before -->
<li class="rightside">{S_TIMEZONE}</li>
<!-- EVENT overall_footer_timezone_after -->
- <!-- IF not S_IS_BOT --><li class="rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
+ <!-- IF not S_IS_BOT -->
+ <li class="small-icon icon-delete-cookies rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true" role="menuitem">{L_DELETE_COOKIES}</a></li>
+ <!-- IF S_DISPLAY_MEMBERLIST --><li class="small-icon icon-members rightside" data-last-responsive="true"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}" role="menuitem">{L_MEMBERLIST}</a></li><!-- ENDIF -->
+ <!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_before -->
- <!-- IF U_TEAM --><li class="rightside"><a href="{U_TEAM}">{L_THE_TEAM}</a></li><!-- ENDIF -->
- <!-- IF U_CONTACT_US --><li class="rightside"><a href="{U_CONTACT_US}">{L_CONTACT_US}</a></li><!-- ENDIF -->
+ <!-- IF U_TEAM --><li class="small-icon icon-team rightside" data-last-responsive="true"><a href="{U_TEAM}" role="menuitem">{L_THE_TEAM}</a></li><!-- ENDIF -->
<!-- EVENT overall_footer_teamlink_after -->
+ <!-- IF U_CONTACT_US --><li class="small-icon icon-contact rightside" data-last-responsive="true"><a href="{U_CONTACT_US}" role="menuitem">{L_CONTACT_US}</a></li><!-- ENDIF -->
</ul>
</div>
diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html
index 67a3b553fd..cb646f25e4 100644
--- a/phpBB/styles/prosilver/template/navbar_header.html
+++ b/phpBB/styles/prosilver/template/navbar_header.html
@@ -1,68 +1,102 @@
-<div class="navbar">
+<div class="navbar" role="navigation">
<div class="inner">
- <ul class="linklist navlinks">
- <!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
- <li class="small-icon icon-home breadcrumbs">
- <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA} data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->
- <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA} data-navbar-reference="index">{L_INDEX}</a></span>
- <!-- BEGIN navlinks -->
- <!-- EVENT overall_header_navlink_prepend -->
- <span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a></span>
- <!-- EVENT overall_header_navlink_append -->
- <!-- END navlinks -->
- <!-- EVENT overall_header_breadcrumb_append -->
+ <ul id="nav-main" class="linklist bulletin" role="menubar">
+
+ <li id="quick-links" class="small-icon responsive-menu dropdown-container<!-- IF not S_DISPLAY_QUICK_LINKS and not S_DISPLAY_SEARCH --> hidden<!-- ENDIF -->" data-skip-responsive="true">
+ <a href="#" class="responsive-menu-link dropdown-trigger">{L_QUICK_LINKS}</a>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents" role="menu">
+ <!-- EVENT navbar_header_quick_links_before -->
+
+ <!-- IF S_DISPLAY_SEARCH -->
+ <li class="separator"></li>
+ <!-- IF S_REGISTERED_USER -->
+ <li class="small-icon icon-search-self"><a href="{U_SEARCH_SELF}" role="menuitem">{L_SEARCH_SELF}</a></li>
+ <!-- ENDIF -->
+ <!-- IF S_USER_LOGGED_IN -->
+ <li class="small-icon icon-search-new"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li>
+ <!-- ENDIF -->
+ <!-- IF S_LOAD_UNREADS -->
+ <li class="small-icon icon-search-unread"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li>
+ <!-- ENDIF -->
+ <li class="small-icon icon-search-unanswered"><a href="{U_SEARCH_UNANSWERED}" role="menuitem">{L_SEARCH_UNANSWERED}</a></li>
+ <li class="small-icon icon-search-active"><a href="{U_SEARCH_ACTIVE_TOPICS}" role="menuitem">{L_SEARCH_ACTIVE_TOPICS}</a></li>
+ <!-- ENDIF -->
+ <li class="separator"></li>
+
+ <!-- EVENT navbar_header_quick_links_after -->
+ </ul>
+ </div>
</li>
- <!-- IF S_REGISTERED_USER -->
- <li id="username_logged_in" class="rightside">
- <!-- EVENT navbar_header_username_prepend -->
- <!-- IF CURRENT_USER_AVATAR -->
- <a href="{U_USER_PROFILE}" class="header-avatar">{CURRENT_USER_AVATAR}</a>
- <!-- ENDIF -->
- {CURRENT_USERNAME_FULL}
- <!-- EVENT navbar_header_username_append -->
- </li>
- <!-- ELSE -->
- <li id="logged_out" class="rightside">
- <!-- EVENT navbar_header_logged_out_content -->
- </li>
- <!-- ENDIF -->
- <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --><li class="responsive-search rightside" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH}</a></li><!-- ENDIF -->
- </ul>
+ <!-- EVENT overall_header_navigation_prepend -->
+ <li class="small-icon icon-faq" <!-- IF not S_USER_LOGGED_IN -->data-skip-responsive="true"<!-- ELSE -->data-last-responsive="true"<!-- ENDIF -->><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" role="menuitem">{L_FAQ}</a></li>
+ <!-- EVENT overall_header_navigation_append -->
+ <!-- IF U_ACP --><li class="small-icon icon-acp" data-skip-responsive="true"><a href="{U_ACP}" title="{L_ACP}" role="menuitem">{L_ACP_SHORT}</a></li><!-- ENDIF -->
+ <!-- IF U_MCP --><li class="small-icon icon-mcp" data-skip-responsive="true"><a href="{U_MCP}" title="{L_MCP}" role="menuitem">{L_MCP_SHORT}</a></li><!-- ENDIF -->
- <ul class="linklist bulletin">
- <!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
- <!-- IF S_NOTIFICATIONS_DISPLAY -->
- <li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END}" data-skip-responsive="true">
- <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
- <!-- INCLUDE notification_dropdown.html -->
+ <!-- IF S_REGISTERED_USER -->
+ <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">
+ <a href="{U_PROFILE}" class="header-avatar dropdown-trigger"><!-- IF CURRENT_USER_AVATAR -->{CURRENT_USER_AVATAR} <!-- ENDIF -->{CURRENT_USERNAME_SIMPLE}</a>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents" role="menu">
+ <!-- IF U_RESTORE_PERMISSIONS --><li class="small-icon icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
+
+ <!-- EVENT navbar_header_profile_list_before -->
+
+ <li class="small-icon icon-ucp"><a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">{L_PROFILE}</a></li>
+ <li class="small-icon icon-profile"><a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">{L_READ_PROFILE}</a></li>
+
+ <!-- EVENT navbar_header_profile_list_after -->
+
+ <li class="separator"></li>
+ <li class="small-icon icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- EVENT navbar_header_username_append -->
</li>
- <!-- ENDIF -->
<!-- IF S_DISPLAY_PM -->
- <li class="small-icon icon-pm">
- <a href="{U_PRIVATEMSGS}"><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></a>
+ <li class="small-icon icon-pm rightside" data-skip-responsive="true">
+ <a href="{U_PRIVATEMSGS}" role="menuitem"><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></a>
</li>
<!-- ENDIF -->
- <li class="small-icon icon-ucp">
- <a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
- </li>
- <!-- IF S_DISPLAY_SEARCH -->
- <li class="icon-search-self"><a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></li>
+ <!-- IF S_NOTIFICATIONS_DISPLAY -->
+ <li class="small-icon icon-notification dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
+ <!-- INCLUDE notification_dropdown.html -->
+ </li>
<!-- ENDIF -->
- <!-- IF U_RESTORE_PERMISSIONS -->
- <li class="icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li>
+ <!-- ELSE -->
+ <li class="small-icon icon-logout rightside" data-skip-responsive="true"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">{L_LOGIN_LOGOUT}</a></li>
+ <!-- IF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
+ <li class="small-icon icon-register rightside" data-skip-responsive="true"><a href="{U_REGISTER}" role="menuitem">{L_REGISTER}</a></li>
<!-- ENDIF -->
+ <!-- EVENT navbar_header_logged_out_content -->
<!-- ENDIF -->
+ </ul>
- <!-- EVENT overall_header_navigation_append -->
- <!-- IF not S_IS_BOT -->
- <li class="small-icon icon-logout rightside no-bulletin"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
- <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="small-icon icon-register rightside no-bulletin"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
- <!-- IF S_DISPLAY_MEMBERLIST --><li class="small-icon icon-members rightside no-bulletin"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
+ <ul id="nav-breadcrumbs" class="linklist navlinks" role="menubar">
+ <!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
+ <li class="small-icon icon-home breadcrumbs" role="navigation">
+ <!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA} data-navbar-reference="home">{L_SITE_HOME}</a></span><!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA} data-navbar-reference="index">{L_INDEX}</a></span>
+ <!-- BEGIN navlinks -->
+ <!-- EVENT overall_header_navlink_prepend -->
+ <span class="crumb"><a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->>{navlinks.FORUM_NAME}</a></span>
+ <!-- EVENT overall_header_navlink_append -->
+ <!-- END navlinks -->
+ <!-- EVENT overall_header_breadcrumb_append -->
+ </li>
+
+ <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
+ <li class="rightside responsive-search" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">{L_SEARCH}</a></li>
<!-- ENDIF -->
- <li class="small-icon icon-faq rightside no-bulletin"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
- <!-- EVENT overall_header_navigation_prepend -->
</ul>
</div>
diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html
index cde183291d..cb2c09bff7 100644
--- a/phpBB/styles/prosilver/template/pagination.html
+++ b/phpBB/styles/prosilver/template/pagination.html
@@ -7,7 +7,7 @@
<ul class="dropdown-contents">
<li>{L_JUMP_TO_PAGE}{L_COLON}</li>
<li class="page-jump-form">
- <input type="text" name="page-number" maxlength="6" title="{L_SEARCH_KEYWORDS}" class="inputbox tiny" value="" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" />
+ <input type="number" name="page-number" maxlength="6" title="{L_JUMP_PAGE}" class="inputbox tiny" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" />
<input class="button2" value="{L_GO}" type="button" />
</li>
</ul>
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index c0bf681f47..986bc92298 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -20,10 +20,12 @@
</dd>
</dl>
<!-- ENDIF -->
+ <!-- IF S_JABBER_ENABLED -->
<dl>
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
<dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd>
</dl>
+ <!-- ENDIF -->
<!-- BEGIN profile_fields -->
<dl>
<dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index c44e830b9c..e8c50f79b2 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -1,5 +1,5 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP or U_ACP --><p class="responsive-center">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p><!-- ENDIF -->
+
<h2 class="forum-title"><!-- EVENT viewforum_forum_name_prepend --><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- EVENT viewforum_forum_name_append --></h2>
<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
@@ -27,15 +27,15 @@
<!-- IF S_HAS_SUBFORUM -->
<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
-<ul class="linklist">
- <li class="rightside mark-read"><a href="{U_MARK_FORUMS}" data-ajax="mark_forums_read">{L_MARK_SUBFORUMS_READ}</a></li>
-</ul>
+ <div class="action-bar compact">
+ <a href="{U_MARK_FORUMS}" class="mark-read rightside" data-ajax="mark_forums_read">{L_MARK_SUBFORUMS_READ}</a>
+ </div>
<!-- ENDIF -->
<!-- INCLUDE forumlist_body.html -->
<!-- ENDIF -->
<!-- IF S_DISPLAY_POST_INFO or .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
- <div class="action-bar top" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
+ <div class="action-bar top">
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
@@ -150,6 +150,15 @@
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+
+ <!-- IF not S_IS_BOT -->
+ <div class="responsive-show" style="display: none;">
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
+ </div>
+ <!-- IF topicrow.REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span><!-- ENDIF -->
+ <!-- ENDIF -->
+
<!-- IF .topicrow.pagination -->
<div class="pagination">
<ul>
@@ -164,19 +173,13 @@
</ul>
</div>
<!-- ENDIF -->
+
<div class="responsive-hide">
<!-- IF topicrow.S_HAS_POLL -->{POLL_IMG} <!-- ENDIF -->
<!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
</div>
- <!-- IF not S_IS_BOT -->
- <div class="responsive-show" style="display: none;">
- {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
- <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
- <!-- IF topicrow.REPLIES --><br />{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong><!-- ENDIF -->
- </div>
- <!-- ENDIF -->
<!-- EVENT topiclist_row_append -->
</div>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 03da6a74de..b764979f97 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -1,5 +1,5 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP or U_ACP --><p class="responsive-center">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p><!-- ENDIF -->
+
<h2 class="topic-title"><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
@@ -350,6 +350,21 @@
<!-- INCLUDE viewtopic_topic_tools.html -->
+ <!-- IF .quickmod -->
+ <div class="dropdown-container dropdown-container-{S_CONTENT_FLOW_BEGIN} dropdown-up dropdown-{S_CONTENT_FLOW_END} dropdown-button-control" id="quickmod">
+ <span title="{L_QUICK_MOD}" class="dropdown-trigger button icon-button modtools-icon dropdown-select">{L_QUICK_MOD}</span>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
+ <!-- BEGIN quickmod -->
+ <!-- DEFINE $QUICKMOD_AJAX = (quickmod.VALUE in ['lock', 'unlock', 'delete_topic', 'restore_topic', 'make_normal', 'make_sticky', 'make_announce', 'make_global']) -->
+ <li><a href="{quickmod.LINK}"<!-- IF $QUICKMOD_AJAX --> data-ajax="true" data-refresh="true"<!-- ENDIF -->>{quickmod.TITLE}</a></li>
+ <!-- END quickmod -->
+ </ul>
+ </div>
+ </div>
+ <!-- ENDIF -->
+
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
{TOTAL_POSTS}
@@ -366,21 +381,6 @@
<!-- EVENT viewtopic_body_footer_before -->
<!-- INCLUDE jumpbox.html -->
-<!-- IF .quickmod -->
- <form method="post" action="{S_MOD_ACTION}" id="quickmodform">
- <fieldset class="quickmod">
- <label for="quick-mod-select">{L_QUICK_MOD}{L_COLON}</label>
- <select name="action" id="quick-mod-select">
- <!-- BEGIN quickmod -->
- <option value="{quickmod.VALUE}">{quickmod.TITLE}</option>
- <!-- END quickmod -->
- </select>
- <input type="submit" value="{L_GO}" class="button2" />
- {S_FORM_TOKEN}
- </fieldset>
- </form>
-<!-- ENDIF -->
-
<!-- IF S_DISPLAY_ONLINE_LIST -->
<div class="stat-block online-list">
<h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
index 5394c00f6a..2a34ebd446 100644
--- a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
+++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
@@ -7,16 +7,12 @@
<!-- EVENT viewtopic_topic_tools_before -->
<!-- IF U_WATCH_TOPIC -->
<li class="small-icon icon-<!-- IF S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->">
- <a href="{U_WATCH_TOPIC}" class="watch-topic-link" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}" data-update-all=".watch-topic-link">
- {S_WATCH_TOPIC_TITLE}
- </a>
+ <a href="{U_WATCH_TOPIC}" class="watch-topic-link" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}" data-update-all=".watch-topic-link">{S_WATCH_TOPIC_TITLE}</a>
</li>
<!-- ENDIF -->
<!-- IF U_BOOKMARK_TOPIC -->
<li class="small-icon icon-bookmark">
- <a href="{U_BOOKMARK_TOPIC}" class="bookmark-link" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}" data-update-all=".bookmark-link">
- {S_BOOKMARK_TOPIC}
- </a>
+ <a href="{U_BOOKMARK_TOPIC}" class="bookmark-link" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}" data-update-all=".bookmark-link">{S_BOOKMARK_TOPIC}</a>
</li>
<!-- ENDIF -->
<!-- IF U_BUMP_TOPIC --><li class="small-icon icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 2e9253928e..bc9e4b3965 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -2,7 +2,7 @@
---------------------------------------- */
/**
-* common.css
+* common.css
*/
.rtl h1 {
margin-right: 0;
@@ -59,20 +59,20 @@
/* Horizontal lists
----------------------------------------*/
-.rtl ul.linklist li {
+.rtl ul.linklist > li {
float: right;
margin-right: 0;
- margin-left: 5px;
+ margin-left: 7px;
}
-.rtl ul.linklist li.rightside, .rtl p.rightside {
+.rtl ul.linklist > li.rightside, .rtl p.rightside, .rtl a.rightside {
float: left;
- margin-right: 5px;
+ margin-right: 7px;
margin-left: 0;
text-align: left;
}
-.rtl ul.leftside li, .rtl ul.rightside li {
+.rtl ul.leftside > li, .rtl ul.rightside > li {
float: left;
}
@@ -92,11 +92,16 @@
/* Bulletin icons for list items
----------------------------------------*/
-.rtl ul.linklist.bulletin li:before {
+.rtl ul.linklist.bulletin > li:before {
padding-left: 4px;
padding-right: 0;
}
+.rtl ul.linklist li.responsive-menu a.responsive-menu-link:before {
+ left: auto;
+ right: 0;
+}
+
/* Dropdown menu
---------------------------------------- */
.rtl .dropdown-container.topic-tools {
@@ -112,6 +117,10 @@
padding-right: 10px;
}
+.rtl .dropdown-extended .header {
+ text-align: right;
+}
+
.rtl .dropdown-extended .header .header_settings {
float: left;
}
@@ -180,7 +189,7 @@
/* Misc layout styles
---------------------------------------- */
-/* column[1-2] styles are containers for two column layouts
+/* column[1-2] styles are containers for two column layouts
Also see tweaks.css */
.rtl .column1 {
float: right;
@@ -276,12 +285,15 @@
text-align: left;
}
-.rtl .forabg {
- width: 99%; /* fix for IE6 */
+.rtl #quick-links {
+ margin-left: 7px;
+ margin-right: 0;
}
-.rtl .forumbg {
- width: 99%; /* fix for IE6 */
+.rtl .header-avatar span:after {
+ float: left;
+ padding-left: 0;
+ padding-right: 2px;
}
.rtl .member-search {
@@ -424,7 +436,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
}
.rtl dl.icon dt .list-inner {
- padding-left: 0;
+ padding-left: 5px;
padding-right: 45px; /* Space for folder icon */
}
@@ -436,7 +448,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
margin-right: 2px;
}
-.rtl dd.lastpost span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+.rtl dd.lastpost > span, .rtl ul.topiclist dd.info > span, .rtl ul.topiclist dd.time > span, .rtl dd.redirect > span, .rtl dd.moderation > span {
padding-left: 0;
padding-right: 5px;
}
@@ -616,7 +628,8 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
---------------------------------------- */
.rtl .small-icon {
background-position: 100% 50%;
- padding: 0 19px 0 0;
+ padding-left: 0;
+ padding-right: 19px;
}
.rtl ul.linklist li.small-icon {
@@ -1005,10 +1018,10 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
/* Forums and topics lists
----------------------------------------*/
- .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt {
+ .rtl ul.topiclist.forums dt {
margin-left: -250px;
}
- .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner {
+ .rtl ul.topiclist.forums dt .list-inner {
margin-left: 250px;
}
@@ -1020,11 +1033,11 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
@media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
{
- .rtl ul.topiclist.forums dt, .rtl ul.topiclist.topics dt {
+ .rtl ul.topiclist.forums dt {
margin-left: 0;
}
- .rtl ul.topiclist.forums dt .list-inner, .rtl ul.topiclist.topics dt .list-inner {
+ .rtl ul.topiclist.forums dt .list-inner {
margin-left: 0;
}
}
@@ -1047,7 +1060,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
{
.rtl dl.details dt, .rtl dl.details dd {
float: none;
- text-align: right;
+ text-align: right;
}
.rtl dl.details dd {
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index 96743bef5d..18c71d251e 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -21,8 +21,8 @@
vertical-align: bottom;
}
-.icon-button.dropdown-select {
- padding-right: 28px;
+.dropdown-select {
+ padding-right: 24px;
}
.icon-button:before {
@@ -35,6 +35,10 @@
width: 12px;
}
+.dropdown-select.icon-button:before {
+ margin-right: 4px;
+}
+
.dropdown-select:after {
background-position: -103px 10px;
border-left: 1px solid;
@@ -58,6 +62,10 @@
margin-right: 5px;
}
+#jumpbox .dropdown-select {
+ margin: 0;
+}
+
/* Big button images */
.reply-icon:before, .pmreply-icon:before { background-position: -20px 0; }
.reply-icon:hover:before, .pmreply-icon:hover:before { background-position: -20px -20px; }
@@ -73,7 +81,11 @@
.forwardpm-icon:before { background-position: -40px 0; }
.forwardpm-icon:hover:before { background-position: -40px -20px; }
-.tools-icon:before {
+.modtools-icon {
+ font-size: 0;
+}
+
+.tools-icon:before, .modtools-icon:before {
background-position: -80px 0;
height: 16px;
margin-top: 2px;
@@ -83,6 +95,10 @@
.dropdown-visible .tools-icon:before,
.nojs .dropdown-container:hover .tools-icon:before { background-position: -80px -20px; }
+.modtools-icon:before { background-position: -225px 0; }
+.dropdown-visible .modtools-icon:before,
+.nojs .dropdown-container:hover .modtools-icon:before { background-position: -225px -20px; }
+
/* Icon images
---------------------------------------- */
.small-icon {
@@ -96,7 +112,7 @@ ul.linklist li.small-icon {
padding-left: 0;
}
-ul.linklist.bulletin li.small-icon:before {
+ul.linklist.bulletin > li.small-icon:before {
display: none;
}
@@ -157,7 +173,7 @@ ul.linklist.bulletin li.small-icon:before {
margin-top: 2px;
}
-.post-buttons li {
+.post-buttons > li {
float: left;
margin-right: 3px;
}
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 4b7532ab8a..fce66f7efb 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -5,7 +5,7 @@ Colours and backgrounds for common.css
html, body {
color: #536482;
- background-color: #FFFFFF;
+ background-color: #F5F7FA;
}
h1 {
@@ -43,6 +43,11 @@ hr {
/* Round cornered boxes and backgrounds
---------------------------------------- */
+#wrap {
+ background-color: #FFF;
+ border-color: #E6E9ED;
+}
+
.headerbar {
background-color: #12A3EB;
background-image: url("./images/bg_header.gif");
@@ -106,7 +111,7 @@ table.zebra-list tr:nth-child(even) td, ul.zebra-list li:nth-child(even) {
----------------------------------------*/
ul.navlinks {
- border-bottom-color: #FFFFFF;
+ border-top-color: #FFFFFF;
}
/* Table styles
@@ -223,15 +228,15 @@ p.post-notice {
background-image: none;
}
-p.post-notice.deleted:before {
+p.post-notice.deleted:before {
background-image: url("./images/icon_topic_deleted.png");
}
-p.post-notice.unapproved:before {
+p.post-notice.unapproved:before {
background-image: url("./images/icon_topic_unapproved.gif");
}
-p.post-notice.reported:before, p.post-notice.error:before {
+p.post-notice.reported:before, p.post-notice.error:before {
background-image: url("./images/icon_topic_reported.gif");
}
@@ -241,16 +246,10 @@ Colours and backgrounds for links.css
-------------------------------------------------------------- */
a { color: #105289; }
-a:visited { color: #105289; }
a:hover { color: #D31141; }
-a:active { color: #368AD2; }
/* Links on gradient backgrounds */
-#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
- color: #FFFFFF;
-}
-
-#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+#search-box a, .navbg a, .forumbg .header a, .forabg .header a, th a {
color: #FFFFFF;
}
@@ -258,44 +257,11 @@ a:active { color: #368AD2; }
color: #A8D8FF;
}
-#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
- color: #C8E6FF;
-}
-
/* Notification mark read link */
.dropdown-extended a.mark_read {
background-color: #FFFFFF;
}
-/* Links for forum/topic lists */
-a.forumtitle {
- color: #105289;
-}
-
-/* a.forumtitle:visited { color: #105289; } */
-
-a.forumtitle:hover {
- color: #BC2A4D;
-}
-
-a.forumtitle:active {
- color: #105289;
-}
-
-a.topictitle {
- color: #105289;
-}
-
-/* a.topictitle:visited { color: #368AD2; } */
-
-a.topictitle:hover {
- color: #BC2A4D;
-}
-
-a.topictitle:active {
- color: #105289;
-}
-
/* Post body links */
.postlink {
color: #368AD2;
@@ -307,41 +273,15 @@ a.topictitle:active {
border-bottom-color: #5D8FBD;
}
-.postlink:active {
- color: #368AD2;
-}
-
.postlink:hover {
background-color: #D0E4F6;
color: #0D4473;
}
-.signature a, .signature a:visited, .signature a:hover, .signature a:active {
+.signature a, .signature a:hover {
background-color: transparent;
}
-/* Profile links */
-.postprofile a:link, .postprofile a:visited, .postprofile dt.author a {
- color: #105289;
-}
-
-.postprofile a:hover, .postprofile dt.author a:hover {
- color: #D31141;
-}
-
-.postprofile a:active {
- color: #105289;
-}
-
-/* Profile searchresults */
-.search .postprofile a {
- color: #105289;
-}
-
-.search .postprofile a:hover {
- color: #D31141;
-}
-
/* Back to top of page */
a.top {
background-image: url("./images/icon_back_top.gif");
@@ -369,7 +309,6 @@ a.arrow-right:hover {
color: #368AD2;
}
-
/*
--------------------------------------------------------------
Colours and backgrounds for content.css
@@ -658,7 +597,7 @@ dd.profile-warnings {
--------------------------------------------------------------
Colours and backgrounds for buttons.css
-------------------------------------------------------------- */
-.button, .button:visited {
+.button {
border-color: #C7C3BF;
background-color: #FFFFFF;
background-image: -moz-linear-gradient(top, #FFFFFF, #E9E9E9);
@@ -668,7 +607,11 @@ Colours and backgrounds for buttons.css
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#FFFFFF', EndColorStr='#E9E9E9')";
box-shadow: 0 0 0 1px #FFFFFF inset;
-webkit-box-shadow: 0 0 0 1px #FFFFFF inset;
- color: #BC2A4D;
+ color: #D31141;
+}
+
+.dropdown-select, .dropdown-select:visited {
+ color: #536482;
}
.button:hover, .dropdown-visible .dropdown-select, .nojs .dropdown-container:hover .dropdown-select {
@@ -694,24 +637,37 @@ Colours and backgrounds for buttons.css
/* Icon images
---------------------------------------- */
-.icon-faq { background-image: url("./images/icon_faq.gif"); }
-.icon-members { background-image: url("./images/icon_members.gif"); }
-.icon-home { background-image: url("./images/icon_home.gif"); }
-.icon-ucp { background-image: url("./images/icon_ucp.gif"); }
-.icon-register { background-image: url("./images/icon_register.gif"); }
-.icon-logout { background-image: url("./images/icon_logout.gif"); }
-.icon-bookmark { background-image: url("./images/icon_bookmark.gif"); }
-.icon-bump { background-image: url("./images/icon_bump.gif"); }
-.icon-subscribe { background-image: url("./images/icon_subscribe.gif"); }
-.icon-unsubscribe { background-image: url("./images/icon_unsubscribe.gif"); }
-.icon-pages { background-image: url("./images/icon_pages.gif"); }
+.icon-acp { background-image: url("./images/icon_acp.gif"); }
+.icon-bookmark { background-image: url("./images/icon_bookmark.gif"); }
+.icon-bump { background-image: url("./images/icon_bump.gif"); }
+.icon-contact { background-image: url("./images/icon_pm.gif"); }
+.icon-delete-cookies { background-image: url("./images/icon_delete_cookies.gif"); }
+.icon-download { background-image: url("./images/icon_download.gif"); }
+.icon-faq { background-image: url("./images/icon_faq.gif"); }
+.icon-home { background-image: url("./images/icon_home.gif"); }
+.icon-logout { background-image: url("./images/icon_logout.gif"); }
+.icon-mark { background-image: url("./images/icon_mark.gif"); }
+.icon-mcp { background-image: url("./images/icon_mcp.gif"); }
+.icon-members { background-image: url("./images/icon_members.gif"); }
+.icon-notification { background-image: url("./images/icon_notification.gif"); }
+.icon-pages { background-image: url("./images/icon_pages.gif"); }
+.icon-pm { background-image: url("./images/icon_pm.gif"); }
+.icon-print { background-image: url("./images/icon_print.gif"); }
+.icon-profile { background-image: url("./images/icon_profile.gif"); }
+.icon-quick-links { background-image: url("./images/icon_quick_links.gif"); }
+.icon-register { background-image: url("./images/icon_register.gif"); }
.icon-search, .responsive-search a { background-image: url("./images/icon_search.gif"); }
-.icon-notification { background-image: url("./images/icon_notification.gif"); }
-.icon-pm { background-image: url("./images/icon_pm.gif"); }
-.icon-download { background-image: url("./images/icon_download.gif"); }
-.icon-mark { background-image: url("./images/icon_mark.gif"); }
-.icon-sendemail { background-image: url("./images/icon_sendemail.gif"); }
-.icon-print { background-image: url("./images/icon_print.gif"); }
+.icon-search-active { background-image: url("./images/subforum_read.gif"); }
+.icon-search-advanced { background-image: url("./images/icon_search_adv.gif"); }
+.icon-search-new { background-image: url("./images/subforum_unread.gif"); }
+.icon-search-self { background-image: url("./images/icon_topic_latest.gif"); }
+.icon-search-unanswered { background-image: url("./images/icon_post_target.gif"); }
+.icon-search-unread { background-image: url("./images/subforum_unread.gif"); }
+.icon-sendemail { background-image: url("./images/icon_sendemail.gif"); }
+.icon-subscribe { background-image: url("./images/icon_subscribe.gif"); }
+.icon-team { background-image: url("./images/icon_team.gif"); }
+.icon-ucp { background-image: url("./images/icon_ucp.gif"); }
+.icon-unsubscribe { background-image: url("./images/icon_unsubscribe.gif"); }
/* Profile & navigation icons */
.contact-icon { background-image: url("./images/icons_contact.png"); }
@@ -814,7 +770,7 @@ ul.cplist {
#tabs .tab > a:hover {
background: #DDEDFB;
- color: #BC2A4D;
+ color: #D31141;
}
#tabs .activetab > a,
@@ -855,7 +811,7 @@ ul.cplist {
}
.responsive-tab .responsive-tab-link:hover:before {
- border-color: #BC2A4D;
+ border-color: #D31141;
}
/* UCP navigation menu
@@ -1079,7 +1035,7 @@ a.button2, input.button2, input.button3 {
}
/* <a> button in the style of the form buttons */
-a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+a.button1, a.button2 {
color: #000000;
}
@@ -1122,7 +1078,7 @@ input.disabled {
}
.dropdown-extended ul li {
- border-bottom-color: #B9B9B9;
+ border-top-color: #B9B9B9;
}
.dropdown-extended ul li:hover {
@@ -1184,6 +1140,10 @@ ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist
border-color: #DCDCDC;
}
+.dropdown li.separator {
+ border-color: #DCDCDC;
+}
+
/* Notifications
---------------------------------------- */
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index a52f5e494d..e33bf99965 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -175,8 +175,18 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul {
/* Main blocks
---------------------------------------- */
#wrap {
- padding: 0 20px;
- min-width: 650px;
+ border: 1px solid transparent;
+ border-radius: 8px;
+ margin: 0 auto;
+ max-width: 1152px;
+ min-width: 625px;
+ padding: 15px;
+}
+
+@media only screen and (max-width: 1220px), only screen and (max-device-width: 1220px) {
+ #wrap {
+ margin: 0 12px;
+ }
}
#simple-wrap {
@@ -261,7 +271,7 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul {
}
.navbar {
- padding: 5px 10px 5px 10px;
+ padding: 3px 10px;
border-radius: 7px;
}
@@ -307,6 +317,10 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul {
/* Horizontal lists
----------------------------------------*/
+.navbar ul.linklist {
+ padding: 2px 0;
+}
+
ul.linklist {
display: block;
margin: 0;
@@ -322,29 +336,25 @@ ul.linklist:after {
padding: 5px 10px;
}
-ul.linklist li {
- display: block;
- list-style-type: none;
+ul.linklist > li {
float: left;
- width: auto;
- margin-right: 5px;
font-size: 1.1em;
line-height: 2.2em;
+ list-style-type: none;
+ margin-right: 7px;
padding-top: 1px;
+ width: auto;
}
-ul.linklist li.rightside, p.rightside {
+ul.linklist > li.rightside, p.rightside, a.rightside {
float: right;
margin-right: 0;
- margin-left: 5px;
+ margin-left: 7px;
text-align: right;
}
ul.navlinks {
- padding-bottom: 1px;
- margin-bottom: 1px;
- border-bottom: 1px solid transparent;
- font-weight: bold;
+ border-top: 1px solid transparent;
}
ul.leftside {
@@ -372,7 +382,7 @@ ul.linklist li.responsive-menu a.responsive-menu-link {
font-size: 16px;
position: relative;
width: 16px;
- line-height: 16.5px;
+ line-height: 20px;
text-decoration: none;
}
@@ -403,27 +413,18 @@ li.responsive-menu.dropdown-left .dropdown {
right: -6px;
}
-li.responsive-menu .dropdown .dropdown-contents {
- padding: 0 5px;
-}
-
-ul.linklist .dropdown-down .dropdown {
+ul.linklist .dropdown {
top: 22px;
}
ul.linklist .dropdown-up .dropdown {
bottom: 18px;
+ top: auto;
}
-ul.linklist .dropdown li {
- clear: both;
-}
-
-
-
/* Bulletin icons for list items
----------------------------------------*/
-ul.linklist.bulletin li:before {
+ul.linklist.bulletin > li:before {
display: inline-block;
content: "\2022";
font-size: inherit;
@@ -431,11 +432,12 @@ ul.linklist.bulletin li:before {
padding-right: 4px;
}
-ul.linklist.bulletin li:first-child:before, ul.linklist.bulletin li.rightside:last-child:before {
+ul.linklist.bulletin > li:first-child:before,
+ul.linklist.bulletin > li.rightside:last-child:before {
content: none;
}
-ul.linklist.bulletin li.no-bulletin:before {
+ul.linklist.bulletin > li.no-bulletin:before {
content: none;
}
@@ -443,20 +445,46 @@ ul.linklist.bulletin li.no-bulletin:before {
display: none !important;
}
-/* Avatar in overall_header.html */
+/* Profile in overall_header.html */
+.header-profile {
+ display: inline-block;
+ vertical-align: top;
+}
+
+.header-avatar:hover {
+ text-decoration: none;
+}
+
.header-avatar img {
margin-bottom: 2px;
- max-height: 25px;
+ max-height: 20px;
vertical-align: middle;
width: auto;
}
+.header-avatar span:after {
+ content: '\25BC';
+ display: inline-block;
+ font-size: 9px;
+ float: right;
+ padding-left: 2px;
+ opacity: 0.7;
+}
+
/* Dropdown menu
----------------------------------------*/
.dropdown-container {
position: relative;
}
+.dropdown-container-right {
+ float: right;
+}
+
+.dropdown-container-left {
+ float: left;
+}
+
.nojs .dropdown-container:hover .dropdown {
display: block !important;
}
@@ -556,14 +584,14 @@ ul.linklist.bulletin li.no-bulletin:before {
padding: 5px;
position: relative;
min-width: 40px;
- max-height: 200px;
+ max-height: 300px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.dropdown li {
- border-bottom: 1px dotted transparent;
+ border-top: 1px dotted transparent;
float: none !important;
line-height: normal !important;
font-size: 1em !important;
@@ -575,8 +603,16 @@ ul.linklist.bulletin li.no-bulletin:before {
text-align: left;
}
-.dropdown li:last-child, .dropdown li li {
- border-bottom: 0;
+.dropdown-contents > li {
+ padding-right: 15px;
+}
+
+.dropdown-nonscroll > li {
+ padding-right: 0;
+}
+
+.dropdown li:first-child, .dropdown li.separator + li, .dropdown li li {
+ border-top: 0;
}
.dropdown li li:first-child {
@@ -596,7 +632,13 @@ ul.linklist.bulletin li.no-bulletin:before {
white-space: normal;
}
-.dropdown li:before, .dropdown li:after {
+.dropdown li.separator {
+ border-top: 1px solid transparent;
+ margin: 4px 0;
+ padding: 0;
+}
+
+.dropdown li.separator:first-child, .dropdown li.separator:last-child {
display: none !important;
}
@@ -604,6 +646,7 @@ ul.linklist.bulletin li.no-bulletin:before {
----------------------------------------*/
.breadcrumbs .crumb {
float: left;
+ font-weight: bold;
word-wrap: normal;
}
@@ -809,6 +852,10 @@ fieldset.fields1 dl.pmlist dd.recipients {
margin: 4px 0;
}
+.forabg + .action-bar {
+ margin-top: 2em;
+}
+
.action-bar:after {
clear: both;
content: '';
@@ -912,14 +959,14 @@ fieldset.fields1 dl.pmlist dd.recipients {
.phpbb_alert {
border: 1px solid transparent;
display: none;
- left: 0;
+ left: 0;
padding: 0 25px 20px 25px;
position: fixed;
- right: 0;
+ right: 0;
top: 150px;
z-index: 50;
width: 620px;
- margin: 0 auto;
+ margin: 0 auto;
}
@media only screen and (max-height: 500px), only screen and (max-device-width: 500px)
@@ -1062,6 +1109,14 @@ form > p.post-notice strong {
line-height: 20px;
}
+#jumpbox {
+ margin: 5px 0;
+}
+
+.stat-block {
+ clear: both;
+}
+
#top {
position: absolute;
top: -20px;
@@ -1099,11 +1154,7 @@ form > p.post-notice strong {
.dropdown-extended {
display: none;
- position: absolute;
- left: 0;
- width: 340px;
z-index: 1;
- top: 22px;
}
.dropdown-extended ul {
@@ -1117,24 +1168,30 @@ form > p.post-notice strong {
padding: 0;
margin: 0 !important;
float: none;
- border-bottom: 1px solid;
+ border-top: 1px solid;
list-style-type: none;
font-size: 0.95em;
clear: both;
position: relative;
}
-.dropdown-extended ul li.no_notifications {
- padding: 10px;
+.dropdown-extended ul li:first-child {
+ border-top: none;
}
-.dropdown-extended ul li:before, .dropdown-extended ul li:after {
- display: none;
+.dropdown-extended ul li.no_notifications {
+ padding: 10px;
}
.dropdown-extended .dropdown-contents {
max-height: none;
padding: 0;
+ position: absolute;
+ width: 340px;
+}
+
+.nojs .dropdown-extended .dropdown-contents {
+ position: relative;
}
.dropdown-extended .header {
@@ -1142,8 +1199,9 @@ form > p.post-notice strong {
font-family: Arial, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 11px;
font-weight: bold;
+ text-align: left;
text-shadow: 1px 1px 1px white;
- text-transform: uppercase;
+ text-transform: uppercase;
line-height: 30px;
border-bottom: 1px solid;
border-radius: 5px 5px 0 0;
@@ -1233,6 +1291,30 @@ form > p.post-notice strong {
display: block;
}
+/* Navbar specific list items
+----------------------------------------*/
+
+#quick-links {
+ margin: 0 7px 0 0;
+}
+
+#quick-links a.responsive-menu-link {
+ display: block;
+ font-size: inherit;
+ line-height: inherit;
+ margin: 0;
+ width: auto;
+}
+
+#quick-links a.responsive-menu-link:before {
+ font-size: 16px;
+ line-height: 16.5px;
+}
+
+.compact #quick-links a.responsive-menu-link {
+ font-size: 0;
+}
+
.compact .icon-notification > a > span, .compact .icon-pm > a > span {
display: none;
}
@@ -1252,3 +1334,19 @@ form > p.post-notice strong {
.dropdown-page-jump input.tiny {
width: 50px;
}
+
+.dropdown .clone {
+ display: none;
+}
+
+.responsive .dropdown .clone {
+ display: inherit;
+}
+
+.dropdown .clone + li.separator {
+ display: none;
+}
+
+.responsive .dropdown .clone + li.separator {
+ display: inherit;
+}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index b99312a5be..a014f57d47 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -210,7 +210,7 @@ dd.time {
line-height: 200%;
}
-dd.lastpost span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
+dd.lastpost > span, ul.topiclist dd.info > span, ul.topiclist dd.time > span, dd.redirect > span, dd.moderation > span {
display: block;
padding-left: 5px;
}
@@ -351,10 +351,6 @@ dd.option {
line-height: 1.4em;
}
-span.corners-top, span.corners-bottom {
- display: none;
-}
-
dl.faq {
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 1.1em;
@@ -462,7 +458,7 @@ blockquote {
blockquote blockquote {
/* Nested quotes */
font-size: 1em;
- margin: 0.5em 1px 0 15px;
+ margin: 0.5em 1px 0 15px;
}
blockquote cite {
@@ -519,7 +515,7 @@ blockquote .codebox {
----------------------------------------*/
.attachbox {
float: left;
- width: auto;
+ width: auto;
max-width: 100%;
margin: 5px 5px 5px 0;
padding: 6px;
@@ -596,7 +592,7 @@ dl.file dt {
dl.file dd {
margin: 0;
- padding: 0;
+ padding: 0;
}
dl.thumbnail img {
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
index e144c74f20..5149a16ec9 100644
--- a/phpBB/styles/prosilver/theme/cp.css
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -138,7 +138,7 @@ ul.cplist {
cursor: pointer;
}
-/* CP tabbed menu
+/* CP tabbed menu
----------------------------------------*/
#tabs {
margin: 20px 0 0 7px;
@@ -321,7 +321,7 @@ ol.def-rules li {
border-right-color: transparent;
}
-.pmlist li.pm_marked_colour, .pm_marked_colour,
+.pmlist li.pm_marked_colour, .pm_marked_colour,
.pmlist li.pm_replied_colour, .pm_replied_colour,
.pmlist li.pm_friend_colour, .pm_friend_colour,
.pmlist li.pm_foe_colour, .pm_foe_colour {
@@ -354,7 +354,7 @@ ol.def-rules li {
@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
{
.nojs #tabs a span, .nojs #minitabs a span {
- max-width: 40px;
+ max-width: 40px;
overflow: hidden;
text-overflow: ellipsis;
letter-spacing: -.5px;
@@ -366,8 +366,8 @@ ol.def-rules li {
margin: 0;
}
- #navigation {
- padding: 0;
+ #navigation {
+ padding: 0;
margin: 0 auto;
max-width: 320px;
}
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index 0c0a3e5ca9..f0effa01c4 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -68,7 +68,7 @@ fieldset dl {
}
fieldset dt {
- float: left;
+ float: left;
width: 40%;
text-align: left;
display: block;
@@ -201,24 +201,6 @@ fieldset.forum-selection2 {
float: right;
}
-/* Jumpbox */
-fieldset.jumpbox {
- text-align: right;
- margin-top: 15px;
- min-height: 2.5em;
-}
-
-fieldset.jumpbox select {
- max-width: 50%;
-}
-
-fieldset.quickmod {
- width: 50%;
- float: right;
- text-align: right;
- height: 2.5em;
-}
-
/* Submit button fieldset */
fieldset.submit-buttons {
text-align: center;
@@ -294,6 +276,10 @@ textarea.inputbox {
width: auto !important;
}
+input[type="number"] {
+ -moz-padding-end: inherit;
+}
+
input[type="search"] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
@@ -331,8 +317,8 @@ input.button3 {
font-variant: small-caps;
}
-input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
- cursor: pointer;
+input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
+ cursor: pointer;
}
/* Alternative button */
diff --git a/phpBB/styles/prosilver/theme/images/icon_acp.gif b/phpBB/styles/prosilver/theme/images/icon_acp.gif
new file mode 100644
index 0000000000..3afa98ee8f
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_acp.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_delete_cookies.gif b/phpBB/styles/prosilver/theme/images/icon_delete_cookies.gif
new file mode 100644
index 0000000000..f7665ebff8
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_delete_cookies.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_mcp.gif b/phpBB/styles/prosilver/theme/images/icon_mcp.gif
new file mode 100644
index 0000000000..80de2e53f7
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_mcp.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_profile.gif b/phpBB/styles/prosilver/theme/images/icon_profile.gif
new file mode 100644
index 0000000000..a0ec098460
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_profile.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_team.gif b/phpBB/styles/prosilver/theme/images/icon_team.gif
new file mode 100644
index 0000000000..613158257b
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_team.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icons_button.png b/phpBB/styles/prosilver/theme/images/icons_button.png
index a45a0cc2ba..da9ae6f1b4 100644
--- a/phpBB/styles/prosilver/theme/images/icons_button.png
+++ b/phpBB/styles/prosilver/theme/images/icons_button.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css
index 89639dde02..890f854baa 100644
--- a/phpBB/styles/prosilver/theme/links.css
+++ b/phpBB/styles/prosilver/theme/links.css
@@ -5,19 +5,10 @@
a {
direction: ltr;
unicode-bidi: embed;
-}
-
-a:link, a:visited {
text-decoration: none;
}
-a:hover {
- text-decoration: underline;
-}
-
-a:active {
- text-decoration: none;
-}
+a:hover { text-decoration: underline; }
/* Coloured usernames */
.username-coloured {
@@ -27,11 +18,7 @@ a:active {
}
/* Links on gradient backgrounds */
-#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
- text-decoration: none;
-}
-
-#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+#search-box a, .navbg a, .forumbg .header a, .forabg .header a, th a {
text-decoration: none;
}
@@ -39,10 +26,6 @@ a:active {
text-decoration: underline;
}
-#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
- text-decoration: none;
-}
-
/* Navigation bar links */
ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
display: inline-block;
@@ -118,13 +101,13 @@ a.lastsubject:hover {
text-decoration: none;
}
-.signature a, .signature a:visited, .signature a:hover, .signature a:active {
+.signature a, .signature a:hover {
border: none;
text-decoration: underline;
}
/* Profile links */
-.postprofile a:link, .postprofile a:visited, .postprofile dt.author a {
+.postprofile a, .postprofile dt.author a {
font-weight: bold;
text-decoration: none;
}
@@ -133,22 +116,14 @@ a.lastsubject:hover {
text-decoration: underline;
}
-/* CSS spec requires a:link, a:visited, a:hover and a:active rules to be specified in this order. */
-/* See http://www.phpbb.com/bugs/phpbb3/59685 */
-.postprofile a:active {
- font-weight: bold;
- text-decoration: none;
-}
-
-
-/* Profile searchresults */
+/* Profile searchresults */
.search .postprofile a {
- text-decoration: none;
+ text-decoration: none;
font-weight: normal;
}
.search .postprofile a:hover {
- text-decoration: underline;
+ text-decoration: underline;
}
/* Back to top of page */
@@ -182,7 +157,7 @@ a.arrow-down { background: none no-repeat right center; }
a.arrow-left { background: none no-repeat 3px 60%; }
a.arrow-right { background: none no-repeat 95% 60%; }
-a.arrow-up, a.arrow-up:link, a.arrow-up:active, a.arrow-up:visited {
+a.arrow-up {
padding-left: 10px;
text-decoration: none;
border-bottom-width: 0;
@@ -192,7 +167,7 @@ a.arrow-up:hover {
background-position: left top;
}
-a.arrow-down, a.arrow-down:link, a.arrow-down:active, a.arrow-down:visited {
+a.arrow-down {
padding-right: 10px;
}
@@ -201,7 +176,7 @@ a.arrow-down:hover {
text-decoration: none;
}
-a.arrow-left, a.arrow-left:active, a.arrow-left:visited {
+a.arrow-left {
padding-left: 12px;
}
@@ -210,7 +185,7 @@ a.arrow-left:hover {
background-position: 0 60%;
}
-a.arrow-right, a.arrow-right:active, a.arrow-right:visited {
+a.arrow-right {
padding-right: 12px;
}
diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css
index 88de620493..34129c92e8 100644
--- a/phpBB/styles/prosilver/theme/print.css
+++ b/phpBB/styles/prosilver/theme/print.css
@@ -91,11 +91,11 @@ hr {
}
/* Dont want to print url for names or titles in content area */
-.postbody .author a:link, .postbody .author a:visited,
-html>body .postbody .author a:link:after,
+.postbody .author a:link, .postbody .author a:visited,
+html>body .postbody .author a:link:after,
html>body .postbody .author a:visited:after,
-.postquote .quote-by a:link, .postquote .quote-by a:visited,
-html>body .postquote .quote-by a:link:after,
+.postquote .quote-by a:link, .postquote .quote-by a:visited,
+html>body .postquote .quote-by a:link:after,
html>body .postquote .quote-by a:visited:after,
html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after {
text-decoration: none;
@@ -119,7 +119,7 @@ html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after {
.postquote img { display: none; }
.postquote span { display: block; }
.postquote span .postquote { font-size: 100%; }
-.quote-by, blockquote cite {
+.quote-by, blockquote cite {
color: black;
display : block;
font-weight: bold;
diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css
index e27a2292b3..241b4d132e 100644
--- a/phpBB/styles/prosilver/theme/responsive.css
+++ b/phpBB/styles/prosilver/theme/responsive.css
@@ -13,12 +13,15 @@ html {
}
body {
- padding: 0 5px;
+ padding: 0;
}
#wrap {
- min-width: 300px;
- padding: 0;
+ border: none;
+ border-radius: 0;
+ margin: 0;
+ min-width: 290px;
+ padding: 0 5px;
}
/* Common block wrappers
@@ -73,7 +76,7 @@ body {
.responsive-search a {
display: block;
width: 16px;
- height: 18px;
+ height: 22px;
text-indent: 99px;
overflow: hidden;
background-position: 50% 50%;
@@ -119,23 +122,23 @@ ul.topiclist li.header dt .list-inner {
min-height: 0;
}
-ul.topiclist dd {
- display: none;
+ul.topiclist dd {
+ display: none;
}
-ul.topiclist dd.mark {
- display: block;
+ul.topiclist dd.mark {
+ display: block;
}
/* Forums and topics lists
----------------------------------------*/
-ul.topiclist.forums dt, ul.topiclist.topics dt {
+ul.topiclist.forums dt {
margin-right: -250px;
}
-ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner {
+ul.topiclist.forums dt .list-inner {
margin-right: 250px;
}
-ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost {
+ul.topiclist.forums dd.lastpost {
display: block;
}
@@ -160,15 +163,15 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn {
@media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
{
- ul.topiclist.forums dt, ul.topiclist.topics dt {
+ ul.topiclist.forums dt {
margin-right: 0;
}
- ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner {
+ ul.topiclist.forums dt .list-inner {
margin-right: 0;
}
- ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost {
+ ul.topiclist.forums dd.lastpost {
display: none;
}
}
@@ -190,8 +193,8 @@ ul.topiclist li.row dt a.subforum {
----------------------------------------*/
@media only screen and (max-width: 350px), only screen and (max-device-width: 350px)
{
- .dropdown-extended {
- width: 250px;
+ .dropdown-extended .dropdown-contents {
+ width: auto;
}
}
@@ -201,8 +204,8 @@ ul.topiclist li.row dt a.subforum {
margin: 5px 0 0;
}
-.row .pagination > ul {
- margin-top: 0;
+.row .pagination .ellipsis + li {
+ display: none !important;
}
/* Responsive tables
@@ -367,7 +370,7 @@ fieldset.quick-login label[for="autologin"] {
dl.details dt, dl.details dd {
width: auto;
float: none;
- text-align: left;
+ text-align: left;
}
dl.details dd {
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index 9a8ed5d399..ea0c66d20a 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -1,6 +1,6 @@
/* Style Sheet Tweaks
-These style definitions are IE 7 and 8 specific
+These style definitions are IE 7 and 8 specific
tweaks required due to its poor CSS support.
-------------------------------------------------*/
@@ -14,9 +14,9 @@ ul.linklist {
}
/* Align checkboxes/radio buttons nicely */
-dd label input {
- vertical-align: text-bottom;
- *vertical-align: middle;
+dd label input {
+ vertical-align: text-bottom;
+ *vertical-align: middle;
}
/* Simple fix so forum and topic lists always have a height set */
@@ -69,5 +69,5 @@ dd.option {
/* Fixes header-avatar aspect-ratio in IE8 */
.header-avatar img {
- height: 25px;
+ height: 20px;
}
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index 2fdd0c77c1..1a2786015f 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<!-- EVENT index_body_linklist_before -->
+<!-- EVENT index_body_markforums_before -->
<!-- IF U_MCP or U_ACP -->
<div id="pageheader">
@@ -10,7 +10,7 @@
<br clear="all" /><br />
<!-- ENDIF -->
-<!-- EVENT index_body_linklist_after -->
+<!-- EVENT index_body_markforums_after -->
<!-- INCLUDE forumlist_body.html -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html
index aa6b61fe22..12dd10be2e 100644
--- a/phpBB/styles/subsilver2/template/memberlist_search.html
+++ b/phpBB/styles/subsilver2/template/memberlist_search.html
@@ -104,8 +104,12 @@
<tr>
<td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td>
<td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
- <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td>
- <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td>
+ <!-- IF S_JABBER_ENABLED -->
+ <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td>
+ <td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td>
+ <!-- ELSE -->
+ <td colspan="2" class="row1">&nbsp;</td>
+ <!-- ENDIF -->
</tr>
<tr>
<td class="row1"><b class="genmed">{L_SORT_BY}{L_COLON}</b></td>
diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html
index 550643ff03..00c627f62e 100644
--- a/phpBB/styles/subsilver2/template/memberlist_view.html
+++ b/phpBB/styles/subsilver2/template/memberlist_view.html
@@ -121,10 +121,12 @@
<td><a href="{U_PM}" class="imageset">{PM_IMG}</a></td>
</tr>
<!-- ENDIF -->
+ <!-- IF S_JABBER_ENABLED -->
<tr>
<td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}{L_COLON} </td>
<td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false" class="imageset">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td>
</tr>
+ <!-- ENDIF -->
<!-- BEGIN custom_fields -->
<!-- IF custom_fields.S_PROFILE_CONTACT -->
<tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
index bf0aa8f899..2d0140a15d 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
@@ -12,10 +12,12 @@
<tr>
<td class="row1" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
+<!-- IF S_JABBER_ENABLED -->
<tr>
<td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}{L_COLON} </b></td>
<td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="{JABBER}" /></td>
</tr>
+<!-- ENDIF -->
<!-- IF S_BIRTHDAYS_ENABLED -->
<tr>
<td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td>
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 43b5f7f001..4c897c58aa 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -44,6 +44,7 @@ if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
}
$pagination = $phpbb_container->get('pagination');
+$viewonline_helper = $phpbb_container->get('viewonline_helper');
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page');
@@ -102,7 +103,7 @@ $guest_counter = 0;
// Get number of online guests (if we do not display them)
if (!$show_guests)
{
- switch ($db->sql_layer)
+ switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
@@ -213,11 +214,7 @@ while ($row = $db->sql_fetchrow($result))
continue;
}
- preg_match('#^([a-z0-9/_-]+)#i', $row['session_page'], $on_page);
- if (!sizeof($on_page))
- {
- $on_page[1] = '';
- }
+ $on_page = $viewonline_helper->get_user_page($row['session_page']);
switch ($on_page[1])
{
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index d87f7de2b0..23f2fe8e3d 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -523,6 +523,19 @@ gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
// Quick mod tools
$allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
+$s_quickmod_action = append_sid(
+ "{$phpbb_root_path}mcp.$phpEx",
+ array(
+ 'f' => $forum_id,
+ 't' => $topic_id,
+ 'start' => $start,
+ 'quickmod' => 1,
+ 'redirect' => urlencode(str_replace('&amp;', '&', $viewtopic_url)),
+ ),
+ true,
+ $user->session_id
+);
+
$quickmod_array = array(
// 'key' => array('LANG_KEY', $userHasPermissions),
@@ -546,7 +559,7 @@ foreach($quickmod_array as $option => $qm_ary)
{
if (!empty($qm_ary[1]))
{
- phpbb_add_quickmod_option($option, $qm_ary[0]);
+ phpbb_add_quickmod_option($s_quickmod_action, $option, $qm_ary[0]);
}
}
@@ -631,7 +644,7 @@ $template->assign_vars(array(
'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start")),
- 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . "&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
+ 'S_MOD_ACTION' => $s_quickmod_action,
'L_RETURN_TO_FORUM' => $user->lang('RETURN_TO', $topic_data['forum_name']),
'S_VIEWTOPIC' => true,
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 246397ad6c..de505e2c9f 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -38,6 +38,7 @@ class phpbb_avatar_manager_test extends \phpbb_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php
index 621efaa830..206c3a4f0b 100644
--- a/tests/controller/helper_route_test.php
+++ b/tests/controller/helper_route_test.php
@@ -26,6 +26,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/dbal/fixtures/migrator_config_text.xml b/tests/dbal/fixtures/migrator_config_text.xml
new file mode 100644
index 0000000000..ba8e1fcfcc
--- /dev/null
+++ b/tests/dbal/fixtures/migrator_config_text.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config_text">
+ <column>config_name</column>
+ <column>config_value</column>
+ </table>
+</dataset>
diff --git a/tests/dbal/migrator_tool_config_text_test.php b/tests/dbal/migrator_tool_config_text_test.php
new file mode 100644
index 0000000000..b271c2d62e
--- /dev/null
+++ b/tests/dbal/migrator_tool_config_text_test.php
@@ -0,0 +1,75 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migrator_tool_config_text_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_config_text.xml');
+ }
+
+ public function setup()
+ {
+ parent::setup();
+
+ $this->db = $this->new_dbal();
+ $this->config_text = new \phpbb\config\db_text($this->db, 'phpbb_config_text');
+
+ $this->tool = new \phpbb\db\migration\tool\config_text($this->config_text);
+ }
+
+ public function test_add()
+ {
+ $this->tool->add('foo', 'bar');
+ $this->assertEquals('bar', $this->config_text->get('foo'));
+ }
+
+ public function test_add_twice()
+ {
+ $this->tool->add('foo', 'bar');
+ $this->assertEquals('bar', $this->config_text->get('foo'));
+
+ $this->tool->add('foo', 'bar2');
+ $this->assertEquals('bar', $this->config_text->get('foo'));
+ }
+
+ public function test_update()
+ {
+ $this->config_text->set('foo', 'bar');
+
+ $this->tool->update('foo', 'bar2');
+ $this->assertEquals('bar2', $this->config_text->get('foo'));
+ }
+
+ public function test_remove()
+ {
+ $this->config_text->set('foo', 'bar');
+
+ $this->tool->remove('foo');
+ $this->assertNull($this->config_text->get('foo'));
+ }
+
+ public function test_reverse_add()
+ {
+ $this->config_text->set('foo', 'bar');
+
+ $this->tool->reverse('add', 'foo');
+ $this->assertNull($this->config_text->get('foo'));
+ }
+
+ public function test_reverse_remove()
+ {
+ $this->tool->reverse('remove', 'foo');
+ $this->assertSame('', $this->config_text->get('foo'));
+ }
+}
diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php
index b7a69c7c5d..b101d28c7d 100644
--- a/tests/dbal/order_lower_test.php
+++ b/tests/dbal/order_lower_test.php
@@ -22,7 +22,7 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case
{
$db = $this->new_dbal();
- if (strpos($db->sql_layer, 'mysql') === 0 && version_compare($db->sql_server_info(true, false), '5.6', '>='))
+ if (strpos($db->get_sql_layer(), 'mysql') === 0 && version_compare($db->sql_server_info(true, false), '5.6', '>='))
{
$this->markTestSkipped('MySQL 5.6 fails to order things correctly. See also: http://tracker.phpbb.com/browse/PHPBB3-11571 http://bugs.mysql.com/bug.php?id=69005');
}
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php
index 7cac4d6a3b..e480716a49 100644
--- a/tests/dbal/select_test.php
+++ b/tests/dbal/select_test.php
@@ -219,8 +219,8 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
{
$db = $this->new_dbal();
- $like_expression = str_replace('*', $db->any_char, $like_expression);
- $like_expression = str_replace('#', $db->one_char, $like_expression);
+ $like_expression = str_replace('*', $db->get_any_char(), $like_expression);
+ $like_expression = str_replace('#', $db->get_one_char(), $like_expression);
$where = ($like_expression) ? 'username_clean ' . $db->sql_like_expression($like_expression) : '';
$result = $db->sql_query('SELECT username_clean
diff --git a/tests/dbal/sql_insert_buffer_test.php b/tests/dbal/sql_insert_buffer_test.php
index 2f9ed0008f..eae0abceba 100644
--- a/tests/dbal/sql_insert_buffer_test.php
+++ b/tests/dbal/sql_insert_buffer_test.php
@@ -32,7 +32,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
public function test_multi_insert_disabled_insert_and_flush()
{
- $this->db->multi_insert = false;
+ $this->db->set_multi_insert(false);
$this->assertTrue($this->buffer->insert($this->get_row(1)));
$this->assert_config_count(3);
$this->assertFalse($this->buffer->flush());
@@ -50,7 +50,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
public function test_multi_insert_disabled_insert_with_flush()
{
- $this->db->multi_insert = false;
+ $this->db->set_multi_insert(false);
$this->assertTrue($this->buffer->insert($this->get_row(1)));
$this->assert_config_count(3);
$this->assertTrue($this->buffer->insert($this->get_row(2)));
@@ -68,7 +68,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
public function test_multi_insert_disabled_insert_all_and_flush()
{
- $this->db->multi_insert = false;
+ $this->db->set_multi_insert(false);
$this->assertTrue($this->buffer->insert_all($this->get_rows(3)));
$this->assert_config_count(5);
}
@@ -93,7 +93,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
protected function check_multi_insert_support()
{
- if (!$this->db->multi_insert)
+ if (!$this->db->get_multi_insert())
{
$this->markTestSkipped('Database does not support multi_insert');
}
diff --git a/tests/extension/ext/barfoo/composer.json b/tests/extension/ext/barfoo/composer.json
index d88fd413c9..05bb099707 100644
--- a/tests/extension/ext/barfoo/composer.json
+++ b/tests/extension/ext/barfoo/composer.json
@@ -13,10 +13,12 @@
"role": "N/A"
}],
"require": {
- "php": ">=5.3",
- "phpbb/phpbb": "3.1.*@dev"
+ "php": ">=5.3"
},
"extra": {
- "display-name": "phpBB BarFoo Extension"
+ "display-name": "phpBB BarFoo Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
}
}
diff --git a/tests/extension/ext/vendor/moo/composer.json b/tests/extension/ext/vendor/moo/composer.json
index b8fc544c01..d49aab47cd 100644
--- a/tests/extension/ext/vendor/moo/composer.json
+++ b/tests/extension/ext/vendor/moo/composer.json
@@ -13,10 +13,12 @@
"role": "N/A"
}],
"require": {
- "php": ">=5.3",
- "phpbb/phpbb": "3.1.*@dev"
+ "php": ">=5.3"
},
"extra": {
- "display-name": "phpBB Moo Extension"
+ "display-name": "phpBB Moo Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
}
}
diff --git a/tests/extension/ext/vendor2/bar/composer.json b/tests/extension/ext/vendor2/bar/composer.json
index 215e7d59db..9d2ed86a0c 100644
--- a/tests/extension/ext/vendor2/bar/composer.json
+++ b/tests/extension/ext/vendor2/bar/composer.json
@@ -12,10 +12,12 @@
"role": "N/A"
}],
"require": {
- "php": ">=5.3",
- "phpbb/phpbb": "3.1.*@dev"
+ "php": ">=5.3"
},
"extra": {
- "display-name": "phpBB Bar Extension"
+ "display-name": "phpBB Bar Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
}
}
diff --git a/tests/extension/ext/vendor2/foo/composer.json b/tests/extension/ext/vendor2/foo/composer.json
index 7b2a80f5d3..efcdfc338f 100644
--- a/tests/extension/ext/vendor2/foo/composer.json
+++ b/tests/extension/ext/vendor2/foo/composer.json
@@ -12,10 +12,12 @@
"role": "N/A"
}],
"require": {
- "php": ">=5.3",
- "phpbb/phpbb": "3.1.*@dev"
+ "php": ">=5.3"
},
"extra": {
- "display-name": "phpBB Foo Extension"
+ "display-name": "phpBB Foo Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
}
}
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index d9f8fbd1a4..230c90c7c7 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -32,22 +32,62 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$this->extension_manager = $this->create_extension_manager();
}
- public function test_available()
+ public function test_all_available()
{
// barfoo and vendor3/bar should not listed due to missing composer.json. barfoo also has incorrect dir structure.
$this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo'), array_keys($this->extension_manager->all_available()));
}
- public function test_enabled()
+ public function test_all_enabled()
{
$this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
}
- public function test_configured()
+ public function test_all_configured()
{
$this->assertEquals(array('vendor/moo', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
}
+ public function test_is_enabled()
+ {
+ $this->assertSame(true, $this->extension_manager->is_enabled('vendor2/foo'));
+ $this->assertSame(false, $this->extension_manager->is_enabled('vendor/moo'));
+ $this->assertSame(false, $this->extension_manager->is_enabled('vendor2/bar'));
+ $this->assertSame(false, $this->extension_manager->is_enabled('bertie/worlddominationplan'));
+ }
+
+ public function test_is_disabled()
+ {
+ $this->assertSame(false, $this->extension_manager->is_disabled('vendor2/foo'));
+ $this->assertSame(true, $this->extension_manager->is_disabled('vendor/moo'));
+ $this->assertSame(false, $this->extension_manager->is_disabled('vendor2/bar'));
+ $this->assertSame(false, $this->extension_manager->is_disabled('bertie/worlddominationplan'));
+ }
+
+ public function test_is_purged()
+ {
+ $this->assertSame(false, $this->extension_manager->is_purged('vendor2/foo'));
+ $this->assertSame(false, $this->extension_manager->is_purged('vendor/moo'));
+ $this->assertSame(true, $this->extension_manager->is_purged('vendor2/bar'));
+ $this->assertSame(false, $this->extension_manager->is_purged('bertie/worlddominationplan'));
+ }
+
+ public function test_is_configured()
+ {
+ $this->assertSame(true, $this->extension_manager->is_configured('vendor2/foo'));
+ $this->assertSame(true, $this->extension_manager->is_configured('vendor/moo'));
+ $this->assertSame(false, $this->extension_manager->is_configured('vendor2/bar'));
+ $this->assertSame(false, $this->extension_manager->is_configured('bertie/worlddominationplan'));
+ }
+
+ public function test_is_available()
+ {
+ $this->assertSame(true, $this->extension_manager->is_available('vendor2/foo'));
+ $this->assertSame(true, $this->extension_manager->is_available('vendor/moo'));
+ $this->assertSame(true, $this->extension_manager->is_available('vendor2/bar'));
+ $this->assertSame(false, $this->extension_manager->is_available('bertie/worlddominationplan'));
+ }
+
public function test_enable()
{
vendor2\bar\ext::$state = 0;
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
index 3678ac0a3f..535e4fe0d5 100644
--- a/tests/extension/metadata_manager_test.php
+++ b/tests/extension/metadata_manager_test.php
@@ -19,8 +19,11 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
protected $cache;
protected $config;
protected $db;
+ protected $db_tools;
+ protected $table_prefix;
protected $phpbb_root_path;
protected $phpEx;
+ protected $migrator;
protected $template;
protected $user;
@@ -50,6 +53,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$this->phpbb_root_path,
$this->phpEx
),
@@ -70,7 +74,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
new \phpbb\db\migration\helper()
);
$container = new phpbb_mock_container_builder();
- $container->set('migrator', $migrator);
+ $container->set('migrator', $this->migrator);
$this->extension_manager = new \phpbb\extension\manager(
$container,
@@ -96,9 +100,10 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
{
$manager->get_metadata();
}
- catch(\phpbb\extension\exception $e){}
-
- $this->assertEquals((string) $e, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json'));
+ catch (\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json'));
+ }
}
// Should be the same as a direct json_decode of the composer.json file
@@ -112,7 +117,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
{
$metadata = $manager->get_metadata();
}
- catch(\phpbb\extension\exception $e)
+ catch (\phpbb\extension\exception $e)
{
$this->fail($e);
}
@@ -122,64 +127,42 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
$this->assertEquals($metadata, $json);
}
- public function test_validator_non_existant()
+ public function validator_non_existing_data()
{
- $ext_name = 'validator';
-
- $manager = $this->get_metadata_manager($ext_name);
-
- // Non-existant data
- try
- {
- $manager->validate('name');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'name'));
- }
-
- try
- {
- $manager->validate('type');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'type'));
- }
-
- try
- {
- $manager->validate('license');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'license'));
- }
+ return array(
+ array('name'),
+ array('type'),
+ array('license'),
+ array('version'),
+ );
+ }
+ /**
+ * @dataProvider validator_non_existing_data
+ */
+ public function test_validator_non_existing($field_name)
+ {
+ $manager = $this->get_metadata_manager('validator');
try
{
- $manager->validate('version');
-
+ $manager->validate($field_name);
$this->fail('Exception not triggered');
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'version'));
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', $field_name));
}
+ }
+ public function test_validator_non_existing_authors()
+ {
+ $manager = $this->get_metadata_manager('validator');
try
{
$manager->validate_authors();
-
$this->fail('Exception not triggered');
}
- catch(\phpbb\extension\exception $e)
+ catch (\phpbb\extension\exception $e)
{
$this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'authors'));
}
@@ -193,72 +176,44 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
try
{
$manager->validate_authors();
-
$this->fail('Exception not triggered');
}
- catch(\phpbb\extension\exception $e)
+ catch (\phpbb\extension\exception $e)
{
$this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'author name'));
}
}
-
- public function test_validator_invalid()
+ public function validator_invalid_data()
{
- $ext_name = 'validator';
+ return array(
+ array('name', 'asdf'),
+ array('type', 'asdf'),
+ array('license', ''),
+ array('version', ''),
+ );
+ }
- $manager = $this->get_metadata_manager($ext_name);
+ /**
+ * @dataProvider validator_invalid_data
+ */
+ public function test_validator_invalid($field_name, $field_value)
+ {
+ $manager = $this->get_metadata_manager('validator');
// Invalid data
$manager->set_metadata(array(
- 'name' => 'asdf',
- 'type' => 'asdf',
- 'license' => '',
- 'version' => '',
+ $field_name => $field_value,
));
try
{
- $manager->validate('name');
-
+ $manager->validate($field_name);
$this->fail('Exception not triggered');
}
catch(\phpbb\extension\exception $e)
{
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'name'));
- }
-
- try
- {
- $manager->validate('type');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'type'));
- }
-
- try
- {
- $manager->validate('license');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'license'));
- }
-
- try
- {
- $manager->validate('version');
-
- $this->fail('Exception not triggered');
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'version'));
+ $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', $field_name));
}
}
@@ -286,143 +241,83 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
}
}
-
- public function test_validator_requirements()
+ public function validator_requirements_data()
{
- $ext_name = 'validator';
-
- $manager = $this->get_metadata_manager($ext_name);
- // Too high of requirements
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => '10.0.0',
- 'phpbb/phpbb' => '3.2.0', // config is set to 3.1.0
+ return array(
+ array(
+ '10.0.0',
+ '100.2.0',
+ false,
+ false,
+ 'Versions are not compared at the moment',
),
- ));
-
- try
- {
- //$this->assertEquals(false, $manager->validate_require_php());
- //$this->assertEquals(false, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
-
-
- // Too high of requirements
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => '5.3.0',
- 'phpbb/phpbb' => '3.1.0-beta', // config is set to 3.1.0
+ array(
+ '5.3.0',
+ '3.1.0-beta',
+ true,
+ true,
),
- ));
-
- try
- {
- $this->assertEquals(true, $manager->validate_require_php());
- $this->assertEquals(true, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
-
-
- // Too high of requirements
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => '>' . phpversion(),
- 'phpbb/phpbb' => '>3.1.0', // config is set to 3.1.0
+ array(
+ '>' . phpversion(),
+ '>3.1.0',
+ false,
+ false,
+ 'Versions are not compared at the moment',
),
- ));
-
- try
- {
- //$this->assertEquals(false, $manager->validate_require_php());
- //$this->assertEquals(false, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
-
-
- // Too high of current install
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => '<' . phpversion(),
- 'phpbb/phpbb' => '<3.1.0', // config is set to 3.1.0
+ array(
+ '<' . phpversion(),
+ '<3.1.0',
+ false,
+ false,
+ 'Versions are not compared at the moment',
),
- ));
-
- try
- {
- //$this->assertEquals(false, $manager->validate_require_php());
- //$this->assertEquals(false, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
-
-
- // Matching requirements
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => phpversion(),
- 'phpbb/phpbb' => '3.1.0', // config is set to 3.1.0
+ array(
+ phpversion(),
+ '3.1.0',
+ true,
+ true,
),
- ));
-
- try
- {
- $this->assertEquals(true, $manager->validate_require_php());
- $this->assertEquals(true, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
-
-
- // Matching requirements
- $manager->merge_metadata(array(
- 'require' => array(
- 'php' => '>=' . phpversion(),
- 'phpbb/phpbb' => '>=3.1.0', // config is set to 3.1.0
+ array(
+ '>=' . phpversion(),
+ '>=3.1.0',
+ true,
+ true,
),
- ));
+ array(
+ '<=' . phpversion(),
+ '<=3.1.0',
+ true,
+ true,
+ ),
+ );
+ }
- try
- {
- $this->assertEquals(true, $manager->validate_require_php());
- $this->assertEquals(true, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
+ /**
+ * @dataProvider validator_requirements_data
+ */
+ public function test_validator_requirements($php_version, $phpbb_version, $expected_php, $expected_phpbb, $incomplete_reason = '')
+ {
+ if ($incomplete_reason)
{
- $this->fail($e);
+ $this->markTestIncomplete($incomplete_reason);
}
-
- // Matching requirements
+ $ext_name = 'validator';
+ $manager = $this->get_metadata_manager($ext_name);
+ // Too high of requirements
$manager->merge_metadata(array(
'require' => array(
- 'php' => '<=' . phpversion(),
- 'phpbb/phpbb' => '<=3.1.0', // config is set to 3.1.0
+ 'php' => $php_version,
+ ),
+ 'extra' => array(
+ 'soft-require' => array(
+ 'phpbb/phpbb' => $phpbb_version, // config is set to 3.1.0
+ ),
),
));
- try
- {
- $this->assertEquals(true, $manager->validate_require_php());
- $this->assertEquals(true, $manager->validate_require_phpbb());
- }
- catch(\phpbb\extension\exception $e)
- {
- $this->fail($e);
- }
+ $this->assertEquals($expected_php, $manager->validate_require_php());
+ $this->assertEquals($expected_phpbb, $manager->validate_require_phpbb());
}
/**
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
index dbf197fcfa..6a6df14c81 100644
--- a/tests/functional/download_test.php
+++ b/tests/functional/download_test.php
@@ -205,12 +205,8 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
),
));
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
-
$this->add_lang('posting');
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('delete_topic');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Download Topic #1'], 'DELETE_TOPIC');
$this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
$this->add_lang('mcp');
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index a474ecf27f..7aa2d0da7d 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -619,12 +619,8 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
));
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Feeds #1 - Topic #2']}&sid={$this->sid}");
-
$this->add_lang('posting');
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('delete_topic');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Feeds #1 - Topic #2'], 'DELETE_TOPIC');
$this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
$this->add_lang('mcp');
diff --git a/tests/functional/fixtures/ext/foo/bar/composer.json b/tests/functional/fixtures/ext/foo/bar/composer.json
index 2f91426d2a..f0c7f0e6c1 100644
--- a/tests/functional/fixtures/ext/foo/bar/composer.json
+++ b/tests/functional/fixtures/ext/foo/bar/composer.json
@@ -13,10 +13,12 @@
"role": "Developer"
}],
"require": {
- "php": ">=5.3",
- "phpbb/phpbb": "3.1.*@dev"
+ "php": ">=5.3"
},
"extra": {
- "display-name": "phpBB 3.1 Extension Testing"
+ "display-name": "phpBB 3.1 Extension Testing",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
}
}
diff --git a/tests/functional/jumpbox_test.php b/tests/functional/jumpbox_test.php
index 9eddcb6bf6..f5a671b1b9 100644
--- a/tests/functional/jumpbox_test.php
+++ b/tests/functional/jumpbox_test.php
@@ -20,18 +20,16 @@ class phpbb_functional_jumpbox_test extends phpbb_functional_test_case
{
$this->login();
- $crawler = self::request('GET', "viewtopic.php?t=1&sid={$this->sid}");
- $form = $crawler->filter('#quickmodform')->selectButton($this->lang('GO'))->form(array(
- 'action' => 'merge_topic',
- ));
+ $this->crawler = $this->get_quickmod_page(1, 'MERGE_TOPIC');
+ $this->check_valid_jump('Your first forum');
- $crawler = self::submit($form);
- $this->assertContains($this->lang('FORUM') . ': Your first forum', $crawler->filter('#cp-main h2')->text());
- $form = $crawler->filter('#jumpbox')->selectButton($this->lang('GO'))->form(array(
- 'f' => 1,
- ));
+ $link = $this->crawler->filter('#jumpbox')->selectLink('Your first category')->link()->getUri();
+ $this->crawler = self::request('GET', substr($link, strpos($link, 'mcp.')));
+ $this->check_valid_jump('Your first category');
+ }
- $crawler = self::submit($form);
- $this->assertContains($this->lang('FORUM') . ': Your first category', $crawler->filter('#cp-main h2')->text());
+ protected function check_valid_jump($forum)
+ {
+ $this->assertContains($this->lang('FORUM') . ": $forum", $this->crawler->filter('#cp-main h2')->text(), $this->crawler->text());
}
}
diff --git a/tests/functional/mcp_test.php b/tests/functional/mcp_test.php
index e4d950ef34..31d835f4fa 100644
--- a/tests/functional/mcp_test.php
+++ b/tests/functional/mcp_test.php
@@ -35,11 +35,7 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case
public function test_handle_quickmod($crawler)
{
// Test moving a post
- $form = $crawler->selectButton('Go')->eq(1)->form();
- $form['action']->select('merge');
- $crawler = self::submit($form);
-
- return $crawler;
+ return $this->get_quickmod_page(0, 'MERGE_POSTS', $crawler);
}
/**
diff --git a/tests/functional/visibility_softdelete_test.php b/tests/functional/visibility_softdelete_test.php
index 5b5f09905c..794f0cde68 100644
--- a/tests/functional/visibility_softdelete_test.php
+++ b/tests/functional/visibility_softdelete_test.php
@@ -186,11 +186,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
'forum_last_post_id' => 0,
), 'before moving #2');
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
-
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('move');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #1'], 'MOVE_TOPIC');
$this->assertContainsLang('SELECT_DESTINATION_FORUM', $crawler->text());
$this->add_lang('mcp');
@@ -261,12 +257,8 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
), 'before softdeleting #2');
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
-
$this->add_lang('posting');
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('delete_topic');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #1'], 'DELETE_TOPIC');
$this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
$this->add_lang('mcp');
@@ -336,11 +328,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
'forum_last_post_id' => 0,
), 'before moving #2');
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
-
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('move');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #1'], 'MOVE_TOPIC');
$this->assertContainsLang('SELECT_DESTINATION_FORUM', $crawler->text());
$this->add_lang('mcp');
@@ -484,12 +472,9 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
'forum_last_post_id' => 0,
), 'before splitting #2');
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #1'], 'SPLIT_TOPIC');
$this->add_lang('mcp');
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('split');
- $crawler = self::submit($form);
$this->assertContainsLang('SPLIT_TOPIC_EXPLAIN', $crawler->text());
$form = $crawler->selectButton('Submit')->form(array(
@@ -546,12 +531,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
),
));
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #2']}&sid={$this->sid}");
-
- $form = $crawler->selectButton('Go')->eq(1)->form();
- $form['action']->select('move');
- $crawler = self::submit($form);
-
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #2'], 'MOVE_TOPIC');
$form = $crawler->selectButton('Yes')->form();
$form['to_forum_id']->select($this->data['forums']['Soft Delete #1']);
$crawler = self::submit($form);
@@ -605,9 +585,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
$this->assertContainsLang('BOOKMARK_ADDED', $crawler_bookmark->text());
$this->add_lang('mcp');
- $form = $crawler->selectButton('Go')->eq(1)->form();
- $form['action']->select('merge_topic');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #2'], 'MERGE_TOPIC', $crawler);
$this->assertContainsLang('SELECT_MERGE', $crawler->text());
$crawler = self::request('GET', "mcp.php?f={$this->data['forums']['Soft Delete #1']}&t={$this->data['topics']['Soft Delete Topic #2']}&i=main&mode=forum_view&action=merge_topic&to_topic_id={$this->data['topics']['Soft Delete Topic #1']}");
@@ -670,12 +648,8 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
'forum_last_post_id' => 0,
), 'before forking #2');
- $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
-
$this->add_lang('mcp');
- $form = $crawler->selectButton('Go')->eq(2)->form();
- $form['action']->select('fork');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($this->data['topics']['Soft Delete Topic #1'], 'FORK_TOPIC');
$this->assertContainsLang('FORK_TOPIC', $crawler->text());
$form = $crawler->selectButton('Yes')->form();
diff --git a/tests/functions/build_url_test.php b/tests/functions/build_url_test.php
index 7a70bddc71..06415a424e 100644
--- a/tests/functions/build_url_test.php
+++ b/tests/functions/build_url_test.php
@@ -30,10 +30,11 @@ class phpbb_build_url_test extends phpbb_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
'php'
);
- $phpbb_container->set('path_helper', $path_helper);
+ $phpbb_container->set('path_helper', $phpbb_path_helper);
}
public function build_url_test_data()
{
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php
index 830b52fb4c..e793a4eb82 100644
--- a/tests/functions/obtain_online_test.php
+++ b/tests/functions/obtain_online_test.php
@@ -128,19 +128,19 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
{
return array(
array(0, false, array(
- 'online_userlist' => 'REGISTERED_USERS 2, 3',
+ 'online_userlist' => 'REGISTERED_USERS <span class="username">2</span>, <span class="username">3</span>',
'l_online_users' => 'ONLINE_USERS_TOTAL 5 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3',
)),
array(0, true, array(
- 'online_userlist' => 'REGISTERED_USERS 2, 3',
+ 'online_userlist' => 'REGISTERED_USERS <span class="username">2</span>, <span class="username">3</span>',
'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 7 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3 GUEST_USERS_TOTAL 2',
)),
array(1, false, array(
- 'online_userlist' => 'BROWSING_FORUM 3',
+ 'online_userlist' => 'BROWSING_FORUM <span class="username">3</span>',
'l_online_users' => 'ONLINE_USERS_TOTAL 2 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1',
)),
array(1, true, array(
- 'online_userlist' => 'BROWSING_FORUM_GUESTS 1 3',
+ 'online_userlist' => 'BROWSING_FORUM_GUESTS 1 <span class="username">3</span>',
'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 3 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1 GUEST_USERS_TOTAL 1',
)),
array(2, false, array(
diff --git a/tests/functions_content/get_username_string_test.php b/tests/functions_content/get_username_string_test.php
index 502796d1df..01ec97f6a4 100644
--- a/tests/functions_content/get_username_string_test.php
+++ b/tests/functions_content/get_username_string_test.php
@@ -94,11 +94,11 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case
global $phpbb_root_path, $phpEx;
return array(
- array(0, '', '', false, false, 'Guest'),
- array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
+ array(0, '', '', false, false, '<span class="username">Guest</span>'),
+ array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'),
array(2, 'Administrator', 'FF0000', false, false, '<a href="' . $phpbb_root_path . 'memberlist.' . $phpEx . '?mode=viewprofile&amp;u=2" style="color: #FF0000;" class="username-coloured">Administrator</a>'),
- array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&amp;u=5">User5</a>'),
- array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&amp;u=8">Eight</a>'),
+ array(5, 'User5', '', false, 'http://www.example.org/user.php?mode=show', '<a href="http://www.example.org/user.php?mode=show&amp;u=5" class="username">User5</a>'),
+ array(8, 'Eight', '', false, false, '<a href="' . $phpbb_root_path . 'memberlist.php?mode=viewprofile&amp;u=8" class="username">Eight</a>'),
);
}
@@ -113,10 +113,10 @@ class phpbb_functions_content_get_username_string_test extends phpbb_test_case
public function get_username_string_no_profile_data()
{
return array(
- array(ANONYMOUS, 'Anonymous', '', false, false, 'Anonymous'),
- array(ANONYMOUS, 'Anonymous', '', '', false, 'Guest'),
+ array(ANONYMOUS, 'Anonymous', '', false, false, '<span class="username">Anonymous</span>'),
+ array(ANONYMOUS, 'Anonymous', '', '', false, '<span class="username">Guest</span>'),
array(2, 'Administrator', 'FF0000', false, false, '<span style="color: #FF0000;" class="username-coloured">Administrator</span>'),
- array(8, 'Eight', '', false, false, 'Eight'),
+ array(8, 'Eight', '', false, false, '<span class="username">Eight</span>'),
);
}
diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php
index b7e60c7393..02e0b3912f 100644
--- a/tests/log/function_view_log_test.php
+++ b/tests/log/function_view_log_test.php
@@ -40,7 +40,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -59,7 +59,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -78,7 +78,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -97,7 +97,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -118,7 +118,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -139,7 +139,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -160,7 +160,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -177,11 +177,11 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'reportee_id' => 2,
'reportee_username' => 'admin',
- 'reportee_username_full'=> 'admin',
+ 'reportee_username_full'=> '<span class="username">admin</span>',
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -196,11 +196,11 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'reportee_id' => 1,
'reportee_username' => 'Anonymous',
- 'reportee_username_full'=> 'Anonymous',
+ 'reportee_username_full'=> '<span class="username">Anonymous</span>',
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -219,7 +219,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
@@ -238,7 +238,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
'user_id' => 1,
'username' => 'Anonymous',
- 'username_full' => 'Anonymous',
+ 'username_full' => '<span class="username">Anonymous</span>',
'ip' => '127.0.0.1',
'time' => 1,
diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php
index 9f70f8e96c..f9d231258e 100644
--- a/tests/mock/controller_helper.php
+++ b/tests/mock/controller_helper.php
@@ -23,4 +23,9 @@ class phpbb_mock_controller_helper extends \phpbb\controller\helper
$provider->find_routing_files($manager->get_finder());
$this->route_collection = $provider->find($phpbb_root_path_ext)->get_routes();
}
+
+ public function get_current_url()
+ {
+ return '';
+ }
}
diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php
index 85d8961e82..851c9ec221 100644
--- a/tests/notification/user_list_trim_test.php
+++ b/tests/notification/user_list_trim_test.php
@@ -86,7 +86,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
array('username' => '', 'poster_id' => 3),
),
),
- '<strong>Reply</strong> from A and B in topic:',
+ '<strong>Reply</strong> from A and <span class="username">B</span> in topic:',
),
array(
array(
@@ -98,7 +98,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
array('username' => '', 'poster_id' => 4),
),
),
- '<strong>Reply</strong> from A, B, and C in topic:',
+ '<strong>Reply</strong> from A, <span class="username">B</span>, and <span class="username">C</span> in topic:',
),
array(
array(
@@ -111,7 +111,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
array('username' => '', 'poster_id' => 5),
),
),
- '<strong>Reply</strong> from A, B, C, and D in topic:',
+ '<strong>Reply</strong> from A, <span class="username">B</span>, <span class="username">C</span>, and <span class="username">D</span> in topic:',
),
array(
array(
@@ -125,7 +125,7 @@ class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
array('username' => '', 'poster_id' => 6),
),
),
- '<strong>Reply</strong> from A, B, C, and 2 others in topic:',
+ '<strong>Reply</strong> from A, <span class="username">B</span>, <span class="username">C</span>, and 2 others in topic:',
),
);
}
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php
index 9866cb6efe..27e94d6a07 100644
--- a/tests/path_helper/path_helper_test.php
+++ b/tests/path_helper/path_helper_test.php
@@ -29,6 +29,7 @@ class phpbb_path_helper_test extends phpbb_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$this->phpbb_root_path,
'php'
);
@@ -158,6 +159,7 @@ class phpbb_path_helper_test extends phpbb_test_case
$path_helper = new \phpbb\path_helper(
$symfony_request,
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$this->phpbb_root_path,
'php'
);
@@ -338,4 +340,58 @@ class phpbb_path_helper_test extends phpbb_test_case
{
$this->assertEquals($expected, $this->path_helper->append_url_params($url, $params, $is_amp));
}
+
+ public function get_web_root_path_from_ajax_referer_data()
+ {
+ return array(
+ array(
+ 'http://www.phpbb.com/community/route1/route2/',
+ 'http://www.phpbb.com/community',
+ '../../',
+ ),
+ array(
+ 'http://www.phpbb.com/community/route1/route2',
+ 'http://www.phpbb.com/community',
+ '../',
+ ),
+ array(
+ 'http://www.phpbb.com/community/route1',
+ 'http://www.phpbb.com/community',
+ '',
+ ),
+ array(
+ 'http://www.phpbb.com/community/',
+ 'http://www.phpbb.com/community',
+ '',
+ ),
+ array(
+ 'http://www.phpbb.com/notcommunity/route1/route2/',
+ 'http://www.phpbb.com/community',
+ '../../../community/',
+ ),
+ array(
+ 'http://www.phpbb.com/notcommunity/route1/route2',
+ 'http://www.phpbb.com/community',
+ '../../community/',
+ ),
+ array(
+ 'http://www.phpbb.com/notcommunity/route1',
+ 'http://www.phpbb.com/community',
+ '../community/',
+ ),
+ array(
+ 'http://www.phpbb.com/notcommunity/',
+ 'http://www.phpbb.com/community',
+ '../community/',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_web_root_path_from_ajax_referer_data
+ */
+ public function test_get_web_root_path_from_ajax_referer($referer_url, $board_url, $expected)
+ {
+ $this->assertEquals($this->phpbb_root_path . $expected, $this->path_helper->get_web_root_path_from_ajax_referer($referer_url, $board_url));
+ }
}
diff --git a/tests/profilefields/type_bool_test.php b/tests/profilefields/type_bool_test.php
index 29c118d57d..bdab179c8c 100644
--- a/tests/profilefields/type_bool_test.php
+++ b/tests/profilefields/type_bool_test.php
@@ -74,10 +74,10 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
{
return array(
array(
- false,
- array('field_required' => true),
- 'FIELD_REQUIRED-field',
- 'Field should not accept empty values for required fields',
+ false,
+ array('field_required' => true),
+ 'FIELD_REQUIRED-field',
+ 'Field should not accept empty values for required fields',
),
);
}
@@ -130,6 +130,54 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ '4',
+ array('field_show_novalue' => true),
+ '4',
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => true),
+ null,
+ 'Field should return correct raw value',
+ ),
+ array(
+ null,
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return correct raw value',
+ ),
+ array(
+ null,
+ array('field_show_novalue' => true),
+ null,
+ 'Field should return correct raw value',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function is_set_callback($field_id, $lang_id, $field_value)
{
return isset($this->options[$field_value]);
diff --git a/tests/profilefields/type_date_test.php b/tests/profilefields/type_date_test.php
index 39fe95b97f..0ad2cde9fe 100644
--- a/tests/profilefields/type_date_test.php
+++ b/tests/profilefields/type_date_test.php
@@ -179,6 +179,42 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ '',
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => true),
+ '',
+ 'Field should return correct raw value',
+ ),
+ array(
+ '12/06/2014',
+ array('field_show_novalue' => true),
+ '12/06/2014',
+ 'Field should return correct raw value',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function return_callback_implode()
{
return implode('-', func_get_args());
diff --git a/tests/profilefields/type_dropdown_test.php b/tests/profilefields/type_dropdown_test.php
index 0e92afd504..ebecbf97f0 100644
--- a/tests/profilefields/type_dropdown_test.php
+++ b/tests/profilefields/type_dropdown_test.php
@@ -170,6 +170,54 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ '4',
+ array('field_show_novalue' => true),
+ '4',
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => false),
+ null,
+ 'Field should null for empty value without show_novalue',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => true),
+ 0,
+ 'Field should return 0 for empty value with show_novalue',
+ ),
+ array(
+ null,
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return correct raw value',
+ ),
+ array(
+ null,
+ array('field_show_novalue' => true),
+ 0,
+ 'Field should return 0 for empty value with show_novalue',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function is_set_callback($field_id, $lang_id, $field_value)
{
return isset($this->dropdown_options[$field_value]);
diff --git a/tests/profilefields/type_int_test.php b/tests/profilefields/type_int_test.php
index 611edd32b9..ac48c10a84 100644
--- a/tests/profilefields/type_int_test.php
+++ b/tests/profilefields/type_int_test.php
@@ -169,6 +169,66 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ '10',
+ array('field_show_novalue' => true),
+ 10,
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '0',
+ array('field_show_novalue' => true),
+ 0,
+ 'Field should return correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => true),
+ 0,
+ 'Field should return correct raw value',
+ ),
+ array(
+ '10',
+ array('field_show_novalue' => false),
+ 10,
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '0',
+ array('field_show_novalue' => false),
+ 0,
+ 'Field should return correct raw value',
+ ),
+ array(
+ '',
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return correct raw value',
+ ),
+ array(
+ 'string',
+ array('field_show_novalue' => false),
+ 0,
+ 'Field should return int cast of passed string'
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function return_callback_implode()
{
return implode('-', func_get_args());
diff --git a/tests/profilefields/type_string_test.php b/tests/profilefields/type_string_test.php
index cee8a1d863..f6c14ee38b 100644
--- a/tests/profilefields/type_string_test.php
+++ b/tests/profilefields/type_string_test.php
@@ -225,6 +225,60 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ '[b]bbcode test[/b]',
+ array('field_show_novalue' => true),
+ '[b]bbcode test[/b]',
+ 'Field should return the correct raw value',
+ ),
+ array(
+ '[b]bbcode test[/b]',
+ array('field_show_novalue' => false),
+ '[b]bbcode test[/b]',
+ 'Field should return correct raw value',
+ ),
+ array(
+ 125,
+ array('field_show_novalue' => false),
+ 125,
+ 'Field should return value of integer as is',
+ ),
+ array(
+ 0,
+ array('field_show_novalue' => false),
+ null,
+ 'Field should return null for empty integer without show_novalue',
+ ),
+ array(
+ 0,
+ array('field_show_novalue' => true),
+ 0,
+ 'Field should return 0 for empty integer with show_novalue',
+ ),
+ array(
+ null,
+ array('field_show_novalue' => true),
+ null,
+ 'field should return null value as is',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function return_callback_implode()
{
return implode('-', func_get_args());
diff --git a/tests/profilefields/type_url_test.php b/tests/profilefields/type_url_test.php
index 9957510d90..a45a28e7c7 100644
--- a/tests/profilefields/type_url_test.php
+++ b/tests/profilefields/type_url_test.php
@@ -104,6 +104,36 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case
$this->assertSame($expected, $result, $description);
}
+ public function profile_value_raw_data()
+ {
+ return array(
+ array(
+ 'http://example.com',
+ array('field_show_novalue' => true),
+ 'http://example.com',
+ 'Field should return the correct raw value',
+ ),
+ array(
+ 'http://example.com',
+ array('field_show_novalue' => false),
+ 'http://example.com',
+ 'Field should return correct raw value',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider profile_value_raw_data
+ */
+ public function test_get_profile_value_raw($value, $field_options, $expected, $description)
+ {
+ $field_options = array_merge($this->field_options, $field_options);
+
+ $result = $this->cp->get_profile_value_raw($value, $field_options);
+
+ $this->assertSame($expected, $result, $description);
+ }
+
public function return_callback_implode()
{
return implode('-', func_get_args());
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index fb1011cde0..3961c2781e 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -63,6 +63,7 @@ class phpbb_security_redirect_test extends phpbb_security_test_base
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$this->phpbb_root_path,
'php'
);
diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php
index ce3c90b78a..c415c969fe 100644
--- a/tests/template/template_events_test.php
+++ b/tests/template/template_events_test.php
@@ -143,6 +143,7 @@ Zeta test event in all',
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 4f5b7629d5..0bbfe3848d 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -352,6 +352,13 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
"13FOOBAR|foobar",
),
+ array(
+ 'if_nested_tags.html',
+ array('S_VALUE' => true,),
+ array(),
+ array(),
+ 'inner_value',
+ ),
);
}
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 00b823b2c4..83446b5352 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -72,6 +72,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php
index 4f778a9c1c..68ecc4b706 100644
--- a/tests/template/template_test_case_with_tree.php
+++ b/tests/template/template_test_case_with_tree.php
@@ -27,6 +27,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
new phpbb_mock_request()
),
new \phpbb\filesystem(),
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/template/templates/if_nested_tags.html b/tests/template/templates/if_nested_tags.html
new file mode 100644
index 0000000000..0348a31a8d
--- /dev/null
+++ b/tests/template/templates/if_nested_tags.html
@@ -0,0 +1 @@
+<!-- IF S_VALUE --><!-- DEFINE $INNER_VALUE = 'inner_value' --><!-- ENDIF -->{$INNER_VALUE}
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index eef30fbcc7..07ef826abf 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -971,12 +971,8 @@ class phpbb_functional_test_case extends phpbb_mink_test_case
*/
public function delete_topic($topic_id)
{
- $crawler = self::request('GET', "viewtopic.php?t={$topic_id}&sid={$this->sid}");
-
$this->add_lang('posting');
- $form = $crawler->selectButton('Go')->eq(1)->form();
- $form['action']->select('delete_topic');
- $crawler = self::submit($form);
+ $crawler = $this->get_quickmod_page($topic_id, 'DELETE_TOPIC');
$this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
$this->add_lang('mcp');
@@ -1067,4 +1063,25 @@ class phpbb_functional_test_case extends phpbb_mink_test_case
return $manager;
}
+
+ /**
+ * Get quickmod page
+ *
+ * @param int $topic_id
+ * @param string $action Language key for the quickmod action
+ * @param Symfony\Component\DomCrawler\Crawler Optional crawler object to use instead of creating new one.
+ * @return Symfony\Component\DomCrawler\Crawler
+ */
+ public function get_quickmod_page($topic_id, $action, $crawler = false)
+ {
+ $this->add_lang('viewtopic');
+
+ if ($crawler === false)
+ {
+ $crawler = self::request('GET', "viewtopic.php?t={$topic_id}&sid={$this->sid}");
+ }
+ $link = $crawler->filter('#quickmod')->selectLink($this->lang($action))->link()->getUri();
+
+ return self::request('GET', substr($link, strpos($link, 'mcp.')));
+ }
}
diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php
index 8a5d582573..d4fc174a12 100644
--- a/tests/test_framework/phpbb_session_test_case.php
+++ b/tests/test_framework/phpbb_session_test_case.php
@@ -32,6 +32,7 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case
$phpbb_path_helper = new \phpbb\path_helper(
$symfony_request,
$phpbb_filesystem,
+ $this->getMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
);
diff --git a/tests/viewonline/helper_test.php b/tests/viewonline/helper_test.php
new file mode 100644
index 0000000000..bbbed59de7
--- /dev/null
+++ b/tests/viewonline/helper_test.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_viewonline_helper_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->viewonline_helper = new \phpbb\viewonline_helper(new \phpbb\filesystem());
+ }
+
+ public function session_pages_data()
+ {
+ return array(
+ array('index.php', 'index'),
+ array('foobar/test.php', 'foobar/test'),
+ array('', ''),
+ array('./../../index.php', '../../index'),
+ array('../subdir/index.php', '../subdir/index'),
+ array('../index.php', '../index'),
+ array('././index.php', 'index'),
+ array('./index.php', 'index'),
+ );
+ }
+
+ /**
+ * @dataProvider session_pages_data
+ */
+ public function test_get_user_page($session_page, $expected)
+ {
+ $on_page = $this->viewonline_helper->get_user_page($session_page);
+ $this->assertArrayHasKey(1, $on_page);
+ $this->assertSame($expected, $on_page[1]);
+ }
+}
diff --git a/travis/ext-sniff.sh b/travis/ext-sniff.sh
new file mode 100755
index 0000000000..4e557a41c1
--- /dev/null
+++ b/travis/ext-sniff.sh
@@ -0,0 +1,27 @@
+#!/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
+
+DB=$1
+TRAVIS_PHP_VERSION=$2
+EXTNAME=$3
+
+if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
+then
+ phpBB/vendor/bin/phpcs \
+ -s \
+ --extensions=php \
+ --standard=build/code_sniffer/ruleset-php-extensions.xml \
+ "--ignore=phpBB/ext/$EXTNAME/tests/*" \
+ "--ignore=phpBB/ext/$EXTNAME/vendor/*" \
+ "phpBB/ext/$EXTNAME"
+fi