aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml14
-rw-r--r--build/code_sniffer/ruleset-minimum.xml3
-rw-r--r--build/code_sniffer/ruleset-php-legacy.xml21
-rw-r--r--build/code_sniffer/ruleset-php-strict.xml9
-rw-r--r--phpBB/adm/images/loading.gifbin0 -> 1320 bytes
-rw-r--r--phpBB/adm/style/acp_attachments.html6
-rw-r--r--phpBB/adm/style/acp_forums.html27
-rw-r--r--phpBB/adm/style/acp_groups_position.html46
-rw-r--r--phpBB/adm/style/acp_icons.html2
-rw-r--r--phpBB/adm/style/acp_modules.html19
-rw-r--r--phpBB/adm/style/admin.css23
-rw-r--r--phpBB/adm/style/ajax.js79
-rw-r--r--phpBB/adm/style/overall_footer.html2
-rw-r--r--phpBB/assets/javascript/core.js53
-rw-r--r--phpBB/config/notifications.yml20
-rw-r--r--phpBB/docs/events.md34
-rw-r--r--phpBB/includes/acp/acp_attachments.php1
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php5
-rw-r--r--phpBB/includes/acp/acp_board.php4
-rw-r--r--phpBB/includes/acp/acp_database.php17
-rw-r--r--phpBB/includes/acp/acp_icons.php3
-rw-r--r--phpBB/includes/acp/acp_users.php7
-rw-r--r--phpBB/includes/captcha/captcha_gd.php15
-rw-r--r--phpBB/includes/captcha/captcha_gd_wave.php2
-rw-r--r--phpBB/includes/functions.php15
-rw-r--r--phpBB/includes/functions_acp.php3
-rw-r--r--phpBB/includes/functions_content.php12
-rw-r--r--phpBB/includes/functions_convert.php42
-rw-r--r--phpBB/includes/ucp/ucp_activate.php5
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php1
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php43
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php28
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php105
-rw-r--r--phpBB/install/index.php2
-rw-r--r--phpBB/install/install_convert.php14
-rw-r--r--phpBB/language/en/common.php435
-rw-r--r--phpBB/language/en/ucp.php2
-rw-r--r--phpBB/phpbb/auth/auth.php8
-rw-r--r--phpBB/phpbb/auth/provider/apache.php8
-rw-r--r--phpBB/phpbb/auth/provider/base.php8
-rw-r--r--phpBB/phpbb/auth/provider/db.php8
-rw-r--r--phpBB/phpbb/auth/provider/ldap.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/base.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/bitly.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/exception.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/google.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/service_interface.php8
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php8
-rw-r--r--phpBB/phpbb/auth/provider/provider_interface.php8
-rw-r--r--phpBB/phpbb/avatar/driver/driver.php8
-rw-r--r--phpBB/phpbb/avatar/driver/driver_interface.php8
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php8
-rw-r--r--phpBB/phpbb/avatar/driver/local.php8
-rw-r--r--phpBB/phpbb/avatar/driver/remote.php8
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php8
-rw-r--r--phpBB/phpbb/avatar/manager.php8
-rw-r--r--phpBB/phpbb/cache/driver/apc.php8
-rw-r--r--phpBB/phpbb/cache/driver/base.php8
-rw-r--r--phpBB/phpbb/cache/driver/driver_interface.php8
-rw-r--r--phpBB/phpbb/cache/driver/eaccelerator.php8
-rw-r--r--phpBB/phpbb/cache/driver/file.php8
-rw-r--r--phpBB/phpbb/cache/driver/memcache.php8
-rw-r--r--phpBB/phpbb/cache/driver/memory.php8
-rw-r--r--phpBB/phpbb/cache/driver/null.php8
-rw-r--r--phpBB/phpbb/cache/driver/redis.php8
-rw-r--r--phpBB/phpbb/cache/driver/wincache.php8
-rw-r--r--phpBB/phpbb/cache/driver/xcache.php8
-rw-r--r--phpBB/phpbb/cache/service.php8
-rw-r--r--phpBB/phpbb/class_loader.php10
-rw-r--r--phpBB/phpbb/config/config.php8
-rw-r--r--phpBB/phpbb/config/db.php8
-rw-r--r--phpBB/phpbb/config/db_text.php8
-rw-r--r--phpBB/phpbb/content_visibility.php8
-rw-r--r--phpBB/phpbb/controller/exception.php8
-rw-r--r--phpBB/phpbb/controller/helper.php8
-rw-r--r--phpBB/phpbb/controller/provider.php8
-rw-r--r--phpBB/phpbb/controller/resolver.php8
-rw-r--r--phpBB/phpbb/cron/manager.php8
-rw-r--r--phpBB/phpbb/cron/task/base.php8
-rw-r--r--phpBB/phpbb/cron/task/core/prune_all_forums.php8
-rw-r--r--phpBB/phpbb/cron/task/core/prune_forum.php8
-rw-r--r--phpBB/phpbb/cron/task/core/prune_notifications.php8
-rw-r--r--phpBB/phpbb/cron/task/core/queue.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_cache.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_database.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_plupload.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_search.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_sessions.php8
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_warnings.php8
-rw-r--r--phpBB/phpbb/cron/task/parametrized.php8
-rw-r--r--phpBB/phpbb/cron/task/task.php8
-rw-r--r--phpBB/phpbb/cron/task/wrapper.php8
-rw-r--r--phpBB/phpbb/datetime.php4
-rw-r--r--phpBB/phpbb/db/driver/driver.php8
-rw-r--r--phpBB/phpbb/db/driver/firebird.php8
-rw-r--r--phpBB/phpbb/db/driver/mssql.php8
-rw-r--r--phpBB/phpbb/db/driver/mssql_base.php8
-rw-r--r--phpBB/phpbb/db/driver/mssql_odbc.php8
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php177
-rw-r--r--phpBB/phpbb/db/driver/mysql.php8
-rw-r--r--phpBB/phpbb/db/driver/mysql_base.php8
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php10
-rw-r--r--phpBB/phpbb/db/driver/oracle.php8
-rw-r--r--phpBB/phpbb/db/driver/postgres.php8
-rw-r--r--phpBB/phpbb/db/driver/sqlite.php8
-rw-r--r--phpBB/phpbb/db/migration/exception.php8
-rw-r--r--phpBB/phpbb/db/migration/migration.php8
-rw-r--r--phpBB/phpbb/db/migration/tool/config.php4
-rw-r--r--phpBB/phpbb/db/migrator.php8
-rw-r--r--phpBB/phpbb/db/sql_insert_buffer.php8
-rw-r--r--phpBB/phpbb/db/tools.php8
-rw-r--r--phpBB/phpbb/di/extension/config.php8
-rw-r--r--phpBB/phpbb/di/extension/core.php8
-rw-r--r--phpBB/phpbb/di/extension/ext.php8
-rw-r--r--phpBB/phpbb/di/pass/collection_pass.php8
-rw-r--r--phpBB/phpbb/di/pass/kernel_pass.php8
-rw-r--r--phpBB/phpbb/di/service_collection.php8
-rw-r--r--phpBB/phpbb/error_collector.php8
-rw-r--r--phpBB/phpbb/event/data.php100
-rw-r--r--phpBB/phpbb/event/dispatcher.php8
-rw-r--r--phpBB/phpbb/event/extension_subscriber_loader.php8
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php8
-rw-r--r--phpBB/phpbb/event/kernel_request_subscriber.php8
-rw-r--r--phpBB/phpbb/event/kernel_terminate_subscriber.php8
-rw-r--r--phpBB/phpbb/extension/base.php8
-rw-r--r--phpBB/phpbb/extension/exception.php8
-rw-r--r--phpBB/phpbb/extension/extension_interface.php8
-rw-r--r--phpBB/phpbb/extension/finder.php8
-rw-r--r--phpBB/phpbb/extension/manager.php8
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php70
-rw-r--r--phpBB/phpbb/extension/provider.php8
-rw-r--r--phpBB/phpbb/feed/base.php8
-rw-r--r--phpBB/phpbb/feed/factory.php8
-rw-r--r--phpBB/phpbb/feed/forum.php8
-rw-r--r--phpBB/phpbb/feed/forums.php8
-rw-r--r--phpBB/phpbb/feed/helper.php8
-rw-r--r--phpBB/phpbb/feed/news.php8
-rw-r--r--phpBB/phpbb/feed/overall.php8
-rw-r--r--phpBB/phpbb/feed/post_base.php8
-rw-r--r--phpBB/phpbb/feed/topic.php8
-rw-r--r--phpBB/phpbb/feed/topic_base.php8
-rw-r--r--phpBB/phpbb/feed/topics.php8
-rw-r--r--phpBB/phpbb/feed/topics_active.php8
-rw-r--r--phpBB/phpbb/filesystem.php8
-rw-r--r--phpBB/phpbb/groupposition/exception.php8
-rw-r--r--phpBB/phpbb/groupposition/groupposition_interface.php8
-rw-r--r--phpBB/phpbb/groupposition/legend.php8
-rw-r--r--phpBB/phpbb/groupposition/teampage.php8
-rw-r--r--phpBB/phpbb/hook/finder.php8
-rw-r--r--phpBB/phpbb/json_response.php8
-rw-r--r--phpBB/phpbb/lock/db.php8
-rw-r--r--phpBB/phpbb/lock/flock.php8
-rw-r--r--phpBB/phpbb/log/log.php8
-rw-r--r--phpBB/phpbb/log/log_interface.php8
-rw-r--r--phpBB/phpbb/log/null.php8
-rw-r--r--phpBB/phpbb/notification/exception.php8
-rw-r--r--phpBB/phpbb/notification/manager.php14
-rw-r--r--phpBB/phpbb/notification/method/base.php8
-rw-r--r--phpBB/phpbb/notification/method/email.php8
-rw-r--r--phpBB/phpbb/notification/method/jabber.php8
-rw-r--r--phpBB/phpbb/notification/method/messenger_base.php8
-rw-r--r--phpBB/phpbb/notification/method/method_interface.php8
-rw-r--r--phpBB/phpbb/notification/type/admin_activate_user.php166
-rw-r--r--phpBB/phpbb/notification/type/approve_post.php8
-rw-r--r--phpBB/phpbb/notification/type/approve_topic.php8
-rw-r--r--phpBB/phpbb/notification/type/base.php8
-rw-r--r--phpBB/phpbb/notification/type/bookmark.php8
-rw-r--r--phpBB/phpbb/notification/type/disapprove_post.php8
-rw-r--r--phpBB/phpbb/notification/type/disapprove_topic.php8
-rw-r--r--phpBB/phpbb/notification/type/group_request.php8
-rw-r--r--phpBB/phpbb/notification/type/group_request_approved.php8
-rw-r--r--phpBB/phpbb/notification/type/pm.php8
-rw-r--r--phpBB/phpbb/notification/type/post.php8
-rw-r--r--phpBB/phpbb/notification/type/post_in_queue.php8
-rw-r--r--phpBB/phpbb/notification/type/quote.php8
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php8
-rw-r--r--phpBB/phpbb/notification/type/report_pm_closed.php8
-rw-r--r--phpBB/phpbb/notification/type/report_post.php8
-rw-r--r--phpBB/phpbb/notification/type/report_post_closed.php8
-rw-r--r--phpBB/phpbb/notification/type/topic.php8
-rw-r--r--phpBB/phpbb/notification/type/topic_in_queue.php8
-rw-r--r--phpBB/phpbb/notification/type/type_interface.php8
-rw-r--r--phpBB/phpbb/path_helper.php8
-rw-r--r--phpBB/phpbb/permissions.php8
-rw-r--r--phpBB/phpbb/php/ini.php8
-rw-r--r--phpBB/phpbb/plupload/plupload.php8
-rw-r--r--phpBB/phpbb/request/deactivated_super_global.php8
-rw-r--r--phpBB/phpbb/request/request.php8
-rw-r--r--phpBB/phpbb/request/request_interface.php8
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php8
-rw-r--r--phpBB/phpbb/request/type_cast_helper_interface.php8
-rw-r--r--phpBB/phpbb/search/base.php8
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php8
-rw-r--r--phpBB/phpbb/search/fulltext_native.php16
-rw-r--r--phpBB/phpbb/search/fulltext_postgres.php8
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php10
-rw-r--r--phpBB/phpbb/search/sphinx/config.php8
-rw-r--r--phpBB/phpbb/search/sphinx/config_comment.php8
-rw-r--r--phpBB/phpbb/search/sphinx/config_section.php8
-rw-r--r--phpBB/phpbb/search/sphinx/config_variable.php8
-rw-r--r--phpBB/phpbb/session.php8
-rw-r--r--phpBB/phpbb/symfony_request.php8
-rw-r--r--phpBB/phpbb/template/asset.php8
-rw-r--r--phpBB/phpbb/template/base.php8
-rw-r--r--phpBB/phpbb/template/context.php8
-rw-r--r--phpBB/phpbb/template/template.php8
-rw-r--r--phpBB/phpbb/template/twig/definition.php8
-rw-r--r--phpBB/phpbb/template/twig/environment.php8
-rw-r--r--phpBB/phpbb/template/twig/extension.php82
-rw-r--r--phpBB/phpbb/template/twig/lexer.php8
-rw-r--r--phpBB/phpbb/template/twig/loader.php8
-rw-r--r--phpBB/phpbb/template/twig/node/definenode.php8
-rw-r--r--phpBB/phpbb/template/twig/node/event.php18
-rw-r--r--phpBB/phpbb/template/twig/node/expression/binary/equalequal.php8
-rw-r--r--phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php8
-rw-r--r--phpBB/phpbb/template/twig/node/includenode.php8
-rw-r--r--phpBB/phpbb/template/twig/node/includephp.php10
-rw-r--r--phpBB/phpbb/template/twig/node/php.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/defineparser.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/event.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includejs.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includeparser.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/php.php10
-rw-r--r--phpBB/phpbb/template/twig/twig.php8
-rw-r--r--phpBB/phpbb/tree/nestedset.php8
-rw-r--r--phpBB/phpbb/tree/nestedset_forum.php8
-rw-r--r--phpBB/phpbb/tree/tree_interface.php8
-rw-r--r--phpBB/phpbb/user.php8
-rw-r--r--phpBB/phpbb/user_loader.php7
-rw-r--r--phpBB/posting.php11
-rw-r--r--phpBB/styles/prosilver/template/index_body.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_header.html6
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_front.html2
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html8
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html2
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html4
-rw-r--r--phpBB/styles/prosilver/theme/colours.css5
-rw-r--r--phpBB/styles/prosilver/theme/common.css15
-rw-r--r--phpBB/styles/prosilver/theme/forms.css6
-rw-r--r--phpBB/styles/prosilver/theme/images/loading.gifbin0 -> 1320 bytes
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/mcp_header.html4
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html9
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html2
-rw-r--r--tests/dbal/migrator_tool_config_test.php91
251 files changed, 1237 insertions, 2199 deletions
diff --git a/build/build.xml b/build/build.xml
index c033b1fefd..0a5448f98d 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -81,7 +81,7 @@
--standard=build/code_sniffer/ruleset-php-strict.xml
--ignore=phpBB/phpbb/db/migration/data/v30x/*
phpBB/phpbb"
- dir="." checkreturn="true" passthru="true" />
+ dir="." returnProperty="retval-php-strict" passthru="true" />
<exec command="phpBB/vendor/bin/phpcs
-s
--extensions=php
@@ -92,10 +92,20 @@
--ignore=phpBB/includes/sphinxapi.php
--ignore=phpBB/includes/utf/data/*
--ignore=phpBB/install/data/*
+ --ignore=phpBB/install/database_update.php
--ignore=phpBB/phpbb/*
--ignore=phpBB/vendor/*
phpBB"
- dir="." checkreturn="true" passthru="true" />
+ dir="." returnProperty="retval-php-legacy" passthru="true" />
+ <if>
+ <or>
+ <not><equals arg1="${retval-php-strict}" arg2="0" /></not>
+ <not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
+ </or>
+ <then>
+ <fail message="PHP Code Sniffer failed." />
+ </then>
+ </if>
</target>
<target name="docs">
diff --git a/build/code_sniffer/ruleset-minimum.xml b/build/code_sniffer/ruleset-minimum.xml
index 2de1fb4be4..33d0177390 100644
--- a/build/code_sniffer/ruleset-minimum.xml
+++ b/build/code_sniffer/ruleset-minimum.xml
@@ -9,4 +9,7 @@
<!-- All code files MUST use the Unix LF (linefeed) line ending. -->
<rule ref="Generic.Files.LineEndings" />
+ <!-- Tabs MUST be used for indentation -->
+ <rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
+
</ruleset>
diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml
index ed8c7e98a0..247313441d 100644
--- a/build/code_sniffer/ruleset-php-legacy.xml
+++ b/build/code_sniffer/ruleset-php-legacy.xml
@@ -5,9 +5,21 @@
<rule ref="./ruleset-minimum.xml" />
+ <!-- "for (; bar; )" should be "while (bar)" instead -->
+ <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
+
+ <!-- A method MUST not only call its parent -->
+ <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
+
<!-- The body of each structure MUST be enclosed by braces. -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />
+ <!-- There MUST not be more than one statement per line. -->
+ <rule ref="Generic.Formatting.DisallowMultipleStatements" />
+
+ <!-- Call-time pass-by-reference MUST not be used. -->
+ <rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
+
<!-- Class constants MUST be declared in all upper case with underscore separators. -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
@@ -17,6 +29,15 @@
<!-- Method arguments with default values MUST go at the end of the argument list. -->
<rule ref="PEAR.Functions.ValidDefaultValue" />
+ <!-- In the argument list, there MUST NOT be a space before each comma,
+ and there MUST be one space after each comma. -->
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
+ <properties>
+ <property name="equalsSpacing" value="1"/>
+ </properties>
+ </rule>
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
+
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
<rule ref="Zend.Files.ClosingTag" />
diff --git a/build/code_sniffer/ruleset-php-strict.xml b/build/code_sniffer/ruleset-php-strict.xml
index 65b6763c57..5e3c26a616 100644
--- a/build/code_sniffer/ruleset-php-strict.xml
+++ b/build/code_sniffer/ruleset-php-strict.xml
@@ -34,6 +34,15 @@
<!-- Functions MUST NOT contain multiple empty lines in a row -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
+ <!-- Classes etc. MUST be namespaced -->
+ <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" />
+
+ <!-- A file MUST not contain more than one class/interface -->
+ <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses" />
+
+ <!-- Files containing classes MUST not have any side-effects -->
+ <rule ref="PSR1.Files.SideEffects.FoundWithSymbols" />
+
<!-- When present, all use declarations MUST go after the namespace declaration.
There MUST be one use keyword per declaration.
There MUST be one blank line after the use block. -->
diff --git a/phpBB/adm/images/loading.gif b/phpBB/adm/images/loading.gif
new file mode 100644
index 0000000000..e1ed0883e0
--- /dev/null
+++ b/phpBB/adm/images/loading.gif
Binary files differ
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 7e9df737d3..9ce9fb5f13 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -122,11 +122,11 @@
{
if (newimage == 'no_image')
{
- document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
+ document.getElementById('image_upload_icon').src = "{ROOT_PATH}images/spacer.gif";
}
else
{
- document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
+ document.getElementById('image_upload_icon').src = "{ROOT_PATH}{IMG_PATH}/" + newimage;
}
}
@@ -192,7 +192,7 @@
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
</select></dd>
- <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
+ <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
</dl>
<dl>
<dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}{L_COLON}</label></dt>
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 77b81b82e3..e8b20007dc 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -444,7 +444,7 @@
<col class="row1" /><col class="row1" /><col class="row2" />
<tbody>
<!-- BEGIN forums -->
- <tr data-down="{forums.U_MOVE_DOWN}" data-up="{forums.U_MOVE_UP}">
+ <tr>
<td class="folder">{forums.FOLDER_IMAGE}</td>
<td class="forum-desc">
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
@@ -453,19 +453,10 @@
<!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}{L_COLON} <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}{L_COLON} <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
</td>
<td class="actions">
- <!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
- <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ELSE -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ENDIF -->
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_FORUM_LINK -->
<a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
@@ -501,14 +492,6 @@
</fieldset>
</form>
- <div class="hidden">
- <a class="template-up-img" href="#">{ICON_MOVE_UP}</a>
- <span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span>
-
- <a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a>
- <span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span>
- </div>
-
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_groups_position.html b/phpBB/adm/style/acp_groups_position.html
index b55c38e479..b1df6b6162 100644
--- a/phpBB/adm/style/acp_groups_position.html
+++ b/phpBB/adm/style/acp_groups_position.html
@@ -38,23 +38,14 @@
</thead>
<tbody>
<!-- BEGIN legend -->
- <tr data-down="{legend.U_MOVE_DOWN}" data-up="{legend.U_MOVE_UP}">
+ <tr>
<td><strong<!-- IF legend.GROUP_COLOUR --> style="color: {legend.GROUP_COLOUR}"<!-- ENDIF -->>{legend.GROUP_NAME}</strong></td>
<td style="text-align: center;">{legend.GROUP_TYPE}</td>
<td class="actions">
- <!-- IF legend.S_FIRST_ROW && not legend.S_LAST_ROW -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF not legend.S_FIRST_ROW && not legend.S_LAST_ROW -->
- <span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF legend.S_LAST_ROW && not legend.S_FIRST_ROW -->
- <span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ELSE -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ENDIF -->
+ <span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<a href="{legend.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
@@ -126,7 +117,7 @@
</thead>
<tbody>
<!-- BEGIN teampage -->
- <tr data-down="{teampage.U_MOVE_DOWN}" data-up="{teampage.U_MOVE_UP}">
+ <tr>
<td>
<!-- IF teampage.U_CATEGORY -->
<a href="{teampage.U_CATEGORY}">{teampage.GROUP_NAME}</a>
@@ -137,19 +128,10 @@
<td style="text-align: center;"><!-- IF teampage.GROUP_TYPE -->{teampage.GROUP_TYPE}<!-- ELSE -->-<!-- ENDIF -->
</td></td>
<td class="actions">
- <!-- IF teampage.S_FIRST_ROW && not teampage.S_LAST_ROW -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF not teampage.S_FIRST_ROW && not teampage.S_LAST_ROW -->
- <span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
- <!-- ELSEIF teampage.S_LAST_ROW && not teampage.S_FIRST_ROW -->
- <span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ELSE -->
- <span class="up">{ICON_MOVE_UP_DISABLED}</span>
- <span class="down">{ICON_MOVE_DOWN_DISABLED}</span>
- <!-- ENDIF -->
+ <span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<a href="{teampage.U_DELETE}">{ICON_DELETE}</a>
</td>
</tr>
@@ -186,12 +168,4 @@
</fieldset>
</form>
- <div class="hidden">
- <a class="template-up-img" href="#">{ICON_MOVE_UP}</a>
- <span class="template-up-img-disabled">{ICON_MOVE_UP_DISABLED}</span>
-
- <a class="template-down-img" href="#">{ICON_MOVE_DOWN}</a>
- <span class="template-down-img-disabled">{ICON_MOVE_DOWN_DISABLED}</span>
- </div>
-
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index faeb4c010e..bfe4878ba5 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -22,7 +22,7 @@
{
var use_element = smiley[newimage];
- document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
+ document.getElementById('add_image_src').src = '{ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
document.getElementById('add_code').value = use_element['code'];
document.getElementById('add_emotion').value = use_element['emotion'];
document.getElementById('add_width').value = use_element['width'];
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index c543cf51d4..8870c815af 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -149,20 +149,11 @@
<td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
- <td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
- <!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
- <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
- <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ELSE -->
- {ICON_MOVE_UP_DISABLED}
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td class="actions">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a></span>
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
<a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index a8655973ed..eae4f42641 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -874,6 +874,14 @@ table td.actions {
white-space: nowrap;
}
+table tr:first-child td.actions .up, table tr:last-child td.actions .down {
+ display: none;
+}
+
+table tr:first-child td.actions .up-disabled, table tr:last-child td.actions .down-disabled {
+ display: inline !important;
+}
+
table.styles td.users, table td.mark {
text-align: center;
}
@@ -1598,6 +1606,21 @@ input.button1:focus, input.button2:focus, input.button3:focus {
}
}
+#loading_indicator {
+ background: #000000 url("../images/loading.gif") center center no-repeat;
+ border-radius: 5px;
+ display: none;
+ opacity: 0.8;
+ margin-top: -50px;
+ margin-left: -50px;
+ height: 50px;
+ width: 50px;
+ position: fixed;
+ left: 50%;
+ top: 50%;
+ z-index: 51;
+}
+
/* Pagination
---------------------------------------- */
.pagination {
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index efb0639f1b..78fcbd88fd 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -2,13 +2,6 @@
"use strict";
-var imgTemplates = {
- up: $('.template-up-img'),
- upDisabled: $('.template-up-img-disabled'),
- down: $('.template-down-img'),
- downDisabled: $('.template-down-img-disabled')
-};
-
/**
* The following callbacks are for reording items. row_down
* is triggered when an item is moved down, and row_up is triggered when
@@ -20,43 +13,7 @@ phpbb.addAjaxCallback('row_down', function() {
tr = el.parents('tr'),
trSwap = tr.next();
- /*
- * If the element was the first one, we have to:
- * - Add the up-link to the row we moved
- * - Remove the up-link on the next row
- */
- if (tr.is(':first-child')) {
- var upImg = imgTemplates.up.clone().attr('href', tr.attr('data-up'));
- tr.find('.up').html(upImg);
-
- phpbb.ajaxify({
- selector: tr.find('.up').children('a'),
- callback: 'row_up',
- overlay: false
- });
-
- trSwap.find('.up').html(imgTemplates.upDisabled.clone());
- }
-
tr.insertAfter(trSwap);
-
- /*
- * As well as:
- * - Remove the down-link on the moved row, if it is now the last row
- * - Add the down-link to the next row, if it was the last row
- */
- if (tr.is(':last-child')) {
- tr.find('.down').html(imgTemplates.downDisabled.clone());
-
- var downImg = imgTemplates.down.clone().attr('href', trSwap.attr('data-down'));
- trSwap.find('.down').html(downImg);
-
- phpbb.ajaxify({
- selector: trSwap.find('.down').children('a'),
- callback: 'row_down',
- overlay: false
- });
- }
});
phpbb.addAjaxCallback('row_up', function() {
@@ -64,43 +21,7 @@ phpbb.addAjaxCallback('row_up', function() {
tr = el.parents('tr'),
trSwap = tr.prev();
- /*
- * If the element was the last one, we have to:
- * - Add the down-link to the row we moved
- * - Remove the down-link on the next row
- */
- if (tr.is(':last-child')) {
- var downImg = imgTemplates.down.clone().attr('href', tr.attr('data-down'));
- tr.find('.down').html(downImg);
-
- phpbb.ajaxify({
- selector: tr.find('.down').children('a'),
- callback: 'row_down',
- overlay: false
- });
-
- trSwap.find('.down').html(imgTemplates.downDisabled.clone());
- }
-
tr.insertBefore(trSwap);
-
- /*
- * As well as:
- * - Remove the up-link on the moved row, if it is now the first row
- * - Add the up-link to the previous row, if it was the first row
- */
- if (tr.is(':first-child')) {
- tr.find('.up').html(imgTemplates.upDisabled.clone());
-
- var upImg = imgTemplates.up.clone().attr('href', trSwap.attr('data-up'));
- trSwap.find('.up').html(upImg);
-
- phpbb.ajaxify({
- selector: trSwap.find('.up').children('a'),
- callback: 'row_up',
- overlay: false
- });
- }
});
/**
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 3c291842dc..72af9d3388 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -17,8 +17,8 @@
<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
<div id="darken">&nbsp;</div>
- <div class="jalert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>
+ <div id="loading_indicator"></div>
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
<a href="#" class="alert_close"></a>
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index efb945a117..a3a6d75dd2 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -12,31 +12,27 @@ var keymap = {
};
var dark = $('#darkenwrapper');
-var loadingAlert = $('#loadingalert');
+var loadingIndicator = $('#loading_indicator');
var phpbbAlertTimer = null;
/**
* Display a loading screen
*
- * @returns object Returns loadingAlert.
+ * @returns object Returns loadingIndicator.
*/
-phpbb.loadingAlert = function() {
- if (dark.is(':visible')) {
- loadingAlert.fadeIn(phpbb.alertTime);
- } else {
- loadingAlert.show();
- dark.fadeIn(phpbb.alertTime, function() {
- // Wait fifteen seconds and display an error if nothing has been returned by then.
- phpbbAlertTimer = setTimeout(function() {
- if (loadingAlert.is(':visible')) {
- phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
- }
- }, 15000);
- });
+phpbb.loadingIndicator = function() {
+ if (!loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeIn(phpbb.alertTime);
+ // Wait fifteen seconds and display an error if nothing has been returned by then.
+ phpbbAlertTimer = setTimeout(function() {
+ if (loadingIndicator.is(':visible')) {
+ phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
+ }
+ }, 15000);
}
- return loadingAlert;
+ return loadingIndicator;
};
/**
@@ -66,6 +62,10 @@ phpbb.alert = function(title, msg, fadedark) {
div.find('.alert_title').html(title);
div.find('.alert_text').html(msg);
+ if (!dark.is(':visible')) {
+ dark.fadeIn(phpbb.alertTime);
+ }
+
div.bind('click', function(e) {
e.stopPropagation();
});
@@ -97,8 +97,8 @@ phpbb.alert = function(title, msg, fadedark) {
e.preventDefault();
});
- if (loadingAlert.is(':visible')) {
- loadingAlert.fadeOut(phpbb.alertTime, function() {
+ if (loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeOut(phpbb.alertTime, function() {
dark.append(div);
div.fadeIn(phpbb.alertTime);
});
@@ -131,6 +131,10 @@ phpbb.confirm = function(msg, callback, fadedark) {
var div = $('#phpbb_confirm');
div.find('.alert_text').html(msg);
+ if (!dark.is(':visible')) {
+ dark.fadeIn(phpbb.alertTime);
+ }
+
div.bind('click', function(e) {
e.stopPropagation();
});
@@ -184,8 +188,8 @@ phpbb.confirm = function(msg, callback, fadedark) {
e.preventDefault();
});
- if (loadingAlert.is(':visible')) {
- loadingAlert.fadeOut(phpbb.alertTime, function() {
+ if (loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeOut(phpbb.alertTime, function() {
dark.append(div);
div.fadeIn(phpbb.alertTime);
});
@@ -326,7 +330,7 @@ phpbb.ajaxify = function(options) {
// If confirmation is required, display a dialog to the user.
phpbb.confirm(res.MESSAGE_BODY, function(del) {
if (del) {
- phpbb.loadingAlert();
+ phpbb.loadingIndicator();
data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
$.ajax({
url: res.S_CONFIRM_ACTION,
@@ -369,16 +373,19 @@ phpbb.ajaxify = function(options) {
}
if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') === 'true')) {
- phpbb.loadingAlert();
+ phpbb.loadingIndicator();
}
- $.ajax({
+ var request = $.ajax({
url: action,
type: method,
data: data,
success: returnHandler,
error: errorHandler
});
+ request.always(function() {
+ loadingIndicator.fadeOut(phpbb.alertTime);
+ });
event.preventDefault();
});
diff --git a/phpBB/config/notifications.yml b/phpBB/config/notifications.yml
index 6fecae2aeb..5675e76a99 100644
--- a/phpBB/config/notifications.yml
+++ b/phpBB/config/notifications.yml
@@ -266,7 +266,7 @@ services:
- { name: notification.type }
notification.type.report_post_closed:
- class: phpbb\notification\type\report_post
+ class: phpbb\notification\type\report_post_closed
scope: prototype # scope MUST be prototype for this to work!
arguments:
- @user_loader
@@ -319,6 +319,24 @@ services:
tags:
- { name: notification.type }
+ notification.type.admin_activate_user:
+ class: phpbb\notification\type\admin_activate_user
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
notification.method.email:
class: phpbb\notification\method\email
scope: prototype # scope MUST be prototype for this to work!
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 49804a57bc..23e63ed7e4 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -157,14 +157,46 @@ overall_header_navigation_prepend
* Since: 3.1.0-a1
* Purpose: Add links before the navigation links in the header
+posting_editor_message_after
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen after the message
+
+posting_editor_message_before
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen before the message
+
posting_editor_options_prepend
===
* Locations:
+ styles/prosilver/template/posting_editor.html
- + styles/prosilver/template/posting_body.html
+ + styles/subsilver2/template/posting_body.html
* Since: 3.1.0-a1
* Purpose: Add posting options on the posting screen
+posting_editor_subject_after
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen after the subject
+
+posting_editor_subject_before
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen before the subject
+
simple_footer_after
===
* Locations:
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 55459739ca..2282863746 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -748,7 +748,6 @@ class acp_attachments
}
$template->assign_vars(array(
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index dca39df38c..575ac84012 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -108,11 +108,12 @@ class acp_bbcodes
'DISPLAY_ON_POSTING' => $display_on_posting)
);
- foreach ($user->lang['tokens'] as $token => $token_explain)
+ $bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
+ foreach ($bbcode_tokens as $token)
{
$template->assign_block_vars('token', array(
'TOKEN' => '{' . $token . '}',
- 'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain,
+ 'EXPLAIN' => ($token === 'LOCAL_URL') ? $user->lang(array('tokens', $token), generate_board_url() . '/') : $user->lang(array('tokens', $token)),
));
}
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 40dca53b76..10fbde8c9b 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -763,8 +763,8 @@ class acp_board
global $user, $config;
$act_ary = array(
- 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
- 'ACC_NONE' => USER_ACTIVATION_NONE,
+ 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
+ 'ACC_NONE' => USER_ACTIVATION_NONE,
);
if ($config['email_enable'])
{
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 86879de816..8afc3709b9 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -1607,16 +1607,17 @@ class mssql_extractor extends base_extractor
return;
}
- $sql = "SELECT * FROM $table_name";
- $result_fields = $db->sql_query_limit($sql, 1);
-
- $row = new result_mssqlnative($result_fields);
- $i_num_fields = $row->num_fields();
+ $sql = "SELECT COLUMN_NAME, DATA_TYPE
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = '" . $db->sql_escape($table_name) . "'";
+ $result_fields = $db->sql_query($sql);
- for ($i = 0; $i < $i_num_fields; $i++)
+ $i_num_fields = 0;
+ while ($row = $db->sql_fetchrow($result_fields))
{
- $ary_type[$i] = $row->field_type($i);
- $ary_name[$i] = $row->field_name($i);
+ $ary_type[$i_num_fields] = $row['DATA_TYPE'];
+ $ary_name[$i_num_fields] = $row['COLUMN_NAME'];
+ $i_num_fields++;
}
$db->sql_freeresult($result_fields);
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 5b23f9c3a0..658be4cc6b 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -307,7 +307,6 @@ class acp_icons
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
'IMG_PATH' => $img_path,
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'CODE' => $default_row['code'],
'EMOTION' => $default_row['emotion'],
@@ -480,7 +479,7 @@ class acp_icons
$icons_updated++;
}
- }
+ }
}
$cache->destroy('_icons');
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 8853200ddc..fd9c17f171 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -396,6 +396,9 @@ class acp_users
{
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
+
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
@@ -647,8 +650,8 @@ class acp_users
while ($row = $db->sql_fetchrow($result))
{
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
- && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
- && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
+ && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
+ && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
{
$move_topic_ary[] = $row['topic_id'];
}
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index f58b590c4b..ab45aa9db6 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -26,7 +26,6 @@ class captcha
var $width = 360;
var $height = 96;
-
/**
* Create the image containing $code with a seed of $seed
*/
@@ -69,7 +68,6 @@ class captcha
$bounding_boxes[$i] = $box;
}
-
// Redistribute leftover x-space
$offset = array();
for ($i = 0; $i < $code_len; ++$i)
@@ -99,12 +97,12 @@ class captcha
imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
}
}
+
if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
{
$this->wave($img);
}
-
-
+
if ($config['captcha_gd_3d_noise'])
{
$xoffset = mt_rand(0,9);
@@ -122,11 +120,12 @@ class captcha
$dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]);
$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
-
+
$noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
}
+
$xoffset = 5;
for ($i = 0; $i < $code_len; ++$i)
{
@@ -137,14 +136,17 @@ class captcha
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
+
if ($config['captcha_gd_wave'])
{
$this->wave($img);
}
+
if ($config['captcha_gd_foreground_noise'])
{
$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
}
+
// Send image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
@@ -233,7 +235,6 @@ class captcha
imagesetthickness($img, 1);
}
-
function captcha_noise_bg_bitmaps()
{
return array(
@@ -292,7 +293,7 @@ class captcha
),
));
}
-
+
/**
* Return bitmaps
*/
diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php
index a61324d120..185352dd4e 100644
--- a/phpBB/includes/captcha/captcha_gd_wave.php
+++ b/phpBB/includes/captcha/captcha_gd_wave.php
@@ -86,7 +86,7 @@ class captcha
$fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120));
- $colors = array();
+ $colors = array();
$minr = mt_rand(20, 30);
$ming = mt_rand(20, 30);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 510f46fcb4..35fa785616 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1318,18 +1318,12 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
$tz_dates .= '<option value="' . $timezone['offest'] . ' - ' . $timezone['current'] . '"' . $selected . '>' . $timezone['offest'] . ' - ' . $timezone['current'] . '</option>';
}
- if (isset($user->lang['timezones'][$timezone['tz']]))
+ $label = $timezone['tz'];
+ if (isset($user->lang['timezones'][$label]))
{
- $title = $label = $user->lang['timezones'][$timezone['tz']];
- }
- else
- {
- // No label, we'll figure one out
- $bits = explode('/', str_replace('_', ' ', $timezone['tz']));
-
- $label = implode(' - ', $bits);
- $title = $timezone['offest'] . ' - ' . $label;
+ $label = $user->lang['timezones'][$label];
}
+ $title = $timezone['offest'] . ' - ' . $label;
if ($truncate)
{
@@ -1478,7 +1472,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$sql = 'SELECT forum_id
FROM ' . FORUMS_TRACK_TABLE . "
WHERE user_id = {$user->data['user_id']}
- AND mark_time < $post_time
AND " . $db->sql_in_set('forum_id', $forum_id);
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index c83bc1f7a6..b9210114ef 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -67,7 +67,8 @@ function adm_page_header($page_title)
'SID' => $SID,
'_SID' => $_SID,
'SESSION_ID' => $user->session_id,
- 'ROOT_PATH' => $phpbb_admin_path,
+ 'ROOT_PATH' => $phpbb_root_path,
+ 'ADMIN_ROOT_PATH' => $phpbb_admin_path,
'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index c5347ef262..8122b87e4b 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -481,6 +481,16 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
* For parsing custom parsed text to be stored within the database.
* This function additionally returns the uid and bitfield that needs to be stored.
* Expects $text to be the value directly from request_var() and in it's non-parsed form
+*
+* @param string $text The text to be replaced with the parsed one
+* @param string $uid The BBCode uid for this parse
+* @param string $bitfield The BBCode bitfield for this parse
+* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.
+* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)
+* @param bool $allow_urls If urls is allowed
+* @param bool $allow_smilies If smilies are allowed
+*
+* @return array An array of string with the errors that occurred while parsing
*/
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false)
{
@@ -542,7 +552,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
$vars = array('text', 'uid', 'bitfield', 'flags');
extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));
- return;
+ return $message_parser->warn_msg;
}
/**
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index a34a193f60..3eeecd038d 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -823,7 +823,7 @@ function get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false
break;
case AVATAR_REMOTE:
- // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
+ // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
return get_remote_avatar_dim($src, $axis);
break;
@@ -1117,7 +1117,7 @@ function words_unique(&$words)
* Adds a user to the specified group and optionally makes them a group leader
* This function does not create the group if it does not exist and so should only be called after the groups have been created
*/
-function add_user_group($group_id, $user_id, $group_leader=false)
+function add_user_group($group_id, $user_id, $group_leader = false)
{
global $convert, $phpbb_root_path, $config, $user, $db;
@@ -1297,7 +1297,7 @@ function restore_config($schema)
$src_ary = $schema['array_name'];
$config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : '';
}
- }
+ }
if ($config_value !== '')
{
@@ -1719,7 +1719,7 @@ function add_default_groups()
'GUESTS' => array('', 0, 0),
'REGISTERED' => array('', 0, 0),
'REGISTERED_COPPA' => array('', 0, 0),
- 'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
+ 'GLOBAL_MODERATORS' => array('00AA00', 2, 0),
'ADMINISTRATORS' => array('AA0000', 1, 1),
'BOTS' => array('9E8DA7', 0, 0),
'NEWLY_REGISTERED' => array('', 0, 0),
@@ -1748,7 +1748,7 @@ function add_default_groups()
'group_type' => GROUP_SPECIAL,
'group_colour' => (string) $data[0],
'group_legend' => (int) $data[1],
- 'group_founder_manage' => (int) $data[2]
+ 'group_founder_manage' => (int) $data[2],
);
}
@@ -1758,6 +1758,38 @@ function add_default_groups()
}
}
+function add_groups_to_teampage()
+{
+ global $db;
+
+ $teampage_groups = array(
+ 'ADMINISTRATORS' => 1,
+ 'GLOBAL_MODERATORS' => 2,
+ );
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_name', array_keys($teampage_groups));
+ $result = $db->sql_query($sql);
+
+ $teampage_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $teampage_ary[] = array(
+ 'group_id' => (int) $row['group_id'],
+ 'teampage_name' => '',
+ 'teampage_position' => (int) $teampage_groups[$row['group_name']],
+ 'teampage_parent' => 0,
+ );
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($teampage_ary))
+ {
+ $db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_ary);
+ }
+}
+
/**
* Sync post count. We might need to do this in batches.
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 898dacd831..2a94acbe02 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -27,7 +27,7 @@ class ucp_activate
function main($id, $mode)
{
global $config, $phpbb_root_path, $phpEx;
- global $db, $user, $auth, $template;
+ global $db, $user, $auth, $template, $phpbb_container;
$user_id = request_var('u', 0);
$key = request_var('k', '');
@@ -108,6 +108,9 @@ class ucp_activate
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
{
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
+
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index dd62b69342..5a896c31b0 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -162,6 +162,7 @@ class ucp_notifications
/**
* Output all the notification types to the template
*
+ * @param array $subscriptions Array containing global subscriptions
* @param \phpbb\notification\manager $phpbb_notifications
* @param \phpbb\template\template $template
* @param \phpbb\user $user
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 625da23736..9393e65f3c 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -269,7 +269,7 @@ function view_folder($id, $mode, $folder_id, $folder)
// There is the chance that all recipients of the message got deleted. To avoid creating
// exports without recipients, we add a bogus "undisclosed recipient".
if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
- !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
+ !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
{
$address[$message_id]['u'] = array();
$address[$message_id]['u']['to'] = array();
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 1f9ab23326..1641c6eef1 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -379,41 +379,16 @@ class ucp_register
}
$messenger->send(NOTIFY_EMAIL);
+ }
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
- {
- // Grab an array of user_id's with a_user permissions ... these users can activate a user
- $admin_ary = $auth->acl_get_list(false, 'a_user', false);
- $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
-
- // Also include founders
- $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
-
- if (sizeof($admin_ary))
- {
- $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
- }
-
- $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
- FROM ' . USERS_TABLE . ' ' .
- $where_sql;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $messenger->template('admin_activate', $row['user_lang']);
- $messenger->set_addresses($row);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($data['username']),
- 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
- 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
- );
-
- $messenger->send($row['user_notify_type']);
- }
- $db->sql_freeresult($result);
- }
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->add_notifications('admin_activate_user', array(
+ 'user_id' => $user_id,
+ 'user_actkey' => $user_row['user_actkey'],
+ 'user_regdate' => $user_row['user_regdate'],
+ ));
}
// Perform account linking if necessary
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 03ed15c0ec..de4e04a8e5 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -136,7 +136,7 @@ $config_schema = array(
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
'default_dateformat' => 'phpbb_set_encoding(default_dateformat)',
- 'board_timezone' => 'board_timezone',
+ 'board_timezone' => 'phpbb_convert_timezone(board_timezone)',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => '!is_empty(coppa_mail)',
@@ -341,6 +341,9 @@ if (!$get_info)
update_folder_pm_count();
', '
update_unread_count();
+ ', (defined('MOD_ATTACHMENT')) ? '
+ phpbb_attachment_extension_group_name();
+ ' : '
', '
phpbb_convert_authentication(\'start\');
', '
@@ -399,7 +402,7 @@ if (!$get_info)
array('is_orphan', 0, ''),
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
- array('real_filename', 'attachments_desc.real_filename', ''),
+ array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),
@@ -497,7 +500,7 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_posts_approved', 'topics.topic_replies + 1', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
array('topic_posts_unapproved', 0, ''),
array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
@@ -506,6 +509,8 @@ if (!$get_info)
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
array('topic_last_view_time', 'posts.post_time', 'intval'),
+ array('topic_visibility', ITEM_APPROVED, ''),
+
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
@@ -531,7 +536,7 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_posts_approved', 'topics.topic_replies + 1', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
array('topic_posts_unapproved', 0, ''),
array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
@@ -539,6 +544,7 @@ if (!$get_info)
array('topic_moved_id', 'topics.topic_moved_id', ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
+ array('topic_visibility', ITEM_APPROVED, ''),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
@@ -646,6 +652,7 @@ if (!$get_info)
array('post_edit_count', 'posts.post_edit_count', ''),
array('post_edit_reason', '', ''),
array('post_edit_user', '', 'phpbb_post_edit_user'),
+ array('post_visibility', ITEM_APPROVED, ''),
array('bbcode_uid', 'posts.post_time', 'make_uid'),
array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'),
@@ -821,7 +828,10 @@ if (!$get_info)
array(
'target' => GROUPS_TABLE,
'autoincrement' => 'group_id',
- 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . GROUPS_TABLE),
+ array('target', $convert->truncate_statement . TEAMPAGE_TABLE),
+ ),
array('group_id', 'groups.group_id', ''),
array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
@@ -838,6 +848,7 @@ if (!$get_info)
'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
'execute_first' => '
add_default_groups();
+ add_groups_to_teampage();
',
array('group_id', 'groups.group_id', ''),
@@ -865,7 +876,8 @@ if (!$get_info)
'autoincrement' => 'user_id',
'query_first' => array(
array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS),
- array('target', $convert->truncate_statement . BOTS_TABLE)
+ array('target', $convert->truncate_statement . BOTS_TABLE),
+ array('target', $convert->truncate_statement . USER_NOTIFICATIONS_TABLE),
),
'execute_last' => '
@@ -889,7 +901,7 @@ if (!$get_info)
array('user_lastmark', 'users.user_lastvisit', 'intval'),
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
- array('user_timezone', 'users.user_timezone', 'floatval'),
+ array('user_timezone', 'users.user_timezone', 'phpbb_convert_timezone'),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
@@ -938,6 +950,8 @@ if (!$get_info)
array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('', 'users.user_regdate AS post_time', ''),
+ array('', 'users.user_notify_pm', 'phpbb_add_notification_options'),
+
'where' => 'users.user_id <> -1',
),
),
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index a698f0ef13..29e5f7ab09 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -540,6 +540,15 @@ function phpbb_user_id($user_id)
return (int) $user_id;
}
+/**
+* Return correct user id value
+* Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
+*/
+function phpbb_topic_replies_to_posts($num_replies)
+{
+ return (int) $num_replies + 1;
+}
+
/* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example)
function phpbb_copy_table_fields()
{
@@ -1406,6 +1415,55 @@ function phpbb_attachment_category($cat_id)
}
/**
+* Convert the attachment extension names
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_attachment_extension_group_name()
+{
+ global $db, $phpbb_root_path, $phpEx;
+
+ // Update file extension group names to use language strings.
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $extension_groups_updated = array();
+ while ($lang_dir = $db->sql_fetchfield('lang_dir'))
+ {
+ $lang_dir = basename($lang_dir);
+ $lang_file = $phpbb_root_path . 'language/' . $lang_dir . '/acp/attachments.' . $phpEx;
+
+ if (!file_exists($lang_file))
+ {
+ continue;
+ }
+
+ $lang = array();
+ include($lang_file);
+
+ foreach ($lang as $lang_key => $lang_val)
+ {
+ if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
+ {
+ continue;
+ }
+
+ $sql_ary = array(
+ 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_name = '" . $db->sql_escape($lang_val) . "'";
+ $db->sql_query($sql);
+
+ $extension_groups_updated[$lang_key] = true;
+ }
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
* Obtain list of forums in which different attachment categories can be used
*/
function phpbb_attachment_forum_perms($forum_permissions)
@@ -1868,3 +1926,50 @@ function phpbb_check_username_collisions()
$drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
$db->sql_query($drop_sql);
}
+
+function phpbb_convert_timezone($timezone)
+{
+ global $config, $db, $phpbb_root_path, $phpEx, $table_prefix;
+ $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix);
+ return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
+}
+
+function phpbb_add_notification_options($user_notify_pm)
+{
+ global $convert_row, $db;
+
+ $user_id = phpbb_user_id($convert_row['user_id']);
+ if ($user_id == ANONYMOUS)
+ {
+ return;
+ }
+
+ $rows = array();
+
+ $rows[] = array(
+ 'item_type' => 'post',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ $rows[] = array(
+ 'item_type' => 'topic',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ if ($user_notify_pm)
+ {
+ $rows[] = array(
+ 'item_type' => 'pm',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ }
+
+ $sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
+}
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index c9bf76bf04..2e09e95ea7 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -691,7 +691,7 @@ class module
/**
* Generate the relevant HTML for an input field and the associated label and explanatory text
*/
- function input_field($name, $type, $value='', $options='')
+ function input_field($name, $type, $value = '', $options = '')
{
global $lang;
$tpl_type = explode(':', $type);
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 4d3e1d3d4a..1c7e2dca76 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -90,13 +90,21 @@ class install_convert extends module
function main($mode, $sub)
{
global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix;
- global $convert;
+ global $convert, $request, $phpbb_container;
$this->tpl_name = 'install_convert';
$this->mode = $mode;
$convert = new convert($this->p_master);
+ // Enable super globals to prevent issues with the new \phpbb\request\request object
+ $request->enable_super_globals();
+ // Create a normal container now
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ // Create cache
+ $cache = $phpbb_container->get('cache');
+
switch ($sub)
{
case 'intro':
@@ -418,6 +426,7 @@ class install_convert extends module
{
$error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix);
}
+ $src_dbms = phpbb_convert_30_dbms_to_31($src_dbms);
// Check table prefix
if (!sizeof($error))
@@ -1537,7 +1546,7 @@ class install_convert extends module
function finish_conversion()
{
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
- global $cache, $auth;
+ global $cache, $auth, $phpbb_container, $phpbb_log;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress'
@@ -1550,6 +1559,7 @@ class install_convert extends module
phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
+ $phpbb_log = $phpbb_container->get('log');
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
$url = $this->p_master->module_url . "?mode={$this->mode}&amp;sub=final&amp;language=$language";
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index bb1c4698ec..a939689f9c 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -62,6 +62,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',
'ACTIVE' => 'active',
'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.',
'ADMINISTRATOR' => 'Administrator',
@@ -381,6 +382,7 @@ $lang = array_merge($lang, array(
'MB' => 'MB',
'MIB' => 'MiB',
'MCP' => 'Moderator Control Panel',
+ 'MCP_SHORT' => 'Moderate',
'MEMBERLIST' => 'Members',
'MEMBERLIST_EXPLAIN' => 'View complete list of members',
'MERGE' => 'Merge',
@@ -430,6 +432,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TOPIC_DISAPPROVED' => 'Your topic "%1$s" was disapproved for reason: "%2$s".',
'NOTIFICATION_TOPIC_IN_QUEUE' => 'A new topic titled "%2$s" was posted by %1$s and needs approval.',
'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.',
+ 'NOTIFICATION_ADMIN_ACTIVATE_USER' => 'The user “%1$s” is newly registered and requires activation.',
'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.',
'NOTIFY_ADMIN_EMAIL' => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',
'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.',
@@ -893,6 +896,8 @@ $lang = array_merge($lang, array(
// Timezones can be translated. We use this for the Etc/GMT timezones here,
// because they are named invers to their offset.
'timezones' => array(
+ 'UTC' => 'UTC',
+
'Etc/GMT-12' => 'GMT+12',
'Etc/GMT-11' => 'GMT+11',
'Etc/GMT-10' => 'GMT+10',
@@ -917,6 +922,436 @@ $lang = array_merge($lang, array(
'Etc/GMT+10' => 'GMT-10',
'Etc/GMT+11' => 'GMT-11',
'Etc/GMT+12' => 'GMT-12',
+
+ 'Africa/Abidjan' => 'Africa/Abidjan',
+ 'Africa/Accra' => 'Africa/Accra',
+ 'Africa/Addis_Ababa' => 'Africa/Addis Ababa',
+ 'Africa/Algiers' => 'Africa/Algiers',
+ 'Africa/Asmara' => 'Africa/Asmara',
+ 'Africa/Bamako' => 'Africa/Bamako',
+ 'Africa/Bangui' => 'Africa/Bangui',
+ 'Africa/Banjul' => 'Africa/Banjul',
+ 'Africa/Bissau' => 'Africa/Bissau',
+ 'Africa/Blantyre' => 'Africa/Blantyre',
+ 'Africa/Brazzaville' => 'Africa/Brazzaville',
+ 'Africa/Bujumbura' => 'Africa/Bujumbura',
+ 'Africa/Cairo' => 'Africa/Cairo',
+ 'Africa/Casablanca' => 'Africa/Casablanca',
+ 'Africa/Ceuta' => 'Africa/Ceuta',
+ 'Africa/Conakry' => 'Africa/Conakry',
+ 'Africa/Dakar' => 'Africa/Dakar',
+ 'Africa/Dar_es_Salaam' => 'Africa/Dar es Salaam',
+ 'Africa/Djibouti' => 'Africa/Djibouti',
+ 'Africa/Douala' => 'Africa/Douala',
+ 'Africa/El_Aaiun' => 'Africa/El Aaiun',
+ 'Africa/Freetown' => 'Africa/Freetown',
+ 'Africa/Gaborone' => 'Africa/Gaborone',
+ 'Africa/Harare' => 'Africa/Harare',
+ 'Africa/Johannesburg' => 'Africa/Johannesburg',
+ 'Africa/Juba' => 'Africa/Juba',
+ 'Africa/Kampala' => 'Africa/Kampala',
+ 'Africa/Khartoum' => 'Africa/Khartoum',
+ 'Africa/Kigali' => 'Africa/Kigali',
+ 'Africa/Kinshasa' => 'Africa/Kinshasa',
+ 'Africa/Lagos' => 'Africa/Lagos',
+ 'Africa/Libreville' => 'Africa/Libreville',
+ 'Africa/Lome' => 'Africa/Lome',
+ 'Africa/Luanda' => 'Africa/Luanda',
+ 'Africa/Lubumbashi' => 'Africa/Lubumbashi',
+ 'Africa/Lusaka' => 'Africa/Lusaka',
+ 'Africa/Malabo' => 'Africa/Malabo',
+ 'Africa/Maputo' => 'Africa/Maputo',
+ 'Africa/Maseru' => 'Africa/Maseru',
+ 'Africa/Mbabane' => 'Africa/Mbabane',
+ 'Africa/Mogadishu' => 'Africa/Mogadishu',
+ 'Africa/Monrovia' => 'Africa/Monrovia',
+ 'Africa/Nairobi' => 'Africa/Nairobi',
+ 'Africa/Ndjamena' => 'Africa/Ndjamena',
+ 'Africa/Niamey' => 'Africa/Niamey',
+ 'Africa/Nouakchott' => 'Africa/Nouakchott',
+ 'Africa/Ouagadougou' => 'Africa/Ouagadougou',
+ 'Africa/Porto-Novo' => 'Africa/Porto-Novo',
+ 'Africa/Sao_Tome' => 'Africa/Sao Tome',
+ 'Africa/Tripoli' => 'Africa/Tripoli',
+ 'Africa/Tunis' => 'Africa/Tunis',
+ 'Africa/Windhoek' => 'Africa/Windhoek',
+
+ 'America/Adak' => 'America/Adak',
+ 'America/Anchorage' => 'America/Anchorage',
+ 'America/Anguilla' => 'America/Anguilla',
+ 'America/Antigua' => 'America/Antigua',
+ 'America/Araguaina' => 'America/Araguaina',
+
+ 'America/Argentina/Buenos_Aires' => 'America/Argentina/Buenos Aires',
+ 'America/Argentina/Catamarca' => 'America/Argentina/Catamarca',
+ 'America/Argentina/Cordoba' => 'America/Argentina/Cordoba',
+ 'America/Argentina/Jujuy' => 'America/Argentina/Jujuy',
+ 'America/Argentina/La_Rioja' => 'America/Argentina/La Rioja',
+ 'America/Argentina/Mendoza' => 'America/Argentina/Mendoza',
+ 'America/Argentina/Rio_Gallegos' => 'America/Argentina/Rio Gallegos',
+ 'America/Argentina/Salta' => 'America/Argentina/Salta',
+ 'America/Argentina/San_Juan' => 'America/Argentina/San Juan',
+ 'America/Argentina/San_Luis' => 'America/Argentina/San Luis',
+ 'America/Argentina/Tucuman' => 'America/Argentina/Tucuman',
+ 'America/Argentina/Ushuaia' => 'America/Argentina/Ushuaia',
+
+ 'America/Aruba' => 'America/Aruba',
+ 'America/Asuncion' => 'America/Asuncion',
+ 'America/Atikokan' => 'America/Atikokan',
+ 'America/Bahia' => 'America/Bahia',
+ 'America/Bahia_Banderas' => 'America/Bahia Banderas',
+ 'America/Barbados' => 'America/Barbados',
+ 'America/Belem' => 'America/Belem',
+ 'America/Belize' => 'America/Belize',
+ 'America/Blanc-Sablon' => 'America/Blanc-Sablon',
+ 'America/Boa_Vista' => 'America/Boa Vista',
+ 'America/Bogota' => 'America/Bogota',
+ 'America/Boise' => 'America/Boise',
+ 'America/Cambridge_Bay' => 'America/Cambridge Bay',
+ 'America/Campo_Grande' => 'America/Campo Grande',
+ 'America/Cancun' => 'America/Cancun',
+ 'America/Caracas' => 'America/Caracas',
+ 'America/Cayenne' => 'America/Cayenne',
+ 'America/Cayman' => 'America/Cayman',
+ 'America/Chicago' => 'America/Chicago',
+ 'America/Chihuahua' => 'America/Chihuahua',
+ 'America/Costa_Rica' => 'America/Costa Rica',
+ 'America/Creston' => 'America/Creston',
+ 'America/Cuiaba' => 'America/Cuiaba',
+ 'America/Curacao' => 'America/Curacao',
+ 'America/Danmarkshavn' => 'America/Danmarkshavn',
+ 'America/Dawson' => 'America/Dawson',
+ 'America/Dawson_Creek' => 'America/Dawson Creek',
+ 'America/Denver' => 'America/Denver',
+ 'America/Detroit' => 'America/Detroit',
+ 'America/Dominica' => 'America/Dominica',
+ 'America/Edmonton' => 'America/Edmonton',
+ 'America/Eirunepe' => 'America/Eirunepe',
+ 'America/El_Salvador' => 'America/El Salvador',
+ 'America/Fortaleza' => 'America/Fortaleza',
+ 'America/Glace_Bay' => 'America/Glace Bay',
+ 'America/Godthab' => 'America/Godthab',
+ 'America/Goose_Bay' => 'America/Goose Bay',
+ 'America/Grand_Turk' => 'America/Grand Turk',
+ 'America/Grenada' => 'America/Grenada',
+ 'America/Guadeloupe' => 'America/Guadeloupe',
+ 'America/Guatemala' => 'America/Guatemala',
+ 'America/Guayaquil' => 'America/Guayaquil',
+ 'America/Guyana' => 'America/Guyana',
+ 'America/Halifax' => 'America/Halifax',
+ 'America/Havana' => 'America/Havana',
+ 'America/Hermosillo' => 'America/Hermosillo',
+ 'America/Indiana/Indianapolis' => 'America/Indiana/Indianapolis',
+ 'America/Indiana/Knox' => 'America/Indiana/Knox',
+ 'America/Indiana/Marengo' => 'America/Indiana/Marengo',
+ 'America/Indiana/Petersburg' => 'America/Indiana/Petersburg',
+ 'America/Indiana/Tell_City' => 'America/Indiana/Tell City',
+ 'America/Indiana/Vevay' => 'America/Indiana/Vevay',
+ 'America/Indiana/Vincennes' => 'America/Indiana/Vincennes',
+ 'America/Indiana/Winamac' => 'America/Indiana/Winamac',
+ 'America/Inuvik' => 'America/Inuvik',
+ 'America/Iqaluit' => 'America/Iqaluit',
+ 'America/Jamaica' => 'America/Jamaica',
+ 'America/Juneau' => 'America/Juneau',
+ 'America/Kentucky/Louisville' => 'America/Kentucky/Louisville',
+ 'America/Kentucky/Monticello' => 'America/Kentucky/Monticello',
+ 'America/Kralendijk' => 'America/Kralendijk',
+ 'America/La_Paz' => 'America/La Paz',
+ 'America/Lima' => 'America/Lima',
+ 'America/Los_Angeles' => 'America/Los Angeles',
+ 'America/Lower_Princes' => 'America/Lower Princes',
+ 'America/Maceio' => 'America/Maceio',
+ 'America/Managua' => 'America/Managua',
+ 'America/Manaus' => 'America/Manaus',
+ 'America/Marigot' => 'America/Marigot',
+ 'America/Martinique' => 'America/Martinique',
+ 'America/Matamoros' => 'America/Matamoros',
+ 'America/Mazatlan' => 'America/Mazatlan',
+ 'America/Menominee' => 'America/Menominee',
+ 'America/Merida' => 'America/Merida',
+ 'America/Metlakatla' => 'America/Metlakatla',
+ 'America/Mexico_City' => 'America/Mexico City',
+ 'America/Miquelon' => 'America/Miquelon',
+ 'America/Moncton' => 'America/Moncton',
+ 'America/Monterrey' => 'America/Monterrey',
+ 'America/Montevideo' => 'America/Montevideo',
+ 'America/Montreal' => 'America/Montreal',
+ 'America/Montserrat' => 'America/Montserrat',
+ 'America/Nassau' => 'America/Nassau',
+ 'America/New_York' => 'America/New York',
+ 'America/Nipigon' => 'America/Nipigon',
+ 'America/Nome' => 'America/Nome',
+ 'America/Noronha' => 'America/Noronha',
+ 'America/North_Dakota/Beulah' => 'America/North Dakota/Beulah',
+ 'America/North_Dakota/Center' => 'America/North Dakota/Center',
+ 'America/North_Dakota/New_Salem' => 'America/North Dakota/New Salem',
+ 'America/Ojinaga' => 'America/Ojinaga',
+ 'America/Panama' => 'America/Panama',
+ 'America/Pangnirtung' => 'America/Pangnirtung',
+ 'America/Paramaribo' => 'America/Paramaribo',
+ 'America/Phoenix' => 'America/Phoenix',
+ 'America/Port-au-Prince' => 'America/Port-au-Prince',
+ 'America/Port_of_Spain' => 'America/Port of Spain',
+ 'America/Porto_Velho' => 'America/Porto Velho',
+ 'America/Puerto_Rico' => 'America/Puerto Rico',
+ 'America/Rainy_River' => 'America/Rainy River',
+ 'America/Rankin_Inlet' => 'America/Rankin Inlet',
+ 'America/Recife' => 'America/Recife',
+ 'America/Regina' => 'America/Regina',
+ 'America/Resolute' => 'America/Resolute',
+ 'America/Rio_Branco' => 'America/Rio Branco',
+ 'America/Santa_Isabel' => 'America/Santa Isabel',
+ 'America/Santarem' => 'America/Santarem',
+ 'America/Santiago' => 'America/Santiago',
+ 'America/Santo_Domingo' => 'America/Santo Domingo',
+ 'America/Sao_Paulo' => 'America/Sao Paulo',
+ 'America/Scoresbysund' => 'America/Scoresbysund',
+ 'America/Shiprock' => 'America/Shiprock',
+ 'America/Sitka' => 'America/Sitka',
+ 'America/St_Barthelemy' => 'America/St. Barthelemy',
+ 'America/St_Johns' => 'America/St. Johns',
+ 'America/St_Kitts' => 'America/St. Kitts',
+ 'America/St_Lucia' => 'America/St. Lucia',
+ 'America/St_Thomas' => 'America/St. Thomas',
+ 'America/St_Vincent' => 'America/St. Vincent',
+ 'America/Swift_Current' => 'America/Swift Current',
+ 'America/Tegucigalpa' => 'America/Tegucigalpa',
+ 'America/Thule' => 'America/Thule',
+ 'America/Thunder_Bay' => 'America/Thunder Bay',
+ 'America/Tijuana' => 'America/Tijuana',
+ 'America/Toronto' => 'America/Toronto',
+ 'America/Tortola' => 'America/Tortola',
+ 'America/Vancouver' => 'America/Vancouver',
+ 'America/Whitehorse' => 'America/Whitehorse',
+ 'America/Winnipeg' => 'America/Winnipeg',
+ 'America/Yakutat' => 'America/Yakutat',
+ 'America/Yellowknife' => 'America/Yellowknife',
+
+ 'Antarctica/Casey' => 'Antarctica/Casey',
+ 'Antarctica/Davis' => 'Antarctica/Davis',
+ 'Antarctica/DumontDUrville' => 'Antarctica/DumontDUrville',
+ 'Antarctica/Macquarie' => 'Antarctica/Macquarie',
+ 'Antarctica/Mawson' => 'Antarctica/Mawson',
+ 'Antarctica/McMurdo' => 'Antarctica/McMurdo',
+ 'Antarctica/Palmer' => 'Antarctica/Palmer',
+ 'Antarctica/Rothera' => 'Antarctica/Rothera',
+ 'Antarctica/South_Pole' => 'Antarctica/South Pole',
+ 'Antarctica/Syowa' => 'Antarctica/Syowa',
+ 'Antarctica/Vostok' => 'Antarctica/Vostok',
+
+ 'Arctic/Longyearbyen' => 'Arctic/Longyearbyen',
+
+ 'Asia/Aden' => 'Asia/Aden',
+ 'Asia/Almaty' => 'Asia/Almaty',
+ 'Asia/Amman' => 'Asia/Amman',
+ 'Asia/Anadyr' => 'Asia/Anadyr',
+ 'Asia/Aqtau' => 'Asia/Aqtau',
+ 'Asia/Aqtobe' => 'Asia/Aqtobe',
+ 'Asia/Ashgabat' => 'Asia/Ashgabat',
+ 'Asia/Baghdad' => 'Asia/Baghdad',
+ 'Asia/Bahrain' => 'Asia/Bahrain',
+ 'Asia/Baku' => 'Asia/Baku',
+ 'Asia/Bangkok' => 'Asia/Bangkok',
+ 'Asia/Beirut' => 'Asia/Beirut',
+ 'Asia/Bishkek' => 'Asia/Bishkek',
+ 'Asia/Brunei' => 'Asia/Brunei',
+ 'Asia/Choibalsan' => 'Asia/Choibalsan',
+ 'Asia/Chongqing' => 'Asia/Chongqing',
+ 'Asia/Colombo' => 'Asia/Colombo',
+ 'Asia/Damascus' => 'Asia/Damascus',
+ 'Asia/Dhaka' => 'Asia/Dhaka',
+ 'Asia/Dili' => 'Asia/Dili',
+ 'Asia/Dubai' => 'Asia/Dubai',
+ 'Asia/Dushanbe' => 'Asia/Dushanbe',
+ 'Asia/Gaza' => 'Asia/Gaza',
+ 'Asia/Harbin' => 'Asia/Harbin',
+ 'Asia/Hebron' => 'Asia/Hebron',
+ 'Asia/Ho_Chi_Minh' => 'Asia/Ho Chi Minh',
+ 'Asia/Hong_Kong' => 'Asia/Hong Kong',
+ 'Asia/Hovd' => 'Asia/Hovd',
+ 'Asia/Irkutsk' => 'Asia/Irkutsk',
+ 'Asia/Jakarta' => 'Asia/Jakarta',
+ 'Asia/Jayapura' => 'Asia/Jayapura',
+ 'Asia/Jerusalem' => 'Asia/Jerusalem',
+ 'Asia/Kabul' => 'Asia/Kabul',
+ 'Asia/Kamchatka' => 'Asia/Kamchatka',
+ 'Asia/Karachi' => 'Asia/Karachi',
+ 'Asia/Kashgar' => 'Asia/Kashgar',
+ 'Asia/Kathmandu' => 'Asia/Kathmandu',
+ 'Asia/Khandyga' => 'Asia/Khandyga',
+ 'Asia/Kolkata' => 'Asia/Kolkata',
+ 'Asia/Krasnoyarsk' => 'Asia/Krasnoyarsk',
+ 'Asia/Kuala_Lumpur' => 'Asia/Kuala Lumpur',
+ 'Asia/Kuching' => 'Asia/Kuching',
+ 'Asia/Kuwait' => 'Asia/Kuwait',
+ 'Asia/Macau' => 'Asia/Macau',
+ 'Asia/Magadan' => 'Asia/Magadan',
+ 'Asia/Makassar' => 'Asia/Makassar',
+ 'Asia/Manila' => 'Asia/Manila',
+ 'Asia/Muscat' => 'Asia/Muscat',
+ 'Asia/Nicosia' => 'Asia/Nicosia',
+ 'Asia/Novokuznetsk' => 'Asia/Novokuznetsk',
+ 'Asia/Novosibirsk' => 'Asia/Novosibirsk',
+ 'Asia/Omsk' => 'Asia/Omsk',
+ 'Asia/Oral' => 'Asia/Oral',
+ 'Asia/Phnom_Penh' => 'Asia/Phnom Penh',
+ 'Asia/Pontianak' => 'Asia/Pontianak',
+ 'Asia/Pyongyang' => 'Asia/Pyongyang',
+ 'Asia/Qatar' => 'Asia/Qatar',
+ 'Asia/Qyzylorda' => 'Asia/Qyzylorda',
+ 'Asia/Rangoon' => 'Asia/Rangoon',
+ 'Asia/Riyadh' => 'Asia/Riyadh',
+ 'Asia/Sakhalin' => 'Asia/Sakhalin',
+ 'Asia/Samarkand' => 'Asia/Samarkand',
+ 'Asia/Seoul' => 'Asia/Seoul',
+ 'Asia/Shanghai' => 'Asia/Shanghai',
+ 'Asia/Singapore' => 'Asia/Singapore',
+ 'Asia/Taipei' => 'Asia/Taipei',
+ 'Asia/Tashkent' => 'Asia/Tashkent',
+ 'Asia/Tbilisi' => 'Asia/Tbilisi',
+ 'Asia/Tehran' => 'Asia/Tehran',
+ 'Asia/Thimphu' => 'Asia/Thimphu',
+ 'Asia/Tokyo' => 'Asia/Tokyo',
+ 'Asia/Ulaanbaatar' => 'Asia/Ulaanbaatar',
+ 'Asia/Urumqi' => 'Asia/Urumqi',
+ 'Asia/Ust-Nera' => 'Asia/Ust-Nera',
+ 'Asia/Vientiane' => 'Asia/Vientiane',
+ 'Asia/Vladivostok' => 'Asia/Vladivostok',
+ 'Asia/Yakutsk' => 'Asia/Yakutsk',
+ 'Asia/Yekaterinburg' => 'Asia/Yekaterinburg',
+ 'Asia/Yerevan' => 'Asia/Yerevan',
+
+ 'Atlantic/Azores' => 'Atlantic/Azores',
+ 'Atlantic/Bermuda' => 'Atlantic/Bermuda',
+ 'Atlantic/Canary' => 'Atlantic/Canary',
+ 'Atlantic/Cape_Verde' => 'Atlantic/Cape Verde',
+ 'Atlantic/Faroe' => 'Atlantic/Faroe',
+ 'Atlantic/Madeira' => 'Atlantic/Madeira',
+ 'Atlantic/Reykjavik' => 'Atlantic/Reykjavik',
+ 'Atlantic/South_Georgia' => 'Atlantic/South Georgia',
+ 'Atlantic/St_Helena' => 'Atlantic/St. Helena',
+ 'Atlantic/Stanley' => 'Atlantic/Stanley',
+
+ 'Australia/Adelaide' => 'Australia/Adelaide',
+ 'Australia/Brisbane' => 'Australia/Brisbane',
+ 'Australia/Broken_Hill' => 'Australia/Broken Hill',
+ 'Australia/Currie' => 'Australia/Currie',
+ 'Australia/Darwin' => 'Australia/Darwin',
+ 'Australia/Eucla' => 'Australia/Eucla',
+ 'Australia/Hobart' => 'Australia/Hobart',
+ 'Australia/Lindeman' => 'Australia/Lindeman',
+ 'Australia/Lord_Howe' => 'Australia/Lord Howe',
+ 'Australia/Melbourne' => 'Australia/Melbourne',
+ 'Australia/Perth' => 'Australia/Perth',
+ 'Australia/Sydney' => 'Australia/Sydney',
+
+ 'Europe/Amsterdam' => 'Europe/Amsterdam',
+ 'Europe/Andorra' => 'Europe/Andorra',
+ 'Europe/Athens' => 'Europe/Athens',
+ 'Europe/Belgrade' => 'Europe/Belgrade',
+ 'Europe/Berlin' => 'Europe/Berlin',
+ 'Europe/Bratislava' => 'Europe/Bratislava',
+ 'Europe/Brussels' => 'Europe/Brussels',
+ 'Europe/Bucharest' => 'Europe/Bucharest',
+ 'Europe/Budapest' => 'Europe/Budapest',
+ 'Europe/Busingen' => 'Europe/Busingen',
+ 'Europe/Chisinau' => 'Europe/Chisinau',
+ 'Europe/Copenhagen' => 'Europe/Copenhagen',
+ 'Europe/Dublin' => 'Europe/Dublin',
+ 'Europe/Gibraltar' => 'Europe/Gibraltar',
+ 'Europe/Guernsey' => 'Europe/Guernsey',
+ 'Europe/Helsinki' => 'Europe/Helsinki',
+ 'Europe/Isle_of_Man' => 'Europe/Isle of Man',
+ 'Europe/Istanbul' => 'Europe/Istanbul',
+ 'Europe/Jersey' => 'Europe/Jersey',
+ 'Europe/Kaliningrad' => 'Europe/Kaliningrad',
+ 'Europe/Kiev' => 'Europe/Kiev',
+ 'Europe/Lisbon' => 'Europe/Lisbon',
+ 'Europe/Ljubljana' => 'Europe/Ljubljana',
+ 'Europe/London' => 'Europe/London',
+ 'Europe/Luxembourg' => 'Europe/Luxembourg',
+ 'Europe/Madrid' => 'Europe/Madrid',
+ 'Europe/Malta' => 'Europe/Malta',
+ 'Europe/Mariehamn' => 'Europe/Mariehamn',
+ 'Europe/Minsk' => 'Europe/Minsk',
+ 'Europe/Monaco' => 'Europe/Monaco',
+ 'Europe/Moscow' => 'Europe/Moscow',
+ 'Europe/Oslo' => 'Europe/Oslo',
+ 'Europe/Paris' => 'Europe/Paris',
+ 'Europe/Podgorica' => 'Europe/Podgorica',
+ 'Europe/Prague' => 'Europe/Prague',
+ 'Europe/Riga' => 'Europe/Riga',
+ 'Europe/Rome' => 'Europe/Rome',
+ 'Europe/Samara' => 'Europe/Samara',
+ 'Europe/San_Marino' => 'Europe/San Marino',
+ 'Europe/Sarajevo' => 'Europe/Sarajevo',
+ 'Europe/Simferopol' => 'Europe/Simferopol',
+ 'Europe/Skopje' => 'Europe/Skopje',
+ 'Europe/Sofia' => 'Europe/Sofia',
+ 'Europe/Stockholm' => 'Europe/Stockholm',
+ 'Europe/Tallinn' => 'Europe/Tallinn',
+ 'Europe/Tirane' => 'Europe/Tirane',
+ 'Europe/Uzhgorod' => 'Europe/Uzhgorod',
+ 'Europe/Vaduz' => 'Europe/Vaduz',
+ 'Europe/Vatican' => 'Europe/Vatican',
+ 'Europe/Vienna' => 'Europe/Vienna',
+ 'Europe/Vilnius' => 'Europe/Vilnius',
+ 'Europe/Volgograd' => 'Europe/Volgograd',
+ 'Europe/Warsaw' => 'Europe/Warsaw',
+ 'Europe/Zagreb' => 'Europe/Zagreb',
+ 'Europe/Zaporozhye' => 'Europe/Zaporozhye',
+ 'Europe/Zurich' => 'Europe/Zurich',
+
+ 'Indian/Antananarivo' => 'Indian/Antananarivo',
+ 'Indian/Chagos' => 'Indian/Chagos',
+ 'Indian/Christmas' => 'Indian/Christmas',
+ 'Indian/Cocos' => 'Indian/Cocos',
+ 'Indian/Comoro' => 'Indian/Comoro',
+ 'Indian/Kerguelen' => 'Indian/Kerguelen',
+ 'Indian/Mahe' => 'Indian/Mahe',
+ 'Indian/Maldives' => 'Indian/Maldives',
+ 'Indian/Mauritius' => 'Indian/Mauritius',
+ 'Indian/Mayotte' => 'Indian/Mayotte',
+ 'Indian/Reunion' => 'Indian/Reunion',
+
+ 'Pacific/Apia' => 'Pacific/Apia',
+ 'Pacific/Auckland' => 'Pacific/Auckland',
+ 'Pacific/Chatham' => 'Pacific/Chatham',
+ 'Pacific/Chuuk' => 'Pacific/Chuuk',
+ 'Pacific/Easter' => 'Pacific/Easter',
+ 'Pacific/Efate' => 'Pacific/Efate',
+ 'Pacific/Enderbury' => 'Pacific/Enderbury',
+ 'Pacific/Fakaofo' => 'Pacific/Fakaofo',
+ 'Pacific/Fiji' => 'Pacific/Fiji',
+ 'Pacific/Funafuti' => 'Pacific/Funafuti',
+ 'Pacific/Galapagos' => 'Pacific/Galapagos',
+ 'Pacific/Gambier' => 'Pacific/Gambier',
+ 'Pacific/Guadalcanal' => 'Pacific/Guadalcanal',
+ 'Pacific/Guam' => 'Pacific/Guam',
+ 'Pacific/Honolulu' => 'Pacific/Honolulu',
+ 'Pacific/Johnston' => 'Pacific/Johnston',
+ 'Pacific/Kiritimati' => 'Pacific/Kiritimati',
+ 'Pacific/Kosrae' => 'Pacific/Kosrae',
+ 'Pacific/Kwajalein' => 'Pacific/Kwajalein',
+ 'Pacific/Majuro' => 'Pacific/Majuro',
+ 'Pacific/Marquesas' => 'Pacific/Marquesas',
+ 'Pacific/Midway' => 'Pacific/Midway',
+ 'Pacific/Nauru' => 'Pacific/Nauru',
+ 'Pacific/Niue' => 'Pacific/Niue',
+ 'Pacific/Norfolk' => 'Pacific/Norfolk',
+ 'Pacific/Noumea' => 'Pacific/Noumea',
+ 'Pacific/Pago_Pago' => 'Pacific/Pago Pago',
+ 'Pacific/Palau' => 'Pacific/Palau',
+ 'Pacific/Pitcairn' => 'Pacific/Pitcairn',
+ 'Pacific/Pohnpei' => 'Pacific/Pohnpei',
+ 'Pacific/Port_Moresby' => 'Pacific/Port Moresby',
+ 'Pacific/Rarotonga' => 'Pacific/Rarotonga',
+ 'Pacific/Saipan' => 'Pacific/Saipan',
+ 'Pacific/Tahiti' => 'Pacific/Tahiti',
+ 'Pacific/Tarawa' => 'Pacific/Tarawa',
+ 'Pacific/Tongatapu' => 'Pacific/Tongatapu',
+ 'Pacific/Wake' => 'Pacific/Wake',
+ 'Pacific/Wallis' => 'Pacific/Wallis',
),
// The value is only an example and will get replaced by the current time on view
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 2f4d35a5b4..9a5713e1cd 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -312,6 +312,7 @@ $lang = array_merge($lang, array(
'NOTIFICATIONS_MARK_ALL_READ_SUCCESS' => 'All notifications have been marked read.',
'NOTIFICATION_GROUP_MISCELLANEOUS' => 'Miscellaneous Notifications',
'NOTIFICATION_GROUP_MODERATION' => 'Moderation Notifications',
+ 'NOTIFICATION_GROUP_ADMINISTRATION' => 'Administration Notifications',
'NOTIFICATION_GROUP_POSTING' => 'Posting Notifications',
'NOTIFICATION_METHOD_EMAIL' => 'Email',
'NOTIFICATION_METHOD_JABBER' => 'Jabber',
@@ -325,6 +326,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TYPE_QUOTE' => 'Someone quotes you in a post',
'NOTIFICATION_TYPE_REPORT' => 'Someone reports a post',
'NOTIFICATION_TYPE_TOPIC' => 'Someone creates a topic in a forum to which you are subscribed',
+ 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'Newly registered user requiring activation',
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',
diff --git a/phpBB/phpbb/auth/auth.php b/phpBB/phpbb/auth/auth.php
index b5cc675838..81676e75fc 100644
--- a/phpBB/phpbb/auth/auth.php
+++ b/phpBB/phpbb/auth/auth.php
@@ -10,14 +10,6 @@
namespace phpbb\auth;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Permission/Auth class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/auth/provider/apache.php b/phpBB/phpbb/auth/provider/apache.php
index 5cbb63c4fc..77bc976938 100644
--- a/phpBB/phpbb/auth/provider/apache.php
+++ b/phpBB/phpbb/auth/provider/apache.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Apache authentication provider for phpBB3
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/base.php b/phpBB/phpbb/auth/provider/base.php
index 2222d8c1b6..78a3289356 100644
--- a/phpBB/phpbb/auth/provider/base.php
+++ b/phpBB/phpbb/auth/provider/base.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base authentication provider class that all other providers should implement
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/db.php b/phpBB/phpbb/auth/provider/db.php
index 4654e49fb5..6ea04eab36 100644
--- a/phpBB/phpbb/auth/provider/db.php
+++ b/phpBB/phpbb/auth/provider/db.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Database authentication provider for phpBB3
*
* This is for authentication via the integrated user table
diff --git a/phpBB/phpbb/auth/provider/ldap.php b/phpBB/phpbb/auth/provider/ldap.php
index 2123a587cb..4ce43853bd 100644
--- a/phpBB/phpbb/auth/provider/ldap.php
+++ b/phpBB/phpbb/auth/provider/ldap.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Database authentication provider for phpBB3
*
* This is for authentication via the integrated user table
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 5df56db00a..2749661269 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use OAuth\Common\Consumer\Credentials;
use OAuth\Common\Http\Uri\Uri;
diff --git a/phpBB/phpbb/auth/provider/oauth/service/base.php b/phpBB/phpbb/auth/provider/oauth/service/base.php
index 61deb48695..7a144d2f51 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/base.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/base.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base OAuth abstract class that all OAuth services should implement
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/service/bitly.php b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
index 47cf7ee380..b4050033a6 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/bitly.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Bitly OAuth service
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/service/exception.php b/phpBB/phpbb/auth/provider/oauth/service/exception.php
index 0c6cba9fb8..3bc93be01e 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/exception.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* OAuth service exception class
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
index 4a4eeba6d5..2698be8b18 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Facebook OAuth service
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php
index 2449bbf523..08cb025c2d 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/google.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/google.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Google OAuth service
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
index ab69fe6ef3..eee3a51cac 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* OAuth service interface
*
* @package auth
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index cc912abf6d..43574288dc 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use OAuth\OAuth1\Token\StdOAuth1Token;
use OAuth\Common\Token\TokenInterface;
diff --git a/phpBB/phpbb/auth/provider/provider_interface.php b/phpBB/phpbb/auth/provider/provider_interface.php
index 1bb209c821..946731f52d 100644
--- a/phpBB/phpbb/auth/provider/provider_interface.php
+++ b/phpBB/phpbb/auth/provider/provider_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\auth\provider;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The interface authentication provider classes have to implement.
*
* @package auth
diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php
index 206df86543..d360614122 100644
--- a/phpBB/phpbb/avatar/driver/driver.php
+++ b/phpBB/phpbb/avatar/driver/driver.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base class for avatar drivers
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/driver/driver_interface.php b/phpBB/phpbb/avatar/driver/driver_interface.php
index d9540c19db..7f049469a2 100644
--- a/phpBB/phpbb/avatar/driver/driver_interface.php
+++ b/phpBB/phpbb/avatar/driver/driver_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Interface for avatar drivers
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
index 3ad783932e..d64f4da734 100644
--- a/phpBB/phpbb/avatar/driver/gravatar.php
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Handles avatars hosted at gravatar.com
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index 0686ffe79a..f6acc6e636 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Handles avatars selected from the board gallery
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php
index 1aa638dfe5..12cbd883f4 100644
--- a/phpBB/phpbb/avatar/driver/remote.php
+++ b/phpBB/phpbb/avatar/driver/remote.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Handles avatars hosted remotely
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index bda872df7a..822c40af98 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Handles avatars uploaded to the board
* @package phpBB3
*/
diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php
index 7c26bce5ae..5fe5e2b0a1 100644
--- a/phpBB/phpbb/avatar/manager.php
+++ b/phpBB/phpbb/avatar/manager.php
@@ -10,14 +10,6 @@
namespace phpbb\avatar;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* @package avatar
*/
class manager
diff --git a/phpBB/phpbb/cache/driver/apc.php b/phpBB/phpbb/cache/driver/apc.php
index ce72ec6134..a28d91c00a 100644
--- a/phpBB/phpbb/cache/driver/apc.php
+++ b/phpBB/phpbb/cache/driver/apc.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM for APC
* @package acm
*/
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php
index 90185a00d2..feaca25a5b 100644
--- a/phpBB/phpbb/cache/driver/base.php
+++ b/phpBB/phpbb/cache/driver/base.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* @package acm
*/
abstract class base implements \phpbb\cache\driver\driver_interface
diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php
index 34c60b5935..0715a4b934 100644
--- a/phpBB/phpbb/cache/driver/driver_interface.php
+++ b/phpBB/phpbb/cache/driver/driver_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* An interface that all cache drivers must implement
*
* @package acm
diff --git a/phpBB/phpbb/cache/driver/eaccelerator.php b/phpBB/phpbb/cache/driver/eaccelerator.php
index 72c0d77d02..2629cb53e5 100644
--- a/phpBB/phpbb/cache/driver/eaccelerator.php
+++ b/phpBB/phpbb/cache/driver/eaccelerator.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM for eAccelerator
* @package acm
* @todo Missing locks from destroy() talk with David
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index a64232400b..6686da6953 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM File Based Caching
* @package acm
*/
diff --git a/phpBB/phpbb/cache/driver/memcache.php b/phpBB/phpbb/cache/driver/memcache.php
index 84fe68ae49..c725ec0fb0 100644
--- a/phpBB/phpbb/cache/driver/memcache.php
+++ b/phpBB/phpbb/cache/driver/memcache.php
@@ -9,14 +9,6 @@
namespace phpbb\cache\driver;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
if (!defined('PHPBB_ACM_MEMCACHE_PORT'))
{
define('PHPBB_ACM_MEMCACHE_PORT', 11211);
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php
index 5a9861913f..292024212b 100644
--- a/phpBB/phpbb/cache/driver/memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM Abstract Memory Class
* @package acm
*/
diff --git a/phpBB/phpbb/cache/driver/null.php b/phpBB/phpbb/cache/driver/null.php
index c03319ad61..ea535ca1e1 100644
--- a/phpBB/phpbb/cache/driver/null.php
+++ b/phpBB/phpbb/cache/driver/null.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM Null Caching
* @package acm
*/
diff --git a/phpBB/phpbb/cache/driver/redis.php b/phpBB/phpbb/cache/driver/redis.php
index 317d07428a..3c6cb0e138 100644
--- a/phpBB/phpbb/cache/driver/redis.php
+++ b/phpBB/phpbb/cache/driver/redis.php
@@ -9,14 +9,6 @@
namespace phpbb\cache\driver;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
if (!defined('PHPBB_ACM_REDIS_PORT'))
{
define('PHPBB_ACM_REDIS_PORT', 6379);
diff --git a/phpBB/phpbb/cache/driver/wincache.php b/phpBB/phpbb/cache/driver/wincache.php
index a0b24e4a1f..1f040e9ab2 100644
--- a/phpBB/phpbb/cache/driver/wincache.php
+++ b/phpBB/phpbb/cache/driver/wincache.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM for WinCache
* @package acm
*/
diff --git a/phpBB/phpbb/cache/driver/xcache.php b/phpBB/phpbb/cache/driver/xcache.php
index fdcbf7e4b5..4d0d683b3d 100644
--- a/phpBB/phpbb/cache/driver/xcache.php
+++ b/phpBB/phpbb/cache/driver/xcache.php
@@ -10,14 +10,6 @@
namespace phpbb\cache\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* ACM for XCache
* @package acm
*
diff --git a/phpBB/phpbb/cache/service.php b/phpBB/phpbb/cache/service.php
index da8f4eb8d8..ebbcfb8cdb 100644
--- a/phpBB/phpbb/cache/service.php
+++ b/phpBB/phpbb/cache/service.php
@@ -10,14 +10,6 @@
namespace phpbb\cache;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Class for grabbing/handling cached entries
* @package acm
*/
diff --git a/phpBB/phpbb/class_loader.php b/phpBB/phpbb/class_loader.php
index 769f28b4f1..37b62fff24 100644
--- a/phpBB/phpbb/class_loader.php
+++ b/phpBB/phpbb/class_loader.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The class loader resolves class names to file system paths and loads them if
* necessary.
*
@@ -55,7 +47,7 @@ class class_loader
* @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
*/
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
- {
+ {
if ($namespace[0] !== '\\')
{
$namespace = '\\' . $namespace;
diff --git a/phpBB/phpbb/config/config.php b/phpBB/phpbb/config/config.php
index dc865df707..d37922acf1 100644
--- a/phpBB/phpbb/config/config.php
+++ b/phpBB/phpbb/config/config.php
@@ -10,14 +10,6 @@
namespace phpbb\config;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Configuration container class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php
index 0a490af14f..c1a3630a14 100644
--- a/phpBB/phpbb/config/db.php
+++ b/phpBB/phpbb/config/db.php
@@ -10,14 +10,6 @@
namespace phpbb\config;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Configuration container class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php
index 3ee3351e19..b1ea112b53 100644
--- a/phpBB/phpbb/config/db_text.php
+++ b/phpBB/phpbb/config/db_text.php
@@ -10,14 +10,6 @@
namespace phpbb\config;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Manages configuration options with an arbitrary length value stored in a TEXT
* column. In constrast to class \phpbb\config\db, values are never cached and
* prefetched, but every get operation sends a query to the database.
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index 0b351bc9ec..874889015a 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* phpbb_visibility
* Handle fetching and setting the visibility for topics and posts
* @package phpbb
diff --git a/phpBB/phpbb/controller/exception.php b/phpBB/phpbb/controller/exception.php
index e8694b8bcf..06ece8d1d5 100644
--- a/phpBB/phpbb/controller/exception.php
+++ b/phpBB/phpbb/controller/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\controller;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Controller exception class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index 07483a91eb..05a05d1e57 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -9,14 +9,6 @@
namespace phpbb\controller;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\HttpFoundation\Response;
/**
diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php
index 048ca72084..fde51696e8 100644
--- a/phpBB/phpbb/controller/provider.php
+++ b/phpBB/phpbb/controller/provider.php
@@ -9,14 +9,6 @@
namespace phpbb\controller;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
diff --git a/phpBB/phpbb/controller/resolver.php b/phpBB/phpbb/controller/resolver.php
index 1cc8981105..233179e343 100644
--- a/phpBB/phpbb/controller/resolver.php
+++ b/phpBB/phpbb/controller/resolver.php
@@ -9,14 +9,6 @@
namespace phpbb\controller;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
index f58ba64a3d..b6af07aff7 100644
--- a/phpBB/phpbb/cron/manager.php
+++ b/phpBB/phpbb/cron/manager.php
@@ -10,14 +10,6 @@
namespace phpbb\cron;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Cron manager class.
*
* Finds installed cron tasks, stores task objects, provides task selection.
diff --git a/phpBB/phpbb/cron/task/base.php b/phpBB/phpbb/cron/task/base.php
index f30c9daf1b..63f0407bcd 100644
--- a/phpBB/phpbb/cron/task/base.php
+++ b/phpBB/phpbb/cron/task/base.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Cron task base class. Provides sensible defaults for cron tasks
* and partially implements cron task interface, making writing cron tasks easier.
*
diff --git a/phpBB/phpbb/cron/task/core/prune_all_forums.php b/phpBB/phpbb/cron/task/core/prune_all_forums.php
index 8e3ef25ce6..90b9a5914b 100644
--- a/phpBB/phpbb/cron/task/core/prune_all_forums.php
+++ b/phpBB/phpbb/cron/task/core/prune_all_forums.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Prune all forums cron task.
*
* It is intended to be invoked from system cron.
diff --git a/phpBB/phpbb/cron/task/core/prune_forum.php b/phpBB/phpbb/cron/task/core/prune_forum.php
index f14ab7b702..e0d8b067c5 100644
--- a/phpBB/phpbb/cron/task/core/prune_forum.php
+++ b/phpBB/phpbb/cron/task/core/prune_forum.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Prune one forum cron task.
*
* It is intended to be used when cron is invoked via web.
diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php
index 1f75709322..9f67c54e1c 100644
--- a/phpBB/phpbb/cron/task/core/prune_notifications.php
+++ b/phpBB/phpbb/cron/task/core/prune_notifications.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Prune notifications cron task.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/queue.php b/phpBB/phpbb/cron/task/core/queue.php
index cb13df86df..cd799b8024 100644
--- a/phpBB/phpbb/cron/task/core/queue.php
+++ b/phpBB/phpbb/cron/task/core/queue.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Queue cron task. Sends email and jabber messages queued by other scripts.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/tidy_cache.php b/phpBB/phpbb/cron/task/core/tidy_cache.php
index 021d5fd8a3..a94a85db53 100644
--- a/phpBB/phpbb/cron/task/core/tidy_cache.php
+++ b/phpBB/phpbb/cron/task/core/tidy_cache.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Tidy cache cron task.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/tidy_database.php b/phpBB/phpbb/cron/task/core/tidy_database.php
index d03cba1d86..f712a5047c 100644
--- a/phpBB/phpbb/cron/task/core/tidy_database.php
+++ b/phpBB/phpbb/cron/task/core/tidy_database.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Tidy database cron task.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php
index 09e9dfa6b4..5a98e0bd7b 100644
--- a/phpBB/phpbb/cron/task/core/tidy_plupload.php
+++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Cron task for cleaning plupload's temporary upload directory.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/tidy_search.php b/phpBB/phpbb/cron/task/core/tidy_search.php
index ebd0d86cbc..42f7df308f 100644
--- a/phpBB/phpbb/cron/task/core/tidy_search.php
+++ b/phpBB/phpbb/cron/task/core/tidy_search.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Tidy search cron task.
*
* Will only run when the currently selected search backend supports tidying.
diff --git a/phpBB/phpbb/cron/task/core/tidy_sessions.php b/phpBB/phpbb/cron/task/core/tidy_sessions.php
index 5df019ae46..68094af1f7 100644
--- a/phpBB/phpbb/cron/task/core/tidy_sessions.php
+++ b/phpBB/phpbb/cron/task/core/tidy_sessions.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Tidy sessions cron task.
*
* @package phpBB3
diff --git a/phpBB/phpbb/cron/task/core/tidy_warnings.php b/phpBB/phpbb/cron/task/core/tidy_warnings.php
index 1cc0abbe88..a0ff23fc57 100644
--- a/phpBB/phpbb/cron/task/core/tidy_warnings.php
+++ b/phpBB/phpbb/cron/task/core/tidy_warnings.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task\core;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Tidy warnings cron task.
*
* Will only run when warnings are configured to expire.
diff --git a/phpBB/phpbb/cron/task/parametrized.php b/phpBB/phpbb/cron/task/parametrized.php
index 1d2f449c58..1aeead0399 100644
--- a/phpBB/phpbb/cron/task/parametrized.php
+++ b/phpBB/phpbb/cron/task/parametrized.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Parametrized cron task interface.
*
* Parametrized cron tasks are somewhat of a cross between regular cron tasks and
diff --git a/phpBB/phpbb/cron/task/task.php b/phpBB/phpbb/cron/task/task.php
index 84218c4fc9..3ce3de9598 100644
--- a/phpBB/phpbb/cron/task/task.php
+++ b/phpBB/phpbb/cron/task/task.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Cron task interface
* @package phpBB3
*/
diff --git a/phpBB/phpbb/cron/task/wrapper.php b/phpBB/phpbb/cron/task/wrapper.php
index aa015966c6..fc3f897206 100644
--- a/phpBB/phpbb/cron/task/wrapper.php
+++ b/phpBB/phpbb/cron/task/wrapper.php
@@ -10,14 +10,6 @@
namespace phpbb\cron\task;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Cron task wrapper class.
* Enhances cron tasks with convenience methods that work identically for all tasks.
*
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
index 84b13202af..dfa21976e0 100644
--- a/phpBB/phpbb/datetime.php
+++ b/phpBB/phpbb/datetime.php
@@ -74,8 +74,8 @@ class datetime extends \DateTime
* finally check that relative dates are supported by the language pack
*/
if ($delta <= 3600 && $delta > -60 &&
- ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60))
- && isset($this->user->lang['datetime']['AGO']))
+ ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60))
+ && isset($this->user->lang['datetime']['AGO']))
{
return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
}
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 53d39e9127..58d0b61519 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Database Abstraction Layer
* @package dbal
*/
diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php
index aef75eab15..ed56a5d154 100644
--- a/phpBB/phpbb/db/driver/firebird.php
+++ b/phpBB/phpbb/db/driver/firebird.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Firebird/Interbase Database Abstraction Layer
* Minimum Requirement is Firebird 2.1
* @package dbal
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index e1b41461e2..6ebc891673 100644
--- a/phpBB/phpbb/db/driver/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* MSSQL Database Abstraction Layer
* Minimum Requirement is MSSQL 2000+
* @package dbal
diff --git a/phpBB/phpbb/db/driver/mssql_base.php b/phpBB/phpbb/db/driver/mssql_base.php
index 57c4e0f1fd..113f1c6902 100644
--- a/phpBB/phpbb/db/driver/mssql_base.php
+++ b/phpBB/phpbb/db/driver/mssql_base.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* MSSQL Database Base Abstraction Layer
* @package dbal
*/
diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php
index b9881035c0..f8c70f1cd7 100644
--- a/phpBB/phpbb/db/driver/mssql_odbc.php
+++ b/phpBB/phpbb/db/driver/mssql_odbc.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Unified ODBC functions
* Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere...
* Here we only support MSSQL Server 2000+ because of the provided schema
diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index 2eb625fb11..125db9c8d4 100644
--- a/phpBB/phpbb/db/driver/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -14,183 +14,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
- * Prior to version 1.1 the SQL Server Native PHP driver didn't support sqlsrv_num_rows, or cursor based seeking so we recall all rows into an array
- * and maintain our own cursor index into that array.
- */
-class result_mssqlnative
-{
- public function result_mssqlnative($queryresult = false)
- {
- $this->m_cursor = 0;
- $this->m_rows = array();
- $this->m_num_fields = sqlsrv_num_fields($queryresult);
- $this->m_field_meta = sqlsrv_field_metadata($queryresult);
-
- while ($row = sqlsrv_fetch_array($queryresult, SQLSRV_FETCH_ASSOC))
- {
- if ($row !== null)
- {
- foreach($row as $k => $v)
- {
- if (is_object($v) && method_exists($v, 'format'))
- {
- $row[$k] = $v->format("Y-m-d\TH:i:s\Z");
- }
- }
- $this->m_rows[] = $row;//read results into memory, cursors are not supported
- }
- }
-
- $this->m_row_count = sizeof($this->m_rows);
- }
-
- private function array_to_obj($array, &$obj)
- {
- foreach ($array as $key => $value)
- {
- if (is_array($value))
- {
- $obj->$key = new \stdClass();
- array_to_obj($value, $obj->$key);
- }
- else
- {
- $obj->$key = $value;
- }
- }
- return $obj;
- }
-
- public function fetch($mode = SQLSRV_FETCH_BOTH, $object_class = 'stdClass')
- {
- if ($this->m_cursor >= $this->m_row_count || $this->m_row_count == 0)
- {
- return false;
- }
-
- $ret = false;
- $arr_num = array();
-
- if ($mode == SQLSRV_FETCH_NUMERIC || $mode == SQLSRV_FETCH_BOTH)
- {
- foreach($this->m_rows[$this->m_cursor] as $key => $value)
- {
- $arr_num[] = $value;
- }
- }
-
- switch ($mode)
- {
- case SQLSRV_FETCH_ASSOC:
- $ret = $this->m_rows[$this->m_cursor];
- break;
- case SQLSRV_FETCH_NUMERIC:
- $ret = $arr_num;
- break;
- case 'OBJECT':
- $ret = $this->array_to_obj($this->m_rows[$this->m_cursor], $o = new $object_class);
- break;
- case SQLSRV_FETCH_BOTH:
- default:
- $ret = $this->m_rows[$this->m_cursor] + $arr_num;
- break;
- }
- $this->m_cursor++;
- return $ret;
- }
-
- public function get($pos, $fld)
- {
- return $this->m_rows[$pos][$fld];
- }
-
- public function num_rows()
- {
- return $this->m_row_count;
- }
-
- public function seek($iRow)
- {
- $this->m_cursor = min($iRow, $this->m_row_count);
- }
-
- public function num_fields()
- {
- return $this->m_num_fields;
- }
-
- public function field_name($nr)
- {
- $arr_keys = array_keys($this->m_rows[0]);
- return $arr_keys[$nr];
- }
-
- public function field_type($nr)
- {
- $i = 0;
- $int_type = -1;
- $str_type = '';
-
- foreach ($this->m_field_meta as $meta)
- {
- if ($nr == $i)
- {
- $int_type = $meta['Type'];
- break;
- }
- $i++;
- }
-
- //http://msdn.microsoft.com/en-us/library/cc296183.aspx contains type table
- switch ($int_type)
- {
- case SQLSRV_SQLTYPE_BIGINT: $str_type = 'bigint'; break;
- case SQLSRV_SQLTYPE_BINARY: $str_type = 'binary'; break;
- case SQLSRV_SQLTYPE_BIT: $str_type = 'bit'; break;
- case SQLSRV_SQLTYPE_CHAR: $str_type = 'char'; break;
- case SQLSRV_SQLTYPE_DATETIME: $str_type = 'datetime'; break;
- case SQLSRV_SQLTYPE_DECIMAL/*($precision, $scale)*/: $str_type = 'decimal'; break;
- case SQLSRV_SQLTYPE_FLOAT: $str_type = 'float'; break;
- case SQLSRV_SQLTYPE_IMAGE: $str_type = 'image'; break;
- case SQLSRV_SQLTYPE_INT: $str_type = 'int'; break;
- case SQLSRV_SQLTYPE_MONEY: $str_type = 'money'; break;
- case SQLSRV_SQLTYPE_NCHAR/*($charCount)*/: $str_type = 'nchar'; break;
- case SQLSRV_SQLTYPE_NUMERIC/*($precision, $scale)*/: $str_type = 'numeric'; break;
- case SQLSRV_SQLTYPE_NVARCHAR/*($charCount)*/: $str_type = 'nvarchar'; break;
- case SQLSRV_SQLTYPE_NTEXT: $str_type = 'ntext'; break;
- case SQLSRV_SQLTYPE_REAL: $str_type = 'real'; break;
- case SQLSRV_SQLTYPE_SMALLDATETIME: $str_type = 'smalldatetime'; break;
- case SQLSRV_SQLTYPE_SMALLINT: $str_type = 'smallint'; break;
- case SQLSRV_SQLTYPE_SMALLMONEY: $str_type = 'smallmoney'; break;
- case SQLSRV_SQLTYPE_TEXT: $str_type = 'text'; break;
- case SQLSRV_SQLTYPE_TIMESTAMP: $str_type = 'timestamp'; break;
- case SQLSRV_SQLTYPE_TINYINT: $str_type = 'tinyint'; break;
- case SQLSRV_SQLTYPE_UNIQUEIDENTIFIER: $str_type = 'uniqueidentifier'; break;
- case SQLSRV_SQLTYPE_UDT: $str_type = 'UDT'; break;
- case SQLSRV_SQLTYPE_VARBINARY/*($byteCount)*/: $str_type = 'varbinary'; break;
- case SQLSRV_SQLTYPE_VARCHAR/*($charCount)*/: $str_type = 'varchar'; break;
- case SQLSRV_SQLTYPE_XML: $str_type = 'xml'; break;
- default: $str_type = $int_type;
- }
- return $str_type;
- }
-
- public function free()
- {
- unset($this->m_rows);
- return;
- }
-}
-
-/**
* @package dbal
*/
class mssqlnative extends \phpbb\db\driver\mssql_base
diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php
index d215453ccb..e311f0dd74 100644
--- a/phpBB/phpbb/db/driver/mysql.php
+++ b/phpBB/phpbb/db/driver/mysql.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* MySQL4 Database Abstraction Layer
* Compatible with:
* MySQL 3.23+
diff --git a/phpBB/phpbb/db/driver/mysql_base.php b/phpBB/phpbb/db/driver/mysql_base.php
index 8f2f66674b..87b6d153a9 100644
--- a/phpBB/phpbb/db/driver/mysql_base.php
+++ b/phpBB/phpbb/db/driver/mysql_base.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Abstract MySQL Database Base Abstraction Layer
* @package dbal
*/
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 6144dba0c4..adc8f96302 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* MySQLi Database Abstraction Layer
* mysqli-extension has to be compiled with:
* MySQL 4.1+ or MySQL 5.0+
@@ -31,7 +23,7 @@ class mysqli extends \phpbb\db\driver\mysql_base
/**
* Connect to server
*/
- function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
{
if (!function_exists('mysqli_connect'))
{
diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php
index 4fba654d1e..36ed43d4a7 100644
--- a/phpBB/phpbb/db/driver/oracle.php
+++ b/phpBB/phpbb/db/driver/oracle.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Oracle Database Abstraction Layer
* @package dbal
*/
diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php
index 5cd6578d87..5dbd1ca74f 100644
--- a/phpBB/phpbb/db/driver/postgres.php
+++ b/phpBB/phpbb/db/driver/postgres.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* PostgreSQL Database Abstraction Layer
* Minimum Requirement is Version 7.3+
* @package dbal
diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php
index 55a33284f2..59ec895c0f 100644
--- a/phpBB/phpbb/db/driver/sqlite.php
+++ b/phpBB/phpbb/db/driver/sqlite.php
@@ -10,14 +10,6 @@
namespace phpbb\db\driver;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Sqlite Database Abstraction Layer
* Minimum Requirement: 2.8.2+
* @package dbal
diff --git a/phpBB/phpbb/db/migration/exception.php b/phpBB/phpbb/db/migration/exception.php
index 58e29b5218..cfe546d1ab 100644
--- a/phpBB/phpbb/db/migration/exception.php
+++ b/phpBB/phpbb/db/migration/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\db\migration;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The migrator is responsible for applying new migrations in the correct order.
*
* @package db
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
index aff3837279..b32de00871 100644
--- a/phpBB/phpbb/db/migration/migration.php
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -10,14 +10,6 @@
namespace phpbb\db\migration;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Abstract base class for database migrations
*
* Each migration consists of a set of schema and data changes to be implemented
diff --git a/phpBB/phpbb/db/migration/tool/config.php b/phpBB/phpbb/db/migration/tool/config.php
index f2149dc59a..36a1931f4e 100644
--- a/phpBB/phpbb/db/migration/tool/config.php
+++ b/phpBB/phpbb/db/migration/tool/config.php
@@ -130,6 +130,10 @@ class config implements \phpbb\db\migration\tool\tool_interface
case 'remove':
$call = 'add';
+ if (sizeof($arguments) == 1)
+ {
+ $arguments[] = '';
+ }
break;
case 'update_if_equals':
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index 47e1406043..3b966b7fe3 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -10,14 +10,6 @@
namespace phpbb\db;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The migrator is responsible for applying new migrations in the correct order.
*
* @package db
diff --git a/phpBB/phpbb/db/sql_insert_buffer.php b/phpBB/phpbb/db/sql_insert_buffer.php
index 7bbd213bdc..41026ad425 100644
--- a/phpBB/phpbb/db/sql_insert_buffer.php
+++ b/phpBB/phpbb/db/sql_insert_buffer.php
@@ -10,14 +10,6 @@
namespace phpbb\db;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Collects rows for insert into a database until the buffer size is reached.
* Then flushes the buffer to the database and starts over again.
*
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index d9bd8cf568..4360c89ac3 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -10,14 +10,6 @@
namespace phpbb\db;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Database Tools for handling cross-db actions such as altering columns, etc.
* Currently not supported is returning SQL for creating tables.
*
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
index 85b374a3ca..5fcb2d6f10 100644
--- a/phpBB/phpbb/di/extension/config.php
+++ b/phpBB/phpbb/di/extension/config.php
@@ -9,14 +9,6 @@
namespace phpbb\di\extension;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 1f6b700973..455dfa7ecd 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -9,14 +9,6 @@
namespace phpbb\di\extension;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
diff --git a/phpBB/phpbb/di/extension/ext.php b/phpBB/phpbb/di/extension/ext.php
index cf623a7c87..4f2f24cb1a 100644
--- a/phpBB/phpbb/di/extension/ext.php
+++ b/phpBB/phpbb/di/extension/ext.php
@@ -9,14 +9,6 @@
namespace phpbb\di\extension;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
diff --git a/phpBB/phpbb/di/pass/collection_pass.php b/phpBB/phpbb/di/pass/collection_pass.php
index ffc5a41f6d..507271de3e 100644
--- a/phpBB/phpbb/di/pass/collection_pass.php
+++ b/phpBB/phpbb/di/pass/collection_pass.php
@@ -9,14 +9,6 @@
namespace phpbb\di\pass;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
diff --git a/phpBB/phpbb/di/pass/kernel_pass.php b/phpBB/phpbb/di/pass/kernel_pass.php
index 6a9124ad78..9c2b193361 100644
--- a/phpBB/phpbb/di/pass/kernel_pass.php
+++ b/phpBB/phpbb/di/pass/kernel_pass.php
@@ -9,14 +9,6 @@
namespace phpbb\di\pass;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
index fccdd77071..65df9ab1d1 100644
--- a/phpBB/phpbb/di/service_collection.php
+++ b/phpBB/phpbb/di/service_collection.php
@@ -9,14 +9,6 @@
namespace phpbb\di;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
diff --git a/phpBB/phpbb/error_collector.php b/phpBB/phpbb/error_collector.php
index 9b3216e32f..297972c6b8 100644
--- a/phpBB/phpbb/error_collector.php
+++ b/phpBB/phpbb/error_collector.php
@@ -9,14 +9,6 @@
namespace phpbb;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class error_collector
{
var $errors;
diff --git a/phpBB/phpbb/event/data.php b/phpBB/phpbb/event/data.php
index 3481023b74..fbb16574ed 100644
--- a/phpBB/phpbb/event/data.php
+++ b/phpBB/phpbb/event/data.php
@@ -9,62 +9,54 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\Event;
class data extends Event implements \ArrayAccess
{
- private $data;
-
- public function __construct(array $data = array())
- {
- $this->set_data($data);
- }
-
- public function set_data(array $data = array())
- {
- $this->data = $data;
- }
-
- public function get_data()
- {
- return $this->data;
- }
-
- /**
- * Returns data filtered to only include specified keys.
- *
- * This effectively discards any keys added to data by hooks.
- */
- public function get_data_filtered($keys)
- {
- return array_intersect_key($this->data, array_flip($keys));
- }
-
- public function offsetExists($offset)
- {
- return isset($this->data[$offset]);
- }
-
- public function offsetGet($offset)
- {
- return isset($this->data[$offset]) ? $this->data[$offset] : null;
- }
-
- public function offsetSet($offset, $value)
- {
- $this->data[$offset] = $value;
- }
-
- public function offsetUnset($offset)
- {
- unset($this->data[$offset]);
- }
+ private $data;
+
+ public function __construct(array $data = array())
+ {
+ $this->set_data($data);
+ }
+
+ public function set_data(array $data = array())
+ {
+ $this->data = $data;
+ }
+
+ public function get_data()
+ {
+ return $this->data;
+ }
+
+ /**
+ * Returns data filtered to only include specified keys.
+ *
+ * This effectively discards any keys added to data by hooks.
+ */
+ public function get_data_filtered($keys)
+ {
+ return array_intersect_key($this->data, array_flip($keys));
+ }
+
+ public function offsetExists($offset)
+ {
+ return isset($this->data[$offset]);
+ }
+
+ public function offsetGet($offset)
+ {
+ return isset($this->data[$offset]) ? $this->data[$offset] : null;
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ $this->data[$offset] = $value;
+ }
+
+ public function offsetUnset($offset)
+ {
+ unset($this->data[$offset]);
+ }
}
diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php
index cc3733692e..74b35eb78d 100644
--- a/phpBB/phpbb/event/dispatcher.php
+++ b/phpBB/phpbb/event/dispatcher.php
@@ -9,14 +9,6 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
/**
diff --git a/phpBB/phpbb/event/extension_subscriber_loader.php b/phpBB/phpbb/event/extension_subscriber_loader.php
index ab50a589fe..df8e093f4a 100644
--- a/phpBB/phpbb/event/extension_subscriber_loader.php
+++ b/phpBB/phpbb/event/extension_subscriber_loader.php
@@ -9,14 +9,6 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class extension_subscriber_loader
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
index 7003e73b38..8a4de1fbad 100644
--- a/phpBB/phpbb/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -9,14 +9,6 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
diff --git a/phpBB/phpbb/event/kernel_request_subscriber.php b/phpBB/phpbb/event/kernel_request_subscriber.php
index a629dd8440..7d5418498b 100644
--- a/phpBB/phpbb/event/kernel_request_subscriber.php
+++ b/phpBB/phpbb/event/kernel_request_subscriber.php
@@ -9,14 +9,6 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
diff --git a/phpBB/phpbb/event/kernel_terminate_subscriber.php b/phpBB/phpbb/event/kernel_terminate_subscriber.php
index de441da102..32dba322d1 100644
--- a/phpBB/phpbb/event/kernel_terminate_subscriber.php
+++ b/phpBB/phpbb/event/kernel_terminate_subscriber.php
@@ -9,14 +9,6 @@
namespace phpbb\event;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index a529cc7961..1f871750e0 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -9,14 +9,6 @@
namespace phpbb\extension;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
diff --git a/phpBB/phpbb/extension/exception.php b/phpBB/phpbb/extension/exception.php
index e2ba647878..b1f4997fdd 100644
--- a/phpBB/phpbb/extension/exception.php
+++ b/phpBB/phpbb/extension/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\extension;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Exception class for metadata
*/
class exception extends \UnexpectedValueException
diff --git a/phpBB/phpbb/extension/extension_interface.php b/phpBB/phpbb/extension/extension_interface.php
index 1e5f546dc5..bddff51b5a 100644
--- a/phpBB/phpbb/extension/extension_interface.php
+++ b/phpBB/phpbb/extension/extension_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\extension;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The interface extension meta classes have to implement to run custom code
* on enable/disable/purge.
*
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php
index e787919588..c9c16ae6d5 100644
--- a/phpBB/phpbb/extension/finder.php
+++ b/phpBB/phpbb/extension/finder.php
@@ -10,14 +10,6 @@
namespace phpbb\extension;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The extension finder provides a simple way to locate files in active extensions
*
* @package extension
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index f8beb963ba..7f009867c9 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -9,14 +9,6 @@
namespace phpbb\extension;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
index ff5d55c7f2..d0323120d8 100644
--- a/phpBB/phpbb/extension/metadata_manager.php
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -10,14 +10,6 @@
namespace phpbb\extension;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The extension metadata manager validates and gets meta-data for extensions
*
* @package extension
@@ -147,7 +139,7 @@ class metadata_manager
if (!file_exists($this->metadata_file))
{
- throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
+ throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
}
}
@@ -166,12 +158,12 @@ class metadata_manager
{
if (!($file_contents = file_get_contents($this->metadata_file)))
{
- throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
+ throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
}
if (($metadata = json_decode($file_contents, true)) === null)
{
- throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
+ throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
}
$this->metadata = $metadata;
@@ -199,50 +191,50 @@ class metadata_manager
* @return Bool True if valid, throws an exception if invalid
*/
public function validate($name = 'display')
- {
- // Basic fields
- $fields = array(
- 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#',
- 'type' => '#^phpbb-extension$#',
- 'licence' => '#.+#',
- 'version' => '#.+#',
- );
-
- switch ($name)
- {
- case 'all':
- $this->validate('display');
+ {
+ // Basic fields
+ $fields = array(
+ 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#',
+ 'type' => '#^phpbb-extension$#',
+ 'licence' => '#.+#',
+ 'version' => '#.+#',
+ );
+
+ switch ($name)
+ {
+ case 'all':
+ $this->validate('display');
$this->validate_enable();
- break;
+ break;
- case 'display':
- foreach ($fields as $field => $data)
+ case 'display':
+ foreach ($fields as $field => $data)
{
$this->validate($field);
}
$this->validate_authors();
- break;
-
- default:
- if (isset($fields[$name]))
- {
- if (!isset($this->metadata[$name]))
- {
- throw new \phpbb\extension\exception("Required meta field '$name' has not been set.");
+ break;
+
+ default:
+ if (isset($fields[$name]))
+ {
+ if (!isset($this->metadata[$name]))
+ {
+ throw new \phpbb\extension\exception("Required meta field '$name' has not been set.");
}
if (!preg_match($fields[$name], $this->metadata[$name]))
{
- throw new \phpbb\extension\exception("Meta field '$name' is invalid.");
+ throw new \phpbb\extension\exception("Meta field '$name' is invalid.");
}
}
break;
}
return true;
- }
+ }
/**
* Validates the contents of the authors field
@@ -253,14 +245,14 @@ class metadata_manager
{
if (empty($this->metadata['authors']))
{
- throw new \phpbb\extension\exception("Required meta field 'authors' has not been set.");
+ throw new \phpbb\extension\exception("Required meta field 'authors' has not been set.");
}
foreach ($this->metadata['authors'] as $author)
{
if (!isset($author['name']))
{
- throw new \phpbb\extension\exception("Required meta field 'author name' has not been set.");
+ throw new \phpbb\extension\exception("Required meta field 'author name' has not been set.");
}
}
diff --git a/phpBB/phpbb/extension/provider.php b/phpBB/phpbb/extension/provider.php
index c2a264d311..bfdc2b66b9 100644
--- a/phpBB/phpbb/extension/provider.php
+++ b/phpBB/phpbb/extension/provider.php
@@ -10,14 +10,6 @@
namespace phpbb\extension;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Provides a set of items found in extensions.
*
* This abstract class is essentially a wrapper around item-specific
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php
index 8245b849a1..e6c1e606fa 100644
--- a/phpBB/phpbb/feed/base.php
+++ b/phpBB/phpbb/feed/base.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base class with some generic functions and settings.
*
* @package phpBB3
diff --git a/phpBB/phpbb/feed/factory.php b/phpBB/phpbb/feed/factory.php
index e011b0e3a9..d370160563 100644
--- a/phpBB/phpbb/feed/factory.php
+++ b/phpBB/phpbb/feed/factory.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Factory class to return correct object
* @package phpBB3
*/
diff --git a/phpBB/phpbb/feed/forum.php b/phpBB/phpbb/feed/forum.php
index 83066d2d25..8026824ab7 100644
--- a/phpBB/phpbb/feed/forum.php
+++ b/phpBB/phpbb/feed/forum.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Forum feed
*
* This will give you the last {$this->num_items} posts made
diff --git a/phpBB/phpbb/feed/forums.php b/phpBB/phpbb/feed/forums.php
index 6be1c68da8..ddbb0bf7b3 100644
--- a/phpBB/phpbb/feed/forums.php
+++ b/phpBB/phpbb/feed/forums.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* 'All Forums' feed
*
* This will give you a list of all postable forums where feeds are enabled
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
index cf8328bd5e..3f2759b85e 100644
--- a/phpBB/phpbb/feed/helper.php
+++ b/phpBB/phpbb/feed/helper.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Class with some helpful functions used in feeds
* @package phpBB3
*/
diff --git a/phpBB/phpbb/feed/news.php b/phpBB/phpbb/feed/news.php
index 20017a3248..7888e73239 100644
--- a/phpBB/phpbb/feed/news.php
+++ b/phpBB/phpbb/feed/news.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* News feed
*
* This will give you {$this->num_items} first posts
diff --git a/phpBB/phpbb/feed/overall.php b/phpBB/phpbb/feed/overall.php
index 8ee1f092ab..4545ba5c64 100644
--- a/phpBB/phpbb/feed/overall.php
+++ b/phpBB/phpbb/feed/overall.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Board wide feed (aka overall feed)
*
* This will give you the newest {$this->num_items} posts
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php
index 5588ecadb0..42c5eea9e3 100644
--- a/phpBB/phpbb/feed/post_base.php
+++ b/phpBB/phpbb/feed/post_base.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Abstract class for post based feeds
*
* @package phpBB3
diff --git a/phpBB/phpbb/feed/topic.php b/phpBB/phpbb/feed/topic.php
index 1eeb4fbe94..09f377dd10 100644
--- a/phpBB/phpbb/feed/topic.php
+++ b/phpBB/phpbb/feed/topic.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Topic feed for a specific topic
*
* This will give you the last {$this->num_items} posts made within this topic.
diff --git a/phpBB/phpbb/feed/topic_base.php b/phpBB/phpbb/feed/topic_base.php
index f05be9223e..7e28e67b82 100644
--- a/phpBB/phpbb/feed/topic_base.php
+++ b/phpBB/phpbb/feed/topic_base.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Abstract class for topic based feeds
*
* @package phpBB3
diff --git a/phpBB/phpbb/feed/topics.php b/phpBB/phpbb/feed/topics.php
index d70195c87b..bdc858e947 100644
--- a/phpBB/phpbb/feed/topics.php
+++ b/phpBB/phpbb/feed/topics.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* New Topics feed
*
* This will give you the last {$this->num_items} created topics
diff --git a/phpBB/phpbb/feed/topics_active.php b/phpBB/phpbb/feed/topics_active.php
index c6f46d67e6..cc0adac2eb 100644
--- a/phpBB/phpbb/feed/topics_active.php
+++ b/phpBB/phpbb/feed/topics_active.php
@@ -10,14 +10,6 @@
namespace phpbb\feed;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Active Topics feed
*
* This will give you the last {$this->num_items} topics
diff --git a/phpBB/phpbb/filesystem.php b/phpBB/phpbb/filesystem.php
index dbfaebe0fa..7878be0a5e 100644
--- a/phpBB/phpbb/filesystem.php
+++ b/phpBB/phpbb/filesystem.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* A class with various functions that are related to paths, files and the filesystem
* @package phpBB3
*/
diff --git a/phpBB/phpbb/groupposition/exception.php b/phpBB/phpbb/groupposition/exception.php
index 3a8d92dbc7..f43502235d 100644
--- a/phpBB/phpbb/groupposition/exception.php
+++ b/phpBB/phpbb/groupposition/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\groupposition;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* @package groupposition
*/
class exception extends \Exception
diff --git a/phpBB/phpbb/groupposition/groupposition_interface.php b/phpBB/phpbb/groupposition/groupposition_interface.php
index a568785185..9785172a00 100644
--- a/phpBB/phpbb/groupposition/groupposition_interface.php
+++ b/phpBB/phpbb/groupposition/groupposition_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\groupposition;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Interface to manage group positions in various places of phpbb
*
* The interface provides simple methods to add, delete and move a group
diff --git a/phpBB/phpbb/groupposition/legend.php b/phpBB/phpbb/groupposition/legend.php
index 9a1ef3d1d0..47ba06c006 100644
--- a/phpBB/phpbb/groupposition/legend.php
+++ b/phpBB/phpbb/groupposition/legend.php
@@ -10,14 +10,6 @@
namespace phpbb\groupposition;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Legend group position class
*
* group_legend is an ascending list 1, 2, ..., n for groups which are displayed. 1 is the first group, n the last.
diff --git a/phpBB/phpbb/groupposition/teampage.php b/phpBB/phpbb/groupposition/teampage.php
index 4e8228eb58..d934571ebc 100644
--- a/phpBB/phpbb/groupposition/teampage.php
+++ b/phpBB/phpbb/groupposition/teampage.php
@@ -10,14 +10,6 @@
namespace phpbb\groupposition;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Teampage group position class
*
* Teampage position is an ascending list 1, 2, ..., n for items which are displayed. 1 is the first item, n the last.
diff --git a/phpBB/phpbb/hook/finder.php b/phpBB/phpbb/hook/finder.php
index d5eb1f8186..c8f71861d9 100644
--- a/phpBB/phpbb/hook/finder.php
+++ b/phpBB/phpbb/hook/finder.php
@@ -10,14 +10,6 @@
namespace phpbb\hook;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The hook finder locates installed hooks.
*
* @package phpBB3
diff --git a/phpBB/phpbb/json_response.php b/phpBB/phpbb/json_response.php
index fe532fc9d4..45c2f6cac4 100644
--- a/phpBB/phpbb/json_response.php
+++ b/phpBB/phpbb/json_response.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* JSON class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/lock/db.php b/phpBB/phpbb/lock/db.php
index 3e15727c12..461adda045 100644
--- a/phpBB/phpbb/lock/db.php
+++ b/phpBB/phpbb/lock/db.php
@@ -10,14 +10,6 @@
namespace phpbb\lock;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Database locking class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/lock/flock.php b/phpBB/phpbb/lock/flock.php
index 2a36a853ee..94a5895440 100644
--- a/phpBB/phpbb/lock/flock.php
+++ b/phpBB/phpbb/lock/flock.php
@@ -10,14 +10,6 @@
namespace phpbb\lock;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* File locking class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 7f4e52ed39..a6ee06ebf2 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -10,14 +10,6 @@
namespace phpbb\log;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* This class is used to add entries into the log table.
*
* @package \phpbb\log\log
diff --git a/phpBB/phpbb/log/log_interface.php b/phpBB/phpbb/log/log_interface.php
index 427d30015d..420ba79691 100644
--- a/phpBB/phpbb/log/log_interface.php
+++ b/phpBB/phpbb/log/log_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\log;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* The interface for the log-system.
*
* @package \phpbb\log\log
diff --git a/phpBB/phpbb/log/null.php b/phpBB/phpbb/log/null.php
index 2ef69926ee..77d0fbe2d7 100644
--- a/phpBB/phpbb/log/null.php
+++ b/phpBB/phpbb/log/null.php
@@ -10,14 +10,6 @@
namespace phpbb\log;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Null logger
*
* @package phpbb_log
diff --git a/phpBB/phpbb/notification/exception.php b/phpBB/phpbb/notification/exception.php
index 275fb3b542..6bdded3fd8 100644
--- a/phpBB/phpbb/notification/exception.php
+++ b/phpBB/phpbb/notification/exception.php
@@ -10,14 +10,6 @@
namespace phpbb\notification;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Notifications exception
*
* @package notifications
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index b92b247c74..d77a936413 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -10,14 +10,6 @@
namespace phpbb\notification;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Notifications service class
* @package notifications
*/
@@ -262,8 +254,7 @@ class manager
SET notification_read = 1
WHERE notification_time <= " . (int) $time .
(($notification_type_name !== false) ? ' AND ' .
- (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name))
- : '') .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') .
(($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
$this->db->sql_query($sql);
@@ -285,8 +276,7 @@ class manager
SET notification_read = 1
WHERE notification_time <= " . (int) $time .
(($notification_type_name !== false) ? ' AND ' .
- (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name))
- : '') .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
(($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
(($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
$this->db->sql_query($sql);
diff --git a/phpBB/phpbb/notification/method/base.php b/phpBB/phpbb/notification/method/base.php
index 327f964424..4ce42de830 100644
--- a/phpBB/phpbb/notification/method/base.php
+++ b/phpBB/phpbb/notification/method/base.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\method;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base notifications method class
* @package notifications
*/
diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php
index b761eb5a28..e039fae8de 100644
--- a/phpBB/phpbb/notification/method/email.php
+++ b/phpBB/phpbb/notification/method/email.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\method;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Email notification method class
* This class handles sending emails for notifications
*
diff --git a/phpBB/phpbb/notification/method/jabber.php b/phpBB/phpbb/notification/method/jabber.php
index 6ec21bb735..bdfaf5a6fc 100644
--- a/phpBB/phpbb/notification/method/jabber.php
+++ b/phpBB/phpbb/notification/method/jabber.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\method;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Jabber notification method class
* This class handles sending Jabber messages for notifications
*
diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php
index b1b30f29b7..7cb38eb59d 100644
--- a/phpBB/phpbb/notification/method/messenger_base.php
+++ b/phpBB/phpbb/notification/method/messenger_base.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\method;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Abstract notification method handling email and jabber notifications
* using the phpBB messenger.
*
diff --git a/phpBB/phpbb/notification/method/method_interface.php b/phpBB/phpbb/notification/method/method_interface.php
index 0131a8bde0..4830d06b86 100644
--- a/phpBB/phpbb/notification/method/method_interface.php
+++ b/phpBB/phpbb/notification/method/method_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\method;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base notifications method interface
* @package notifications
*/
diff --git a/phpBB/phpbb/notification/type/admin_activate_user.php b/phpBB/phpbb/notification/type/admin_activate_user.php
new file mode 100644
index 0000000000..5f146e18ff
--- /dev/null
+++ b/phpBB/phpbb/notification/type/admin_activate_user.php
@@ -0,0 +1,166 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Admin activation notifications class
+* This class handles notifications for users requiring admin activation
+*
+* @package notifications
+*/
+class admin_activate_user extends \phpbb\notification\type\base
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_type()
+ {
+ return 'admin_activate_user';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected $language_key = 'NOTIFICATION_ADMIN_ACTIVATE_USER';
+
+ /**
+ * {@inheritdoc}
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER',
+ 'group' => 'NOTIFICATION_GROUP_ADMINISTRATION',
+ );
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_available()
+ {
+ return ($this->auth->acl_get('a_user') && $this->config['require_activation'] == USER_ACTIVATION_ADMIN);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_id($user)
+ {
+ return (int) $user['user_id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_parent_id($post)
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function find_users_for_notification($user, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ // Grab admins that have permission to administer users.
+ $admin_ary = $this->auth->acl_get_list(false, 'a_user', false);
+ $users = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
+
+ // Grab founders
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_FOUNDER;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($sql))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+ $users = array_unique($users);
+
+ return $this->check_user_notification_options($users, $options);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->item_id, 'no_profile');
+
+ return $this->user->lang($this->language_key, $username);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template()
+ {
+ return 'admin_activate';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template_variables()
+ {
+ $board_url = generate_board_url();
+ $username = $this->user_loader->get_username($this->item_id, 'no_profile');
+
+ return array(
+ 'USERNAME' => htmlspecialchars_decode($username),
+ 'U_USER_DETAILS' => "{$board_url}/memberlist.{$this->php_ext}?mode=viewprofile&u={$this->item_id}",
+ 'U_ACTIVATE' => "{$board_url}/ucp.{$this->php_ext}?mode=activate&u={$this->item_id}&k={$this->get_data('user_actkey')}",
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=viewprofile&u={$this->item_id}");
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function users_to_query()
+ {
+ return array($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function create_insert_array($user, $pre_create_data)
+ {
+ $this->set_data('user_actkey', $user['user_actkey']);
+ $this->notification_time = $user['user_regdate'];
+
+ return parent::create_insert_array($user, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php
index cf4ec57989..51a9a704b0 100644
--- a/phpBB/phpbb/notification/type/approve_post.php
+++ b/phpBB/phpbb/notification/type/approve_post.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post approved notifications class
* This class handles notifications for posts when they are approved (to their authors)
*
diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php
index 9f061b8be1..6229800c68 100644
--- a/phpBB/phpbb/notification/type/approve_topic.php
+++ b/phpBB/phpbb/notification/type/approve_topic.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Topic approved notifications class
* This class handles notifications for topics when they are approved (for authors)
*
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php
index 3c44468bb8..951585853f 100644
--- a/phpBB/phpbb/notification/type/base.php
+++ b/phpBB/phpbb/notification/type/base.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base notifications class
* @package notifications
*/
diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php
index 50ea7380af..5e6fdd2523 100644
--- a/phpBB/phpbb/notification/type/bookmark.php
+++ b/phpBB/phpbb/notification/type/bookmark.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Bookmark updating notifications class
* This class handles notifications for replies to a bookmarked topic
*
diff --git a/phpBB/phpbb/notification/type/disapprove_post.php b/phpBB/phpbb/notification/type/disapprove_post.php
index 0c9162ec5c..411d4195c7 100644
--- a/phpBB/phpbb/notification/type/disapprove_post.php
+++ b/phpBB/phpbb/notification/type/disapprove_post.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post disapproved notifications class
* This class handles notifications for posts when they are disapproved (for authors)
*
diff --git a/phpBB/phpbb/notification/type/disapprove_topic.php b/phpBB/phpbb/notification/type/disapprove_topic.php
index dde6f83ec4..19e9d468ce 100644
--- a/phpBB/phpbb/notification/type/disapprove_topic.php
+++ b/phpBB/phpbb/notification/type/disapprove_topic.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Topic disapproved notifications class
* This class handles notifications for topics when they are disapproved (for authors)
*
diff --git a/phpBB/phpbb/notification/type/group_request.php b/phpBB/phpbb/notification/type/group_request.php
index 1768a8fffa..e0527fe220 100644
--- a/phpBB/phpbb/notification/type/group_request.php
+++ b/phpBB/phpbb/notification/type/group_request.php
@@ -9,14 +9,6 @@
namespace phpbb\notification\type;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class group_request extends \phpbb\notification\type\base
{
/**
diff --git a/phpBB/phpbb/notification/type/group_request_approved.php b/phpBB/phpbb/notification/type/group_request_approved.php
index be4a902acd..448f049412 100644
--- a/phpBB/phpbb/notification/type/group_request_approved.php
+++ b/phpBB/phpbb/notification/type/group_request_approved.php
@@ -9,14 +9,6 @@
namespace phpbb\notification\type;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class group_request_approved extends \phpbb\notification\type\base
{
/**
diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php
index bed0807b0f..584a30efa6 100644
--- a/phpBB/phpbb/notification/type/pm.php
+++ b/phpBB/phpbb/notification/type/pm.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Private message notifications class
* This class handles notifications for private messages
*
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php
index fe50e7f172..9d5c7b0a4c 100644
--- a/phpBB/phpbb/notification/type/post.php
+++ b/phpBB/phpbb/notification/type/post.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post notifications class
* This class handles notifications for replies to a topic
*
diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php
index f05ed1ce9a..db16763583 100644
--- a/phpBB/phpbb/notification/type/post_in_queue.php
+++ b/phpBB/phpbb/notification/type/post_in_queue.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post in queue notifications class
* This class handles notifications for posts that are put in the moderation queue (for moderators)
*
diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php
index 8fb433990e..e8527261d8 100644
--- a/phpBB/phpbb/notification/type/quote.php
+++ b/phpBB/phpbb/notification/type/quote.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post quoting notifications class
* This class handles notifying users when they have been quoted in a post
*
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
index 13330e2932..55f6bf946d 100644
--- a/phpBB/phpbb/notification/type/report_pm.php
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Private message reported notifications class
* This class handles notifications for private messages when they are reported
*
diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php
index 2e4a1ceb30..9d2aac329e 100644
--- a/phpBB/phpbb/notification/type/report_pm_closed.php
+++ b/phpBB/phpbb/notification/type/report_pm_closed.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* PM report closed notifications class
* This class handles notifications for when reports are closed on PMs (for the one who reported the PM)
*
diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php
index c2dad6f1bb..89b497efa6 100644
--- a/phpBB/phpbb/notification/type/report_post.php
+++ b/phpBB/phpbb/notification/type/report_post.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Reported post notifications class
* This class handles notifications for reported posts
*
diff --git a/phpBB/phpbb/notification/type/report_post_closed.php b/phpBB/phpbb/notification/type/report_post_closed.php
index 270ccf0a1a..5874d48e31 100644
--- a/phpBB/phpbb/notification/type/report_post_closed.php
+++ b/phpBB/phpbb/notification/type/report_post_closed.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Post report closed notifications class
* This class handles notifications for when reports are closed on posts (for the one who reported the post)
*
diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php
index 8db02f610b..6198881d8d 100644
--- a/phpBB/phpbb/notification/type/topic.php
+++ b/phpBB/phpbb/notification/type/topic.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Topic notifications class
* This class handles notifications for new topics
*
diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php
index 056651bc53..c8c1b5b7e2 100644
--- a/phpBB/phpbb/notification/type/topic_in_queue.php
+++ b/phpBB/phpbb/notification/type/topic_in_queue.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Topic in queue notifications class
* This class handles notifications for topics when they are put in the moderation queue (for moderators)
*
diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php
index cfc6cd461e..e3e6898172 100644
--- a/phpBB/phpbb/notification/type/type_interface.php
+++ b/phpBB/phpbb/notification/type/type_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\notification\type;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base notifications interface
* @package notifications
*/
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index e9fd092b62..8cd8808261 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* A class with various functions that are related to paths, files and the filesystem
* @package phpBB3
*/
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index d0405471bc..8319e6d123 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -9,14 +9,6 @@
namespace phpbb;
-/**
-* DO NOT CHANGE
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class permissions
{
/**
diff --git a/phpBB/phpbb/php/ini.php b/phpBB/phpbb/php/ini.php
index 8767091aba..f0f53807fe 100644
--- a/phpBB/phpbb/php/ini.php
+++ b/phpBB/phpbb/php/ini.php
@@ -10,14 +10,6 @@
namespace phpbb\php;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Wrapper class for ini_get function.
*
* Provides easier handling of the different interpretations of ini values.
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index 6eb5adf864..f21ec40450 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -10,14 +10,6 @@
namespace phpbb\plupload;
/**
- * @ignore
- */
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* This class handles all server-side plupload functions
*
* @package \phpbb\plupload\plupload
diff --git a/phpBB/phpbb/request/deactivated_super_global.php b/phpBB/phpbb/request/deactivated_super_global.php
index 8f39960477..b03624593e 100644
--- a/phpBB/phpbb/request/deactivated_super_global.php
+++ b/phpBB/phpbb/request/deactivated_super_global.php
@@ -10,14 +10,6 @@
namespace phpbb\request;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Replacement for a superglobal (like $_GET or $_POST) which calls
* trigger_error on all operations but isset, overloads the [] operator with SPL.
*
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index 1c388b3c73..e158d33c01 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -10,14 +10,6 @@
namespace phpbb\request;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* All application input is accessed through this class.
*
* It provides a method to disable access to input data through super globals.
diff --git a/phpBB/phpbb/request/request_interface.php b/phpBB/phpbb/request/request_interface.php
index cd949147f7..1f9978b276 100644
--- a/phpBB/phpbb/request/request_interface.php
+++ b/phpBB/phpbb/request/request_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\request;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* An interface through which all application input can be accessed.
*
* @package \phpbb\request\request
diff --git a/phpBB/phpbb/request/type_cast_helper.php b/phpBB/phpbb/request/type_cast_helper.php
index 262aff73c1..e9b55663af 100644
--- a/phpBB/phpbb/request/type_cast_helper.php
+++ b/phpBB/phpbb/request/type_cast_helper.php
@@ -10,14 +10,6 @@
namespace phpbb\request;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* A helper class that provides convenience methods for type casting.
*
* @package \phpbb\request\request
diff --git a/phpBB/phpbb/request/type_cast_helper_interface.php b/phpBB/phpbb/request/type_cast_helper_interface.php
index e8195c352e..f12795eef9 100644
--- a/phpBB/phpbb/request/type_cast_helper_interface.php
+++ b/phpBB/phpbb/request/type_cast_helper_interface.php
@@ -10,14 +10,6 @@
namespace phpbb\request;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* An interface for type cast operations.
*
* @package \phpbb\request\request
diff --git a/phpBB/phpbb/search/base.php b/phpBB/phpbb/search/base.php
index f2f982c31b..9ecf3751d0 100644
--- a/phpBB/phpbb/search/base.php
+++ b/phpBB/phpbb/search/base.php
@@ -12,14 +12,6 @@ namespace phpbb\search;
/**
* @ignore
*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* @ignore
-*/
define('SEARCH_RESULT_NOT_IN_CACHE', 0);
define('SEARCH_RESULT_IN_CACHE', 1);
define('SEARCH_RESULT_INCOMPLETE', 2);
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index ca2f42358f..cdd2da222f 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -10,14 +10,6 @@
namespace phpbb\search;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* fulltext_mysql
* Fulltext search for MySQL
* @package search
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 024b8f441b..1b314a24d3 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -10,14 +10,6 @@
namespace phpbb\search;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* fulltext_native
* phpBB's own db driven fulltext search, version 2
* @package search
@@ -1188,8 +1180,8 @@ class fulltext_native extends \phpbb\search\base
* we know that it will also be lower than CJK ranges
*/
if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0)
- && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
- && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
+ && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
+ && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
{
$word = strtok(' ');
continue;
@@ -1683,8 +1675,8 @@ class fulltext_native extends \phpbb\search\base
$pos += $utf_len;
if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST)
- || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
- || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
+ || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
+ || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
{
/**
* All characters within these ranges are valid
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php
index 756034103e..063bf52a19 100644
--- a/phpBB/phpbb/search/fulltext_postgres.php
+++ b/phpBB/phpbb/search/fulltext_postgres.php
@@ -10,14 +10,6 @@
namespace phpbb\search;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* fulltext_postgres
* Fulltext search for PostgreSQL
* @package search
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index cb76d58f49..acbfad9474 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -9,16 +9,6 @@
namespace phpbb\search;
-/**
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* @ignore
-*/
define('SPHINX_MAX_MATCHES', 20000);
define('SPHINX_CONNECT_RETRIES', 3);
define('SPHINX_CONNECT_WAIT_TIME', 300);
diff --git a/phpBB/phpbb/search/sphinx/config.php b/phpBB/phpbb/search/sphinx/config.php
index 262d6008cc..cb8e4524df 100644
--- a/phpBB/phpbb/search/sphinx/config.php
+++ b/phpBB/phpbb/search/sphinx/config.php
@@ -10,14 +10,6 @@
namespace phpbb\search\sphinx;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* \phpbb\search\sphinx\config
* An object representing the sphinx configuration
* Can read it from file and write it back out after modification
diff --git a/phpBB/phpbb/search/sphinx/config_comment.php b/phpBB/phpbb/search/sphinx/config_comment.php
index 77a943377d..20b1c19af1 100644
--- a/phpBB/phpbb/search/sphinx/config_comment.php
+++ b/phpBB/phpbb/search/sphinx/config_comment.php
@@ -10,14 +10,6 @@
namespace phpbb\search\sphinx;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* \phpbb\search\sphinx\config_comment
* Represents a comment inside the sphinx configuration
*/
diff --git a/phpBB/phpbb/search/sphinx/config_section.php b/phpBB/phpbb/search/sphinx/config_section.php
index 730abf011e..8f9253ec56 100644
--- a/phpBB/phpbb/search/sphinx/config_section.php
+++ b/phpBB/phpbb/search/sphinx/config_section.php
@@ -10,14 +10,6 @@
namespace phpbb\search\sphinx;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* \phpbb\search\sphinx\config_section
* Represents a single section inside the sphinx configuration
*/
diff --git a/phpBB/phpbb/search/sphinx/config_variable.php b/phpBB/phpbb/search/sphinx/config_variable.php
index c8f40bfb5f..c0f6d28dcc 100644
--- a/phpBB/phpbb/search/sphinx/config_variable.php
+++ b/phpBB/phpbb/search/sphinx/config_variable.php
@@ -10,14 +10,6 @@
namespace phpbb\search\sphinx;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* \phpbb\search\sphinx\config_variable
* Represents a single variable inside the sphinx configuration
*/
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 214ab8fd33..f530d30f1f 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Session class
* @package phpBB3
*/
diff --git a/phpBB/phpbb/symfony_request.php b/phpBB/phpbb/symfony_request.php
index 92784c213b..ebe862a565 100644
--- a/phpBB/phpbb/symfony_request.php
+++ b/phpBB/phpbb/symfony_request.php
@@ -11,14 +11,6 @@ namespace phpbb;
use Symfony\Component\HttpFoundation\Request;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class symfony_request extends Request
{
/**
diff --git a/phpBB/phpbb/template/asset.php b/phpBB/phpbb/template/asset.php
index 27564bf347..24e0d6698d 100644
--- a/phpBB/phpbb/template/asset.php
+++ b/phpBB/phpbb/template/asset.php
@@ -9,14 +9,6 @@
namespace phpbb\template;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class asset
{
protected $components = array();
diff --git a/phpBB/phpbb/template/base.php b/phpBB/phpbb/template/base.php
index 86868707f0..6044effa1f 100644
--- a/phpBB/phpbb/template/base.php
+++ b/phpBB/phpbb/template/base.php
@@ -9,14 +9,6 @@
namespace phpbb\template;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
abstract class base implements template
{
/**
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index decd1c7956..65c7d094a0 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -10,14 +10,6 @@
namespace phpbb\template;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Stores variables assigned to template.
*
* @package phpBB3
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php
index cf38bba522..d95b0a822c 100644
--- a/phpBB/phpbb/template/template.php
+++ b/phpBB/phpbb/template/template.php
@@ -9,14 +9,6 @@
namespace phpbb\template;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
interface template
{
diff --git a/phpBB/phpbb/template/twig/definition.php b/phpBB/phpbb/template/twig/definition.php
index 2490a43f81..945c46675e 100644
--- a/phpBB/phpbb/template/twig/definition.php
+++ b/phpBB/phpbb/template/twig/definition.php
@@ -10,14 +10,6 @@
namespace phpbb\template\twig;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* This class holds all DEFINE variables from the current page load
*/
class definition
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php
index a6c0e476f0..24bd55b3c5 100644
--- a/phpBB/phpbb/template/twig/environment.php
+++ b/phpBB/phpbb/template/twig/environment.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class environment extends \Twig_Environment
{
/** @var array */
diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php
index 1ddb97369e..6847dbd9f8 100644
--- a/phpBB/phpbb/template/twig/extension.php
+++ b/phpBB/phpbb/template/twig/extension.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class extension extends \Twig_Extension
{
/** @var \phpbb\template\context */
@@ -48,11 +40,11 @@ class extension extends \Twig_Extension
return 'phpbb';
}
- /**
- * Returns the token parser instance to add to the existing list.
- *
- * @return array An array of Twig_TokenParser instances
- */
+ /**
+ * Returns the token parser instance to add to the existing list.
+ *
+ * @return array An array of Twig_TokenParser instances
+ */
public function getTokenParsers()
{
return array(
@@ -66,36 +58,36 @@ class extension extends \Twig_Extension
);
}
- /**
- * Returns a list of filters to add to the existing list.
- *
- * @return array An array of filters
- */
- public function getFilters()
- {
+ /**
+ * Returns a list of filters to add to the existing list.
+ *
+ * @return array An array of filters
+ */
+ public function getFilters()
+ {
return array(
new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
new \Twig_SimpleFilter('addslashes', 'addslashes'),
);
- }
-
- /**
- * Returns a list of global functions to add to the existing list.
- *
- * @return array An array of global functions
- */
- public function getFunctions()
- {
+ }
+
+ /**
+ * Returns a list of global functions to add to the existing list.
+ *
+ * @return array An array of global functions
+ */
+ public function getFunctions()
+ {
return array(
new \Twig_SimpleFunction('lang', array($this, 'lang')),
);
}
- /**
- * Returns a list of operators to add to the existing list.
- *
- * @return array An array of operators
- */
+ /**
+ * Returns a list of operators to add to the existing list.
+ *
+ * @return array An array of operators
+ */
public function getOperators()
{
return array(
@@ -126,19 +118,19 @@ class extension extends \Twig_Extension
'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
),
);
- }
+ }
/**
- * Grabs a subset of a loop
- *
- * @param Twig_Environment $env A Twig_Environment instance
- * @param mixed $item A variable
- * @param integer $start Start of the subset
- * @param integer $end End of the subset
- * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
- *
- * @return mixed The sliced variable
- */
+ * Grabs a subset of a loop
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param mixed $item A variable
+ * @param integer $start Start of the subset
+ * @param integer $end End of the subset
+ * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
+ *
+ * @return mixed The sliced variable
+ */
function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false)
{
// We do almost the same thing as Twig's slice (array_slice), except when $end is positive
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index d832fbf84e..be53b3eb5b 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class lexer extends \Twig_Lexer
{
public function tokenize($code, $filename = null)
diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php
index 910061dc0f..e01e9de467 100644
--- a/phpBB/phpbb/template/twig/loader.php
+++ b/phpBB/phpbb/template/twig/loader.php
@@ -10,14 +10,6 @@
namespace phpbb\template\twig;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Twig Template loader
* @package phpBB3
*/
diff --git a/phpBB/phpbb/template/twig/node/definenode.php b/phpBB/phpbb/template/twig/node/definenode.php
index ec084d0f7d..6a9969f8c6 100644
--- a/phpBB/phpbb/template/twig/node/definenode.php
+++ b/phpBB/phpbb/template/twig/node/definenode.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class definenode extends \Twig_Node
{
diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php
index 202db775ee..7a1181a866 100644
--- a/phpBB/phpbb/template/twig/node/event.php
+++ b/phpBB/phpbb/template/twig/node/event.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class event extends \Twig_Node
{
@@ -57,10 +49,10 @@ class event extends \Twig_Node
// templates on page load rather than at compile. This is
// slower, but makes developing extensions easier (no need to
// purge the cache when a new event template file is added)
- $compiler
- ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n")
- ->indent()
- ;
+ $compiler
+ ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n")
+ ->indent()
+ ;
}
if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html'))
@@ -79,7 +71,7 @@ class event extends \Twig_Node
{
$compiler
->outdent()
- ->write("}\n\n")
+ ->write("}\n\n")
;
}
}
diff --git a/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php b/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php
index 48d8b814b8..f3bbfa6691 100644
--- a/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php
+++ b/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node\expression\binary;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class equalequal extends \Twig_Node_Expression_Binary
{
diff --git a/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php b/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php
index 87585dfb4c..c9c2687e08 100644
--- a/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php
+++ b/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node\expression\binary;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class notequalequal extends \Twig_Node_Expression_Binary
{
diff --git a/phpBB/phpbb/template/twig/node/includenode.php b/phpBB/phpbb/template/twig/node/includenode.php
index 77fe7f3acb..d9b45d6407 100644
--- a/phpBB/phpbb/template/twig/node/includenode.php
+++ b/phpBB/phpbb/template/twig/node/includenode.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class includenode extends \Twig_Node_Include
{
diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php
index 70dcf85d62..3f4621c0a9 100644
--- a/phpBB/phpbb/template/twig/node/includephp.php
+++ b/phpBB/phpbb/template/twig/node/includephp.php
@@ -9,21 +9,13 @@
namespace phpbb\template\twig\node;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class includephp extends \Twig_Node
{
/** @var Twig_Environment */
protected $environment;
- public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
+ public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
{
$this->environment = $environment;
diff --git a/phpBB/phpbb/template/twig/node/php.php b/phpBB/phpbb/template/twig/node/php.php
index b37759303d..2b18551266 100644
--- a/phpBB/phpbb/template/twig/node/php.php
+++ b/phpBB/phpbb/template/twig/node/php.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\node;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class php extends \Twig_Node
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
index 688afec191..21add0c17c 100644
--- a/phpBB/phpbb/template/twig/tokenparser/defineparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class defineparser extends \Twig_TokenParser
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/event.php b/phpBB/phpbb/template/twig/tokenparser/event.php
index 7cf4000909..8864e879f8 100644
--- a/phpBB/phpbb/template/twig/tokenparser/event.php
+++ b/phpBB/phpbb/template/twig/tokenparser/event.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class event extends \Twig_TokenParser
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/includejs.php b/phpBB/phpbb/template/twig/tokenparser/includejs.php
index 30a99f3279..0e46915b86 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includejs.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includejs.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class includejs extends \Twig_TokenParser
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/includeparser.php b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
index 715c0ec84d..d351f1b4cd 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includeparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class includeparser extends \Twig_TokenParser_Include
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
index 25170e7214..1b3d1742e3 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includephp.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class includephp extends \Twig_TokenParser
{
diff --git a/phpBB/phpbb/template/twig/tokenparser/php.php b/phpBB/phpbb/template/twig/tokenparser/php.php
index e4f70fb9b1..b427969e2d 100644
--- a/phpBB/phpbb/template/twig/tokenparser/php.php
+++ b/phpBB/phpbb/template/twig/tokenparser/php.php
@@ -9,14 +9,6 @@
namespace phpbb\template\twig\tokenparser;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class php extends \Twig_TokenParser
{
@@ -53,5 +45,5 @@ class php extends \Twig_TokenParser
public function getTag()
{
return 'PHP';
- }
+ }
}
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index 9df9310427..ddadcfd89a 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -10,14 +10,6 @@
namespace phpbb\template\twig;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Twig Template class.
* @package phpBB3
*/
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php
index 171dae4d14..13184cf41c 100644
--- a/phpBB/phpbb/tree/nestedset.php
+++ b/phpBB/phpbb/tree/nestedset.php
@@ -9,14 +9,6 @@
namespace phpbb\tree;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
abstract class nestedset implements \phpbb\tree\tree_interface
{
/** @var \phpbb\db\driver\driver */
diff --git a/phpBB/phpbb/tree/nestedset_forum.php b/phpBB/phpbb/tree/nestedset_forum.php
index 2fee5b097e..ef6023546b 100644
--- a/phpBB/phpbb/tree/nestedset_forum.php
+++ b/phpBB/phpbb/tree/nestedset_forum.php
@@ -9,14 +9,6 @@
namespace phpbb\tree;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
class nestedset_forum extends \phpbb\tree\nestedset
{
/**
diff --git a/phpBB/phpbb/tree/tree_interface.php b/phpBB/phpbb/tree/tree_interface.php
index 162c1e5e29..90ec27e024 100644
--- a/phpBB/phpbb/tree/tree_interface.php
+++ b/phpBB/phpbb/tree/tree_interface.php
@@ -9,14 +9,6 @@
namespace phpbb\tree;
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
interface tree_interface
{
/**
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index d82acbf501..ce0dc3c1df 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -10,14 +10,6 @@
namespace phpbb;
/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* Base user class
*
* This is the overarching class which contains (through session extend)
diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php
index 78620ab1b9..c1d69802f8 100644
--- a/phpBB/phpbb/user_loader.php
+++ b/phpBB/phpbb/user_loader.php
@@ -10,13 +10,6 @@
namespace phpbb;
/**
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
* User loader class
*
* This handles loading users from the database and
diff --git a/phpBB/posting.php b/phpBB/posting.php
index e29b74af65..5db36007c2 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -381,7 +381,7 @@ if ($mode == 'delete' || $mode == 'soft_delete')
if ($mode == 'bump')
{
if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id'])
- && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
+ && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
{
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url);
@@ -817,8 +817,13 @@ if ($submit || $preview || $refresh)
// We make sure nobody else made exactly the same change
// we're about to submit by also checking $message_md5 != $post_data['post_checksum']
- if (($edit_post_message_checksum !== '' && $edit_post_message_checksum != $post_data['post_checksum'] && $message_md5 != $post_data['post_checksum'])
- || ($edit_post_subject_checksum !== '' && $edit_post_subject_checksum != $post_data['post_subject_md5'] && md5($post_data['post_subject']) != $post_data['post_subject_md5']))
+ if ($edit_post_message_checksum !== '' &&
+ $edit_post_message_checksum != $post_data['post_checksum'] &&
+ $message_md5 != $post_data['post_checksum']
+ ||
+ $edit_post_subject_checksum !== '' &&
+ $edit_post_subject_checksum != $post_data['post_subject_md5'] &&
+ md5($post_data['post_subject']) != $post_data['post_subject_md5'])
{
if (topic_review($topic_id, $forum_id, 'post_review_edit', $post_id))
{
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index 4565a2d7c7..8acc0a8812 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -1,7 +1,7 @@
<!-- 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 U_MCP --><p class="responsive-center">{CURRENT_TIME} <br />[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ELSEIF S_USER_LOGGED_IN --><p class="responsive-center">{CURRENT_TIME}</p><!-- ENDIF -->
+<!-- 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 -->
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
<ul class="linklist bulletin">
diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html
index 7b9e4c13cb..e3efe49943 100644
--- a/phpBB/styles/prosilver/template/mcp_header.html
+++ b/phpBB/styles/prosilver/template/mcp_header.html
@@ -3,10 +3,8 @@
<h2>{L_MCP}</h2>
<!-- IF U_MCP -->
- <p class="linkmcp">
- [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
- <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
- <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ <p class="linkmcp responsive-center">
+ [<!-- IF U_ACP -->&nbsp;<a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a>&nbsp;|<!-- ENDIF -->&nbsp;<a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- IF U_MCP_FORUM -->&nbsp;|&nbsp;<a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF --><!-- IF U_MCP_TOPIC -->&nbsp;|&nbsp;<a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF --><!-- IF U_MCP_POST -->&nbsp;|&nbsp;<a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF -->&nbsp;]
</p>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html
index 34fd374d5d..668a0d81a8 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_front.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_front.html
@@ -51,7 +51,7 @@
<td>{highest.WARNING_TIME}</td>
<td><a href="{highest.U_NOTES}">{L_VIEW_NOTES}</a></td>
</tr>
- <!-- END latest -->
+ <!-- END highest -->
</tbody>
</table>
<!-- ELSE -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 86e55c54f6..a831ab6cb4 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -34,8 +34,8 @@
<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
<div id="darken">&nbsp;</div>
- <div class="phpbb_alert" id="loadingalert"><h3>{L_LOADING}</h3><p>{L_PLEASE_WAIT}</p></div>
</div>
+ <div id="loading_indicator"></div>
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
<a href="#" class="alert_close"></a>
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index f3e62db649..5677b92fc3 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -86,6 +86,8 @@
</dl>
<!-- ENDIF -->
+ <!-- EVENT posting_editor_subject_before -->
+
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
<dl style="clear: left;">
<dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
@@ -97,6 +99,8 @@
<!-- ENDIF -->
<!-- ENDIF -->
+ <!-- EVENT posting_editor_subject_after -->
+
<!-- INCLUDE posting_buttons.html -->
<div id="smiley-box">
@@ -129,9 +133,13 @@
<!-- ENDIF -->
</div>
+ <!-- EVENT posting_editor_message_before -->
+
<div id="message-box">
<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
</div>
+
+ <!-- EVENT posting_editor_message_after -->
</fieldset>
<!-- IF $EXTRA_POSTING_OPTIONS eq 1 -->
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 6a8c3382da..f0994f0716 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 --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
+<!-- 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><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 91c1cb7a5d..46881d3b03 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 --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
+<!-- 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><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></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 -->
@@ -60,7 +60,7 @@
<div class="clear"></div>
<!-- IF S_HAS_POLL -->
- <form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" data-overlay="false" class="topic_poll">
+ <form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" class="topic_poll">
<div class="panel">
<div class="inner">
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 960415afbf..d4e63bf3ec 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -1104,6 +1104,11 @@ input.disabled {
background-color: #000000;
}
+#loading_indicator {
+ background-color: #000000;
+ background-image: url("./images/loading.gif");
+}
+
#notification_list ul li {
border-bottom-color: #B9B9B9;
}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 84aea8212c..225673a932 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -821,6 +821,21 @@ li.pagination ul {
opacity: 0.5;
}
+#loading_indicator {
+ background: center center no-repeat;
+ border-radius: 5px;
+ display: none;
+ opacity: 0.8;
+ margin-top: -50px;
+ margin-left: -50px;
+ height: 50px;
+ width: 50px;
+ position: fixed;
+ left: 50%;
+ top: 50%;
+ z-index: 51;
+}
+
/* Miscellaneous styles
---------------------------------------- */
#forum-permissions {
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index f128450955..1ee364ce93 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -11,7 +11,6 @@ fieldset {
input {
font-weight: normal;
- cursor: pointer;
vertical-align: middle;
padding: 0 3px;
font-size: 1em;
@@ -279,7 +278,6 @@ fieldset.submit-buttons input {
.inputbox {
border: 1px solid transparent;
padding: 2px;
- cursor: text;
}
.inputbox:hover, .inputbox:focus {
@@ -337,6 +335,10 @@ input.button3 {
font-variant: small-caps;
}
+input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
+ cursor: pointer;
+}
+
/* Alternative button */
a.button2, input.button2, input.button3 {
border: 1px solid transparent;
diff --git a/phpBB/styles/prosilver/theme/images/loading.gif b/phpBB/styles/prosilver/theme/images/loading.gif
new file mode 100644
index 0000000000..e1ed0883e0
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/loading.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index e07cfda8b3..158e5f2720 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -1,8 +1,8 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP -->
+<!-- IF U_MCP or U_ACP -->
<div id="pageheader">
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
</div>
<br clear="all" /><br />
diff --git a/phpBB/styles/subsilver2/template/mcp_header.html b/phpBB/styles/subsilver2/template/mcp_header.html
index f107732234..9b9f7849f4 100644
--- a/phpBB/styles/subsilver2/template/mcp_header.html
+++ b/phpBB/styles/subsilver2/template/mcp_header.html
@@ -3,9 +3,7 @@
<div id="pageheader">
<!-- IF U_MCP -->
<p class="linkmcp">
- [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
- <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
- <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ [<!-- IF U_ACP -->&nbsp;<a href="{U_ACP}">{L_ACP}</a>&nbsp;|<!-- ENDIF -->&nbsp;<a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM -->&nbsp;|&nbsp;<a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF --><!-- IF U_MCP_TOPIC -->&nbsp;|&nbsp;<a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF --><!-- IF U_MCP_POST -->&nbsp;|&nbsp;<a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF -->&nbsp;]
</p>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index 635b05aaa0..7b77f85694 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -25,8 +25,8 @@
<!-- IF MODERATORS -->
<p class="moderators">{L_MODERATORS}{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
- <!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <!-- IF U_MCP or U_ACP -->
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
@@ -163,11 +163,12 @@
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
-
+<!-- EVENT posting_editor_subject_before -->
<tr>
<td class="row1" width="22%"><b class="genmed">{L_SUBJECT}{L_COLON}</b></td>
<td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>
+<!-- EVENT posting_editor_subject_after -->
<tr>
<td class="row1" valign="top"><b class="genmed">{L_MESSAGE_BODY}{L_COLON}</b><br /><span class="gensmall">{L_MESSAGE_BODY_EXPLAIN}&nbsp;</span><br /><br />
<!-- IF S_SMILIES_ALLOWED -->
@@ -202,6 +203,7 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<!-- INCLUDE posting_buttons.html -->
+ <!-- EVENT posting_editor_message_before -->
<tr>
<td valign="top" style="width: 100%;"><textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" style="width: 700px; height: 270px; min-width: 98%; max-width: 98%;">{MESSAGE}</textarea></td>
<!-- IF S_BBCODE_ALLOWED -->
@@ -214,6 +216,7 @@
</td>
<!-- ENDIF -->
</tr>
+ <!-- EVENT posting_editor_message_after -->
</table>
</td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index dfbe0a605b..612c2e42ea 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -109,7 +109,7 @@
<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index 26e74b8c38..c3f8bf205b 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -21,7 +21,7 @@
<p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
diff --git a/tests/dbal/migrator_tool_config_test.php b/tests/dbal/migrator_tool_config_test.php
index a8d8966839..807399385c 100644
--- a/tests/dbal/migrator_tool_config_test.php
+++ b/tests/dbal/migrator_tool_config_test.php
@@ -20,35 +20,24 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
public function test_add()
{
- try
- {
- $this->tool->add('foo', 'bar');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->add('foo', 'bar');
+ $this->assertEquals('bar', $this->config['foo']);
+ }
+
+ public function test_add_twice()
+ {
+ $this->tool->add('foo', 'bar');
$this->assertEquals('bar', $this->config['foo']);
- try
- {
- $this->tool->add('foo', 'bar');
- $this->fail('Exception not thrown');
- }
- catch (Exception $e) {}
+ $this->tool->add('foo', 'bar2');
+ $this->assertEquals('bar', $this->config['foo']);
}
public function test_update()
{
$this->config->set('foo', 'bar');
- try
- {
- $this->tool->update('foo', 'bar2');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+
+ $this->tool->update('foo', 'bar2');
$this->assertEquals('bar2', $this->config['foo']);
}
@@ -56,24 +45,10 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
{
$this->config->set('foo', 'bar');
- try
- {
- $this->tool->update_if_equals('', 'foo', 'bar2');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->update_if_equals('', 'foo', 'bar2');
$this->assertEquals('bar', $this->config['foo']);
- try
- {
- $this->tool->update_if_equals('bar', 'foo', 'bar2');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->update_if_equals('bar', 'foo', 'bar2');
$this->assertEquals('bar2', $this->config['foo']);
}
@@ -81,41 +56,31 @@ class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
{
$this->config->set('foo', 'bar');
- try
- {
- $this->tool->remove('foo');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->remove('foo');
$this->assertFalse(isset($this->config['foo']));
}
- public function test_reverse()
+ public function test_reverse_add()
{
$this->config->set('foo', 'bar');
- try
- {
- $this->tool->reverse('add', 'foo');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->reverse('add', 'foo');
$this->assertFalse(isset($this->config['foo']));
+ }
+
+ public function test_reverse_remove()
+ {
+ $this->config->delete('foo');
+ $this->tool->reverse('remove', 'foo');
+ $this->assertEquals('', $this->config['foo']);
+ }
+
+ public function test_reverse_update_if_equals()
+ {
$this->config->set('foo', 'bar');
- try
- {
- $this->tool->reverse('update_if_equals', 'test', 'foo', 'bar');
- }
- catch (Exception $e)
- {
- $this->fail($e);
- }
+ $this->tool->reverse('update_if_equals', 'test', 'foo', 'bar');
$this->assertEquals('test', $this->config['foo']);
}
}