diff options
143 files changed, 2204 insertions, 503 deletions
diff --git a/.travis.yml b/.travis.yml index 2542898324..14cf3e6d6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,4 +50,3 @@ script: - sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi" - diff --git a/build/build.xml b/build/build.xml index 2d1a6eb51a..b8a88473ba 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ <project name="phpBB" description="The phpBB forum software" default="all" basedir="../"> <!-- a few settings for the build --> - <property name="newversion" value="3.1.7-dev" /> - <property name="prevversion" value="3.1.6" /> - <property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5" /> + <property name="newversion" value="3.1.8-dev" /> + <property name="prevversion" value="3.1.7" /> + <property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6" /> <!-- no configuration should be needed beyond this point --> <property name="oldversions" value="${olderversions}, ${prevversion}" /> diff --git a/phpBB/adm/style/acp_avatar_options_local.html b/phpBB/adm/style/acp_avatar_options_local.html index 8adafa1d99..bee3c57ea0 100644 --- a/phpBB/adm/style/acp_avatar_options_local.html +++ b/phpBB/adm/style/acp_avatar_options_local.html @@ -12,7 +12,7 @@ <!-- BEGIN avatar_local_col --> <li> <label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br /> - <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label> + <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}"<!-- IF avatar_local_row.avatar_local_col.CHECKED -->checked="checked"<!-- ENDIF --> /></label> </li> <!-- END avatar_local_col --> <!-- END avatar_local_row --> diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 9e9f05120a..f2249941a5 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -52,7 +52,7 @@ <legend>{L_TITLE}</legend> <dl> <dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt> - <dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd> + <dd><!-- EVENT acp_ban_cell_prepend --><textarea name="ban" cols="40" rows="3" id="ban"></textarea><!-- EVENT acp_ban_cell_append --></dd> <!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF --> </dl> <dl> diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index f4866653c3..0efbbac51e 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -8,6 +8,13 @@ <p>{L_ACP_VC_EXT_GET_MORE}</p> +<!-- IF ERROR_MSG --> +<div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{ERROR_MSG}</p> +</div> +<!-- ENDIF --> + <form id="acp_captcha" method="post" action="{U_ACTION}"> <fieldset> diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html index 63acd7fcc1..e14c56ab47 100644 --- a/phpBB/adm/style/acp_email.html +++ b/phpBB/adm/style/acp_email.html @@ -19,12 +19,14 @@ <legend>{L_COMPOSE}</legend> <dl> <dt><label for="group">{L_SEND_TO_GROUP}{L_COLON}</label></dt> + <!-- EVENT acp_email_group_options_prepend --> <dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd> + <!-- EVENT acp_email_group_options_append --> </dl> <dl> <dt><label for="usernames">{L_SEND_TO_USERS}{L_COLON}</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt> <dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd><!-- EVENT acp_email_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_email_find_username_append --></dd> </dl> <dl> <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt> diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html index fa261ed289..8feb12a423 100644 --- a/phpBB/adm/style/acp_ext_list.html +++ b/phpBB/adm/style/acp_ext_list.html @@ -47,7 +47,7 @@ <td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong></td> </tr> <!-- BEGIN enabled --> - <tr class="ext_enabled"> + <tr class="ext_enabled row-highlight"> <td><strong title="{enabled.NAME}">{enabled.META_DISPLAY_NAME}</strong></td> <td style="text-align: center;"> <!-- IF enabled.S_VERSIONCHECK --> @@ -72,7 +72,7 @@ <td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong></td> </tr> <!-- BEGIN disabled --> - <tr class="ext_disabled"> + <tr class="ext_disabled row-highlight"> <td><strong title="{disabled.NAME}">{disabled.META_DISPLAY_NAME}</strong></td> <td style="text-align: center;"> <!-- IF disabled.S_VERSIONCHECK --> diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 0d8b8ad583..dcad90d7bc 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -498,7 +498,7 @@ <fieldset class="quick"> {L_SELECT_FORUM}{L_COLON} <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select> - <input class="button2" type="submit" value="{L_GO}" /> + <!-- EVENT acp_forums_quick_select_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_forums_quick_select_button_append --> {S_FORM_TOKEN} </fieldset> </form> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index d24d62497d..23f6e744c0 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -236,7 +236,7 @@ <dl> <dt><label for="usernames">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt> <dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd><!-- EVENT acp_groups_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_groups_find_username_append --></dd> </dl> <p class="quick"> @@ -265,6 +265,7 @@ <form id="acp_groups" method="post" action="{U_ACTION}"> + <!-- EVENT acp_groups_manage_before --> <table class="table1"> <col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" /> <thead> @@ -285,6 +286,7 @@ <!-- ENDIF --> </tbody> </table> + <!-- EVENT acp_groups_manage_after --> <fieldset class="quick"> <!-- IF S_GROUP_ADD --> diff --git a/phpBB/adm/style/acp_groups_position.html b/phpBB/adm/style/acp_groups_position.html index c01f7aeb03..20ed9521f0 100644 --- a/phpBB/adm/style/acp_groups_position.html +++ b/phpBB/adm/style/acp_groups_position.html @@ -65,8 +65,10 @@ <option<!-- IF add_legend.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_legend.GROUP_ID}">{add_legend.GROUP_NAME}</option> <!-- END add_legend --> </select> + <!-- EVENT acp_groups_position_legend_add_button_before --> <input class="button2" type="submit" name="submit" value="{L_ADD}" /> <input type="hidden" name="action" value="add" /> + <!-- EVENT acp_groups_position_legend_add_button_after --> {S_FORM_TOKEN} </fieldset> </form> @@ -162,8 +164,10 @@ <option<!-- IF add_teampage.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_teampage.GROUP_ID}">{add_teampage.GROUP_NAME}</option> <!-- END add_teampage --> </select> + <!-- EVENT acp_groups_position_teampage_add_button_before --> <input class="button2" type="submit" name="submit" value="{L_ADD}" /> <input type="hidden" name="action" value="add" /> + <!-- EVENT acp_groups_position_teampage_add_button_after --> {S_FORM_TOKEN} </fieldset> </form> diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html index 409ea46de5..2aa3051f53 100644 --- a/phpBB/adm/style/acp_inactive.html +++ b/phpBB/adm/style/acp_inactive.html @@ -18,6 +18,7 @@ <thead> <tr> <th>{L_USERNAME}</th> + <th>{L_EMAIL}</th> <th>{L_JOINED}</th> <th>{L_INACTIVE_DATE}</th> <th>{L_LAST_VISIT}</th> @@ -32,6 +33,7 @@ {inactive.USERNAME_FULL} <!-- IF inactive.POSTS --><br />{L_POSTS}{L_COLON} <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF --> </td> + <td style="vertical-align: top;">{inactive.USER_EMAIL}</td> <td style="vertical-align: top;">{inactive.JOINED}</td> <td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td> <td style="vertical-align: top;">{inactive.LAST_VISIT}</td> diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 76ea801de0..cb15a8f51d 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -73,7 +73,7 @@ <!-- IF S_SHOW_FORUMS --> <fieldset class="quick"> {L_SELECT_FORUM}{L_COLON} <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select> - <input class="button2" type="submit" value="{L_GO}" /> + <!-- EVENT acp_logs_quick_select_forum_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_logs_quick_select_forum_button_append --> </fieldset> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 065dd7ac4f..4af3f1a62c 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -141,19 +141,24 @@ <td>{L_GZIP_COMPRESSION}{L_COLON} </td> <td><strong>{GZIP_COMPRESSION}</strong></td> </tr> + <!-- IF S_TOTAL_ORPHAN or S_VERSIONCHECK --> <tr> + <!-- IF S_VERSIONCHECK --> <td>{L_BOARD_VERSION}{L_COLON} </td> <td> - <strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ] + <strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;" <!-- ELSEIF not S_VERSIONCHECK_FAIL -->style="color: #BC2A4D;" <!-- ENDIF -->title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ] </td> + <!-- ENDIF --> <!-- IF S_TOTAL_ORPHAN --> <td>{L_NUMBER_ORPHAN}{L_COLON} </td> <td><strong>{TOTAL_ORPHAN}</strong></td> - <!-- ELSE --> + <!-- ENDIF --> + <!-- IF not S_TOTAL_ORPHAN or not S_VERSIONCHECK --> <td> </td> <td> </td> <!-- ENDIF --> </tr> + <!-- ENDIF --> </tbody> </table> diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index 6dc9dca2e7..a4d33ed78b 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -30,7 +30,7 @@ <legend>{L_LOOK_UP_FORUM}</legend> <!-- IF S_FORUM_MULTIPLE --><p>{L_LOOK_UP_FORUMS_EXPLAIN}</p><!-- ENDIF --> <dl> - <dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt> + <dt><!-- EVENT acp_permissions_select_multiple_forum_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_multiple_forum_append --></dt> <dd><select id="forum" name="forum_id[]"<!-- IF S_FORUM_MULTIPLE --> multiple="multiple"<!-- ENDIF --> size="10">{S_FORUM_OPTIONS}</select></dd> <!-- IF S_FORUM_ALL --><dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd><!-- ENDIF --> </dl> @@ -52,7 +52,7 @@ <legend>{L_LOOK_UP_FORUM}</legend> <p>{L_SELECT_FORUM_SUBFORUM_EXPLAIN}</p> <dl> - <dt><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt> + <dt><!-- EVENT acp_permissions_select_forum_prepend --><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_forum_append --></dt> <dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd> </dl> @@ -95,7 +95,7 @@ <fieldset> <legend>{L_LOOK_UP_GROUP}</legend> <dl> - <dt><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label></dt> + <dt><!-- EVENT acp_permissions_select_group_prepend --><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label><!-- EVENT acp_permissions_select_group_append --></dt> <dd><select name="group_id[]" id="group">{S_GROUP_OPTIONS}</select></dd> </dl> @@ -140,7 +140,7 @@ <p>{L_USERNAMES_EXPLAIN}</p> <dl> <dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd> - <dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd> + <dd class="full" style="text-align: left;"><!-- EVENT acp_permissions_find_username_prepend --><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><!-- EVENT acp_permissions_find_username_append --><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd> </dl> </fieldset> @@ -183,7 +183,7 @@ <fieldset> <legend>{L_ADD_GROUPS}</legend> <dl> - <dd class="full"><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select></dd> + <dd class="full"><!-- EVENT acp_permissions_add_group_options_prepend --><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select><!-- EVENT acp_permissions_add_group_options_append --></dd> </dl> </fieldset> @@ -267,7 +267,9 @@ <legend>{L_LOOK_UP_GROUP}</legend> <dl> <dt><label for="group_select">{L_LOOK_UP_GROUP}{L_COLON}</label></dt> + <!-- EVENT acp_permissions_select_group_before --> <dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd> + <!-- EVENT acp_permissions_select_group_after --> <dd> </dd> </dl> </fieldset> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 3ce2d9471d..07718846cc 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -17,7 +17,7 @@ </div> <!-- ENDIF --> - <form id="add_profile_field" method="post" action="{U_ACTION}"> + <form id="add_profile_field" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}> <!-- IF S_STEP_ONE --> diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index 4d748f1cce..b8c681ea00 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -43,7 +43,7 @@ <legend>{L_SELECT_FORUM}</legend> <p>{L_LOOK_UP_FORUMS_EXPLAIN}</p> <dl> - <dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt> + <dt><!-- EVENT acp_prune_forums_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_prune_forums_append --></dt> <dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd> <dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd> </dl> diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index b8c271355b..6e8b2e4214 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -50,7 +50,7 @@ <dl> <dt><label for="users">{L_ACP_PRUNE_USERS}{L_COLON}</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt> <dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd><!-- EVENT acp_prune_users_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_prune_users_find_username_append --></dd> </dl> </fieldset> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 92ceaebc08..a36d15fe73 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -87,6 +87,7 @@ <!-- ENDIF --> <!-- IF .styles_list --> + <!-- EVENT acp_styles_list_before --> <table class="table1 styles"> <thead> <tr> @@ -99,7 +100,7 @@ </thead> <!-- BEGIN styles_list --> <tbody id="styles-list-{styles_list.S_ROW_COUNT}"> - <tr<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> class="row-inactive"<!-- ENDIF -->> + <tr class="row-highlight<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> row-inactive<!-- ENDIF -->"> <!-- IF styles_list.LEVEL is odd --> <!-- IF $ROW_CLASS == 'row1a' --><!-- DEFINE $ROW_CLASS = 'row1b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row1a' --><!-- ENDIF --> <!-- ELSE --> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 25064c6f3a..18c3d84f96 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -146,7 +146,9 @@ <!-- IF S_GROUP_OPTIONS --> <fieldset class="quick"> + <!-- EVENT acp_users_select_group_before --> {L_USER_GROUP_ADD}{L_COLON} <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + <!-- EVENT acp_users_select_group_after --> {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index 573534fc95..9296638ff6 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -1,4 +1,4 @@ - <form id="user_profile" method="post" action="{U_ACTION}"> + <form id="user_profile" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}> <fieldset> <legend>{L_USER_PROFILE}</legend> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 396b21e3eb..0c00e5339e 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -859,6 +859,8 @@ table.zebra-table tbody tr:nth-child(even) { .row2a { background-color: #E7EEF4; } .row2b { background-color: #E3EBF2; } +tr.row-highlight:hover td { background-color: #DBDFE2; } + .spacer { background-color: #DBDFE2; height: 1px; diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index a29fce6c5a..8e7599dc3f 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -12,7 +12,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF --> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS admin.js --> {$SCRIPTS} diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index deb38c8691..8745286d64 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -34,7 +34,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS ajax.js --> <!-- INCLUDEJS admin.js --> diff --git a/phpBB/adm/style/permission_forum_copy.html b/phpBB/adm/style/permission_forum_copy.html index 1e012a9347..b1539aff12 100644 --- a/phpBB/adm/style/permission_forum_copy.html +++ b/phpBB/adm/style/permission_forum_copy.html @@ -12,7 +12,7 @@ <legend>{L_LOOK_UP_FORUM}</legend> <dl> - <dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt> + <dt><!-- EVENT acp_permission_forum_copy_src_forum_prepend --><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_src_forum_append --></dt> <dd><select id="src_forum" name="src_forum_id"><option value="0">{L_SELECT_FORUM}</option><option value="-1">------------------</option>{S_FORUM_OPTIONS}</select></dd> </dl> </fieldset> @@ -22,7 +22,7 @@ <p>{L_LOOK_UP_FORUMS_EXPLAIN}</p> <dl> - <dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt> + <dt><!-- EVENT acp_permission_forum_copy_dest_forum_prepend --><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_dest_forum_append --></dt> <dd><select id="dest_forums" name="dest_forum_ids[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd> </dl> </fieldset> diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index c08fd931a0..08ee0a739f 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,7 +17,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- EVENT acp_simple_footer_after --> diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 36e881f5fd..228230ff71 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -303,6 +303,10 @@ phpbb.ajaxify = function(options) { alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT); } else { $dark.fadeOut(phpbb.alertTime); + + if ($loadingIndicator) { + $loadingIndicator.fadeOut(phpbb.alertTime); + } } if (typeof phpbb.ajaxCallbacks[callback] === 'function') { diff --git a/phpBB/composer.json b/phpBB/composer.json index af1cd2b329..8a177b3cf4 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -25,7 +25,7 @@ "phpbb/phpbb-core": "self.version" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.3,<7.0", "lusitanian/oauth": "0.2.*", "symfony/config": "2.3.*", "symfony/console": "2.3.*", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index d24c163b70..0d489a22da 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -109,26 +109,23 @@ }, { "name": "symfony/config", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Config", "source": { "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "75ab3b117c690d4421d9e83f87df89755778d788" + "url": "https://github.com/symfony/config.git", + "reference": "665b906c22103bb36eaeff31cc3063b53ed4eae5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/75ab3b117c690d4421d9e83f87df89755778d788", - "reference": "75ab3b117c690d4421d9e83f87df89755778d788", + "url": "https://api.github.com/repos/symfony/config/zipball/665b906c22103bb36eaeff31cc3063b53ed4eae5", + "reference": "665b906c22103bb36eaeff31cc3063b53ed4eae5", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/filesystem": "~2.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -138,7 +135,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Config\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -156,29 +156,28 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-07-15 17:51:32" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/console", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Console", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "cb9006df9d50f1dd7b9dfa3e4ad8942acde9f76c" + "url": "https://github.com/symfony/console.git", + "reference": "ed9c6cad324afb02672fa8ebf55fe0feb1659067" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/cb9006df9d50f1dd7b9dfa3e4ad8942acde9f76c", - "reference": "cb9006df9d50f1dd7b9dfa3e4ad8942acde9f76c", + "url": "https://api.github.com/repos/symfony/console/zipball/ed9c6cad324afb02672fa8ebf55fe0feb1659067", + "reference": "ed9c6cad324afb02672fa8ebf55fe0feb1659067", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7" + "symfony/event-dispatcher": "~2.1" }, "suggest": { "symfony/event-dispatcher": "" @@ -192,7 +191,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Console\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -210,21 +212,21 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-08-31 12:48:21" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/debug", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "77d632fd7265fe55bd20882685998ec1f3415a64" + "url": "https://github.com/symfony/debug.git", + "reference": "c0f543d3c40f5b885a68bc87ef1f2f8aec8e0424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/77d632fd7265fe55bd20882685998ec1f3415a64", - "reference": "77d632fd7265fe55bd20882685998ec1f3415a64", + "url": "https://api.github.com/repos/symfony/debug/zipball/c0f543d3c40f5b885a68bc87ef1f2f8aec8e0424", + "reference": "c0f543d3c40f5b885a68bc87ef1f2f8aec8e0424", "shasum": "" }, "require": { @@ -235,8 +237,7 @@ }, "require-dev": { "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2", - "symfony/phpunit-bridge": "~2.7" + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" }, "suggest": { "symfony/class-loader": "", @@ -252,7 +253,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Debug\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -270,21 +274,21 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2015-07-28 12:38:40" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/dependency-injection", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "3f85e842b92c552f520ae2ea628be4aab2810fdb" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "d3c6bcab8f626c32e687f8b77d683f8a9f1f4be3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3f85e842b92c552f520ae2ea628be4aab2810fdb", - "reference": "3f85e842b92c552f520ae2ea628be4aab2810fdb", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d3c6bcab8f626c32e687f8b77d683f8a9f1f4be3", + "reference": "d3c6bcab8f626c32e687f8b77d683f8a9f1f4be3", "shasum": "" }, "require": { @@ -292,7 +296,6 @@ }, "require-dev": { "symfony/config": "~2.2", - "symfony/phpunit-bridge": "~2.7", "symfony/yaml": "~2.1" }, "suggest": { @@ -309,7 +312,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\DependencyInjection\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -327,29 +333,28 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-08-01 07:45:23" + "time": "2015-11-19 14:08:33" }, { "name": "symfony/event-dispatcher", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "af8fba40bdab97fc666173a8c2087e02445c231c" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "08564581a8444035d0874efc35a6366be8c0af9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/af8fba40bdab97fc666173a8c2087e02445c231c", - "reference": "af8fba40bdab97fc666173a8c2087e02445c231c", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/08564581a8444035d0874efc35a6366be8c0af9e", + "reference": "08564581a8444035d0874efc35a6366be8c0af9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "symfony/dependency-injection": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7" + "symfony/dependency-injection": "~2.0,>=2.0.5" }, "suggest": { "symfony/dependency-injection": "", @@ -364,7 +369,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -382,29 +390,26 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-05-15 13:28:34" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/filesystem", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "2d4e4e21e2b5e4720555811fe8f4a8873cfa0f0f" + "url": "https://github.com/symfony/filesystem.git", + "reference": "d72d4b276921c2388ac09a5a6716e10d57a6e89b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d4e4e21e2b5e4720555811fe8f4a8873cfa0f0f", - "reference": "2d4e4e21e2b5e4720555811fe8f4a8873cfa0f0f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d72d4b276921c2388ac09a5a6716e10d57a6e89b", + "reference": "d72d4b276921c2388ac09a5a6716e10d57a6e89b", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -414,7 +419,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -432,29 +440,26 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-08-29 10:34:03" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/http-foundation", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "fd351e4abb56b05ba05023f6ae4185873978da10" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "2242d5d7b12ee2291bbaac161d94ea312a9c0d1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/fd351e4abb56b05ba05023f6ae4185873978da10", - "reference": "fd351e4abb56b05ba05023f6ae4185873978da10", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2242d5d7b12ee2291bbaac161d94ea312a9c0d1f", + "reference": "2242d5d7b12ee2291bbaac161d94ea312a9c0d1f", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -467,6 +472,9 @@ }, "classmap": [ "Symfony/Component/HttpFoundation/Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -485,21 +493,21 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2015-08-25 21:41:39" + "time": "2015-11-19 16:24:57" }, { "name": "symfony/http-kernel", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "15604f5b95a72ccdc38c318e14e9147e2e51bfa2" + "url": "https://github.com/symfony/http-kernel.git", + "reference": "a79bd3b40c73fd504d1e66ab6c40cdede509c600" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/15604f5b95a72ccdc38c318e14e9147e2e51bfa2", - "reference": "15604f5b95a72ccdc38c318e14e9147e2e51bfa2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a79bd3b40c73fd504d1e66ab6c40cdede509c600", + "reference": "a79bd3b40c73fd504d1e66ab6c40cdede509c600", "shasum": "" }, "require": { @@ -518,7 +526,6 @@ "symfony/dependency-injection": "~2.2", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/finder": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7", "symfony/process": "~2.0,>=2.0.5", "symfony/routing": "~2.2", "symfony/stopwatch": "~2.3", @@ -541,7 +548,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\HttpKernel\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -559,21 +569,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2015-09-01 15:40:52" + "time": "2015-11-23 10:44:06" }, { "name": "symfony/routing", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "fbadda8d2a35bdec8187bd54f698b8b704649721" + "url": "https://github.com/symfony/routing.git", + "reference": "08a4065c47b45a1785101aabb29082fe415cec6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/fbadda8d2a35bdec8187bd54f698b8b704649721", - "reference": "fbadda8d2a35bdec8187bd54f698b8b704649721", + "url": "https://api.github.com/repos/symfony/routing/zipball/08a4065c47b45a1785101aabb29082fe415cec6c", + "reference": "08a4065c47b45a1785101aabb29082fe415cec6c", "shasum": "" }, "require": { @@ -584,7 +594,6 @@ "psr/log": "~1.0", "symfony/config": "~2.2", "symfony/http-foundation": "~2.3", - "symfony/phpunit-bridge": "~2.7", "symfony/yaml": "~2.0,>=2.0.5" }, "suggest": { @@ -601,7 +610,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Routing\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -619,29 +631,26 @@ ], "description": "Symfony Routing Component", "homepage": "https://symfony.com", - "time": "2015-08-01 19:33:42" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/yaml", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "162a8860e58bcd9d316e04e3af8ff96e63cb1cdb" + "url": "https://github.com/symfony/yaml.git", + "reference": "6d7a3b7cfdd5095e5f4318ad4c2ed20c71c74764" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/162a8860e58bcd9d316e04e3af8ff96e63cb1cdb", - "reference": "162a8860e58bcd9d316e04e3af8ff96e63cb1cdb", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6d7a3b7cfdd5095e5f4318ad4c2ed20c71c74764", + "reference": "6d7a3b7cfdd5095e5f4318ad4c2ed20c71c74764", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -651,7 +660,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -669,7 +681,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-08-11 07:25:28" + "time": "2015-11-18 08:19:46" }, { "name": "twig/twig", @@ -828,6 +840,7 @@ "event", "exception" ], + "abandoned": "guzzle/guzzle", "time": "2013-09-08 21:09:18" }, { @@ -885,6 +898,7 @@ "http", "http client" ], + "abandoned": "guzzle/guzzle", "time": "2013-09-06 11:34:26" }, { @@ -929,6 +943,7 @@ "message", "url" ], + "abandoned": "guzzle/guzzle", "time": "2013-07-11 22:46:03" }, { @@ -982,6 +997,7 @@ "component", "stream" ], + "abandoned": "guzzle/guzzle", "time": "2013-07-30 22:07:23" }, { @@ -1891,7 +1907,8 @@ }, { "name": "Adam Harvey", - "email": "aharvey@php.net" + "email": "aharvey@php.net", + "role": "Lead" }, { "name": "Bernhard Schussek", @@ -2017,17 +2034,17 @@ }, { "name": "symfony/browser-kit", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "85afdbfbc789709192a9c5f37268063b18fc861d" + "url": "https://github.com/symfony/browser-kit.git", + "reference": "65576a393a8372e68ffe57706c1c9eb93e2aac98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/85afdbfbc789709192a9c5f37268063b18fc861d", - "reference": "85afdbfbc789709192a9c5f37268063b18fc861d", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/65576a393a8372e68ffe57706c1c9eb93e2aac98", + "reference": "65576a393a8372e68ffe57706c1c9eb93e2aac98", "shasum": "" }, "require": { @@ -2036,8 +2053,7 @@ }, "require-dev": { "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.0,>=2.0.5" + "symfony/process": "~2.3.34|~2.7,>=2.7.6" }, "suggest": { "symfony/process": "" @@ -2051,7 +2067,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\BrowserKit\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2069,29 +2088,26 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2015-07-05 14:01:47" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/css-selector", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "75cc67b407df5617fd58c40caa872e9d81de38cc" + "url": "https://github.com/symfony/css-selector.git", + "reference": "93cccf44bf22103694611dc1802714d2cd36f5fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/75cc67b407df5617fd58c40caa872e9d81de38cc", - "reference": "75cc67b407df5617fd58c40caa872e9d81de38cc", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/93cccf44bf22103694611dc1802714d2cd36f5fb", + "reference": "93cccf44bf22103694611dc1802714d2cd36f5fb", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -2101,7 +2117,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\CssSelector\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2123,29 +2142,28 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2015-05-15 13:28:34" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/dom-crawler", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "da19f268a3f6ec68b77706c06fd874ddbb073011" + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "be39e9bc2a3ae45a876174e8a2c49e263541a754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/da19f268a3f6ec68b77706c06fd874ddbb073011", - "reference": "da19f268a3f6ec68b77706c06fd874ddbb073011", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/be39e9bc2a3ae45a876174e8a2c49e263541a754", + "reference": "be39e9bc2a3ae45a876174e8a2c49e263541a754", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/phpunit-bridge": "~2.7" + "symfony/css-selector": "~2.0,>=2.0.5" }, "suggest": { "symfony/css-selector": "" @@ -2159,7 +2177,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\DomCrawler\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2177,29 +2198,26 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2015-08-25 21:41:39" + "time": "2015-11-02 18:22:02" }, { "name": "symfony/finder", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "87a0f52f6ec3061499a71e225145a031afa22511" + "url": "https://github.com/symfony/finder.git", + "reference": "5baf7b74657db10c4ad8ca0934be74151268b741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/87a0f52f6ec3061499a71e225145a031afa22511", - "reference": "87a0f52f6ec3061499a71e225145a031afa22511", + "url": "https://api.github.com/repos/symfony/finder/zipball/5baf7b74657db10c4ad8ca0934be74151268b741", + "reference": "5baf7b74657db10c4ad8ca0934be74151268b741", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -2209,7 +2227,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2227,29 +2248,26 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-08-26 16:41:06" + "time": "2015-11-18 08:19:46" }, { "name": "symfony/process", - "version": "v2.3.32", + "version": "v2.3.35", "target-dir": "Symfony/Component/Process", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "55aec78e1ff04c40ca2cbcb7a119581cdf4e5d82" + "url": "https://github.com/symfony/process.git", + "reference": "4d0eaad4b1153174dce6db15e26764de20e7b43d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/55aec78e1ff04c40ca2cbcb7a119581cdf4e5d82", - "reference": "55aec78e1ff04c40ca2cbcb7a119581cdf4e5d82", + "url": "https://api.github.com/repos/symfony/process/zipball/4d0eaad4b1153174dce6db15e26764de20e7b43d", + "reference": "4d0eaad4b1153174dce6db15e26764de20e7b43d", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { @@ -2259,7 +2277,10 @@ "autoload": { "psr-0": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2277,7 +2298,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-08-25 21:41:39" + "time": "2015-11-19 12:49:26" } ], "aliases": [], diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index b1db7b6f36..a59ea31509 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -49,6 +49,7 @@ <ol> <li><a href="#changelog">Changelog</a> <ul> + <li><a href="#v316">Changes since 3.1.6</a></li> <li><a href="#v315">Changes since 3.1.5</a></li> <li><a href="#v314">Changes since 3.1.4</a></li> <li><a href="#v313">Changes since 3.1.3</a></li> @@ -113,6 +114,113 @@ <div class="content"> + <a name="v316"></a><h3>Changes since 3.1.6</h3> + + <h4>Bug</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8839">PHPBB3-8839</a>] - Wrong new status of subforumlink on index</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8920">PHPBB3-8920</a>] - PM-Report for every moderator</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9153">PHPBB3-9153</a>] - New member can delete pm just in one way</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9252">PHPBB3-9252</a>] - Conflict when (dis)approving a post by two moderators at the same time</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11468">PHPBB3-11468</a>] - Controllers can not set additional parameters of page_header()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11971">PHPBB3-11971</a>] - Validating not correctly in Spambot countermeasures</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12616">PHPBB3-12616</a>] - Report notification is not removed when post is disapproved or deleted</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13202">PHPBB3-13202</a>] - dead code in sessions.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13423">PHPBB3-13423</a>] - Driver sqlite3 failed periodically</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13636">PHPBB3-13636</a>] - Unexpect return to previous page behaviour</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13656">PHPBB3-13656</a>] - database_upgrade.php fails when database password contains a % character</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13748">PHPBB3-13748</a>] - Wrong tooltip after poll vote change</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13759">PHPBB3-13759</a>] - submit_post doesn't take $data['post_time'] - into account</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13799">PHPBB3-13799</a>] - Avatar gallery subfolders paths are handled incorrectly</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13831">PHPBB3-13831</a>] - Post deletion reason is not appearing on moderation logs</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13835">PHPBB3-13835</a>] - File upload of large files where filename contains umlauts fails</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13846">PHPBB3-13846</a>] - Permissions around soft deleting are inconsistently handled</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13851">PHPBB3-13851</a>] - "Can ignore flood limit" permission not taking effect</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13892">PHPBB3-13892</a>] - "Someone reports a post" notification setting has no effect</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13945">PHPBB3-13945</a>] - Account re-activation does not create a notification</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13950">PHPBB3-13950</a>] - If disabled extension - no hidden permission set</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13960">PHPBB3-13960</a>] - Profile field validation may break</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13976">PHPBB3-13976</a>] - Fix comment typo in salted_md5 driver</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13988">PHPBB3-13988</a>] - Atom feeds use relative links for image attachments</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13992">PHPBB3-13992</a>] - Fix html5 error from output on w3.org its new validator</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14058">PHPBB3-14058</a>] - subsilver2 Contact us form doesn't have an email subject field</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14070">PHPBB3-14070</a>] - Disabled avatar types is still displayed on the forum</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14106">PHPBB3-14106</a>] - Sorting is unworkable while moderating forum (merge topics)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14114">PHPBB3-14114</a>] - Inconsistency in install.html in 3.1.x Automatic uopdate package</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14127">PHPBB3-14127</a>] - Error in the BBCode FAQ in 'Linking to another site'</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14142">PHPBB3-14142</a>] - Remove unused ignore_configs from avatar drivers</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14143">PHPBB3-14143</a>] - Flush the in-memory mail queue when writing it to the disk</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14153">PHPBB3-14153</a>] - Notifications dropdown header doesn't clear floats</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14159">PHPBB3-14159</a>] - Not accessible link on main ACP page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14161">PHPBB3-14161</a>] - The core.download_file_send_to_browser_before - $vars - 'extension' it does not exist</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14163">PHPBB3-14163</a>] - Select All in code bug in Edge</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14181">PHPBB3-14181</a>] - Custom report/denial reason not shown in user notifications</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14186">PHPBB3-14186</a>] - Incorrect string concatenation in phpbb_mcp_sorting()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14200">PHPBB3-14200</a>] - Allow hidden users to see theself on viewonline</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14215">PHPBB3-14215</a>] - [ticket/14212] - Adding event after users have been removed to a group</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14217">PHPBB3-14217</a>] - [ticket/13591] - Change SQL query into array to allow</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14224">PHPBB3-14224</a>] - Fix trailing whitespaces</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14228">PHPBB3-14228</a>] - Vertical align of numbers in polls</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14236">PHPBB3-14236</a>] - Race condition in the functional tests</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14242">PHPBB3-14242</a>] - Fix on memberlist the sort method.</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14249">PHPBB3-14249</a>] - Online list isn't sorted anymore</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14258">PHPBB3-14258</a>] - Add event in auth::Login</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14271">PHPBB3-14271</a>] - Update nginx sample config</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14276">PHPBB3-14276</a>] - Function get_folder_status not setup for use of plurals</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14287">PHPBB3-14287</a>] - Loading indicator not removed after confirming action that does not produce a message</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14297">PHPBB3-14297</a>] - Uppercase and lowercase when sorting topics</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14334">PHPBB3-14334</a>] - Do not use deprecated function get_user_avatar() in user_loader</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14339">PHPBB3-14339</a>] - State support for PHP 7.0 in docs</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14346">PHPBB3-14346</a>] - Improve version check output when phpbb.com is unreachable</li> + </ul> + <h4>Improvement</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7362">PHPBB3-7362</a>] - Title/Post Icons Need Attribute Text</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8800">PHPBB3-8800</a>] - Add "mark topics read" link to "View unread posts"</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10343">PHPBB3-10343</a>] - ACP: searching for users does not show inactive accounts</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13684">PHPBB3-13684</a>] - Only resize attached file comments vertically</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13934">PHPBB3-13934</a>] - Enctype clause for forms may be needed for profile fields</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14066">PHPBB3-14066</a>] - Add template events to search_body.html</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14073">PHPBB3-14073</a>] - Add core events to the several places in includes/functions_admin.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14075">PHPBB3-14075</a>] - Event in posting preview</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14080">PHPBB3-14080</a>] - Add template events to viewforum_body.html before/after/append/prepend the topic row</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14088">PHPBB3-14088</a>] - Add core events to the search.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14089">PHPBB3-14089</a>] - [Template] - posting_topic_title_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14098">PHPBB3-14098</a>] - Add core events to the search backends (fulltext_*.php)</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14102">PHPBB3-14102</a>] - Add core event to the mcp_topic.php</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14113">PHPBB3-14113</a>] - Add core events to the memberlist.php for customizing members search</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14117">PHPBB3-14117</a>] - Add core events to index.php to allow modifying birthdays list</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14123">PHPBB3-14123</a>] - Add more descriptive help to the CLI commands</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14126">PHPBB3-14126</a>] - Add viewtopic_topic_title_after template event</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14133">PHPBB3-14133</a>] - Comment fix for phpbb_get_user_rank()</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14154">PHPBB3-14154</a>] - Include "Clean Name" for disabled Extensions</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14155">PHPBB3-14155</a>] - Add row highlighting to extensions and style management</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14156">PHPBB3-14156</a>] - Add the Symfony ResponseListener</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14164">PHPBB3-14164</a>] - Helpful instructions for database updates</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14170">PHPBB3-14170</a>] - Fix mcp_change_poster_after event</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14201">PHPBB3-14201</a>] - Add ACP template events</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14213">PHPBB3-14213</a>] - [PHP] - core.group_add_user_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14219">PHPBB3-14219</a>] - Add email address into inactive user display in ACP</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14261">PHPBB3-14261</a>] - Pages served from app.php can't disable the update of session_page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14283">PHPBB3-14283</a>] - Add a "Manage Group" link on a group page</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14313">PHPBB3-14313</a>] - Don't display quote button on unapproved posts</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14343">PHPBB3-14343</a>] - Add event when locking/unlocking posts/topics</li> + </ul> + <h4>New Feature</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14144">PHPBB3-14144</a>] - [Template] - quickreply_editor_subject_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14146">PHPBB3-14146</a>] - [Template] - viewtopic_body_post_subject_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14187">PHPBB3-14187</a>] - [ACP Template] - acp_styles_before_table</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14188">PHPBB3-14188</a>] - [PHP] - core.acp_styles_action_before</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14191">PHPBB3-14191</a>] - [PHP] - core.get_gravatar_url_after</li> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14192">PHPBB3-14192</a>] - [PHP] - core.memberlist_memberrow_before</li> + </ul> + <h4>Task</h4> + <ul> + <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14140">PHPBB3-14140</a>] - Update Symfony to benefit from improvement to the console component</li> + </ul> + + <a name="v315"></a><h3>Changes since 3.1.5</h3> <h4>Bug</h4> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 132367dd0a..2929c7be28 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -147,7 +147,7 @@ <li>Oracle</li> </ul> </li> - <li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li> + <li><strong>PHP 5.3.3+</strong> and <strong>PHP < 7.0</strong> with support for the database you intend to use.</li> <li>The following PHP modules are required: <ul> <li>json</li> @@ -265,7 +265,7 @@ <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> <a name="update_full"></a><h3>4.i. Full package</h3> @@ -273,7 +273,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 <a href="#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> @@ -285,7 +285,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> <a name="update_patch"></a><h3>4.iii. Patch file</h3> @@ -297,13 +297,13 @@ <p>If you do get failures, you should look at using the <a href="#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> <a name="update_auto"></a><h3>4.iv. Automatic update package</h3> <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.13</strong>, you need the <code>phpBB-3.0.13_to_3.0.14.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> diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 21639045a3..4b85735463 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -323,7 +323,7 @@ <div class="content"> - <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> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 2639871cae..fdcd649030 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1,3 +1,15 @@ +acp_ban_cell_append +=== +* Location: adm/style/acp_ban.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the end of the ban cell area + +acp_ban_cell_prepend +=== +* Location: adm/style/acp_ban.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the start of the ban cell area + acp_bbcodes_actions_append === * Location: adm/style/acp_bbcodes.html @@ -16,6 +28,30 @@ acp_bbcodes_edit_fieldsets_after * Since: 3.1.0-a3 * Purpose: Add settings to BBCode add/edit form +acp_email_group_options_append +=== +* Location: adm/style/acp_email.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the end of the group options select box + +acp_email_group_options_prepend +=== +* Location: adm/style/acp_email.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the start of the group options select box + +acp_email_find_username_append +=== +* Location: adm/style/acp_email.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the end of the fimd username link + +acp_email_find_username_prepend +=== +* Location: adm/style/acp_email.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the start of the fimd username link + acp_email_options_after === * Location: adm/style/acp_email.html @@ -64,6 +100,18 @@ acp_forums_prune_settings_prepend * Since: 3.1.2-RC1 * Purpose: Add settings to forums before prune settings section +acp_forums_quick_select_button_append +=== +* Location: adm/style/acp_forums.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the quick select forum submit button + +acp_forums_quick_select_button_prepend +=== +* Location: adm/style/acp_forums.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the quick select forum submit button + acp_forums_rules_settings_append === * Location: adm/style/acp_forums.html @@ -88,6 +136,66 @@ acp_group_options_after * Since: 3.1.0-b4 * Purpose: Add addtional options to group settings (after GROUP_RECEIVE_PM) +acp_groups_find_username_append +=== +* Location: adm/style/acp_groups.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the end of the find username link + +acp_groups_find_username_prepend +=== +* Location: adm/style/acp_groups.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the start of the find username link + +acp_groups_manage_after +=== +* Location: adm/style/acp_groups.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the manage groups table + +acp_groups_manage_before +=== +* Location: adm/style/acp_groups.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the manage groups table + +acp_groups_position_legend_add_button_after +=== +* Location: adm/style/acp_groups_position.html +* Since: 3.1.7-RC1 +* Purpose: Add content after adding group to legend submit button + +acp_groups_position_legend_add_button_before +=== +* Location: adm/style/acp_groups_position.html +* Since: 3.1.7-RC1 +* Purpose: Add content before adding group to legend submit button + +acp_groups_position_teampage_add_button_after +=== +* Location: adm/style/acp_groups_position.html +* Since: 3.1.7-RC1 +* Purpose: Add content after adding group to teampage submit button + +acp_groups_position_teampage_add_button_before +=== +* Location: adm/style/acp_groups_position.html +* Since: 3.1.7-RC1 +* Purpose: Add content before adding group to teampage submit button + +acp_logs_quick_select_forum_button_append +=== +* Location: adm/style/acp_logs.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the quick forum select form submit button + +acp_logs_quick_select_forum_button_prepend +=== +* Location: adm/style/acp_logs.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the quick forum select form submit button + acp_main_actions_append === * Location: adm/style/acp_main.html @@ -125,6 +233,102 @@ acp_overall_header_stylesheets_after * Purpose: Add assets after stylesheets within the `<head>` tags in the ACP. Note that INCLUDECSS will not work with this event. +acp_permission_forum_copy_src_forum_append +=== +* Location: adm/style/permission_forum_copy.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the sourse forum select form + +acp_permission_forum_copy_src_forum_prepend +=== +* Location: adm/style/permission_forum_copy.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the sourse forum select form + +acp_permission_forum_copy_dest_forum_append +=== +* Location: adm/style/permission_forum_copy.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the destiny forum select form + +acp_permission_forum_copy_dest_forum_prepend +=== +* Location: adm/style/permission_forum_copy.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the destiny forum select form + +acp_permissions_add_group_options_append +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the group multiple select form + +acp_permissions_add_group_options_prepend +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the group multiple select form + +acp_permissions_find_username_append +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the find username link + +acp_permissions_find_username_prepend +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the find username link + +acp_permissions_select_forum_append +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the forum select form label + +acp_permissions_select_forum_prepend +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the forum select form label + +acp_permissions_select_group_after +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the group select form in usergroup view + +acp_permissions_select_group_append +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the group select form label + +acp_permissions_select_group_before +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the group select form in usergroup view + +acp_permissions_select_group_prepend +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the group select form label + +acp_permissions_select_multiple_forum_append +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the forum multiple select form label + +acp_permissions_select_multiple_forum_prepend +=== +* Location: adm/style/acp_permissions.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the forum multiple select form label + acp_posting_buttons_after === * Locations: @@ -146,6 +350,34 @@ acp_profile_contact_before * Since: 3.1.6-RC1 * Purpose: Add extra options to custom profile field configuration in the ACP +acp_prune_forums_append +=== +* Locations: + + adm/style/acp_prune_forums.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the forum select form label + +acp_prune_forums_prepend +=== +* Locations: + + adm/style/acp_prune_forums.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the forum select form label + +acp_prune_users_find_username_append +=== +* Locations: + + adm/style/acp_prune_users.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the find username link + +acp_prune_users_find_username_prepend +=== +* Locations: + + adm/style/acp_prune_users.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the find username link + acp_ranks_edit_after === * Locations: @@ -190,6 +422,13 @@ acp_ranks_list_header_before * Purpose: Add content after the last header-column (but before the action column) in the ranks list in the ACP +acp_styles_list_before +=== +* Locations: + + adm/style/acp_styles.html +* Since: 3.1.7-RC1 +* Purpose: Add content before list of styles + acp_users_profile_before === * Locations: @@ -290,6 +529,18 @@ acp_users_prefs_view_prepend * Since: 3.1.0-b3 * Purpose: Add user options fieldset to the top of ACP users view prefs settings +acp_users_select_group_after +=== +* Location: adm/style/acp_users.html +* Since: 3.1.7-RC1 +* Purpose: Add content after group select form + +acp_users_select_group_before +=== +* Location: adm/style/acp_users.html +* Since: 3.1.7-RC1 +* Purpose: Add content before group select form + attachment_file_after === * Locations: @@ -1291,6 +1542,22 @@ quickreply_editor_message_before * Since: 3.1.0-a4 * Purpose: Add content before the quick reply textbox +quickreply_editor_subject_before +=== +* Locations: + + styles/prosilver/template/quickreply_editor.html + + styles/subsilver2/template/quickreply_editor.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the quick reply subject textbox + +search_body_form_after +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search form + search_body_form_before === * Locations: @@ -1299,6 +1566,102 @@ search_body_form_before * Since: 3.1.5-RC1 * Purpose: Add content before the search form +search_body_recent_search_after +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the recent search queries list + +search_body_recent_search_before +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the recent search queries list + +search_body_search_display_options_append +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query display options fields set + +search_body_search_display_options_prepend +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query display options fields set + +search_body_search_options_after +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search query options fields set + +search_body_search_options_append +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query options fields set + +search_body_search_options_before +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the search query options fields set + +search_body_search_options_prepend +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query options fields set + +search_body_search_query_after +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the search query fields set + +search_body_search_query_append +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the bottom of the search query fields set + +search_body_search_query_before +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the search query fields set + +search_body_search_query_prepend +=== +* Locations: + + styles/prosilver/template/search_body.html + + styles/subsilver2/template/search_body.html +* Since: 3.1.7-RC1 +* Purpose: Put content at the top of the search query fields set + search_results_header_after === * Locations: @@ -1770,6 +2133,38 @@ ucp_friend_list_after * Since: 3.1.0-a4 * Purpose: Add optional elements after list of friends in UCP +viewforum_body_topic_row_after +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content after the topic list item. + +viewforum_body_topic_row_append +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the start of the topic list item. + +viewforum_body_topic_row_before +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content before the topic list item. + +viewforum_body_topic_row_prepend +=== +* Locations: + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/viewforum_body.html +* Since: 3.1.7-RC1 +* Purpose: Add content at the end of the topic list item. + viewforum_buttons_bottom_before === * Locations: @@ -2038,6 +2433,46 @@ viewtopic_body_post_buttons_list_before * Purpose: Add post button custom list to posts (next to edit, quote etc), before the original list. +viewtopic_body_post_subject_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.7-RC1 +* Purpose: Add data before post icon and subject + +viewtopic_body_postrow_back2top_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.8-RC1 +* Purpose: Add content to the post's bottom after the back to top link + +viewtopic_body_postrow_back2top_append +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.8-RC1 +* Purpose: Add content to the post's bottom directly before the back to top link + +viewtopic_body_postrow_back2top_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.8-RC1 +* Purpose: Add content to the post's bottom before the back to top link + +viewtopic_body_postrow_back2top_prepend +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Since: 3.1.8-RC1 +* Purpose: Add content to the post's bottom directly before the back to top link + viewtopic_body_postrow_custom_fields_after === * Locations: diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf index c82f5c8e49..2ead3552fd 100644 --- a/phpBB/docs/nginx.sample.conf +++ b/phpBB/docs/nginx.sample.conf @@ -64,6 +64,11 @@ http { location / { # phpbb uses index.htm index index.php index.html index.htm; + try_files $uri $uri/ @rewriteapp; + } + + location @rewriteapp { + rewrite ^(.*)$ /app.php/$1 last; } # Deny access to internal phpbb files. @@ -75,12 +80,16 @@ http { } # Pass the php scripts to fastcgi server specified in upstream declaration. - location ~ \.php$ { - fastcgi_pass php; - # Necessary for php. - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + location ~ \.php(/|$) { # Unmodified fastcgi_params from nginx distribution. include fastcgi_params; + # Necessary for php. + fastcgi_split_path_info ^(.+\.php)(/.*)$; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + try_files $uri $uri/ /app.php$is_args$args; + fastcgi_pass php; } # Deny access to version control system directories. diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 3e7965899f..56ea273d5c 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -258,17 +258,18 @@ else * @var array attachment Array with attachment data * @var int display_cat Attachment category * @var int download_mode File extension specific download mode - * @var array extension Array with file extensions data + * @var array extensions Array with file extensions data * @var string mode Download mode * @var bool thumbnail Flag indicating if the file is a thumbnail * @since 3.1.6-RC1 + * @change 3.1.7-RC1 Fixing wrong name of a variable (replacing "extension" by "extensions") */ $vars = array( 'attach_id', 'attachment', 'display_cat', 'download_mode', - 'extension', + 'extensions', 'mode', 'thumbnail', ); diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 67fba1094d..4956aab241 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -106,7 +106,10 @@ class acp_attachments { case 'attach': - include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + if (!function_exists('get_supported_image_types')) + { + include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + } $sql = 'SELECT group_name, cat_id FROM ' . EXTENSION_GROUPS_TABLE . ' diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index b555f46a94..286bc92813 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -28,7 +28,10 @@ class acp_ban global $user, $template, $request, $phpbb_dispatcher; global $phpbb_root_path, $phpEx; - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_ban')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $bansubmit = $request->is_set_post('bansubmit'); $unbansubmit = $request->is_set_post('unbansubmit'); diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php index 1ea320e674..2188b90729 100644 --- a/phpBB/includes/acp/acp_bots.php +++ b/phpBB/includes/acp/acp_bots.php @@ -141,7 +141,11 @@ class acp_bots case 'edit': case 'add': - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + + if (!function_exists('user_update_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $bot_row = array( 'bot_name' => utf8_normalize_nfc(request_var('bot_name', '', true)), diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php index fa8d8fb6a9..92d5e1dda6 100644 --- a/phpBB/includes/acp/acp_captcha.php +++ b/phpBB/includes/acp/acp_captcha.php @@ -25,7 +25,7 @@ class acp_captcha function main($id, $mode) { - global $db, $user, $auth, $template; + global $request, $user, $auth, $template; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container; $user->add_lang('acp/board'); @@ -52,11 +52,36 @@ class acp_captcha else { $config_vars = array( - 'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false), - 'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false), - 'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false), - 'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0), - 'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0), + 'enable_confirm' => array( + 'tpl' => 'REG_ENABLE', + 'default' => false, + 'validate' => 'bool', + 'lang' => 'VISUAL_CONFIRM_REG', + ), + 'enable_post_confirm' => array( + 'tpl' => 'POST_ENABLE', + 'default' => false, + 'validate' => 'bool', + 'lang' => 'VISUAL_CONFIRM_POST', + ), + 'confirm_refresh' => array( + 'tpl' => 'CONFIRM_REFRESH', + 'default' => false, + 'validate' => 'bool', + 'lang' => 'VISUAL_CONFIRM_REFRESH', + ), + 'max_reg_attempts' => array( + 'tpl' => 'REG_LIMIT', + 'default' => 0, + 'validate' => 'int:0:99999', + 'lang' => 'REG_LIMIT', + ), + 'max_login_attempts' => array( + 'tpl' => 'MAX_LOGIN_ATTEMPTS', + 'default' => 0, + 'validate' => 'int:0:99999', + 'lang' => 'MAX_LOGIN_ATTEMPTS', + ), ); $this->tpl_name = 'acp_captcha'; @@ -65,12 +90,31 @@ class acp_captcha add_form_key($form_key); $submit = request_var('main_submit', false); + $error = $cfg_array = array(); - if ($submit && check_form_key($form_key)) + if ($submit) { foreach ($config_vars as $config_var => $options) { - set_config($config_var, request_var($config_var, $options['default'])); + $cfg_array[$config_var] = $request->variable($config_var, $options['default']); + } + validate_config_vars($config_vars, $cfg_array, $error); + + if (!check_form_key($form_key)) + { + $error[] = $user->lang['FORM_INVALID']; + } + if ($error) + { + $submit = false; + } + } + + if ($submit) + { + foreach ($cfg_array as $key => $value) + { + $config->set($key, $value); } if ($selected !== $config['captcha_plugin']) @@ -94,10 +138,6 @@ class acp_captcha } trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action)); } - else if ($submit) - { - trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); - } else { $captcha_select = ''; @@ -124,6 +164,7 @@ class acp_captcha 'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id), 'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(), 'CAPTCHA_SELECT' => $captcha_select, + 'ERROR_MSG' => implode('<br />', $error), 'U_ACTION' => $this->u_action, )); diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php index 4c8f3cc65b..5b12013708 100644 --- a/phpBB/includes/acp/acp_disallow.php +++ b/phpBB/includes/acp/acp_disallow.php @@ -26,9 +26,7 @@ class acp_disallow function main($id, $mode) { global $db, $user, $auth, $template, $cache; - global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; - - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + global $config, $phpbb_admin_path; $user->add_lang('acp/posting'); diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index fda9d50779..917d02318e 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -189,8 +189,15 @@ class acp_email $db->sql_freeresult($result); // Send the messages - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + } + + if (!function_exists('get_group_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $messenger = new messenger($use_queue); $errored = false; diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index edfada1bf1..1e0264d8e9 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -42,7 +42,10 @@ class acp_groups return; } - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('group_user_attributes')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } // Check and set some common vars $action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', '')); @@ -295,7 +298,10 @@ class acp_groups case 'edit': case 'add': - include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + if (!function_exists('display_forums')) + { + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + } $data = $submit_ary = array(); @@ -666,9 +672,8 @@ class acp_groups $driver = $phpbb_avatar_manager->get_driver($current_driver); $avatars_enabled = true; - $config_name = $phpbb_avatar_manager->get_driver_config_name($driver); $template->set_filenames(array( - 'avatar' => "acp_avatar_options_{$config_name}.html", + 'avatar' => $driver->get_acp_template_name(), )); if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error)) diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index e96c42de05..76c7a1b277 100644 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -34,7 +34,10 @@ class acp_inactive global $config, $db, $user, $auth, $template, $phpbb_container; global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_active_flip')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $user->add_lang('memberlist'); @@ -109,7 +112,10 @@ class acp_inactive if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users)) { - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + } $messenger = new messenger(false); @@ -196,7 +202,10 @@ class acp_inactive if ($row = $db->sql_fetchrow($result)) { // Send the messages - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + } $messenger = new messenger(); $usernames = $user_ids = array(); @@ -271,9 +280,10 @@ class acp_inactive 'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])), - 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview')), + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&redirect=acp_inactive')), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), + 'USER_EMAIL' => $row['user_email'], 'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"), 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&sr=posts") : '', diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php index 284543acd3..a482b41e1d 100644 --- a/phpBB/includes/acp/acp_jabber.php +++ b/phpBB/includes/acp/acp_jabber.php @@ -34,7 +34,10 @@ class acp_jabber $user->add_lang('acp/board'); - include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx); + if (!class_exists('jabber')) + { + include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx); + } $action = request_var('action', ''); $submit = (isset($_POST['submit'])) ? true : false; diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 60e338ae7c..3888a411f0 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -34,7 +34,10 @@ class acp_language global $config, $db, $user, $template; global $phpbb_root_path, $phpEx, $request; - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('validate_language_iso_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } // Check and set some common vars $action = (isset($_POST['update_details'])) ? 'update_details' : ''; diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index f6d728ffed..afa0f1ea61 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -429,20 +429,28 @@ class acp_main )); } - $version_helper = $phpbb_container->get('version_helper'); - try + if ($auth->acl_get('a_board')) { - $recheck = $request->variable('versioncheck_force', false); - $updates_available = $version_helper->get_suggested_updates($recheck); + $version_helper = $phpbb_container->get('version_helper'); + try + { + $recheck = $request->variable('versioncheck_force', false); + $updates_available = $version_helper->get_suggested_updates($recheck); - $template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available)); + $template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available)); + } + catch (\RuntimeException $e) + { + $template->assign_vars(array( + 'S_VERSIONCHECK_FAIL' => true, + 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', + )); + } } - catch (\RuntimeException $e) + else { - $template->assign_vars(array( - 'S_VERSIONCHECK_FAIL' => true, - 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '', - )); + // We set this template var to true, to not display an outdated version notice. + $template->assign_var('S_VERSION_UP_TO_DATE', true); } /** @@ -553,6 +561,7 @@ class acp_main 'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'), 'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'), + 'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false, 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false, 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, ) diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php index cd3616208d..be4ab4676a 100644 --- a/phpBB/includes/acp/acp_permission_roles.php +++ b/phpBB/includes/acp/acp_permission_roles.php @@ -30,8 +30,15 @@ class acp_permission_roles global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; global $request; - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); - include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } + + if (!class_exists('auth_admin')) + { + include($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + } $this->auth_admin = new auth_admin(); diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index cb408e304f..660afb4e93 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -30,8 +30,15 @@ class acp_permissions global $db, $user, $auth, $template, $cache, $phpbb_container; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); - include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } + + if (!class_exists('auth_admin')) + { + include($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + } $this->permissions = $phpbb_container->get('acl.permissions'); diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 43668b8ad5..8c7691538c 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -33,8 +33,15 @@ class acp_profile global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; global $request, $phpbb_container, $phpbb_dispatcher; - include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('generate_smilies')) + { + include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + } + + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $user->add_lang(array('ucp', 'acp/profile')); $this->tpl_name = 'acp_profile'; @@ -537,13 +544,14 @@ class acp_profile } } - $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step); - if (sizeof($error)) { - $step--; $submit = false; } + else + { + $step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step); + } // Build up the specific hidden fields foreach ($exclude as $num => $key_ary) @@ -561,7 +569,7 @@ class acp_profile $var = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data); if ($var !== null) { - $_new_key_ary[$key] = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data); + $_new_key_ary[$key] = $var; } } $cp->vars = $field_data; @@ -571,11 +579,7 @@ class acp_profile if (!sizeof($error)) { - if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) - { - $this->save_profile_field($cp, $field_type, $action); - } - else if ($action == 'edit' && $save) + if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save)) { $this->save_profile_field($cp, $field_type, $action); } diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index e17399e3d9..98d9caabdd 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -28,7 +28,11 @@ class acp_prune global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path; $user->add_lang('acp/prune'); - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + + if (!function_exists('user_active_flip')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } switch ($mode) { diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_send_statistics.php index d178be2fb0..7c9e9cf78e 100644 --- a/phpBB/includes/acp/acp_send_statistics.php +++ b/phpBB/includes/acp/acp_send_statistics.php @@ -27,7 +27,10 @@ class acp_send_statistics { global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx; - include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); + if (!class_exists('phpbb_questionnaire_data_collector')) + { + include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); + } $collect_url = "https://www.phpbb.com/stats/receive_stats.php"; diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index a36a6c1ecd..5181b87ecb 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -56,9 +56,12 @@ class acp_styles /** @var string */ protected $php_ext; + /** @var \phpbb\event\dispatcher_interface */ + protected $dispatcher; + public function main($id, $mode) { - global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config; + global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher; $this->db = $db; $this->user = $user; @@ -69,6 +72,7 @@ class acp_styles $this->config = $config; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $phpEx; + $this->dispatcher = $phpbb_dispatcher; $this->default_style = $config['default_style']; $this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/'; @@ -118,6 +122,18 @@ class acp_styles ) ); + /** + * Run code before ACP styles action execution + * + * @event core.acp_styles_action_before + * @var int id Module ID + * @var string mode Active module + * @var string action Module that should be run + * @since 3.1.7-RC1 + */ + $vars = array('id', 'mode', 'action'); + extract($this->dispatcher->trigger_event('core.acp_styles_action_before', compact($vars))); + // Execute actions switch ($action) { diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 8c17fb6311..aa4470fd0e 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -44,6 +44,11 @@ class acp_users $user_id = request_var('u', 0); $action = request_var('action', ''); + // Get referer to redirect user to the appropriate page after delete action + $redirect = request_var('redirect', ''); + $redirect_tag = "redirect=$redirect"; + $redirect_url = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$redirect"); + $submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false; $form_name = 'acp_users'; @@ -52,7 +57,10 @@ class acp_users // Whois (special case) if ($action == 'whois') { - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $this->page_title = 'WHOIS'; $this->tpl_name = 'simple_body'; @@ -146,9 +154,9 @@ class acp_users } $template->assign_vars(array( - 'U_BACK' => $this->u_action, + 'U_BACK' => (empty($redirect)) ? $this->u_action : $redirect_url, 'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&u=$user_id"), - 'U_ACTION' => $this->u_action . '&u=' . $user_id, + 'U_ACTION' => $this->u_action . '&u=' . $user_id . ((empty($redirect)) ? '' : '&' . $redirect_tag), 'S_FORM_OPTIONS' => $s_form_options, 'MANAGED_USERNAME' => $user_row['username']) ); @@ -165,7 +173,10 @@ class acp_users { case 'overview': - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $user->add_lang('acp/ban'); @@ -221,19 +232,30 @@ class acp_users user_delete($delete_type, $user_id, $user_row['username']); add_log('admin', 'LOG_USER_DELETED', $user_row['username']); - trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action)); + trigger_error($user->lang['USER_DELETED'] . adm_back_link( + (empty($redirect)) ? $this->u_action : $redirect_url + ) + ); } else { - confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + $delete_confirm_hidden_fields = array( 'u' => $user_id, 'i' => $id, 'mode' => $mode, 'action' => $action, 'update' => true, 'delete' => 1, - 'delete_type' => $delete_type)) + 'delete_type' => $delete_type, ); + + // Checks if the redirection page is specified + if (!empty($redirect)) + { + $delete_confirm_hidden_fields['redirect'] = $redirect; + } + + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($delete_confirm_hidden_fields)); } } else @@ -338,7 +360,10 @@ class acp_users if ($config['email_enable']) { - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + } $server_url = generate_board_url(); @@ -421,7 +446,10 @@ class acp_users $phpbb_notifications = $phpbb_container->get('notification_manager'); $phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']); - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + } $messenger = new messenger(false); @@ -1345,7 +1373,10 @@ class acp_users case 'profile': - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $cp = $phpbb_container->get('profilefields.manager'); @@ -1504,7 +1535,10 @@ class acp_users case 'prefs': - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('user_get_id_name')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $data = array( 'dateformat' => utf8_normalize_nfc(request_var('dateformat', $user_row['user_dateformat'], true)), @@ -1774,8 +1808,6 @@ class acp_users case 'avatar': - include($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $avatars_enabled = false; if ($config['allow_avatar']) @@ -1846,9 +1878,8 @@ class acp_users $driver = $phpbb_avatar_manager->get_driver($current_driver); $avatars_enabled = true; - $config_name = $phpbb_avatar_manager->get_driver_config_name($driver); $template->set_filenames(array( - 'avatar' => "acp_avatar_options_{$config_name}.html", + 'avatar' => $driver->get_acp_template_name(), )); if ($driver->prepare_form($request, $template, $user, $avatar_data, $error)) @@ -1930,8 +1961,15 @@ class acp_users case 'sig': - include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); - include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); + if (!function_exists('generate_smilies')) + { + include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + } + + if (!function_exists('display_custom_bbcodes')) + { + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + } $enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $this->optionget($user_row, 'sig_bbcode') : false; $enable_smilies = ($config['allow_sig_smilies']) ? (bool) $this->optionget($user_row, 'sig_smilies') : false; @@ -1942,7 +1980,10 @@ class acp_users if ($submit || $preview) { - include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx); + if (!class_exists('messenger')) + { + include($phpbb_root_path . 'includes/message_parser.' . $phpEx); + } $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false; $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false; @@ -2183,7 +2224,10 @@ class acp_users case 'groups': - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if (!function_exists('group_user_attributes')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } $user->add_lang(array('groups', 'acp/groups')); $group_id = request_var('g', 0); @@ -2399,7 +2443,10 @@ class acp_users case 'perm': - include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + if (!class_exists('auth_admin')) + { + include($phpbb_root_path . 'includes/acp/auth.' . $phpEx); + } $auth_admin = new auth_admin(); diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index ab943c2f86..a1d85cf272 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.1.7-dev'); +define('PHPBB_VERSION', '3.1.8-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 80d6e22bb7..bb1e47ecf7 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4264,10 +4264,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' if (sizeof($online_users['online_users'])) { - $sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour - FROM ' . USERS_TABLE . ' - WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . ' - ORDER BY username_clean ASC'; + $sql_ary = array( + 'SELECT' => 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour', + 'FROM' => array( + USERS_TABLE => 'u', + ), + 'WHERE' => $db->sql_in_set('u.user_id', $online_users['online_users']), + 'ORDER_BY' => 'u.username_clean ASC', + ); /** * Modify SQL query to obtain online users data @@ -4279,13 +4283,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' * @var string item Restrict online users to a certain * session item, e.g. forum for * session_forum_id - * @var string sql SQL query to obtain users online data + * @var string sql_ary SQL query to obtain users online data * @since 3.1.4-RC1 + * @changed 3.1.7-RC1 Change sql query into array and adjust var accordingly. Allows extension authors the ability to adjust the sql_ary. */ - $vars = array('online_users', 'item_id', 'item', 'sql'); + $vars = array('online_users', 'item_id', 'item', 'sql_ary'); extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars))); - $result = $db->sql_query($sql); + $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); $rowset = $db->sql_fetchrowset($result); $db->sql_freeresult($result); @@ -4299,7 +4304,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' $row['username'] = '<em>' . $row['username'] . '</em>'; } - if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline')) + if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id']) { $user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']); } @@ -5390,6 +5395,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = return; } + $user->update_session_infos(); + phpbb_check_and_display_sql_report($request, $auth, $db); $template->assign_vars(array( diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index d566336d26..4193f69929 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -164,6 +164,8 @@ function adm_page_footer($copyright_html = true) return; } + $user->update_session_infos(); + phpbb_check_and_display_sql_report($request, $auth, $db); $template->assign_vars(array( diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index afd3dce730..33cf55cc0b 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -576,7 +576,7 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true) */ function move_posts($post_ids, $topic_id, $auto_sync = true) { - global $db; + global $db, $phpbb_dispatcher; if (!is_array($post_ids)) { @@ -610,6 +610,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) trigger_error('NO_TOPIC'); } + /** + * Perform additional actions before moving posts + * + * @event core.move_posts_before + * @var array post_ids Array of post ids to move + * @var string topic_id The topic id the posts are moved to + * @var bool auto_sync Whether or not to perform auto sync + * @var array forum_ids Array of the forum ids the posts are moved from + * @var array topic_ids Array of the topic ids the posts are moved from + * @var array forum_row Array with the forum id of the topic the posts are moved to + * @since 3.1.7-RC1 + */ + $vars = array( + 'post_ids', + 'topic_id', + 'auto_sync', + 'forum_ids', + 'topic_ids', + 'forum_row', + ); + extract($phpbb_dispatcher->trigger_event('core.move_posts_before', compact($vars))); + $sql = 'UPDATE ' . POSTS_TABLE . ' SET forum_id = ' . (int) $forum_row['forum_id'] . ", topic_id = $topic_id WHERE " . $db->sql_in_set('post_id', $post_ids); @@ -620,6 +642,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) WHERE " . $db->sql_in_set('post_msg_id', $post_ids); $db->sql_query($sql); + /** + * Perform additional actions after moving posts + * + * @event core.move_posts_after + * @var array post_ids Array of the moved post ids + * @var string topic_id The topic id the posts are moved to + * @var bool auto_sync Whether or not to perform auto sync + * @var array forum_ids Array of the forum ids the posts are moved from + * @var array topic_ids Array of the topic ids the posts are moved from + * @var array forum_row Array with the forum id of the topic the posts are moved to + * @since 3.1.7-RC1 + */ + $vars = array( + 'post_ids', + 'topic_id', + 'auto_sync', + 'forum_ids', + 'topic_ids', + 'forum_row', + ); + extract($phpbb_dispatcher->trigger_event('core.move_posts_after', compact($vars))); + if ($auto_sync) { $forum_ids[] = (int) $forum_row['forum_id']; @@ -785,6 +829,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = 'notification.type.quote', 'notification.type.approve_post', 'notification.type.post_in_queue', + 'notification.type.report_post', ); /** @@ -886,6 +931,32 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = $table_ary = array(POSTS_TABLE, REPORTS_TABLE); + /** + * Perform additional actions during post(s) deletion before running the queries + * + * @event core.delete_posts_in_transaction_before + * @var array post_ids Array with deleted posts' ids + * @var array poster_ids Array with deleted posts' author ids + * @var array topic_ids Array with deleted posts' topic ids + * @var array forum_ids Array with deleted posts' forum ids + * @var string where_type Variable containing posts deletion mode + * @var mixed where_ids Array or comma separated list of post ids to delete + * @var array delete_notifications_types Array with notifications types to delete + * @var array table_ary Array with table names to delete data from + * @since 3.1.7-RC1 + */ + $vars = array( + 'post_ids', + 'poster_ids', + 'topic_ids', + 'forum_ids', + 'where_type', + 'where_ids', + 'delete_notifications_types', + 'table_ary', + ); + extract($phpbb_dispatcher->trigger_event('core.delete_posts_in_transaction_before', compact($vars))); + foreach ($table_ary as $table) { $sql = "DELETE FROM $table @@ -1042,7 +1113,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = */ function delete_attachments($mode, $ids, $resync = true) { - global $db, $config; + global $db, $config, $phpbb_dispatcher; // 0 is as bad as an empty array if (empty($ids)) @@ -1087,6 +1158,24 @@ function delete_attachments($mode, $ids, $resync = true) $post_ids = $message_ids = $topic_ids = $physical = array(); + /** + * Perform additional actions before collecting data for attachment(s) deletion + * + * @event core.delete_attachments_collect_data_before + * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user + * @var mixed ids Array or comma separated list of ids corresponding to the mode + * @var bool resync Flag indicating if posts/messages/topics should be synchronized + * @var string sql_id The field name to collect/delete data for depending on the mode + * @since 3.1.7-RC1 + */ + $vars = array( + 'mode', + 'ids', + 'resync', + 'sql_id', + ); + extract($phpbb_dispatcher->trigger_event('core.delete_attachments_collect_data_before', compact($vars))); + // Collect post and topic ids for later use if we need to touch remaining entries (if resync is enabled) $sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan FROM ' . ATTACHMENTS_TABLE . ' @@ -1116,6 +1205,32 @@ function delete_attachments($mode, $ids, $resync = true) } $db->sql_freeresult($result); + /** + * Perform additional actions before attachment(s) deletion + * + * @event core.delete_attachments_before + * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user + * @var mixed ids Array or comma separated list of ids corresponding to the mode + * @var bool resync Flag indicating if posts/messages/topics should be synchronized + * @var string sql_id The field name to collect/delete data for depending on the mode + * @var array post_ids Array with post ids for deleted attachment(s) + * @var array topic_ids Array with topic ids for deleted attachment(s) + * @var array message_ids Array with private message ids for deleted attachment(s) + * @var array physical Array with deleted attachment(s) physical file(s) data + * @since 3.1.7-RC1 + */ + $vars = array( + 'mode', + 'ids', + 'resync', + 'sql_id', + 'post_ids', + 'topic_ids', + 'message_ids', + 'physical', + ); + extract($phpbb_dispatcher->trigger_event('core.delete_attachments_before', compact($vars))); + // Delete attachments $sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set($sql_id, $ids); @@ -1125,6 +1240,34 @@ function delete_attachments($mode, $ids, $resync = true) $db->sql_query($sql); $num_deleted = $db->sql_affectedrows(); + /** + * Perform additional actions after attachment(s) deletion from the database + * + * @event core.delete_attachments_from_database_after + * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user + * @var mixed ids Array or comma separated list of ids corresponding to the mode + * @var bool resync Flag indicating if posts/messages/topics should be synchronized + * @var string sql_id The field name to collect/delete data for depending on the mode + * @var array post_ids Array with post ids for deleted attachment(s) + * @var array topic_ids Array with topic ids for deleted attachment(s) + * @var array message_ids Array with private message ids for deleted attachment(s) + * @var array physical Array with deleted attachment(s) physical file(s) data + * @var int num_deleted The number of deleted attachment(s) from the database + * @since 3.1.7-RC1 + */ + $vars = array( + 'mode', + 'ids', + 'resync', + 'sql_id', + 'post_ids', + 'topic_ids', + 'message_ids', + 'physical', + 'num_deleted', + ); + extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_database_after', compact($vars))); + if (!$num_deleted) { return 0; @@ -1147,6 +1290,38 @@ function delete_attachments($mode, $ids, $resync = true) } } + /** + * Perform additional actions after attachment(s) deletion from the filesystem + * + * @event core.delete_attachments_from_filesystem_after + * @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user + * @var mixed ids Array or comma separated list of ids corresponding to the mode + * @var bool resync Flag indicating if posts/messages/topics should be synchronized + * @var string sql_id The field name to collect/delete data for depending on the mode + * @var array post_ids Array with post ids for deleted attachment(s) + * @var array topic_ids Array with topic ids for deleted attachment(s) + * @var array message_ids Array with private message ids for deleted attachment(s) + * @var array physical Array with deleted attachment(s) physical file(s) data + * @var int num_deleted The number of deleted attachment(s) from the database + * @var int space_removed The size of deleted files(s) from the filesystem + * @var int files_removed The number of deleted file(s) from the filesystem + * @since 3.1.7-RC1 + */ + $vars = array( + 'mode', + 'ids', + 'resync', + 'sql_id', + 'post_ids', + 'topic_ids', + 'message_ids', + 'physical', + 'num_deleted', + 'space_removed', + 'files_removed', + ); + extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_filesystem_after', compact($vars))); + if ($space_removed || $files_removed) { set_config_count('upload_dir_size', $space_removed * (-1), true); diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 8e1561b842..1639eb1a4c 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1594,7 +1594,7 @@ function get_folder_status($folder_id, $folder) 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0, ); - $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']); + $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), (int) $return['cur'], $return['percent']); return $return; } diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 89bc31fa25..f0a48e51e5 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -919,7 +919,7 @@ class fileupload return $file; } - $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache'; + $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? sys_get_temp_dir() : $phpbb_root_path . 'cache'; $filename = tempnam($tmp_path, unique_id() . '-'); if (!($fp = @fopen($filename, 'wb'))) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c46653db9e..3e2dbcb794 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2698,7 +2698,7 @@ function group_delete($group_id, $group_name = false) */ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false) { - global $db, $auth, $phpbb_container; + global $db, $auth, $phpbb_container, $phpbb_dispatcher; // We need both username and user_id info $result = user_get_id_name($user_id_ary, $username_ary); @@ -2775,6 +2775,26 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, // Clear permissions cache of relevant users $auth->acl_clear_prefetch($user_id_ary); + /** + * Event after users are added to a group + * + * @event core.group_add_user_after + * @var int group_id ID of the group to which users are added + * @var string group_name Name of the group + * @var array user_id_ary IDs of the users which are added + * @var array username_ary names of the users which are added + * @var int pending Pending setting, 1 if user(s) added are pending + * @since 3.1.7-RC1 + */ + $vars = array( + 'group_id', + 'group_name', + 'user_id_ary', + 'username_ary', + 'pending', + ); + extract($phpbb_dispatcher->trigger_event('core.group_add_user_after', compact($vars))); + if (!$group_name) { $group_name = get_group_name($group_id); @@ -2933,6 +2953,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, // Clear permissions cache of relevant users $auth->acl_clear_prefetch($user_id_ary); + /** + * Event after users are removed from a group + * + * @event core.group_delete_user_after + * @var int group_id ID of the group from which users are deleted + * @var string group_name Name of the group + * @var array user_id_ary IDs of the users which are removed + * @var array username_ary names of the users which are removed + * @since 3.1.7-RC1 + */ + $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary'); + extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars))); + if (!$group_name) { $group_name = get_group_name($group_id); diff --git a/phpBB/includes/mcp/info/mcp_pm_reports.php b/phpBB/includes/mcp/info/mcp_pm_reports.php index 8670b71084..c80f3b86a3 100644 --- a/phpBB/includes/mcp/info/mcp_pm_reports.php +++ b/phpBB/includes/mcp/info/mcp_pm_reports.php @@ -20,9 +20,9 @@ class mcp_pm_reports_info 'title' => 'MCP_PM_REPORTS', 'version' => '1.0.0', 'modes' => array( - 'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), - 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), - 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), + 'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')), + 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')), + 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')), ), ); } diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 629b6fd275..cdf1abd8ff 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -274,7 +274,7 @@ function mcp_front_view($id, $mode, $action) } // Latest 5 reported PMs - if ($module->loaded('pm_reports') && $auth->acl_getf_global('m_report')) + if ($module->loaded('pm_reports') && $auth->acl_get('m_pm_report')) { $template->assign_var('S_SHOW_PM_REPORTS', true); $user->add_lang(array('ucp')); diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index fc28968101..d0908a0d8b 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -262,7 +262,7 @@ class mcp_main */ function lock_unlock($action, $ids) { - global $auth, $user, $db, $phpEx, $phpbb_root_path, $request; + global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_dispatcher; if ($action == 'lock' || $action == 'unlock') { @@ -322,6 +322,22 @@ function lock_unlock($action, $ids) add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']); } + /** + * Perform additional actions after locking/unlocking posts/topics + * + * @event core.mcp_lock_unlock_after + * @var string action Variable containing the action we perform on the posts/topics ('lock', 'unlock', 'lock_post' or 'unlock_post') + * @var array ids Array containing the post/topic IDs that have been locked/unlocked + * @var array data Array containing posts/topics data + * @since 3.1.7-RC1 + */ + $vars = array( + 'action', + 'ids', + 'data', + ); + extract($phpbb_dispatcher->trigger_event('core.mcp_lock_unlock_after', compact($vars))); + $success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS'; meta_refresh(2, $redirect); diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 7a93f73228..2dcfcd608b 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -549,16 +549,6 @@ function change_poster(&$post_info, $userdata) $from_username = $post_info['username']; $to_username = $userdata['username']; - // Renew post info - $post_info = phpbb_get_post_data(array($post_id), false, true); - - if (!sizeof($post_info)) - { - trigger_error('POST_NOT_EXIST'); - } - - $post_info = $post_info[$post_id]; - /** * This event allows you to perform additional tasks after changing a post's poster * @@ -566,10 +556,21 @@ function change_poster(&$post_info, $userdata) * @var array userdata Information on a post's new poster * @var array post_info Information on the affected post * @since 3.1.6-RC1 + * @changed 3.1.7-RC1 Change location to prevent post_info from being set to the new post information */ $vars = array('userdata', 'post_info'); extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars))); + // Renew post info + $post_info = phpbb_get_post_data(array($post_id), false, true); + + if (!sizeof($post_info)) + { + trigger_error('POST_NOT_EXIST'); + } + + $post_info = $post_info[$post_id]; + // Now add log entry add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $from_username, $to_username); } diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 5fde63ecb4..3567e545f0 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -72,6 +72,7 @@ class mcp_queue case 'delete': $post_id_list = $request->variable('post_id_list', array(0)); $topic_id_list = $request->variable('topic_id_list', array(0)); + $delete_reason = $request->variable('delete_reason', '', true); if (!empty($post_id_list)) { @@ -80,7 +81,7 @@ class mcp_queue global $phpbb_root_path, $phpEx; include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx); } - mcp_delete_post($post_id_list, false, '', $action); + mcp_delete_post($post_id_list, false, $delete_reason, $action); } else if (!empty($topic_id_list)) { @@ -89,7 +90,7 @@ class mcp_queue global $phpbb_root_path, $phpEx; include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx); } - mcp_delete_topic($topic_id_list, false, '', $action); + mcp_delete_topic($topic_id_list, false, $delete_reason, $action); } else { @@ -283,6 +284,7 @@ class mcp_queue $template->assign_vars(array( 'S_MCP_QUEUE' => true, 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f=$forum_id"), + 'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']), 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => $post_info['post_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE, @@ -1130,6 +1132,11 @@ class mcp_queue // Build a list of posts to be disapproved and get the related topics real replies count foreach ($post_info as $post_id => $post_data) { + if ($mode === 'unapproved_topics' && $post_data['post_visibility'] == ITEM_APPROVED) + { + continue; + } + $post_disapprove_list[$post_id] = $post_data['topic_id']; if (!isset($topic_posts_unapproved[$post_data['topic_id']])) { @@ -1139,6 +1146,12 @@ class mcp_queue $topic_posts_unapproved[$post_data['topic_id']]++; } + // Do not try to disapprove if no posts are selected + if (empty($post_disapprove_list)) + { + trigger_error('NO_POST_SELECTED'); + } + // Now we build the log array foreach ($post_disapprove_list as $post_id => $topic_id) { @@ -1240,7 +1253,7 @@ class mcp_queue continue; } - $post_data['disapprove_reason'] = ''; + $post_data['disapprove_reason'] = $disapprove_reason; if (isset($disapprove_reason_lang)) { // Okay we need to get the reason from the posters language diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 425a56cf6c..f026cd3eb3 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -92,7 +92,7 @@ class ucp_pm $user_folders = get_folder($user->data['user_id']); - if (!$auth->acl_get('u_sendpm')) + if ($action != 'delete' && !$auth->acl_get('u_sendpm')) { // trigger_error('NO_AUTH_SEND_MESSAGE'); $template->assign_vars(array( diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8d8d42e742..be0833254b 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -183,37 +183,12 @@ class ucp_profile 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->data['user_id']}", - 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") - ); - - $messenger->send($row['user_notify_type']); - } - $db->sql_freeresult($result); + $notifications_manager = $phpbb_container->get('notification_manager'); + $notifications_manager->add_notifications('notification.type.admin_activate_user', array( + 'user_id' => $user->data['user_id'], + 'user_actkey' => $user_actkey, + 'user_regdate' => time(), // Notification time + )); } user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE); diff --git a/phpBB/index.php b/phpBB/index.php index df6932f6c0..eb9a657b3f 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -119,7 +119,7 @@ $db->sql_freeresult($result); $legend = implode($user->lang['COMMA_SEPARATOR'], $legend); // Generate birthday list if required ... -$birthday_list = array(); +$birthdays = $birthday_list = array(); if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) { $time = $user->create_datetime(); @@ -132,33 +132,66 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets(' $leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'"; } - $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday - FROM ' . USERS_TABLE . ' u - LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) - WHERE (b.ban_id IS NULL - OR b.ban_exclude = 1) + $sql_ary = array( + 'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_birthday', + 'FROM' => array( + USERS_TABLE => 'u', + ), + 'LEFT_JOIN' => array( + array( + 'FROM' => array(BANLIST_TABLE => 'b'), + 'ON' => 'u.user_id = b.ban_userid', + ), + ), + 'WHERE' => "(b.ban_id IS NULL OR b.ban_exclude = 1) AND (u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' $leap_year_birthdays) - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')', + ); + + /** + * Event to modify the SQL query to get birthdays data + * + * @event core.index_modify_birthdays_sql + * @var array now The assoc array with the 'now' local timestamp data + * @var array sql_ary The SQL array to get the birthdays data + * @var object time The user related Datetime object + * @since 3.1.7-RC1 + */ + $vars = array('now', 'sql_ary', 'time'); + extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_sql', compact($vars))); + + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); + $rows = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); - while ($row = $db->sql_fetchrow($result)) + foreach ($rows as $row) { $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); $birthday_year = (int) substr($row['user_birthday'], -4); $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; - $template->assign_block_vars('birthdays', array( + $birthdays[] = array( 'USERNAME' => $birthday_username, 'AGE' => $birthday_age, - )); + ); // For 3.0 compatibility - if ($age = (int) substr($row['user_birthday'], -4)) - { - $birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : ''); - } + $birthday_list[] = $birthday_username . (($birthday_age) ? " ({$birthday_age})" : ''); } - $db->sql_freeresult($result); + + /** + * Event to modify the birthdays list + * + * @event core.index_modify_birthdays_list + * @var array birthdays Array with the users birhtdays data + * @var array rows Array with the birhtdays SQL query result + * @since 3.1.7-RC1 + */ + $vars = array('birthdays', 'rows'); + extract($phpbb_dispatcher->trigger_event('core.index_modify_birthdays_list', compact($vars))); + + $template->assign_block_vars_array('birthdays', $birthdays); } // Assign index specific vars diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 3a5e58cabd..56bc23c32d 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.6', + 'phpbb_version' => '3.1.7', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 9af2bc13f7..4f87954907 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -273,7 +273,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0 INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.7-dev'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.8-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); @@ -355,6 +355,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_soft # -- Global moderator auth option (not a local option) INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); +INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_pm_report', 0, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1); # -- Admin related auth options @@ -542,7 +543,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter'); # Simple Moderator (m_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report', 'm_pm_report'); # Queue Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit'); diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index b9aeed8fcb..2e80e61adc 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -155,9 +155,10 @@ $lang = array_merge($lang, array( 'ACL_M_SPLIT' => 'Can split topics', 'ACL_M_MERGE' => 'Can merge topics', - 'ACL_M_INFO' => 'Can view post details', - 'ACL_M_WARN' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local) - 'ACL_M_BAN' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local) + 'ACL_M_INFO' => 'Can view post details', + 'ACL_M_WARN' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local) + 'ACL_M_PM_REPORT' => 'Can close and delete reports of private messages<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local) + 'ACL_M_BAN' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local) )); // Admin Permissions diff --git a/phpBB/language/en/app.php b/phpBB/language/en/app.php index 2da0f098c1..39c4065ebd 100644 --- a/phpBB/language/en/app.php +++ b/phpBB/language/en/app.php @@ -44,5 +44,5 @@ $lang = array_merge($lang, array( 'CONTROLLER_ARGUMENT_VALUE_MISSING' => 'Missing value for argument #%1$s: <strong>%3$s</strong> in class <strong>%2$s</strong>', 'CONTROLLER_NOT_SPECIFIED' => 'No controller has been specified.', 'CONTROLLER_METHOD_NOT_SPECIFIED' => 'No method was specified for the controller.', - 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller "<strong>%s</strong>" is not defined in ./config/services.yml.', + 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller “<strong>%s</strong>” is not defined in ./config/services.yml.', )); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 79d504a67d..47e04d9360 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -329,6 +329,7 @@ $lang = array_merge($lang, array( 'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.', 'IMAGE_FILETYPE_MISMATCH' => 'Image file type mismatch: expected extension %1$s but extension %2$s given.', 'IN' => 'in', + 'INACTIVE' => 'Inactive', 'INDEX' => 'Index page', 'INFORMATION' => 'Information', 'INSECURE_REDIRECT' => 'Tried to redirect to potentially insecure url.', @@ -467,7 +468,7 @@ $lang = array_merge($lang, array( 'NOTIFICATION_TOPIC_DISAPPROVED' => '<strong>Topic disapproved</strong>:', 'NOTIFICATION_TOPIC_IN_QUEUE' => '<strong>Topic approval</strong> request by %1$s:', 'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.', - 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for newly registered user: “%1$s”', + 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for deactivated or newly registered user: “%1$s”', // Used in conjuction with NOTIFICATION_BOOKMARK and NOTIFICATION_POST. 'NOTIFICATION_MANY_OTHERS' => 'others', 'NOTIFICATION_X_OTHERS' => array( diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index c674d5cf3d..800ce3dfb7 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -73,11 +73,11 @@ $help = array( ), array( 0 => 'Creating an Unordered list', - 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul>' + 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example to list your favourite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul><br />Alternatively you can specify the list’s bullet style using <strong>[list=disc][/list]</strong>, <strong>[list=circle][/list]</strong>, or <strong>[list=square][/list]</strong>.' ), array( 0 => 'Creating an Ordered list', - 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>' + 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=A]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=i]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><br /><strong>[list=I]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: upper-roman"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>' ), // This block will switch the FAQ-Questions to the second template column array( diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 5605f8f4b5..c7b2bf55d1 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -101,6 +101,7 @@ $lang = array_merge($lang, array( 'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.', 'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.', + 'MANAGE_GROUP' => 'Manage Group', 'MORE_THAN' => 'More than', 'NO_CONTACT_FORM' => 'The board administrator contact form has been disabled.', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 07751d1f7f..1faa623b44 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -339,7 +339,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', + 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'User requiring activation', 'NOTIFY_METHOD' => 'Notification method', 'NOTIFY_METHOD_BOTH' => 'Both', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e64dab635b..6be44587f5 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -151,7 +151,7 @@ switch ($mode) $db->sql_freeresult($result); $sql_ary = array( - 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id', + 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_type, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id', 'FROM' => array( USER_GROUP_TABLE => 'ug', @@ -314,6 +314,8 @@ switch ($mode) 'RANK_IMG' => $user_rank_data['img'], 'RANK_IMG_SRC' => $user_rank_data['img_src'], + 'S_INACTIVE' => $row['user_type'] == USER_INACTIVE, + 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '', 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), @@ -1025,6 +1027,23 @@ switch ($mode) FROM ' . POSTS_TABLE . ' WHERE poster_ip ' . ((strpos($ips, '%') !== false) ? 'LIKE' : 'IN') . " ($ips) AND " . $db->sql_in_set('forum_id', $ip_forums); + + /** + * Modify sql query for members search by ip address / hostname + * + * @event core.memberlist_modify_ip_search_sql_query + * @var string ipdomain The host name + * @var string ips IP address list for the given host name + * @var string sql The SQL query for searching members by IP address + * @since 3.1.7-RC1 + */ + $vars = array( + 'ipdomain', + 'ips', + 'sql', + ); + extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_ip_search_sql_query', compact($vars))); + $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -1069,7 +1088,7 @@ switch ($mode) if ($mode == 'group') { // We JOIN here to save a query for determining membership for hidden groups. ;) - $sql = 'SELECT g.*, ug.user_id + $sql = 'SELECT g.*, ug.user_id, ug.group_leader FROM ' . GROUPS_TABLE . ' g LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id'] . " AND ug.group_id = $group_id) WHERE g.group_id = $group_id"; @@ -1128,6 +1147,24 @@ switch ($mode) $user_rank_data['img'] .= '<br />'; } } + // include modules for manage groups link display or not + // need to ensure the module is active + $can_manage_group = false; + if ($user->data['is_registered'] && $group_row['group_leader']) + { + if (!class_exists('p_master')) + { + include($phpbb_root_path . 'includes/functions_module.' . $phpEx); + } + $module = new p_master; + $module->list_modules('ucp'); + + if ($module->is_active('ucp_groups', 'manage')) + { + $can_manage_group = true; + } + unset($module); + } $template->assign_vars(array( 'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']), @@ -1140,7 +1177,8 @@ switch ($mode) 'RANK_IMG' => $user_rank_data['img'], 'RANK_IMG_SRC' => $user_rank_data['img_src'], - 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '',) + 'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '', + 'U_MANAGE' => ($can_manage_group) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_groups&mode=manage') : false,) ); $sql_select = ', ug.group_leader'; @@ -1165,6 +1203,32 @@ switch ($mode) $order_by .= ', u.user_posts DESC'; } + /** + * Modify sql query data for members search + * + * @event core.memberlist_modify_sql_query_data + * @var string order_by SQL ORDER BY clause condition + * @var string sort_dir The sorting direction + * @var string sort_key The sorting key + * @var array sort_key_sql Arraty with the sorting conditions data + * @var string sql_from SQL FROM clause condition + * @var string sql_select SQL SELECT fields list + * @var string sql_where SQL WHERE clause condition + * @var string sql_where_data SQL WHERE clause additional conditions data + * @since 3.1.7-RC1 + */ + $vars = array( + 'order_by', + 'sort_dir', + 'sort_key', + 'sort_key_sql', + 'sql_from', + 'sql_select', + 'sql_where', + 'sql_where_data', + ); + extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_sql_query_data', compact($vars))); + // Count the users ... if ($sql_where) { @@ -1345,13 +1409,19 @@ switch ($mode) ); } + $user_types = array(USER_NORMAL, USER_FOUNDER); + if ($auth->acl_get('a_user')) + { + $user_types[] = USER_INACTIVE; + } + $start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']); // Get us some users :D $sql = "SELECT u.user_id FROM " . USERS_TABLE . " u $sql_from - WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ") + WHERE " . $db->sql_in_set('u.user_type', $user_types) . " $sql_where ORDER BY $order_by"; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); @@ -1448,6 +1518,20 @@ switch ($mode) usort($user_list, 'phpbb_sort_last_active'); } + // do we need to display contact fields as such + $use_contact_fields = false; + + /** + * Modify list of users before member row is created + * + * @event core.memberlist_memberrow_before + * @var array user_list Array containing list of users + * @var bool use_contact_fields Should we display contact fields as such? + * @since 3.1.7-RC1 + */ + $vars = array('user_list', 'use_contact_fields'); + extract($phpbb_dispatcher->trigger_event('core.memberlist_memberrow_before', compact($vars))); + for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i) { $user_id = $user_list[$i]; @@ -1458,7 +1542,7 @@ switch ($mode) $cp_row = array(); if ($config['load_cpf_memberlist']) { - $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array(); + $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], $use_contact_fields) : array(); } $memberrow = array_merge(phpbb_show_profile($row, false, false, false), array( @@ -1466,6 +1550,7 @@ switch ($mode) 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, 'S_GROUP_LEADER' => $is_leader, + 'S_INACTIVE' => $row['user_type'] == USER_INACTIVE, 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $row['username']), )); @@ -1505,12 +1590,12 @@ switch ($mode) 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '', 'U_LIVE_SEARCH' => ($config['allow_live_searches']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch') : false, 'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '', - 'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'd') ? 'a' : 'd'), + 'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'd') ? 'a' : 'd'), + 'U_SORT_EMAIL' => $sort_url . '&sk=e&sd=' . (($sort_key == 'e' && $sort_dir == 'd') ? 'a' : 'd'), + 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd') : '', + 'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'd') ? 'a' : 'd'), + 'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'd') ? 'a' : 'd'), 'S_SHOW_GROUP' => ($mode == 'group') ? true : false, 'S_VIEWONLINE' => $auth->acl_get('u_viewonline'), diff --git a/phpBB/phpbb/auth/auth.php b/phpBB/phpbb/auth/auth.php index b59f0e60ec..b7634e04ce 100644 --- a/phpBB/phpbb/auth/auth.php +++ b/phpBB/phpbb/auth/auth.php @@ -928,6 +928,7 @@ class auth function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0) { global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container; + global $phpbb_dispatcher; $provider_collection = $phpbb_container->get('auth.provider_collection'); @@ -982,6 +983,24 @@ class auth redirect($url); } + /** + * Event is triggered after checking for valid username and password, and before the actual session creation. + * + * @event core.auth_login_session_create_before + * @var array login Variable containing login array + * @var bool admin Boolean variable whether user is logging into the ACP + * @var string username Username of user to log in + * @var bool autologin Boolean variable signaling whether login is triggered via auto login + * @since 3.1.7-RC1 + */ + $vars = array( + 'login', + 'admin', + 'username', + 'autologin', + ); + extract($phpbb_dispatcher->trigger_event('core.auth_login_session_create_before', compact($vars))); + // If login succeeded, we will log the user in... else we pass the login array through... if ($login['status'] == LOGIN_SUCCESS) { diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php index b3ced7edf7..ad186635f2 100644 --- a/phpBB/phpbb/avatar/driver/driver.php +++ b/phpBB/phpbb/avatar/driver/driver.php @@ -120,6 +120,22 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface } /** + * {@inheritdoc} + */ + public function get_config_name() + { + return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($this)); + } + + /** + * {@inheritdoc} + */ + public function get_acp_template_name() + { + return 'acp_avatar_options_' . $this->get_config_name() . '.html'; + } + + /** * Sets the name of the driver. * * @param string $name Driver name diff --git a/phpBB/phpbb/avatar/driver/driver_interface.php b/phpBB/phpbb/avatar/driver/driver_interface.php index 835609745a..7d6c2cff8a 100644 --- a/phpBB/phpbb/avatar/driver/driver_interface.php +++ b/phpBB/phpbb/avatar/driver/driver_interface.php @@ -26,6 +26,13 @@ interface driver_interface public function get_name(); /** + * Returns the config name of the driver. To be used in accessing the CONFIG variables. + * + * @return string Config name of driver. + */ + public function get_config_name(); + + /** * Get the avatar url and dimensions * * @param array $row User data or group data that has been cleaned with @@ -110,4 +117,11 @@ interface driver_interface * @return string Avatar driver's template name */ public function get_template_name(); + + /** + * Get the avatar driver's template name (ACP) + * + * @return string Avatar driver's template name + */ + public function get_acp_template_name(); } diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php index 2082e0fd02..bb4977c30c 100644 --- a/phpBB/phpbb/avatar/driver/gravatar.php +++ b/phpBB/phpbb/avatar/driver/gravatar.php @@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver */ protected function get_gravatar_url($row) { + global $phpbb_dispatcher; + $url = self::GRAVATAR_URL; $url .= md5(strtolower(trim($row['avatar']))); @@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver $url .= '?s=' . max($row['avatar_width'], $row['avatar_height']); } + /** + * Modify gravatar url + * + * @event core.get_gravatar_url_after + * @var string row User data or group data + * @var string url Gravatar URL + * @since 3.1.7-RC1 + */ + $vars = array('row', 'url'); + extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars))); + return $url; } } diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index 36087f8ba0..75c384f31e 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -84,11 +84,13 @@ class local extends \phpbb\avatar\driver\driver 'AVATAR_IMAGE' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $img['file'], 'AVATAR_NAME' => $img['name'], 'AVATAR_FILE' => $img['filename'], + 'CHECKED' => $img['file'] === $row['avatar'], )); $template->assign_block_vars('avatar_local_row.avatar_local_option', array( 'AVATAR_FILE' => $img['filename'], - 'S_OPTIONS_AVATAR' => $img['filename'] + 'S_OPTIONS_AVATAR' => $img['filename'], + 'CHECKED' => $img['file'] === $row['avatar'], )); $col_count = ($col_count + 1) % $table_cols; @@ -182,7 +184,7 @@ class local extends \phpbb\avatar\driver\driver } $cat = ($path == $file_path) ? $user->lang['NO_AVATAR_CATEGORY'] : str_replace("$path/", '', $file_path); $avatar_list[$cat][$image] = array( - 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image), + 'file' => ($cat != $user->lang['NO_AVATAR_CATEGORY']) ? str_replace('%2F', '/', rawurlencode($cat)) . '/' . rawurlencode($image) : rawurlencode($image), 'filename' => rawurlencode($image), 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $image))), 'width' => $dims[0], diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php index 8d83152ed6..26eb17c265 100644 --- a/phpBB/phpbb/avatar/manager.php +++ b/phpBB/phpbb/avatar/manager.php @@ -246,7 +246,7 @@ class manager */ public function is_enabled($driver) { - $config_name = $this->get_driver_config_name($driver); + $config_name = $driver->get_config_name(); return $this->config["allow_avatar_{$config_name}"]; } @@ -260,7 +260,7 @@ class manager */ public function get_avatar_settings($driver) { - $config_name = $this->get_driver_config_name($driver); + $config_name = $driver->get_config_name(); return array( 'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), @@ -268,18 +268,6 @@ class manager } /** - * Get the config name of an avatar driver - * - * @param object $driver Avatar driver object - * - * @return string Avatar driver config name - */ - public function get_driver_config_name($driver) - { - return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($driver)); - } - - /** * Replace "error" strings with their real, localized form * * @param \phpbb\user phpBB User object diff --git a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php new file mode 100644 index 0000000000..9b5710c639 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php @@ -0,0 +1,64 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class m_pm_report extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array('\phpbb\db\migration\data\v31x\v316rc1'); + } + + public function update_data() + { + return array( + array('permission.add', array('m_pm_report', true, 'm_report')), + array('custom', array( + array($this, 'update_module_auth'), + ), + ), + ); + } + + public function revert_data() + { + return array( + array('permission.remove', array('m_pm_report')), + array('custom', array( + array($this, 'revert_module_auth'), + ), + ), + ); + } + + public function update_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'acl_m_pm_report' + WHERE module_class = 'mcp' + AND module_basename = 'mcp_pm_reports' + AND module_auth = 'aclf_m_report'"; + $this->db->sql_query($sql); + } + + public function revert_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'aclf_m_report' + WHERE module_class = 'mcp' + AND module_basename = 'mcp_pm_reports' + AND module_auth = 'acl_m_pm_report'"; + $this->db->sql_query($sql); + } +} diff --git a/phpBB/phpbb/db/migration/data/v31x/v317.php b/phpBB/phpbb/db/migration/data/v31x/v317.php new file mode 100644 index 0000000000..15ba2a1feb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/v317.php @@ -0,0 +1,31 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class v317 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\v317rc1', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.7')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v31x/v317rc1.php b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php new file mode 100644 index 0000000000..fa24819094 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/v317rc1.php @@ -0,0 +1,32 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class v317rc1 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v31x\m_pm_report', + '\phpbb\db\migration\data\v31x\v316', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.7-RC1')), + ); + } +} diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php index a9e635b41a..5760c12166 100644 --- a/phpBB/phpbb/notification/type/approve_post.php +++ b/phpBB/phpbb/notification/type/approve_post.php @@ -82,7 +82,7 @@ class approve_post extends \phpbb\notification\type\post $users[$post['poster_id']] = array(''); return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php index 2f4678359c..26e51bf9cd 100644 --- a/phpBB/phpbb/notification/type/approve_topic.php +++ b/phpBB/phpbb/notification/type/approve_topic.php @@ -82,7 +82,7 @@ class approve_topic extends \phpbb\notification\type\topic $users[$post['poster_id']] = array(''); return $this->get_authorised_recipients(array_keys($users), $post['forum_id'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php index 4f2d34cb60..1626add22c 100644 --- a/phpBB/phpbb/notification/type/bookmark.php +++ b/phpBB/phpbb/notification/type/bookmark.php @@ -95,7 +95,7 @@ class bookmark extends \phpbb\notification\type\post $sql = 'SELECT n.* FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt WHERE n.notification_type_id = ' . (int) $this->notification_type_id . ' - AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . ' + AND n.item_parent_id = ' . (int) static::get_item_parent_id($post) . ' AND n.notification_read = 0 AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1'; diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index e25fdcd808..2969da550d 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -135,7 +135,7 @@ class post extends \phpbb\notification\type\base $sql = 'SELECT n.* FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt WHERE n.notification_type_id = ' . (int) $this->notification_type_id . ' - AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . ' + AND n.item_parent_id = ' . (int) static::get_item_parent_id($post) . ' AND n.notification_read = 0 AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1'; diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php index 315b8b0243..5832c99cd2 100644 --- a/phpBB/phpbb/notification/type/post_in_queue.php +++ b/phpBB/phpbb/notification/type/post_in_queue.php @@ -108,7 +108,7 @@ class post_in_queue extends \phpbb\notification\type\post } return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 508ca92fa0..2732cb84e4 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -78,7 +78,7 @@ class quote extends \phpbb\notification\type\post ), $options); $usernames = false; - preg_match_all(self::$regular_expression_match, $post['post_text'], $usernames); + preg_match_all(static::$regular_expression_match, $post['post_text'], $usernames); if (empty($usernames[1])) { @@ -116,7 +116,7 @@ class quote extends \phpbb\notification\type\post $sql = 'SELECT n.user_id FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt WHERE n.notification_type_id = ' . (int) $this->notification_type_id . ' - AND n.item_id = ' . self::get_item_id($post) . ' + AND n.item_id = ' . static::get_item_id($post) . ' AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1'; $result = $this->db->sql_query($sql); @@ -147,7 +147,7 @@ class quote extends \phpbb\notification\type\post { $sql = 'DELETE FROM ' . $this->notifications_table . ' WHERE notification_type_id = ' . (int) $this->notification_type_id . ' - AND item_id = ' . self::get_item_id($post) . ' + AND item_id = ' . static::get_item_id($post) . ' AND ' . $this->db->sql_in_set('user_id', $remove_notifications); $this->db->sql_query($sql); } diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 749cfe0b8e..785e5f243d 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -120,7 +120,7 @@ class report_pm extends \phpbb\notification\type\pm } return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php index 4c60c6b858..6e57b9ac0c 100644 --- a/phpBB/phpbb/notification/type/topic_in_queue.php +++ b/phpBB/phpbb/notification/type/topic_in_queue.php @@ -108,7 +108,7 @@ class topic_in_queue extends \phpbb\notification\type\topic } return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array( - 'item_type' => self::$notification_option['id'], + 'item_type' => static::$notification_option['id'], ))); } diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php index 81ac010785..38d6d9cd2c 100644 --- a/phpBB/phpbb/passwords/driver/salted_md5.php +++ b/phpBB/phpbb/passwords/driver/salted_md5.php @@ -75,7 +75,7 @@ class salted_md5 extends base // happen if pre-determined settings are // directly passed to the driver. The manager // will not do this. Same as the old hashing - // implementatio in phpBB 3.0 + // implementation in phpBB 3.0 return md5($password); } } diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php index 42bbe443d1..e75476f59b 100644 --- a/phpBB/phpbb/permissions.php +++ b/phpBB/phpbb/permissions.php @@ -307,8 +307,9 @@ class permissions 'm_split' => array('lang' => 'ACL_M_SPLIT', 'cat' => 'topic_actions'), 'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'), - 'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'), - 'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'), + 'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'), + 'm_pm_report' => array('lang' => 'ACL_M_PM_REPORT', 'cat' => 'misc'), + 'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'), // Admin Permissions 'a_board' => array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'), diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php index ca78167ec0..7f6267ed32 100644 --- a/phpBB/phpbb/plupload/plupload.php +++ b/phpBB/phpbb/plupload/plupload.php @@ -125,7 +125,7 @@ class plupload // Need to modify some of the $_FILES values to reflect the new file return array( 'tmp_name' => $file_path, - 'name' => $this->request->variable('real_filename', ''), + 'name' => $this->request->variable('real_filename', '', true), 'size' => filesize($file_path), 'type' => $this->mimetype_guesser->guess($file_path, $file_name), ); diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index bad2003000..3ddbd85b36 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -379,7 +379,7 @@ class fulltext_mysql extends \phpbb\search\base } // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( implode(', ', $this->split_words), $type, $fields, @@ -390,7 +390,39 @@ class fulltext_mysql extends \phpbb\search\base implode(',', $ex_fid_ary), $post_visibility, implode(',', $author_ary) - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_mysql_by_keyword_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var string type Searching type ('posts', 'topics') + * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all') + * @var string terms Searching terms ('all', 'any') + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'type', + 'fields', + 'terms', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_by_keyword_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); if ($start < 0) { @@ -610,7 +642,7 @@ class fulltext_mysql extends \phpbb\search\base } // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( '', $type, ($firstpost_only) ? 'firstpost' : '', @@ -623,7 +655,39 @@ class fulltext_mysql extends \phpbb\search\base $post_visibility, implode(',', $author_ary), $author_name, - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_mysql_by_author_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var string type Searching type ('posts', 'topics') + * @var boolean firstpost_only Flag indicating if only topic starting posts are considered + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @var string author_name The username to search on + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'type', + 'firstpost_only', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + 'author_name', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_mysql_by_author_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); if ($start < 0) { diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 02337cbf98..a02f889415 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -57,7 +57,7 @@ class fulltext_native extends \phpbb\search\base protected $must_not_contain_ids = array(); /** - * Post ids of posts containing atleast one word that needs to be excluded + * Post ids of posts containing at least one word that needs to be excluded * @var array */ protected $must_exclude_one_ids = array(); @@ -530,7 +530,7 @@ class fulltext_native extends \phpbb\search\base sort($must_exclude_one_ids); // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( serialize($must_contain_ids), serialize($must_not_contain_ids), serialize($must_exclude_one_ids), @@ -544,7 +544,45 @@ class fulltext_native extends \phpbb\search\base $post_visibility, implode(',', $author_ary), $author_name, - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_native_by_keyword_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var array must_contain_ids Array with post ids of posts containing words that are to be included + * @var array must_not_contain_ids Array with post ids of posts containing words that should not be included + * @var array must_exclude_one_ids Array with post ids of posts containing at least one word that needs to be excluded + * @var string type Searching type ('posts', 'topics') + * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all') + * @var string terms Searching terms ('all', 'any') + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'must_contain_ids', + 'must_not_contain_ids', + 'must_exclude_one_ids', + 'type', + 'fields', + 'terms', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_native_by_keyword_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); // try reading the results from cache $total_results = 0; @@ -980,7 +1018,7 @@ class fulltext_native extends \phpbb\search\base } // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( '', $type, ($firstpost_only) ? 'firstpost' : '', @@ -993,7 +1031,39 @@ class fulltext_native extends \phpbb\search\base $post_visibility, implode(',', $author_ary), $author_name, - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_native_by_author_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var string type Searching type ('posts', 'topics') + * @var boolean firstpost_only Flag indicating if only topic starting posts are considered + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @var string author_name The username to search on + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'type', + 'firstpost_only', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + 'author_name', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_native_by_author_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); // try reading the results from cache $total_results = 0; diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php index d17b26be8f..c2186b0df3 100644 --- a/phpBB/phpbb/search/fulltext_postgres.php +++ b/phpBB/phpbb/search/fulltext_postgres.php @@ -341,7 +341,7 @@ class fulltext_postgres extends \phpbb\search\base } // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( implode(', ', $this->split_words), $type, $fields, @@ -352,7 +352,39 @@ class fulltext_postgres extends \phpbb\search\base implode(',', $ex_fid_ary), $post_visibility, implode(',', $author_ary) - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_postgres_by_keyword_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var string type Searching type ('posts', 'topics') + * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all') + * @var string terms Searching terms ('all', 'any') + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'type', + 'fields', + 'terms', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_by_keyword_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); if ($start < 0) { @@ -585,7 +617,7 @@ class fulltext_postgres extends \phpbb\search\base } // generate a search_key from all the options to identify the results - $search_key = md5(implode('#', array( + $search_key_array = array( '', $type, ($firstpost_only) ? 'firstpost' : '', @@ -598,7 +630,39 @@ class fulltext_postgres extends \phpbb\search\base $post_visibility, implode(',', $author_ary), $author_name, - ))); + ); + + /** + * Allow changing the search_key for cached results + * + * @event core.search_postgres_by_author_modify_search_key + * @var array search_key_array Array with search parameters to generate the search_key + * @var string type Searching type ('posts', 'topics') + * @var boolean firstpost_only Flag indicating if only topic starting posts are considered + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @var string author_name The username to search on + * @since 3.1.7-RC1 + */ + $vars = array( + 'search_key_array', + 'type', + 'firstpost_only', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + 'author_name', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_by_author_modify_search_key', compact($vars))); + + $search_key = md5(implode('#', $search_key_array)); if ($start < 0) { diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index cd7add72f0..612ef8f1f3 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -358,6 +358,23 @@ class fulltext_sphinx $non_unique = array('sql_query_pre' => true, 'sql_attr_uint' => true, 'sql_attr_timestamp' => true, 'sql_attr_str2ordinal' => true, 'sql_attr_bool' => true); $delete = array('sql_group_column' => true, 'sql_date_column' => true, 'sql_str2ordinal_column' => true); + + /** + * Allow adding/changing the Sphinx configuration data + * + * @event core.search_sphinx_modify_config_data + * @var array config_data Array with the Sphinx configuration data + * @var array non_unique Array with the Sphinx non-unique variables to delete + * @var array delete Array with the Sphinx variables to delete + * @since 3.1.7-RC1 + */ + $vars = array( + 'config_data', + 'non_unique', + 'delete', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_sphinx_modify_config_data', compact($vars))); + foreach ($config_data as $section_name => $section_data) { $section = $config_object->get_section_by_name($section_name); @@ -531,6 +548,41 @@ class fulltext_sphinx $this->sphinx->SetFilter('topic_id', array($topic_id)); } + /** + * Allow modifying the Sphinx search options + * + * @event core.search_sphinx_keywords_modify_options + * @var string type Searching type ('posts', 'topics') + * @var string fields Searching fields ('titleonly', 'msgonly', 'firstpost', 'all') + * @var string terms Searching terms ('all', 'any') + * @var int sort_days Time, in days, of the oldest possible post to list + * @var string sort_key The sort type used from the possible sort types + * @var int topic_id Limit the search to this topic_id only + * @var array ex_fid_ary Which forums not to search on + * @var string post_visibility Post visibility data + * @var array author_ary Array of user_id containing the users to filter the results to + * @var string author_name The username to search on + * @var object sphinx The Sphinx searchd client object + * @since 3.1.7-RC1 + */ + $sphinx = $this->sphinx; + $vars = array( + 'type', + 'fields', + 'terms', + 'sort_days', + 'sort_key', + 'topic_id', + 'ex_fid_ary', + 'post_visibility', + 'author_ary', + 'author_name', + 'sphinx', + ); + extract($this->phpbb_dispatcher->trigger_event('core.search_sphinx_keywords_modify_options', compact($vars))); + $this->sphinx = $sphinx; + unset($sphinx); + $search_query_prefix = ''; switch ($fields) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index a5c8f264e0..999d9e58ad 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -446,39 +446,6 @@ class session if (!$session_expired) { - // Only update session DB a minute or so after last update or if page changes - if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) - { - $sql_ary = array('session_time' => $this->time_now); - - // Do not update the session page for ajax requests, so the view online still works as intended - if ($this->update_session_page && !$request->is_ajax()) - { - $sql_ary['session_page'] = substr($this->page['page'], 0, 199); - $sql_ary['session_forum_id'] = $this->page['forum']; - } - - $db->sql_return_on_error(true); - - $this->update_session($sql_ary); - - $db->sql_return_on_error(false); - - // If the database is not yet updated, there will be an error due to the session_forum_id - // @todo REMOVE for 3.0.2 - if ($result === false) - { - unset($sql_ary['session_forum_id']); - - $this->update_session($sql_ary); - } - - if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts']) - { - $this->leave_newly_registered(); - } - } - $this->data['is_registered'] = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false; $this->data['is_bot'] = (!$this->data['is_registered'] && $this->data['user_id'] != ANONYMOUS) ? true : false; $this->data['user_lang'] = basename($this->data['user_lang']); @@ -734,18 +701,6 @@ class session // Only update session DB a minute or so after last update or if page changes if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) { - $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now; - - $sql_ary = array('session_time' => $this->time_now, 'session_last_visit' => $this->time_now, 'session_admin' => 0); - - if ($this->update_session_page) - { - $sql_ary['session_page'] = substr($this->page['page'], 0, 199); - $sql_ary['session_forum_id'] = $this->page['forum']; - } - - $this->update_session($sql_ary); - // Update the last visit time $sql = 'UPDATE ' . USERS_TABLE . ' SET user_lastvisit = ' . (int) $this->data['session_time'] . ' @@ -1599,4 +1554,39 @@ class session $vars = array('session_data', 'session_id'); extract($phpbb_dispatcher->trigger_event('core.update_session_after', compact($vars))); } + + public function update_session_infos() + { + global $db, $request; + + // No need to update if it's a new session. Informations are already inserted by session_create() + if (isset($this->data['session_created']) && $this->data['session_created']) + { + return; + } + + // Only update session DB a minute or so after last update or if page changes + if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) + { + $sql_ary = array('session_time' => $this->time_now); + + // Do not update the session page for ajax requests, so the view online still works as intended + if ($this->update_session_page && !$request->is_ajax()) + { + $sql_ary['session_page'] = substr($this->page['page'], 0, 199); + $sql_ary['session_forum_id'] = $this->page['forum']; + } + + $db->sql_return_on_error(true); + + $this->update_session($sql_ary); + + $db->sql_return_on_error(false); + + if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts']) + { + $this->leave_newly_registered(); + } + } + } } diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php index 5ce8ca2d4d..967d96d73a 100644 --- a/phpBB/phpbb/user_loader.php +++ b/phpBB/phpbb/user_loader.php @@ -189,12 +189,7 @@ class user_loader return ''; } - if (!function_exists('get_user_avatar')) - { - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); - } - - return get_user_avatar($user['user_avatar'], $user['user_avatar_type'], $user['user_avatar_width'], $user['user_avatar_height'], 'USER_AVATAR', false, $lazy); + return phpbb_get_avatar(\phpbb\avatar\manager::clean_row($user, 'user'), 'USER_AVATAR', false, $lazy); } /** diff --git a/phpBB/posting.php b/phpBB/posting.php index 2bd3a1a1d2..5fcd427b2b 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1027,7 +1027,8 @@ if ($submit || $preview || $refresh) $message_parser->bbcode_bitfield = $post_data['bbcode_bitfield']; } - if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id)) + $ignore_flood = $auth->acl_get('u_ignoreflood') ? true : $auth->acl_get('f_ignoreflood', $forum_id); + if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$ignore_flood) { // Flood check $last_post_time = 0; diff --git a/phpBB/search.php b/phpBB/search.php index d8f0bd1426..7469daa49c 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -427,6 +427,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); $s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = ''; + + $template->assign_var('U_MARK_ALL_READ', ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : ''); break; case 'newposts': @@ -483,6 +485,24 @@ if ($keywords || $author || $author_id || $search_id || $submit) } } + /** + * Event to modify data after pre-made searches + * + * @event core.search_modify_param_after + * @var string l_search_title The title of the search page + * @var string search_id Predefined search type name + * @var string show_results Display topics or posts + * @var string sql SQL query corresponding to the pre-made search id + * @since 3.1.7-RC1 + */ + $vars = array( + 'l_search_title', + 'search_id', + 'show_results', + 'sql', + ); + extract($phpbb_dispatcher->trigger_event('core.search_modify_param_after', compact($vars))); + // show_results should not change after this $per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page']; $total_match_count = 0; @@ -594,6 +614,20 @@ if ($keywords || $author || $author_id || $search_id || $submit) $u_search .= ($search_fields != 'all') ? '&sf=' . $search_fields : ''; $u_search .= ($return_chars != 300) ? '&ch=' . $return_chars : ''; + /** + * Event to add or modify search URL parameters + * + * @event core.search_modify_url_parameters + * @var string u_search Search URL parameters string + * @var string search_id Predefined search type name + * @since 3.1.7-RC1 + */ + $vars = array( + 'u_search', + 'search_id', + ); + extract($phpbb_dispatcher->trigger_event('core.search_modify_url_parameters', compact($vars))); + if ($sql_where) { if ($show_results == 'posts') @@ -704,6 +738,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } + $sql_order_by = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); + /** * Event to modify the SQL query before the topic data is retrieved * @@ -712,16 +748,30 @@ if ($keywords || $author || $author_id || $search_id || $submit) * @var string sql_from The SQL FROM string used by search to get topic data * @var string sql_where The SQL WHERE string used by search to get topic data * @var int total_match_count The total number of search matches + * @var array sort_by_sql Array of SQL sorting instructions + * @var string sort_dir The sorting direction + * @var string sort_key The sorting key + * @var string sql_order_by The SQL ORDER BY string used by search to get topic data * @since 3.1.0-a1 * @changed 3.1.0-RC5 Added total_match_count + * @changed 3.1.7-RC1 Added sort_by_sql, sort_dir, sort_key, sql_order_by */ - $vars = array('sql_select', 'sql_from', 'sql_where', 'total_match_count'); + $vars = array( + 'sql_select', + 'sql_from', + 'sql_where', + 'total_match_count', + 'sort_by_sql', + 'sort_dir', + 'sort_key', + 'sql_order_by', + ); extract($phpbb_dispatcher->trigger_event('core.search_get_topic_data', compact($vars))); $sql = "SELECT $sql_select FROM $sql_from - WHERE $sql_where"; - $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); + WHERE $sql_where + ORDER BY $sql_order_by"; } $result = $db->sql_query($sql); $result_topic_id = 0; diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index 13433c389f..f1a34bcf68 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -21,8 +21,8 @@ # General Information about this style name = prosilver copyright = © phpBB Limited, 2007 -style_version = 3.1.6 -phpbb_version = 3.1.6 +style_version = 3.1.7 +phpbb_version = 3.1.7 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 76c605dd19..e3780f024a 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -242,7 +242,14 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var mostVoted = (res.vote_counts[optionId] === mostVotes); var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[optionId] / res.total_votes) * 100); var percentRel = (mostVotes === 0) ? 0 : Math.round((res.vote_counts[optionId] / mostVotes) * 100); - + var altText; + + altText = $this.attr('data-alt-text'); + if (voted) { + $this.attr('title', $.trim(altText)); + } else { + $this.attr('title', ''); + }; $this.toggleClass('voted', voted); $this.toggleClass('most-votes', mostVoted); diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 8e5b257ba4..99f3108fad 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -159,7 +159,10 @@ function selectCode(a) { try { s.setBaseAndExtent(e, 0, e, l); } catch (error) { - s.setBaseAndExtent(e, 0, e, 1); + r = document.createRange(); + r.selectNodeContents(e); + s.removeAllRanges(); + s.addRange(r); } } // Firefox and Opera diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 81d1be795e..e5777d206a 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -91,9 +91,9 @@ <form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}"> <p class="post-notice deleted"> - <input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" /> + <!-- IF S_CAN_DELETE_POST --><input class="button2" type="submit" value="{L_DELETE}" name="action[delete]" /> <!-- ENDIF --> <input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" /> - <!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="unapproved_posts" /><!-- ENDIF --> + <!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="deleted_posts" /><!-- ENDIF --> <input type="hidden" name="post_id_list[]" value="{POST_ID}" /> {S_FORM_TOKEN} </p> diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 414569019e..5fba59159c 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -14,7 +14,11 @@ <!-- IF S_SHOW_GROUP --> <h2 class="group-title"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{GROUP_NAME}</h2> + <!-- IF U_MANAGE --> + <p class="right responsive-center manage rightside"><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a></p> + <!-- ENDIF --> <p>{GROUP_DESC} {GROUP_TYPE}</p> + <p> <!-- IF AVATAR_IMG -->{AVATAR_IMG}<!-- ENDIF --> <!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --> @@ -101,8 +105,8 @@ <!-- ENDIF --> <!-- ENDIF --> - <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->"> - <td><span class="rank-img"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></span><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF --><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- EVENT memberlist_body_username_append --><!-- IF S_IN_SEARCH_POPUP --><br />[ <a href="#" onclick="insert_single_user('#results', '{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td> + <tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF memberrow.S_INACTIVE --> inactive<!-- ENDIF -->"> + <td><span class="rank-img"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></span><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF --><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- IF memberrow.S_INACTIVE --> ({L_INACTIVE})<!-- ENDIF --><!-- EVENT memberlist_body_username_append --><!-- IF S_IN_SEARCH_POPUP --><br />[ <a href="#" onclick="insert_single_user('#results', '{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td> <td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td> <td class="info"><!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- BEGINELSE --> <!-- END custom_fields --></td> <td>{memberrow.JOINED}</td> diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index bc71aa0969..874607d913 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -9,6 +9,10 @@ <p>{L_SEND_IM_EXPLAIN}</p> + <!-- IF S_SENT_JABBER --> + <p>{L_IM_SENT_JABBER}</p> + <!-- ENDIF --> + <fieldset> <dl class="fields2"> <dt><label>{L_IM_RECIPIENT}{L_COLON}</label></dt> @@ -24,10 +28,6 @@ <dt> </dt> <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd> </dl> - <dl class="fields2"> - <dt> </dt> - <dd>{L_IM_SENT_JABBER}</dd> - </dl> <!-- ELSE IF S_NO_SEND_JABBER --> <dl class="fields2"> <dt> </dt> diff --git a/phpBB/styles/prosilver/template/memberlist_team.html b/phpBB/styles/prosilver/template/memberlist_team.html index fd2ba564d3..b7f2d66d94 100644 --- a/phpBB/styles/prosilver/template/memberlist_team.html +++ b/phpBB/styles/prosilver/template/memberlist_team.html @@ -8,7 +8,7 @@ <div class="forumbg forumbg-table"> <div class="inner"> - <table class="table1"> + <table class="table1" id="team"> <thead> <tr> <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}{L_USERNAME}"><span class="rank-img">{L_RANK} </span><!-- IF group.U_GROUP --><a href="{group.U_GROUP}">{group.GROUP_NAME}</a><!-- ELSE -->{group.GROUP_NAME}<!-- ENDIF --></th> @@ -18,8 +18,8 @@ </thead> <tbody> <!-- BEGIN user --> - <tr class="<!-- IF group.user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->"> - <td><!-- IF group.user.RANK_IMG --><span class="rank-img">{group.user.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{group.user.RANK_TITLE}</span><!-- ENDIF -->{group.user.USERNAME_FULL}</td> + <tr class="<!-- IF group.user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF group.user.S_INACTIVE --> inactive<!-- ENDIF -->"> + <td><!-- IF group.user.RANK_IMG --><span class="rank-img">{group.user.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{group.user.RANK_TITLE}</span><!-- ENDIF -->{group.user.USERNAME_FULL}<!-- IF group.user.S_INACTIVE --> ({L_INACTIVE})<!-- ENDIF --></td> <td class="info"><!-- IF group.user.U_GROUP --> <a<!-- IF group.user.GROUP_COLOR --> style="font-weight: bold; color: #{group.user.GROUP_COLOR}"<!-- ENDIF --> href="{group.user.U_GROUP}">{group.user.GROUP_NAME}</a> <!-- ELSE --> diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index ecba72f6f4..ff54f3a0aa 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -37,7 +37,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS forum_fn.js --> <!-- INCLUDEJS ajax.js --> diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html index 6a8846626e..ca8ccc0a6b 100644 --- a/phpBB/styles/prosilver/template/quickreply_editor.html +++ b/phpBB/styles/prosilver/template/quickreply_editor.html @@ -4,6 +4,7 @@ <div class="inner"> <h2 class="quickreply-title">{L_QUICKREPLY}</h2> <fieldset class="fields1"> + <!-- EVENT quickreply_editor_subject_before --> <dl style="clear: left;"> <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt> <dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd> diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index 8d56a103d2..618e2680ba 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -9,7 +9,9 @@ <div class="inner"> <h3>{L_SEARCH_QUERY}</h3> + <!-- EVENT search_body_search_query_before --> <fieldset> + <!-- EVENT search_body_search_query_prepend --> <dl> <dt><label for="keywords">{L_SEARCH_KEYWORDS}{L_COLON}</label><br /><span>{L_SEARCH_KEYWORDS_EXPLAIN}</span></dt> <dd><input type="search" class="inputbox" name="keywords" id="keywords" size="40" title="{L_SEARCH_KEYWORDS}" /></dd> @@ -20,7 +22,9 @@ <dt><label for="author">{L_SEARCH_AUTHOR}{L_COLON}</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt> <dd><input type="search" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd> </dl> + <!-- EVENT search_body_search_query_append --> </fieldset> + <!-- EVENT search_body_search_query_after --> </div> </div> @@ -30,7 +34,9 @@ <h3>{L_SEARCH_OPTIONS}</h3> + <!-- EVENT search_body_search_options_before --> <fieldset> + <!-- EVENT search_body_search_options_prepend --> <dl> <dt><label for="search_forum">{L_SEARCH_FORUMS}{L_COLON}</label><br /><span>{L_SEARCH_FORUMS_EXPLAIN}</span></dt> <dd><select name="fid[]" id="search_forum" multiple="multiple" size="8" title="{L_SEARCH_FORUMS}">{S_FORUM_OPTIONS}</select></dd> @@ -49,9 +55,11 @@ <dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd> <dd><label for="sf4"><input type="radio" name="sf" id="sf4" value="firstpost" /> {L_SEARCH_FIRST_POST}</label></dd> </dl> + <!-- EVENT search_body_search_options_append --> <hr class="dashed" /> + <!-- EVENT search_body_search_display_options_prepend --> <dl> <dt><label for="show_results1">{L_DISPLAY_RESULTS}{L_COLON}</label></dt> <dd> @@ -74,7 +82,9 @@ <dt><label>{L_RETURN_FIRST}{L_COLON}</label></dt> <dd><select name="ch" title="{L_RETURN_FIRST}">{S_CHARACTER_OPTIONS}</select> {L_POST_CHARACTERS}</dd> </dl> + <!-- EVENT search_body_search_display_options_append --> </fieldset> + <!-- EVENT search_body_search_options_after --> </div> </div> @@ -91,7 +101,9 @@ </div> </form> +<!-- EVENT search_body_form_after --> +<!-- EVENT search_body_recent_search_before --> <!-- IF .recentsearch --> <div class="forumbg forumbg-table"> <div class="inner"> @@ -119,5 +131,6 @@ </div> </div> <!-- ENDIF --> +<!-- EVENT search_body_recent_search_after --> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index f76afe3767..57d80bd804 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -33,6 +33,7 @@ <!-- EVENT search_results_searchbox_after --> <div class="pagination"> + <!-- IF U_MARK_ALL_READ --><a href="{U_MARK_ALL_READ}" class="mark-read" accesskey="m">{L_MARK_ALL_READ}</a> •<!-- ENDIF --> {SEARCH_MATCHES} <!-- IF .pagination --> <!-- INCLUDE pagination.html --> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 123f8992f2..77980a9dea 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -21,7 +21,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> <script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS forum_fn.js --> <!-- INCLUDEJS ajax.js --> diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html index 2a0f403782..80c7f28ca3 100644 --- a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html +++ b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html @@ -10,7 +10,8 @@ <!-- BEGIN avatar_local_row --> <!-- BEGIN avatar_local_col --> <label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br /> - <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label> + <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" + value="{avatar_local_row.avatar_local_col.AVATAR_FILE}"<!-- IF avatar_local_row.avatar_local_col.CHECKED --> checked="checked"<!-- ENDIF --> /></label> <!-- END avatar_local_col --> <!-- END avatar_local_row --> </div> diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index fafd0cce00..655c0fc48c 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -14,7 +14,7 @@ // ]]> </script> -<form method="post" action="{S_UCP_ACTION}" id="register"> +<form id="register" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}> <div class="panel"> <div class="inner"> diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 2679a2cd29..087cf668cf 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -145,7 +145,9 @@ <ul class="topiclist topics"> <!-- ENDIF --> + <!-- EVENT viewforum_body_topic_row_before --> <li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->"> + <!-- EVENT viewforum_body_topic_row_prepend --> <dl class="icon {topicrow.TOPIC_IMG_STYLE}"> <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"> <!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF --> @@ -195,7 +197,9 @@ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{topicrow.LAST_POST_TIME}</span> </dd> </dl> + <!-- EVENT viewforum_body_topic_row_append --> </li> + <!-- EVENT viewforum_body_topic_row_after --> <!-- IF topicrow.S_LAST_ROW --> </ul> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index b7506608d9..d2a253bb77 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -84,7 +84,7 @@ <fieldset class="polls"> <!-- BEGIN poll_option --> <!-- EVENT viewtopic_body_poll_option_before --> - <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}"> + <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}"> <dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt> <!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF --> <dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd> @@ -216,6 +216,7 @@ <!-- ENDIF --> <div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->> + <!-- EVENT viewtopic_body_post_subject_before --> <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3> <!-- DEFINE $SHOW_POST_BUTTONS = (postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE) --> @@ -278,7 +279,9 @@ <form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}"> <p class="post-notice deleted"> <strong>{L_POST_DELETED_ACTION}</strong> - <input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" /> + <!-- IF postrow.S_DELETE_PERMANENT --> + <input class="button2" type="submit" value="{L_DELETE}" name="action[delete]" /> + <!-- ENDIF --> <input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" /> <input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" /> {S_FORM_TOKEN} @@ -328,7 +331,9 @@ </div> - <div class="back2top"><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div> + <!-- EVENT viewtopic_body_postrow_back2top_before --> + <div class="back2top"><!-- EVENT viewtopic_body_postrow_back2top_prepend --><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a><!-- EVENT viewtopic_body_postrow_back2top_append --></div> + <!-- EVENT viewtopic_body_postrow_back2top_after --> </div> </div> diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 380b285b83..92a7db81d9 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -672,7 +672,7 @@ fieldset.polls dd div { text-align: right; font-family: Arial, Helvetica, sans-serif; font-weight: bold; - padding: 0 2px; + padding: 2px 2px 0 2px; overflow: visible; min-width: 8px; } @@ -842,3 +842,7 @@ table.fixed-width-table { background: rgba(0, 0, 0, .3); border-radius: 3px; } + +#memberlist tr.inactive, #team tr.inactive { + font-style: italic; +} diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css index 7d4092c3fe..b17cca5f25 100644 --- a/phpBB/styles/prosilver/theme/plupload.css +++ b/phpBB/styles/prosilver/theme/plupload.css @@ -15,6 +15,11 @@ width: 30%; } +.attach-comment .inputbox { + resize: vertical; + width: 100%; +} + .attach-filesize { width: 15%; } diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg index 8077c1d51e..77cea1a55f 100644 --- a/phpBB/styles/subsilver2/style.cfg +++ b/phpBB/styles/subsilver2/style.cfg @@ -21,8 +21,8 @@ # General Information about this style name = subsilver2 copyright = © 2005 phpBB Limited -style_version = 3.1.6 -phpbb_version = 3.1.6 +style_version = 3.1.7 +phpbb_version = 3.1.7 # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index 79b78f32a4..9044896bca 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -64,7 +64,7 @@ <!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF --> <td class="gen" align="center"> {memberrow.ROW_NUMBER} </td> - <td class="genmed" align="{S_CONTENT_FLOW_BEGIN}"><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- EVENT memberlist_body_username_append --><!-- IF S_SELECT_SINGLE --> [ <a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td> + <td class="genmed" align="{S_CONTENT_FLOW_BEGIN}"><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- IF memberrow.S_INACTIVE --> <em>({L_INACTIVE})</em><!-- ENDIF --><!-- EVENT memberlist_body_username_append --><!-- IF S_SELECT_SINGLE --> [ <a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a> ]<!-- ENDIF --></td> <td class="genmed" align="center" nowrap="nowrap"> {memberrow.JOINED} </td> <td class="gen" align="center">{memberrow.POSTS}</td> <td class="gen" align="center"><!-- EVENT memberlist_body_rank_prepend --><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --><!-- EVENT memberlist_body_rank_append --></td> diff --git a/phpBB/styles/subsilver2/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html index 4140c8cdbf..ff8c96c120 100644 --- a/phpBB/styles/subsilver2/template/memberlist_group.html +++ b/phpBB/styles/subsilver2/template/memberlist_group.html @@ -5,7 +5,7 @@ </tr> <tr> <td class="row1" width="20%"><b class="genmed">{L_GROUP_NAME}{L_COLON}</b></td> - <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b></td> + <td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b> <!-- IF U_MANAGE --><a href="{U_MANAGE}">{L_MANAGE_GROUP}</a><!-- ENDIF --></td> <!-- IF AVATAR_IMG or RANK_IMG or GROUP_RANK or U_PM --> <td class="row1" width="33%" rowspan="2" align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<br /><!-- ENDIF --><!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --><!-- IF GROUP_RANK --><span class="gensmall">{GROUP_RANK}</span><br /><br /><!-- ENDIF --><!-- IF U_PM --><a href="{U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF --></td> <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index a19229605a..ecd9aca86f 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -7,6 +7,11 @@ <tr> <th colspan="2">{L_SEND_IM}</th> </tr> + <!-- IF S_SENT_JABBER --> + <tr> + <td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td> + </tr> + <!-- ENDIF --> <tr> <td class="row3" colspan="2"><span class="gensmall">{L_SEND_IM_EXPLAIN}</span></td> </tr> @@ -23,12 +28,6 @@ <tr> <td class="cat" colspan="2" align="center"><input class="btnmain" name="submit" type="submit" value="{L_IM_SEND}" /></td> </tr> - <tr> - <td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td> - </tr> - <tr> - <td class="cat" colspan="2" align="center"></td> - </tr> <!-- ELSEIF S_NO_SEND_JABBER --> <tr> <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td> diff --git a/phpBB/styles/subsilver2/template/memberlist_team.html b/phpBB/styles/subsilver2/template/memberlist_team.html index a4f38aafc4..18995b6e50 100644 --- a/phpBB/styles/subsilver2/template/memberlist_team.html +++ b/phpBB/styles/subsilver2/template/memberlist_team.html @@ -17,7 +17,7 @@ <!-- BEGIN user --> <!-- IF group.user.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF --> - <td class="gen" align="center"><strong>{group.user.USERNAME_FULL}</strong></td> + <td class="gen" align="center"><strong>{group.user.USERNAME_FULL}</strong><!-- IF group.user.S_INACTIVE --> <em>({L_INACTIVE})</em><!-- ENDIF --></td> <!-- IF S_DISPLAY_MODERATOR_FORUMS --><td class="gensmall" align="center"><!-- IF group.user.FORUM_OPTIONS --><select style="width: 100%;">{group.user.FORUMS}</select><!-- ELSEIF group.user.FORUMS -->{group.user.FORUMS}<!-- ELSE -->-<!-- ENDIF --></td><!-- ENDIF --> <td class="gensmall" align="center" nowrap="nowrap"> <!-- IF group.user.U_GROUP --> diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html index 5afc723f48..a7614e841f 100644 --- a/phpBB/styles/subsilver2/template/quickreply_editor.html +++ b/phpBB/styles/subsilver2/template/quickreply_editor.html @@ -4,6 +4,7 @@ <tr> <th align="center" colspan="2">{L_QUICKREPLY}</th> </tr> + <!-- EVENT quickreply_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="124" tabindex="2" value="{SUBJECT}" /></td> diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html index d3aa758b43..84ea73ea30 100644 --- a/phpBB/styles/subsilver2/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -6,9 +6,12 @@ <form method="get" action="{S_SEARCH_ACTION}"> <table class="tablebg" width="100%" cellspacing="1"> + <!-- DEFINE $COLSPAN = 4 --> + <!-- EVENT search_body_search_query_before --> <tr> - <th colspan="4">{L_SEARCH_QUERY}</th> + <th colspan="{$COLSPAN}">{L_SEARCH_QUERY}</th> </tr> + <!-- EVENT search_body_search_query_prepend --> <tr> <td class="row1" colspan="2" width="50%"><b class="genmed">{L_SEARCH_KEYWORDS}{L_COLON} </b><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td> <td class="row2" colspan="2" valign="top"><input type="text" style="width: 300px" class="post" name="keywords" size="30" /><br /><input type="radio" class="radio" name="terms" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_ALL_TERMS}</span><br /><input type="radio" class="radio" name="terms" value="any" /> <span class="genmed">{L_SEARCH_ANY_TERMS}</span></td> @@ -21,15 +24,21 @@ <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_FORUMS}{L_COLON} </b><br /><span class="gensmall">{L_SEARCH_FORUMS_EXPLAIN}</span></td> <td class="row2" colspan="2"><select name="fid[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></td> </tr> + <!-- EVENT search_body_search_query_append --> + <!-- EVENT search_body_search_query_after --> + <!-- EVENT search_body_search_options_before --> <tr> - <th colspan="4">{L_SEARCH_OPTIONS}</th> + <th colspan="{$COLSPAN}">{L_SEARCH_OPTIONS}</th> </tr> + <!-- EVENT search_body_search_options_prepend --> <tr> <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_SUBFORUMS}{L_COLON} </b></td> <td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sc" value="1" checked="checked" /> <span class="genmed">{L_YES}</span> <input type="radio" class="radio" name="sc" value="0" /> <span class="genmed">{L_NO}</span></td> <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_WITHIN}{L_COLON} </b></td> <td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sf" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_TITLE_MSG}</span><br /><input type="radio" class="radio" name="sf" value="msgonly" /> <span class="genmed">{L_SEARCH_MSG_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="titleonly" /> <span class="genmed">{L_SEARCH_TITLE_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="firstpost" /> <span class="genmed">{L_SEARCH_FIRST_POST}</span></td> </tr> + <!-- EVENT search_body_search_options_append --> + <!-- EVENT search_body_search_display_options_prepend --> <tr> <td class="row1"><b class="genmed">{L_RESULT_SORT}{L_COLON} </b></td> <td class="row2" nowrap="nowrap">{S_SELECT_SORT_KEY}<br /><input type="radio" class="radio" name="sd" value="a" /> <span class="genmed">{L_SORT_ASCENDING}</span><br /><input type="radio" class="radio" name="sd" value="d" checked="checked" /> <span class="genmed">{L_SORT_DESCENDING}</span></td> @@ -42,15 +51,19 @@ <td class="row1" nowrap="nowrap"><b class="genmed">{L_RETURN_FIRST}{L_COLON} </b></td> <td class="row2" nowrap="nowrap"><select name="ch">{S_CHARACTER_OPTIONS}</select> <span class="genmed">{L_POST_CHARACTERS}</span></td> </tr> + <!-- EVENT search_body_search_display_options_append --> + <!-- EVENT search_body_search_options_after --> <tr> - <td class="cat" colspan="4" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" name="submit" type="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> + <td class="cat" colspan="{$COLSPAN}" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" name="submit" type="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> </tr> </table> </form> + <!-- EVENT search_body_form_after --> <br clear="all" /> + <!-- EVENT search_body_recent_search_before --> <!-- IF .recentsearch --> <table class="tablebg" width="100%" cellspacing="1"> <tr> @@ -67,6 +80,7 @@ <br clear="all" /> <!-- ENDIF --> + <!-- EVENT search_body_recent_search_after --> </div> diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html index 919cf49e44..921126ba22 100644 --- a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html +++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html @@ -19,7 +19,11 @@ </tr> <tr> <!-- BEGIN avatar_local_option --> - <td class="row2" align="center"><input type="radio" class="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_option.S_OPTIONS_AVATAR}" /></td> + <td class="row2" align="center"><input type="radio" class="radio" name="avatar_local_file" + id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" + value="{avatar_local_row.avatar_local_option.S_OPTIONS_AVATAR}" + <!-- IF avatar_local_row.avatar_local_option.CHECKED --> checked="checked"<!-- ENDIF --> /> + </td> <!-- END avatar_local_option --> </tr> <!-- BEGINELSE --> diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index 83b01b9f6d..ff16b62fd3 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -34,7 +34,9 @@ <!-- BEGIN topicrow --> + <!-- EVENT viewforum_body_topic_row_before --> <tr> + <!-- EVENT viewforum_body_topic_row_prepend --> <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td> <!-- IF S_TOPIC_ICONS --> <td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td> @@ -75,7 +77,9 @@ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF --> </p> </td> + <!-- EVENT viewforum_body_topic_row_append --> </tr> + <!-- EVENT viewforum_body_topic_row_after --> <!-- BEGINELSE --> diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index ea64bc837f..e340334cf8 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -171,6 +171,7 @@ <!-- EVENT viewtopic_body_post_author_after --> </td> <!-- EVENT viewtopic_body_postrow_post_details_before --> + <!-- EVENT viewtopic_body_post_subject_before --> <td width="100%" height="25"> <table width="100%" cellspacing="0"> <tr> @@ -345,7 +346,9 @@ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td class="profile"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td> + <!-- EVENT viewtopic_body_postrow_back2top_before --> + <td class="profile"><!-- EVENT viewtopic_body_postrow_back2top_prepend --><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong><!-- EVENT viewtopic_body_postrow_back2top_append --></td> + <!-- EVENT viewtopic_body_postrow_back2top_after --> <td> <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};"> <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}" class="imageset">{PROFILE_IMG}</a><!-- ENDIF --> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index cd55114bad..6607f24833 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -264,7 +264,7 @@ gen_forum_auth_level('forum', $forum_id, $forum_data['forum_status']); $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); -$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 't.topic_title', 'v' => 't.topic_views'); +$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 'LOWER(t.topic_title)', 'v' => 't.topic_views'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir); diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 583e297682..87848f4485 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -187,7 +187,7 @@ while ($row = $db->sql_fetchrow($result)) if (!$row['session_viewonline']) { - $view_online = ($auth->acl_get('u_viewonline')) ? true : false; + $view_online = ($auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id']) ? true : false; $logged_hidden_online++; $username_full = '<em>' . $username_full . '</em>'; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 26524283e1..fcc44abc33 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1821,11 +1821,20 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('f_reply', $forum_id)) ); + // Only display the quote button if the post is quotable. Posts not approved are not quotable. + $quote_allowed = ($quote_allowed && $row['post_visibility'] == ITEM_APPROVED) ? true : false; + $delete_allowed = $force_delete_allowed || ($user->data['is_registered'] && ( ($auth->acl_get('m_delete', $forum_id) || ($auth->acl_get('m_softdelete', $forum_id) && $row['post_visibility'] != ITEM_DELETED)) || (!$s_cannot_delete && !$s_cannot_delete_lastpost && !$s_cannot_delete_time && !$s_cannot_delete_locked) )); + $softdelete_allowed = ($auth->acl_get('m_softdelete', $forum_id) || + ($auth->acl_get('f_softdelete', $forum_id) && $user->data['user_id'] == $poster_id)) && ($row['post_visibility'] != ITEM_DELETED); + + $permanent_delete_allowed = ($auth->acl_get('m_delete', $forum_id) || + ($auth->acl_get('f_delete', $forum_id) && $user->data['user_id'] == $poster_id)); + // Can this user receive a Private Message? $can_receive_pm = ( // They must be a "normal" user @@ -1888,7 +1897,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_EDIT' => ($edit_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '', 'U_QUOTE' => ($quote_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '', 'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '', - 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '', + 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=' . (($softdelete_allowed) ? 'soft_delete' : 'delete') . "&f=$forum_id&p={$row['post_id']}") : '', 'U_SEARCH' => $user_cache[$poster_id]['search'], 'U_PM' => $u_pm, @@ -1927,6 +1936,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '', 'S_POST_HIDDEN' => $row['hide_post'], 'L_POST_DISPLAY' => ($row['hide_post']) ? $user->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '', + 'S_DELETE_PERMANENT' => $permanent_delete_allowed, ); $user_poster_data = $user_cache[$poster_id]; diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index 9b97fa6a68..344eef38ff 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -64,10 +64,13 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case ->method('get_name') ->will($this->returnValue('avatar.driver.foobar')); // barfoo driver can't be mocked with constructor arguments - $this->avatar_barfoo = $this->getMock('\phpbb\avatar\driver\barfoo', array('get_name')); + $this->avatar_barfoo = $this->getMock('\phpbb\avatar\driver\barfoo', array('get_name', 'get_config_name')); $this->avatar_barfoo->expects($this->any()) ->method('get_name') ->will($this->returnValue('avatar.driver.barfoo')); + $this->avatar_barfoo->expects($this->any()) + ->method('get_config_name') + ->will($this->returnValue('barfoo')); $avatar_drivers = array($this->avatar_foobar, $this->avatar_barfoo); foreach ($this->avatar_drivers() as $driver) diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index 7be8957ec7..8a71a5ce04 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -41,6 +41,8 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case { parent::setUp(); + $this->purge_cache(); + $this->get_db(); // Clear the phpbb_ext table diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php index 53bb9af5ca..f615114c08 100644 --- a/tests/functional/extension_global_lang_test.php +++ b/tests/functional/extension_global_lang_test.php @@ -52,6 +52,13 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_ $this->purge_cache(); } + public function tearDown() + { + parent::tearDown(); + + $this->purge_cache(); + } + public function test_load_extension_lang_globally() { $this->phpbb_extension_manager->enable('foo/bar'); diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php index ad5c4a5cab..e48dfc043a 100644 --- a/tests/functional/feed_test.php +++ b/tests/functional/feed_test.php @@ -20,6 +20,12 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case static public $init_values = array(); + public function setUp() + { + parent::setUp(); + $this->purge_cache(); + } + public function __construct($name = null, array $data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php index 080822d249..0d2fdf082e 100644 --- a/tests/functional/metadata_manager_test.php +++ b/tests/functional/metadata_manager_test.php @@ -24,6 +24,13 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case 'foo/bar/', ); + public function tearDown() + { + $this->purge_cache(); + + parent::tearDown(); + } + static public function setUpBeforeClass() { parent::setUpBeforeClass(); diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php index ee71597ffc..d358681ad1 100644 --- a/tests/functional/plupload_test.php +++ b/tests/functional/plupload_test.php @@ -33,6 +33,7 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case public function setUp() { parent::setUp(); + $this->purge_cache(); $this->set_extension_group_permission(1); $this->path = __DIR__ . '/fixtures/files/'; $this->add_lang('posting'); diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index d403831626..04e8f71379 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -89,7 +89,6 @@ class phpbb_functional_test_case extends phpbb_test_case // that were added in other tests are gone $this->lang = array(); $this->add_lang('common'); - $this->purge_cache(); $db = $this->get_db(); diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh index c0defe44ef..d9544858b7 100755 --- a/travis/setup-php-extensions.sh +++ b/travis/setup-php-extensions.sh @@ -48,6 +48,9 @@ then echo 'Enabling APC PHP extension' register_php_extension 'apc' "$php_ini_file" echo 'apc.enable_cli=1' >> "$php_ini_file" +else + echo 'Disabling Opcache' + echo 'opcache.enable=0' >> "$php_ini_file" fi # redis |