[ticket/14559] Remove attachment BBCode tags from the quoted message
* rxu/ticket/14559:
[ticket/14559] Remove attachment BBCode tags from the quoted message
The column default shouldn't be escaped for mssql. This is a regression
from 743d816631. Prior to that commit, the
default value for the column was not escaped. Escaping it will cause SQL
errors while altering columns.
PHPBB3-14532
[ticket/14272] Use html5 valid input elements
* marc1706/ticket/14272:
[ticket/14272] Allow input of floats for filesize
[ticket/14272] Use input type number instead of text in avatars
[ticket/14272] Assign min and max values for avatar driver settings
[ticket/14272] Define min and max values for avatar width and height
[ticket/14272] Disable not toggled form elements
[ticket/14272] Make sure phpbb_avatar_manager was defined
[ticket/14272] Remove useless check
[ticket/14272] Fix invalid or missing min/max settings
[ticket/14272] Assign min/max for all allowed types
[ticket/14272] Only use maxlength and size for allowed input elements
[ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
* marc1706/ticket/14481:
[ticket/14481] Add tests for x_forwarded_proto header
[ticket/14481] Use port 443 if https is specified in x-forwarded-proto
[ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
[ticket/13842] Prevent internal server errors without rewrite module on IIS
* marc1706/ticket/13842:
[ticket/13842] Prevent internal server errors without rewrite module on IIS
[ticket/14437] Correctly assume index from attachment display order
* marc1706/ticket/14437:
[ticket/14437] Make sure attachments array is properly ordered before processing
[ticket/14437] Preserve attachment ID order by ordering by attach_id
[ticket/14437] Sort attachments after assigning inline attachments
[ticket/14437] Correctly assume index from attachment display order
[ticket/14241] Prevent empty q&a as a result of improper settings
* marc1706/ticket/14241:
[ticket/14241] Log fatal captcha error to error log
[ticket/14241] Prevent empty q&a as a result of improper settings
This was previously removed without needing to. Adding it back to force
users to not emulate the page for previous versions of IE. The
imagetoolbar http-equiv tag was not restored as IE does not contain that
anymore since IE7. Also, the chome=1 has been removed from the
X-UA-Compatible content as ChromeFrame does not receive any further
updates since 2014 and is potentially broken.
PHPBB3-14136
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. This event serves two purposes - one, it is easier to
add new quickmod options, and two, it allows an extenstion developer to check
additional permissions and apply further authentication for the display of the
quickmod options.
PHPBB3-14395
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. This event serves two purposes - one, it is easier to
add new quickmod options, and two, it allows an extenstion developer to check
additional permissions and apply further authentication for the display of the
quickmod options.
PHPBB3-14395
This will ensure to prevent PHP fatal errors in case the passed timestamp
is an empty string or does not evaluate to an integer (i.e. strings like
foobar).
PHPBB3-14536
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. This event serves two purposes - one, it is easier to
add new quickmod options, and two, it allows an extenstion developer to check
additional permissions and apply further authentication for the display of the
quickmod options.
PHPBB3-14395
Swapping conditions in the function accept() of the class
\phpbb\recursive_dot_prefix_filter_iterator saves a lot of isDir() calls which
is more expensive than $filename[0] checks.
PHPBB3-14540
Improper setup of the q&a captcha in combination with the admin choosing a
default language that does not have any questions and answers set might
result in the user being presented empty questions and answers. This
change will try to fall back to any question in case the admin incorrectly
set the default language and has no questions & answers set. If that does
not work, the captcha will not allow passing it and suggest to contact the
board admin to resolve this issue.
PHPBB3-14241
[ticket/14496] Cache last update of update list instead of using filemtime
* marc1706/ticket/14496:
[ticket/14496] Destroy update_list_time cache variable on intro
[ticket/14496] Cache last update of update list instead of using filemtime
This will prevent a race condition that might occur by two posts being
submitted at the same time with the notification type IDs not being
cached.
PHPBB3-14132
The statement RewriteBase / needs to be explicitly typed down into the .htaccess file in root in order to reduce all the support requests about the implicit statement and the URL rewriting not working.
PHPBB3-14458
[ticket/14411] Permanently delete post if delete_permanent is set
* marc1706/ticket/14411:
[ticket/14411] Permanently delete post if delete_permanent is set
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. The function is run before any event can be called to
modify ... meaning that any modifications done to this array
will not affect the options displayed to the user on the viewtopic page itself.
This event serves two purposes - one, it is easier to add new quickmod options,
and two, it allows an extenstion developer to check additional permissions and
apply further authentication for the display of the quickmod options.
PHPBB3-14395
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. The function is run before any event can be called to
modify ... meaning that any modifications done to this array
will not affect the options displayed to the user on the viewtopic page itself.
This event serves two purposes - one, it is easier to add new quickmod options,
and two, it allows an extenstion developer to check additional permissions and
apply further authentication for the display of the quickmod options.
PHPBB3-14395
Added an event before the function phpbb_add_quickmod_option is called in
the viewtopic.php file. The function is run before any event can be called to
modify ... meaning that any modifications done to this array
will not affect the options displayed to the user on the viewtopic page itself.
This event serves two purposes - one, it is easier to add new quickmod options,
and two, it allows an extenstion developer to check additional permissions and
apply further authentication for the display of the quickmod options.
PHPBB3-14395
Moved the call to function phpbb_add_quickmod_option to being under the core
event core.viewtopic_assign_template_vars_before so as to enable the
modification of elements in the BEFORE they are assigned to the
template, so that removed elements don't show up in a non-functional state.
Allows the user to perform additional permissions checks on the items within the
array.
PHPBB3-14395
Create two driver methods to provide the driver config name and the
driver ACP template name, and use them directly when required.
Default driver config name and template name are the same as now.
But new drivers are able to override the config name and template
name with their own, including @vendor_extension. Simplified manager
interface by reducing unneeded methods.
PHPBB3-14387
Create two driver methods to provide the driver config name and the
driver ACP template name, and use them within the manager method.
Default driver config name and template name are the same as now.
But new drivers are able to override the config name and template
name with their own, including @vendor_extension.
PHPBB3-14387
Create a driver method to provide the driver config name, and use it
within the manager method. Default driver config name is the same as now.
But new drivers are able to override the config name with their own.
PHPBB3-14387
Add core event to the function decode_message() in
includes/functions_content.php to allow extensions performing additional
message handling before/after decoding.
PHPBB3-14366
When making a Jabber message, the page says the message has been sent
when loading the page for the first time, This message should only be
shown after the message has actually been sent
PHPBB3-14046
[ticket/14213] Adding event after users have been added to a group
* marc1706/ticket/14213:
[ticket/14213] Add pending to core.group_add_user_after
[ticket/14213] Mv event group_add_user_after after cache cleaning
[ticket/14213] Fix version number
[ticket/14213] Adding missing reference to event dispatcher
[ticket/14213] Adding event after users have been added to a group
[ticket/14261] Move the update of session informations to page_footer()
* Zoddo/ticket/14261:
[ticket/14261] Fix tests by removing old code.
[ticket/14261] Move the update of session informations to page_footer()
[ticket/14346] Do not turn version red if update status is unknown
* marc1706/ticket/14346:
[ticket/14346] Do not turn version red if update status is unknown
[ticket/13831] Store provided reason when deleting from Mod. Queue module.
* prototech/ticket/13831:
[ticket/13831] Store provided reason when deleting from Mod. Queue module.
Currently, the unique way to disable the update of session_page is to pass
"false" to the parameter of session_begin(). This method is directly
called in app.php, so pages served from the routing system can't disable
the update of session informations.
By moving the update to page_footer, we can allow controllers to tell to
the session manager that we don't want to update the session infos.
PHPBB3-14261
[ticket/13799] Do not rawurlencode category in gallery avatar
* marc1706/ticket/13799:
[ticket/13799] Split lines in HTML files for better readability
[ticket/13799] Add missing space before checked attribute
[ticket/13799] Correctly urlencode category and show selected avatar
[ticket/13799] Do not rawurlencode category in gallery avatar
[ticket/9252] Do not try to disapprove a post that was just approved
* marc1706/ticket/9252:
[ticket/9252] Do not try to disapprove a post that was just approved
report_post inherits from post_in_queue, therefore using self:: instead of
static:: results in the incorrect notification type being used to determine
which users to exclude from the notification.
PHPBB3-13892
[ticket/14159] Hide version info on ACP if we don't have the permission
* Zoddo/ticket/14159:
[ticket/14159] Hide version info on ACP if we don't have the permission
[ticket/10343] Allows a_user to show inactive accounts in memberlist
* Zoddo/ticket/10343:
[ticket/10343] Add a distinction for inactive users on memberlist
[ticket/10343] Allows a_user to show inactive accounts in memberlist
The u_sendpm check in ucp_pm.php is merely for the purpose of displaying the
error message within the UCP template. Otherwise it could be removed as
compose_pm() will check the appropriate permission pertaining to the attempted
action.
PHPBB3-9153
[ticket/13835] Normalize filename for attachments uploaded in chunks.
* prototech/ticket/13835:
[ticket/13835] Normalize filename for attachments uploaded in chunks.
[ticket/14114] Update 3.0.x version references in INSTALL.html.
* prototech/ticket/14114:
[ticket/14114] Update 3.0.x version references in INSTALL.html.
[ticket/14164] Add instructions to use the CLI for database updates
* Zoddo/ticket/14164:
[ticket/14164] Add instructions to use the CLI for database updates
[ticket/14212] Adding event after users have been removed to a group
* Wardormeur/ticket/14212:
[ticket/14212] Fix version number
[ticket/14212] Adding event after users have been removed to a group
The idea is to be able to map with others CMS by exposing most commons user configuration & changes.
Difference between the event before and after group belonging removal is that
users belongs to multiple groups, so that the belonging into a group also
depends on the others groups (and not only the deleted one), which is not
reflected before as the user is not yet deleted
PHPBB-14212
For version-check a new parameter 'ssl' is introduced.
If set to true, it will use 443 as port for the file_downloader.
In file_downloader, the host parameter of fsockopen is appended
with 'ssl://' in case the port is 443 in order to use SSL.
PHPBB3-12618
[ticket/14186] Do correct string concatenation in phpbb_mcp_sorting()
* marc1706/ticket/14186:
[ticket/14186] Do correct string concatenation in phpbb_mcp_sorting()
This also hide a link to an unreachable module (Check phpBB version).
We could have simply remove the link to the module, but if the user hasn't
the permission to access to the phpBB version check module, I think that
he shouldn't view any version information about phpBB.
PHPBB3-14159
[ticket/13423] Set busyTimeout on connect to prevent db locking
* marc1706/ticket/13423:
[ticket/13423] Set busyTimeout on connect to prevent db locking
[ticket/14123] Add descriptive help to the CLI help output
* VSEphpbb/ticket/14123:
[ticket/14123] Fix typo
[ticket/14123] Remove redundant help messages
[ticket/14123] Add descriptive help to the CLI help output
[ticket/11468] Allow controllers to set paramters of page_header()
* Zoddo/ticket/11468:
[ticket/11468] Allow controllers to set paramters of page_header()
Anybody who has the permission to read reports in one forum
can read PM reports.
Solving this problem by adding a new permission to read PM reports.
PHPBB3-8920
[ticket/13988] Use absolute path for image attachments in feeds
* Zoddo/ticket/13988:
[ticket/13988] Update tests
[ticket/13988] Use absolute path for image attachments in feeds
[ticket/14058] Contact us form missing email subject field in subsilver2
* Oyabun1/ticket/14058:
[ticket/14058] Contact us form missing email subject field in subsilver2
[ticket/14070] Properly pass whether config should be ignored for avatars
* marc1706/ticket/14070:
[ticket/14070] Properly pass whether config should be ignored for avatars
[ticket/14127] Fix the BBCode FAQ about auto-linking w/o protocol
* Zoddo/ticket/14127:
[ticket/14127] Fix the BBCode FAQ about auto-linking w/o protocol
[ticket/14077] Fall back to 1 as focusOffset if length is unsupported
* marc1706/ticket/14077:
[ticket/14077] Fall back to 1 as focusOffset if length is unsupported
The setBaseAndExtent() in Microsoft's Edge browser is incompatible with
the one Webkit browsers use. As a result of that, we have to fall back to
setting the focusOffset to 1 instead of the text length.
PHPBB3-14077
[ticket/14049] Use headers from config when sending Plupload delete request.
* prototech/ticket/14049:
[ticket/14049] Use headers from config when sending Plupload delete request.
An event to capture new avatar moving in place (and maybe overwriting
existing avatar), and another to capture deletion. Includes better error
processing. Rename event.
PHPBB3-13981
An event to capture overwriting, and another to capture deletion.
Includes better error processing. Replaced global by dependency injection.
Fix Travis tests.
PHPBB3-13981
Events added in events.md
Add in template posting_editor.html for link to custom panel
Add in template posting_layout.html for include of custom panel template body
PHPBB3-13843
Event added for the function delete_forum_content() in
includes/acp/acp_forums.php, so that you can insert any extension's table(s)
to be updated when forum content is deleted
Incude parameters forum_id, topic_ids and post_counts
PHPBB3-13311
An event to capture overwriting, and another to capture deletion.
Includes better error processing. Replaced global by dependency injection.
Fix typo.
PHPBB3-13981
An event to capture overwriting, and another to capture deletion.
Includes better error processing. Replaced global by dependency injection.
PHPBB3-13981
Add events to present information around ranks in the memberlist,
user profile, viewtopic profile and private message profile.
Slight repositioning of events in the memberlist.
PHPBB3-13982
Store the "voted" tooltip in an extra attribute in HTML, and use it
with the JS that refreshes after poll vote. Use L_ language string
instead of LA_ language string.
PHPBB3-13748
Adds core events to includes/acp/acp_profile.php and template events
to adm/style/acp_profile.html to support adding configuration options
to profile fields. Fixed version number again.
PHPBB3-13911
Added draft_id to the core.posting_modify_template_vars event in posting.php,
to provide the ability to use the 'checked' draft_id in extensions,
in addition to the 'raw' draft_id provided in earlier events in posting.php
PHPBB3-13971
As requested events are named *_after
core.session_start_after is moved after
USERS_TABLE update to prevent returning
session data from extensions
PHPBB3-13817
Ticket was changed to add few more session related events
core.session_kill - send user_id and session_id
core.session_gc - just triger event
PHPBB3-13817
[ticket/13903] Replacing regexp path naming for container by md5.
* bantu/ticket/13903:
[ticket/13903] Replacing regexp path naming for container by md5.
[ticket/12952] Check obvious errors before status in functional tests
* marc1706/ticket/12952:
[ticket/12952] Check obvious errors before status in functional tests
This will change the output from just saying that the status did not match
the expected one to actually showing any errors before complaining about a
possible difference in the status code.
PHPBB3-12952
[ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3
* Nicofuma/ticket/13941:
[ticket/13941] Workaround to fix the bug on php 5.5 with sqlite3
In certain situations, an SQL error DUPLICATE ERROR for KEY 'PRIMARY'
in the forums_track table is produced when marking forums read
(viewforum.php?f=xx&mark=forums).
The problem happens when there are duplicates in the forum_id array.
The solution is to remove those duplicates.
PHPBB3-10711
Removed:
-w, --ignore-all-space Ignore white space when comparing lines.
Added:
-Z, --ignore-trailing-space Ignore white space at line end.
-b, --ignore-space-change Ignore changes in the amount of white space.
PHPBB3-13823
[ticket/13930] Check for correct spacing between keyword & parenthesis
* marc1706/ticket/13930:
[ticket/13930] Add missing spaces to code
[ticket/13930] Use OpeningParenthesisSniff in legacy ruleset
[ticket/13930] Remove not needed return statements
[ticket/13930] Add missing spaces to code
[ticket/13930] Check for correct spacing between keyword & parenthesis
This changes the line with non-whitespace changes, so the packaging script
should correctly detect them as changed and put the file into the update.
PHPBB3-13823
While suppressing the output from the 'set_magic_quotes_runtime(0)'
is sufficient with normal phpBB installs, using this file in association
with the oauth plugin will cause an error on some versions of PHP.
This fixes a potential bug where set_magic_quotes_runtime is depreciated
in newer versions of PHP.
PHPBB3-13923
Adds core events to includes/acp/acp_profile.php and template events
to adm/style/acp_profile.html to support adding configuration options
to profile fields. Fixed version number and event name.
PHPBB3-13911
Adds core events to includes/acp/acp_profile.php and template events
to adm/style/acp_profile.html to support adding configuration options
to profile fields. Fix bamboo formatting errors.
PHPBB3-13911
Adds core events to includes/acp/acp_profile.php and template events
to adm/style/acp_profile.html to support adding configuration options
to profile fields.
PHPBB3-13911
In a migration file, if you try to add a column to a table and specify
the order, by specifying an "after" clause, it is not used at all, even
for databases that support it (like mysql).
This fixes the issue, for mysql databases. Typo fixed.
PHPBB3-13908
In a migration file, if you try to add a column to a table and specify
the order, by specifying an "after" clause, it is not used at all, even
for databases that support it (like mysql).
This fixes the issue, for mysql databases.
PHPBB3-13908
Event added for the function move_topics() in
includes/functions_admin.php, so that you can insert any extension's table(s)
to be updated when topics are moved between forums
Added parameters topic_ids, forum_id, forum_ids and auto_sync
PHPBB3-13841
Without this change, posts that are approved by someone right before
another moderator is trying to disapprove a post are actually deleted
instead of disapproved.
PHPBB3-9252
[ticket/13875] Ignore cache, ext, and store folder in lint test
* marc1706/ticket/13875:
[ticket/13875] Ignore cache, ext, and store folder in lint test
This PR adds typekit and Google's webfontloader and calls it
asyncronously, removing the SPOF in the header. Now, if google
goes down, some buttons display with a different font.
https://github.com/typekit/webfontloader
PHPBB3-13876
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.
Also include the poll variable in the parameter list for event
core.posting_modify_submission_errors, as it was missing, and any
modification here on post_data for poll related data is silently
ignored. Added correct @change tags to both events.
PHPBB3-13795
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Remove extra template variable around the new event.
PHPBB3-13786
* marc1706/ticket/12542:
[ticket/12542] Use more specific CSS for drag-n-drop
[ticket/12542] Do not use browser specific css for outline
[ticket/12542] Properly check if textarea is undefined or null
[ticket/12542] Use extended CSS for all browsers
[ticket/12542] Rename javascript method and add doc block
[ticket/12542] Add different outline colors for body & textarea
[ticket/12542] Add initial drag-n-drop animation
[ticket/13672] Allow changing the data from the user-submitted report
* brunoais/ticket/13672:
[ticket/13672] Removed bogus sting concatenation
[ticket/13672] BUMP version to 3.1.5-dev
[ticket/13672] Allow changing the data from the user-submitted report
[ticket/13668] Allow changing the query to obtain the user-submitted report
* brunoais/ticket/13668:
[ticket/13668] Removed bogus sting concatenation
[ticket/13668] BUMP version to 3.1.5-dev
[ticket/13668] Allow changing the query to obtain the user-submitted report.
[ticket/13668] Convert the mcp report_details query to a built query
[ticket/13661] Add event to allow editing the queries used to get the logs
* brunoais/ticket/13661:
[ticket/13661] BUMP version to 3.1.5-dev
[ticket/13661] Brackets in their own line
[ticket/13661] Re-Fixed $log_type -> $log_time
[ticket/13661] Wrong event @since version
[ticket/13661] Removed superfluous whitespace
[ticket/13661] bugfix: The conditional is the log_time, not log_type
[ticket/13661] Fixed the "FROM" in the built query.
[ticket/13661] Add event to allow editing the queries used to get the logs
[ticket/13661] Transform queries to get logs and log count into built queries
Changes:
- For permanent deletion of softdeleted post, disapprove mode has been changed
to delete mode;
- If post delete and softdelete are allowed, delete button triggers softdelete
mode;
- If a user can't permanently delete posts but can restore softdeleted posts,
delete button won't be displayed for softdeleted posts.
Subsilver2 is unaffected.
PHPBB3-13846
Extensions may be designed to add secondary search options,
such as Google search in the search_body.html.
There are no events in the searchbody, so this should be merged.
PHPBB3-13808
Add generate_forum_nav() core event in includes/functions_display.php
to allow modifying navlinks text. Use case example: extension(s) implementing
multilanguage boards including translated forum names and so on.
PHPBB3-13750
[ticket/13819] Add missing sql_freeresult() to files in includes/
* marc1706/ticket/13819:
[ticket/13819] Add missing sql_freeresult() to files in includes/
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.
Also include the poll variable in the parameter list for event
core.posting_modify_submission_errors, as it was missing, and any
modification here on post_data for poll related data is silently
ignored.
PHPBB3-13795
The purpose is to allow adding custom post buttons outside of original post
buttons conditionals/list in prosilver (for subsilver2 it's not the issue).
PHPBB3-13791
Modified the core.posting_modify_template_vars event in posting.php
to extend the content of the page_data array to include poll data.
That required moving the event and merging the new set of template vars.
PHPBB3-13795
* prep-release-3.1.4:
[ticket/security-180] Use language variable for redirect error in 3.1+
[ticket/security-180] Merge if statement with previous one in 3.1.x
[ticket/security-180] Add tests for redirecting to main URL
[ticket/security-180] Always fail when redirecting to an insecure URL
[ticket/security-180] Make sure that redirect goes to full URL plus slash
[ticket/security-180] Check if redirect URL contains board URL
* phpbb-security/ticket/security-180-asc:
[ticket/security-180] Use language variable for redirect error in 3.1+
[ticket/security-180] Merge if statement with previous one in 3.1.x
[ticket/security-180] Add tests for redirecting to main URL
[ticket/security-180] Always fail when redirecting to an insecure URL
[ticket/security-180] Make sure that redirect goes to full URL plus slash
[ticket/security-180] Check if redirect URL contains board URL
* prep-release-3.0.14:
[ticket/security-180] Add tests for redirecting to main URL
[ticket/security-180] Always fail when redirecting to an insecure URL
[ticket/security-180] Make sure that redirect goes to full URL plus slash
[ticket/security-180] Check if redirect URL contains board URL
* phpbb-security/ticket/security-180:
[ticket/security-180] Add tests for redirecting to main URL
[ticket/security-180] Always fail when redirecting to an insecure URL
[ticket/security-180] Make sure that redirect goes to full URL plus slash
[ticket/security-180] Check if redirect URL contains board URL
* 3.0.x:
[3.0.x] Increment version number to 3.0.15-dev.
Conflicts:
build/build.xml
phpBB/includes/constants.php
phpBB/install/database_update.php
phpBB/install/schemas/schema_data.sql
* prep-release-3.1.4:
[3.0.x] Add changelog for 3.0.14 release.
[3.0.x] Bump version numbers for 3.0.14-RC1 release.
[3.0.x] Bumping version numbers to final for 3.0.14 releases.
[ticket/12101] Remove HTML redirect workaround for Microsoft/IIS webserver
* akoeplinger/ticket/12101:
[ticket/12101] Remove HTML redirect workaround for Microsoft/IIS webserver
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Fix another typo.
PHPBB3-13786
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
Fix typo.
PHPBB3-13786
Three new events are included:
1) Core event to perform new moderator action in includes/mcp/mcp_post.php
2) Core event to add/modify template data in includes/mcp/mcp_post.php
3) Template event to present new options in template/mcp_post.html
PHPBB3-13786
When options are shown and poll delete is allowed, the option to
delete
polls is shown twice. This is fixed here by moving the if poll
delete
check out of the outer if, wich makes it also more consistent
with the
new event.
PHPBB3-13787
The code was added as a workaround for bugs in very old versions of IIS,
dating back to 2002: see commit 849d766974.
Newer IIS versions handle the 'Location' header just fine, so we can avoid
the unnecessary HTML page for redirects. Given that it seems to work fine
since IIS 6.0 (on WinServer 2003), I don't think it's worth adding a special
check for earlier versions as they are no longer supported by MS as well.
PHPBB3-12101
Migrations' permission tool allows setting permissions to the role which
doesn't match the role type, e.g. m_ permissions for u_ role types and so on.
As one of side effects, this may lead to granting users moderative/admin
permissions silently.
With this patch the only new permissions matching the role type will be set.
PHPBB3-13779
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
* bantu/ticket/13765-3.1.4:
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
* bantu/ticket/13765-3.1.4:
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
* bantu/ticket/13765:
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
* ticket/13765:
[ticket/13765] Verify SERVER_PROTOCOL has the expected format before using it.
Conflicts:
phpBB/includes/functions.php
phpBB/includes/startup.php
message_parser.php performs include of bbcode.php at the very start using
$phpbb_root_path and $phpEx vars, so there's a possibility those can be
undefined at that point, especially when message_parser.php is being included
in event listener or another extension file where $phpbb_root_path and $phpEx
don't exist. This can be fixed by adding the appropriate vars definitions.
PHPBB3-13743
This change makes the uploaded avatars use the PHPBB_USE_BOARD_URL_PATH
constant, which is needed when trying to use the get_user_avatar()
function in a listener for index changes.
PHPBB3-13703
This changes how the native FULLTEXT search calculates the total
match number for MySQL.
This should improve performance as there is one less query being made
and it is being searched using the technique mentioned in the manual
PHPBB3-13674
[ticket/13670] Modify variable-variable syntax in common avatar test for PHP/
* marc1706/ticket/13670:
[ticket/13670] Modify variable-variable syntax in common avatar test for PHP7
The event now has nearly all variables and it is in the place where it can
most influence this method's outcome without requiring the extension
to re-process phpBB's code.
PHPBB3-13142
Success message did not provide the expected "previous page" link
(acp_inactive was expected, but the link took users to acp_users) if the
acp_users module was accessed by navigating from the inactive user list to
acp_users and then deleting inactive user.
PHPBB3-13636
[ticket/13643] Change the priority of kernel_terminate_subscriber to -10000
* Nicofuma/ticket/13643:
[ticket/13643] Change the priority of kernel_terminate_subscriber to PHP_INT_MIN
The rule is a left over from development. it should be removed from colours.css
.icon-search-advanced { background-image: url("./images/icon_search_adv.gif");}
Area21 ticket: https://area51.phpbb.com/phpBB/viewtopic.php?f=81&p=275166
PHPBB3-13639
Currently email addresses are parsed incorrectly due to the regex structure.
Namely, if localpart consists of several dot separated parts, only the last
part with the trailing dot will be captured.
The patch change this behavior to capture the whole localpart.
PHPBB3-13433
Added topics_count, sort_days, sort_key and sort_dir to
core.viewforum_get_topic_data and adjusted the event's comment explaining
it's possible extended purpose now that it has more variables.
PHPBB3-13625
Avatar Gallery shows categories but no images in subsilver2.
The ID was not specified in the template. Also, the correct parent template
loop is called avatar_local_row and not avatar_local_col.
PHPBB3-13615
[ticket/13597] Modify variable-variable syntax to be compatible with PHP7
* marc1706/ticket/13597:
[ticket/13597] Modify variable-variable syntax to be compatible with PHP7
Add display_forums() core event in includes/functions_display.php to allow
modifying forums list data before the list is being generated and dumped
to the template.
PHPBB3-13596
[ticket/13348] Use close method to free feed query result handle
* marc1706/ticket/13348:
[ticket/13348] Remove unnecessary global $cache
[ticket/13348] Use close method to free query result handle
[ticket/13348] Use close method to free query result handle
* marc1706/ticket/13348-olympus:
[ticket/13348] Remove unnecessary global $cache
[ticket/13348] Use close method to free query result handle
[ticket/13538] Add tests for pagination in nested loops
* marc1706/ticket/13538:
[ticket/13538] Add tests for double nested pagination loop
[ticket/13538] Fix tests for pagination in nested loop
[ticket/13538] Add test for pagination in nested loop
* prep-release-3.0.13:
[prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
[prep-release-3.0.13] Also update version in references to files.
[prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
[prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
[prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.
Conflicts:
build/build.xml
phpBB/includes/constants.php
phpBB/install/database_update.php
phpBB/install/schemas/schema_data.sql
* prep-release-3.1.3:
[prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
[prep-release-3.0.13] Also update version in references to files.
[prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
[prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
[prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.
* prep-release-3.0.13:
[prep-release-3.0.13] Correct changelog link to 3.0.13 changes.
[prep-release-3.0.13] Also update version in references to files.
[prep-release-3.0.13] Add changelog for 3.0.13-PL1 release.
[prep-release-3.0.13] Get rid of roman numbers in CHANGELOG.html.
[prep-release-3.0.13] Bump version numbers for 3.0.13-PL1 release.
[ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
[ticket/12933] Handle case when * is last character of word
[ticket/13554] Show feature release upgrades in blue rather than red.
Conflicts:
build/build.xml
phpBB/adm/style/acp_update.html
phpBB/docs/CHANGELOG.html
phpBB/docs/INSTALL.html
phpBB/includes/constants.php
phpBB/includes/startup.php
phpBB/install/database_update.php
phpBB/install/schemas/schema_data.sql
tests/security/trailing_path_test.php
* develop-olympus:
[ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
Conflicts:
phpBB/includes/startup.php
tests/security/trailing_path_test.php
[ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME...
* bantu/ticket/13549:
[ticket/13549] Do not exit when ORIG_PATH_INFO just contains SCRIPT_NAME.
[ticket/12933] Handle *wildcard character in native search
* dhruvgoel92/ticket/12933:
[ticket/12933] Add test cases for * wildcard searches
[ticket/12933] Handle case when * is last character of word
The ORIG_PATH_INFO on IIS also contains the script name. Only use that
for killing the script after removing the script name from ORIG_PATH_INFO.
PHPBB3-13549
[ticket/13414] Set Content-Length header only if status is not 304
* marc1706/ticket/13414:
[ticket/13414] Set Content-Length header only if status is not 304
Added event core.topic_review_modify_row in function topic_review() in
functions_posting for modifying template data blocks for topic reviews.
PHPBB3-13540
Events added for the functions approve_posts(), approve_topics()
and disapprove_posts() in mcp_queue.php, so that you can send notifications
during approval and disapproval.
PHPBB3-13537
Adding core event core.markread_before to to funtion markread()
in functions.php, so that you now are able to add additional
stuff inside the markread process, for example notifications designed
in extensions.
PHPBB3-13518
Adding core event core.get_unread_topics_modify_sql to to funtion
get_unread_topics() in functions.php, so that you now are able to modify
the sql query that retrieves the unread topics.
PHPBB3-13532
Add core events to the function user_active_flip() in
includes/functions_user.php to allow checking/modifying data while
activating/deactivating users.
PHPBB3-13336
[ticket/13534] Set imagick path to empty string to prevent failing path ...
* marc1706/ticket/13534:
[ticket/13534] Set imagick path to empty string to prevent failing path check
* develop-olympus:
[develop-olympus] Increment version number to 3.0.14-dev.
[develop-olympus] Add changelog for 3.0.13 release.
[develop-olympus] Bump version numbers for 3.0.13-RC1 release.
[develop-olympus] Bumping version numbers to final for 3.0.13 releases.
Conflicts:
build/build.xml
phpBB/docs/CHANGELOG.html
phpBB/docs/INSTALL.html
phpBB/includes/constants.php
phpBB/install/convertors/convert_phpbb20.php
phpBB/install/database_update.php
phpBB/install/schemas/schema_data.sql
phpBB/styles/prosilver/imageset/imageset.cfg
phpBB/styles/prosilver/style.cfg
phpBB/styles/prosilver/template/template.cfg
phpBB/styles/prosilver/theme/theme.cfg
phpBB/styles/subsilver2/imageset/imageset.cfg
phpBB/styles/subsilver2/style.cfg
phpBB/styles/subsilver2/template/template.cfg
phpBB/styles/subsilver2/theme/theme.cfg
The imagick path defaults to /usr/bin. If it doesn't exist for some reason,
for example on travis, the form won't be submitted and the settings won't be
changed.
PHPBB3-13534
* develop-olympus:
[ticket/13527] Apply htmlspecialchars() to data from version server.
[ticket/13527] Remove two unused variables.
Conflicts:
phpBB/includes/acp/acp_update.php
[ticket/13527] Escape information received from version server
* bantu/ticket/13527:
[ticket/13527] Apply htmlspecialchars() to data from version server.
[ticket/13527] Remove two unused variables.
[ticket/13519] Correctly validate imagick path as path and not string
* marc1706/ticket/13519:
[ticket/13519] Correctly validate imagick path as path and not string
[ticket/13192] Add method for generating valid user page links based on mod_rewrite
* marc1706/ticket/13192:
[ticket/13192] Add test for app.php in external subfolder
[ticket/13192] Use ltrim() instead of preg_replace()
[ticket/13192] Order test cases consistently
[ticket/13192] Remove app.php on mod rewrite even if app.php is outside root
[ticket/13192] Pass correct parameters and rename method to get_valid_page
[ticket/13192] Use get_valid_user_page in confirm_box() and cleanup globals
[ticket/13192] Use get_valid_user_page method in build_url function
[ticket/13192] Add method for generating valid user page links
[ticket/13511] Call the check() method with the phpcsFile object
* Nicofuma/ticket/13511:
[ticket/13511] Call the check() method with the phpcsFile object
Adds a couple of variables to the event that allows extension authors to
bypass the f_read and forum password checks as if the user had those permissions
whether or not he actually has them.
PHPBB3-13160
Renamed content_replaced to get_global_visibility_sql_overwrite in order to
follow the convention in other events' variables that have the same basic
function
PHPBB3-13147
This change allows the usage of array($class, 'method')) directly instead of
having to use the functionX syntax as follows:
array('function1' => array($class, 'method')))
PHPBB3-13370
[ticket/13405] Fix a typo in phpbb/migration/data/v310/style_update_p1.php
* rxu/ticket/13405:
[ticket/13405] Fix a typo in phpbb/migration/data/v310/style_update_p1.php
Currently there's no space between the index name and columns list
when generating ADD INDEX sql query for MySQL DBMSes. This may cause errors
on earlier MySQL versions like 3.23.
PHPBB3-13406
prepare_hidden_fields is expected to return null if the option is not sent
in the request. The boolean method returns false instead, which results in
the options being set as false in hidden fields when accessing the first edit
step.
When checking the "Default value" option, there is also a failure to check
whether the "Field type" option is set to checkbox, thus resulting in this
option getting lost as well.
PHPBB3-12642
phpBB is a free open-source bulletin board written in PHP.
## COMMUNITY
Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
Get your copy of phpBB, find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
## INSTALLING DEPENDENCIES
To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
cd phpBB
php ../composer.phar install --dev
php ../composer.phar install
## CONTRIBUTE
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
3.[Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
4. Send us a pull request
## AUTOMATED TESTING
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis builds below:
* [](http://travis-ci.org/phpbb/phpbb)**master** - Latest development version
* [](http://travis-ci.org/phpbb/phpbb)**3.2.x** - Development of version 3.2.x
* [](http://travis-ci.org/phpbb/phpbb)**3.1.x** - Development of version 3.1.x
$scheme=($inline)?'[a-z][a-z\d+]*':'[a-z][a-z\d+\-.]*';// avoid automatic parsing of "word" in "last word.http://..."
$pchar="(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)";// rfc: no "|"
$reg_name="(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)+";// rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB, the community forums and our IRC channel (see <ahref="README.html">README</a> for details).</p>
<pclass="paragraph main-description">
This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the
more commonly asked questions. It is by no means exhaustive and should be used in combination with
the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel
(see <ahref="README.html">README</a> for details).
<p>Please read the paragraph about permissions in our extensive <ahref="https://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
<p>Please read the paragraph about permissions in our extensive <ahref="https://www.phpbb.com/support/docs/en/3.1/ug/">online documentation</a>.</p>
</div>
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>Please read our <ahref="https://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
<p>Please read our <ahref="https://www.phpbb.com/support/docs/en/3.1/ug/">extensive user documentation</a> first, it may just explain what you want to know.</p>
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
@@ -309,7 +315,7 @@ I want to sue you because i think you host an illegal board!</h2>
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
<divclass="paragraph">
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
<p>A basic overview of running phpBB can be found in the accompanying <ahref="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB you should read <ahref="https://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
<p>
A basic overview of running phpBB can be found in the accompanying <ahref="README.html">README</a> file.
Please ensure you read that document in addition to this! For more detailed information on using, installing,
updating and converting phpBB you should read <ahref="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a>
<p>If you are currently using a stable release of phpBB, updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Note</strong>: Before updating, we heavily recommend you do a <em>full backup of your database and existing phpBB files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong></p>
<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong> If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<aname="update_full"></a><h3>4.i. Full package</h3>
@@ -267,7 +274,7 @@
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code> and <code>images/</code> directories in place. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <ahref="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<p>Once <code>install/database_update.php</code> has completed, you may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
@@ -279,7 +286,7 @@
<p>The directory structure has been preserved, enabling you (if you wish) to simply upload the uncompressed contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any modifications (MODs) these files will overwrite the originals, possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
<p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number.</p>
<p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<p>If you do get failures, you should look at using the <ahref="#update_files">Changed Files</a> package to replace the files which failed to patch. Please note that you will need to manually re-add any MODs to these particular files. Alternatively, if you know how, you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</p>
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.1.5</strong>, you need the <code>phpBB-3.1.5_to_3.1.6.zip/tar.bz2</code> file.</p>
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
@@ -321,7 +328,7 @@
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <ahref="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <ahref="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <ahref="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
@@ -472,7 +479,7 @@
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>Thank you for downloading phpBB. This README will guide you through the basics of installation and operation of phpBB. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
<pclass="paragraph main-description">
Thank you for downloading phpBB. This README will guide you through the basics of installation
and operation of phpBB. Please ensure you read this and the accompanying documentation fully
<strong>before</strong> proceeding with the installation.
<p>Installation, update and conversion instructions can be found in the <ahref="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
@@ -110,7 +115,7 @@
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>Customise tab -> Language management -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <ahref="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
<p>If your language is not available, please visit our <ahref="https://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <ahref="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
<p>If your language is not available, please visit our <ahref="https://www.phpbb.com/community/viewforum.php?f=491">[3.1.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <ahref="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <ahref="https://www.phpbb.com/customise/db/extensions-27/">Extensions</a> section of our <ahref="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <ahref="https://www.phpbb.com/customise/db/extensions-36">Extensions</a> section of our <ahref="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
<p>For more information about extensions, please see: <ahref="https://www.phpbb.com/extensions">https://www.phpbb.com/extensions</a></p>
@@ -162,7 +167,7 @@
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p>
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3 and the maximum supported version is any version prior to PHP 7.0.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
@@ -333,7 +338,7 @@
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
<divclass="codebox"><pre>
$auth = new phpbb\auth\auth();
</pre></div>
$auth = new phpbb\auth\auth();</pre>
</div>
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
@@ -95,7 +96,7 @@ $auth = new phpbb\auth\auth();
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
@@ -114,8 +115,8 @@ $auth = new phpbb\auth\auth();
<p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p>
<divclass="codebox"><pre>
$auth->acl(<code>userdata</code>);
</pre></div>
$auth->acl(<code>userdata</code>);</pre>
</div>
<p>Where userdata is the array containing the aforementioned data.</p>
<p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p>
<p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p>
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
<p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p>
<p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p>
<p>The method returns an associative array of the form:</p>
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
<divclass="codebox"><pre>
$auth_admin = new auth_admin();
</pre></div>
$auth_admin = new auth_admin();</pre>
</div>
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
@@ -256,7 +257,7 @@ $auth_admin = new auth_admin();
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
<p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should be prefixed with "phpbb_" and preferably have a verb in them somewhere. Good function names are <code>phpbb_print_login_status()</code>, <code>phpbb_get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
<p>In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
@@ -427,8 +430,8 @@ while (condition)
function do_stuff()
{
...
}
</pre></div>
}</pre>
</div>
<p>In JavaScript code, braces always go on the same line:</p>
@@ -451,8 +454,8 @@ while (condition) {
function do_stuff() {
...
}
</pre></div>
}</pre>
</div>
<h4>Use spaces between tokens:</h4>
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
<p>Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:</p>
<pclass="bad">// what's the result? who knows. </p>
<p>There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should <em>always</em> use single quotes <em>unless</em> you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.</p>
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
<p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
<pclass="bad">// wrong</p>
<divclass="codebox"><pre>
$foo = $assoc_array[blah];
</pre></div>
<divclass="codebox">
<pre>$foo = $assoc_array[blah];</pre>
</div>
<pclass="good">// right </p>
<divclass="codebox"><pre>
$foo = $assoc_array['blah'];
</pre></div>
<divclass="codebox">
<pre>$foo = $assoc_array['blah'];</pre>
</div>
<pclass="bad">// wrong</p>
<divclass="codebox"><pre>
$foo = $assoc_array["$var"];
</pre></div>
<divclass="codebox">
<pre>$foo = $assoc_array["$var"];</pre>
</div>
<pclass="good">// right </p>
<divclass="codebox"><pre>
$foo = $assoc_array[$var];
</pre></div>
<divclass="codebox">
<pre>$foo = $assoc_array[$var];</pre>
</div>
<h4>Comments:</h4>
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br/><br/>Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br/><br/>Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
@@ -582,8 +585,8 @@ $foo = $assoc_array[$var];
<pclass="bad">// wrong </p>
<divclass="codebox"><pre>
$array[++$i] = $j;
$array[$i++] = $k;
</pre></div>
$array[$i++] = $k;</pre>
</div>
<pclass="good">// right </p>
<divclass="codebox"><pre>
@@ -591,39 +594,38 @@ $i++;
$array[$i] = $j;
$array[$i] = $k;
$i++;
</pre></div>
$i++;</pre>
</div>
<h4>Inline conditionals:</h4>
<p>Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:</p>
<p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:</p>
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) && sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
@@ -640,8 +642,8 @@ switch ($mode)
case 'mode2':
// I am doing something completely different here
break;
}
</pre></div>
}</pre>
</div>
<pclass="good">// Good </p>
<divclass="codebox"><pre>
@@ -658,8 +660,8 @@ switch ($mode)
default:
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<pclass="good">// Also good, if you have more code between the case and the break </p>
<divclass="codebox"><pre>
@@ -682,8 +684,8 @@ switch ($mode)
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
@@ -710,8 +712,8 @@ switch ($mode)
// Always assume that a case was not caught
break;
}
</pre></div>
}</pre>
</div>
<h4>Class Members</h4>
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
@@ -721,14 +723,14 @@ switch ($mode)
<pclass="bad">//Wrong </p>
<divclass="codebox"><pre>
var $x;
private static function f()
</pre></div>
private static function f()</pre>
</div>
<pclass="good">// Right </p>
<divclass="codebox"><pre>
public $x;
static private function f()
</pre></div>
static private function f()</pre>
</div>
<h4>Constants</h4>
<p>Prefer class constants over global constants created with <code>define()</code>.</p>
@@ -748,8 +750,8 @@ $sql = 'SELECT *
<-one tab->WHERE a = 1
<-two tabs->AND (b = 2
<-three tabs->OR b = 3)
<-one tab->ORDER BY b';
</pre></div>
<-one tab->ORDER BY b';</pre>
</div>
<p>Here the example with the tabs applied:</p>
@@ -759,8 +761,8 @@ $sql = 'SELECT *
WHERE a = 1
AND (b = 2
OR b = 3)
ORDER BY b';
</pre></div>
ORDER BY b';</pre>
</div>
<h4>SQL Quotes: </h4>
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
@@ -769,16 +771,16 @@ $sql = 'SELECT *
<divclass="codebox"><pre>
"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
</pre></div>
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;</pre>
</div>
<pclass="good">// These are right. </p>
<divclass="codebox"><pre>
'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
</pre></div>
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";</pre>
</div>
<p>In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.</p>
@@ -789,15 +791,15 @@ $sql = 'SELECT *
<divclass="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . '
WHERE a != 2';
</pre></div>
WHERE a != 2';</pre>
</div>
<pclass="good">// This is right. </p>
<divclass="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . '
WHERE a <> 2';
</pre></div>
WHERE a <> 2';</pre>
</div>
<h4>Common DBAL methods: </h4>
@@ -808,8 +810,8 @@ $sql = 'SELECT *
<divclass="codebox"><pre>
$sql = 'SELECT *
FROM ' . SOME_TABLE . "
WHERE username = '" . $db->sql_escape($username) . "'";
</pre></div>
WHERE username = '" . $db->sql_escape($username) . "'";</pre>
<p>To complete the example, this is how an update statement would look like:</p>
@@ -845,8 +847,8 @@ $sql_ary = array(
$sql = 'UPDATE ' . SOME_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
</pre></div>
$db->sql_query($sql);</pre>
</div>
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
<p>The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:</p>
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
<p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
@@ -1094,16 +1096,16 @@ $user->setup();
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
<p>The <code>append_sid()</code> function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
# Set value to empty or to this style's name if this style does not have a parent style
parent = prosilver
</pre></div>
parent = prosilver</pre>
</div>
<aname="genstyling"></a><h3>3.2. General Styling Rules</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
@@ -1252,14 +1254,14 @@ parent = prosilver
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
@@ -2443,8 +2445,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'CONV_ERROR_NO_AVATAR_PATH'
=> 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
@@ -2452,8 +2454,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'CONV_ERROR_NO_AVATAR_PATH'
=> 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
...
</pre></div>
...</pre>
</div>
<p>However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:</p>
@@ -2462,24 +2464,24 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<divclass="codebox"><pre>
...
'USE_PERMISSIONS' => 'Test out user's permissions',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
<divclass="codebox"><pre>
...
'USE_PERMISSIONS' => 'Test out user\'s permissions',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
<divclass="codebox"><pre>
...
'USE_PERMISSIONS' => 'Test out user’s permissions',
...
</pre></div>
...</pre>
</div>
<p>The <code>"</code> (straight double quote), <code><</code> (less-than sign) and <code>></code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
@@ -2489,8 +2491,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' => 'PHP version < 5.3.3.<br />
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Okay - No more invalid HTML, but "&quot;" is rather clumsy</p>
@@ -2498,8 +2500,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
@@ -2507,8 +2509,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
...
</pre></div>
...</pre>
</div>
<p>Lastly, the <code>&</code> (ampersand) must always be entitised regardless of where it is used:</p>
@@ -2517,16 +2519,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<divclass="codebox"><pre>
...
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
...
</pre></div>
...</pre>
</div>
<pclass="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
<p>As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see <ahref="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
@@ -2538,7 +2540,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<divclass="back2top"><ahref="#wrap"class="top">Back to Top</a></div>
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.