diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:37 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:37 +0100 |
| commit | aa4495b8ad0cf90c2b3f655441ccfee49701282d (patch) | |
| tree | e70cd18c1f03e6a0219bd0fbe41d896b350e974e /phpBB | |
| parent | 8a3c323933cbdadd302ed49b5769f90c3f622cdc (diff) | |
| parent | 0aef1e57a73ef4c7086cf24ed154e8d5bbbac679 (diff) | |
| download | forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.gz forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.bz2 forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.tar.xz forums-aa4495b8ad0cf90c2b3f655441ccfee49701282d.zip | |
Merge commit 'release-3.0-RC8'
Diffstat (limited to 'phpBB')
164 files changed, 2448 insertions, 601 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 42ae610545..dd1374fee4 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -109,8 +109,8 @@ <!-- ELSE --> <p>{L_NO_IPS_DEFINED}</p> <!-- ENDIF --> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSEIF S_EXTENSION_GROUPS --> @@ -214,9 +214,9 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - - </fieldset> {S_FORM_TOKEN} + </fieldset> + </form> <!-- ELSE --> @@ -257,8 +257,8 @@ {L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" /> <input class="button2" name="add" type="submit" value="{L_SUBMIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> @@ -280,8 +280,8 @@ <p class="quick"> <input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <br /> @@ -320,8 +320,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSEIF S_ORPHAN --> @@ -367,9 +367,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index d8638f5bcd..85b8acc393 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -71,9 +71,8 @@ <input class="button1" type="submit" id="bansubmit" name="bansubmit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" /> </p> - -</fieldset> {S_FORM_TOKEN} +</fieldset> </form> <br /><br /> @@ -109,15 +108,17 @@ <input class="button1" type="submit" id="unbansubmit" name="unbansubmit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="unbanreset" name="unbanreset" value="{L_RESET}" /> </p> + {S_FORM_TOKEN} </fieldset> <!-- ELSE --> <p>{L_NO_BAN_CELL}</p> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} + </form> diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index 48b117cfc9..a0b0016a11 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -51,6 +51,7 @@ <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> <br /> @@ -77,7 +78,6 @@ <!-- END token --> </tbody> </table> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -110,8 +110,9 @@ <p class="quick"> <input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" /> </p> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} + </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html index 2569b162ca..bb16204801 100644 --- a/phpBB/adm/style/acp_board.html +++ b/phpBB/adm/style/acp_board.html @@ -42,10 +42,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - + {S_FORM_TOKEN} </fieldset> - -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index 92778472d8..7783356574 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -49,9 +49,9 @@ <p class="submit-buttons"> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -93,8 +93,8 @@ <select name="action">{S_BOT_OPTIONS}</select> <input class="button2" name="submit" type="submit" value="{L_SUBMIT}" /> <p class="small"><a href="#" onclick="marklist('acp_bots', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('acp_bots', 'mark', false);">{L_UNMARK_ALL}</a></p> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index ecb60e4b59..d9d087d6ba 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -63,8 +63,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> <input class="button2" type="submit" id="preview" name="preview" value="{L_PREVIEW}" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index dc24b55bb1..8165efe9a2 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -23,9 +23,8 @@ <input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" /> </p> <!-- ENDIF --> - + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -85,8 +84,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html index 020135e227..b68d3ab3c0 100644 --- a/phpBB/adm/style/acp_disallow.html +++ b/phpBB/adm/style/acp_disallow.html @@ -38,8 +38,8 @@ <!-- ELSE --> <p>{L_NO_DISALLOWED}</p> <!-- ENDIF --> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html index bb891de0b4..b1d9b4af11 100644 --- a/phpBB/adm/style/acp_email.html +++ b/phpBB/adm/style/acp_email.html @@ -47,8 +47,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> -</fieldset> {S_FORM_TOKEN} +</fieldset> </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 91c15999e5..560bc195bc 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -317,8 +317,8 @@ <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_DELETE_FORUM --> @@ -366,8 +366,8 @@ <p class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSEIF S_CONTINUE_SYNC --> @@ -475,8 +475,8 @@ {L_SELECT_FORUM}: <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}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <form id="forums" method="post" action="{U_ACTION}"> @@ -486,8 +486,8 @@ <input type="text" name="forum_name" value="" maxlength="255" /> <input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index b615099b7c..c90a075f9e 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -154,8 +154,8 @@ <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" id="submit" name="update" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_LIST --> @@ -260,8 +260,8 @@ <p class="quick"> <input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSE --> @@ -309,8 +309,8 @@ {L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> <input type="hidden" name="add" value="1" /> <!-- ENDIF --> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <h1>{L_SPECIAL_GROUPS}</h1> diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index e02840f1c5..8bb8257318 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -158,9 +158,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSEIF S_CHOOSE_PAK --> @@ -194,8 +193,8 @@ <input class="button1" type="submit" id="import" name="import" value="{L_IMPORT_SUBMIT}" /> </p> <!-- ENDIF --> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSE --> @@ -256,8 +255,8 @@ <p class="quick"> <input class="button2" name="add" type="submit" value="{L_ICON_ADD}" /> <input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html index b5a05ec799..240cec1643 100755 --- a/phpBB/adm/style/acp_inactive.html +++ b/phpBB/adm/style/acp_inactive.html @@ -60,12 +60,12 @@ <fieldset class="quick"> <select name="action">{S_INACTIVE_OPTIONS}</select> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> -<p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p> + <p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index b57ad59af5..2cc715493a 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -58,8 +58,8 @@ <fieldset class="submit-buttons"> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index a6f99c2b56..815ebb024a 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -54,8 +54,8 @@ <p class="quick" style="margin-top: -15px;"> <input type="submit" name="update_details" class="button2" value="{L_SUBMIT}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <br /><br /> @@ -92,7 +92,7 @@ <!-- END missing --> </tbody> </table> - {S_FORM_TOKEN} + <div>{S_FORM_TOKEN}</div> </form> <br /><br /> @@ -157,11 +157,10 @@ {TPL} <!-- ENDIF --> <tr> - <td class="row3" colspan="3" style="text-align: right;"><input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" /> <input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td> + <td class="row3" colspan="3" style="text-align: right;">{S_FORM_TOKEN}<input type="submit" name="download_file" class="button2" value="{L_SUBMIT_AND_DOWNLOAD}" /> <input type="submit" name="submit_file" class="button2" value="{L_SUBMIT}" /></td> </tr> </tbody> </table> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_UPLOAD --> @@ -198,10 +197,10 @@ <fieldset class="quick"> {HIDDEN} + {S_FORM_TOKEN} <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> <input class="button1" type="submit" name="test_connection" value="{L_TEST_CONNECTION}" /> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index cc1765e2a4..11ab5faa9c 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -56,6 +56,7 @@ <fieldset class="display-options"> {L_DISPLAY_LOG}: {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR} <input class="button2" type="submit" value="{L_GO}" name="sort" /> + {S_FORM_TOKEN} </fieldset> <hr /> <!-- IF PAGINATION --> @@ -79,7 +80,6 @@ <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 729ac56c5e..5396e78557 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -115,8 +115,8 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ELSE --> diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index f6ca6081aa..725c7a5ec1 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -124,8 +124,8 @@ <fieldset class="quick"> <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <a href="#maincontent">» {L_BACK_TO_TOP}</a><br /> @@ -178,8 +178,8 @@ <fieldset class="quick"> {L_CREATE_ROLE}: <input type="text" name="role_name" value="" maxlength="255" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- IF S_DISPLAY_ROLE_MASK --> diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index a4797fcc4f..b4386d5f19 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -35,11 +35,11 @@ <p class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- IF S_FORUM_MULTIPLE --> @@ -56,11 +56,11 @@ <p class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -80,10 +80,10 @@ <p class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_SELECT_GROUP and S_CAN_SELECT_GROUP --> @@ -99,11 +99,11 @@ <p class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_SELECT_USERGROUP --> @@ -126,9 +126,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" class="button2" name="action[delete]" value="{L_REMOVE_PERMISSIONS}" style="width: 46% !important;" /> <input class="button1" type="submit" name="submit_edit_options" value="{L_EDIT_PERMISSIONS}" style="width: 46% !important;" /> </fieldset> - {S_FORM_TOKEN} </form> <form id="add_user" method="post" action="{U_ACTION}"> @@ -144,9 +144,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" type="submit" name="submit_add_options" value="{L_ADD_PERMISSIONS}" /> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -171,9 +171,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button2" type="submit" name="action[delete]" value="{L_REMOVE_PERMISSIONS}" style="width: 46% !important;" /> <input class="button1" type="submit" name="submit_edit_options" value="{L_EDIT_PERMISSIONS}" style="width: 46% !important;" /> </fieldset> - {S_FORM_TOKEN} </form> <form id="add_groups" method="post" action="{U_ACTION}"> @@ -187,10 +187,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" class="button1" name="submit_add_options" value="{L_ADD_PERMISSIONS}" /> </fieldset> - - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -214,10 +213,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" /> </fieldset> - - {S_FORM_TOKEN} </form> <form id="add_user" method="post" action="{U_ACTION}"> @@ -234,9 +232,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" class="button1" /> </fieldset> - {S_FORM_TOKEN} </form> </div> @@ -256,10 +254,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" /> </fieldset> - - {S_FORM_TOKEN} </form> <form id="group" method="post" action="{U_ACTION}"> @@ -275,10 +272,9 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input type="submit" name="submit" value="{L_VIEW_PERMISSIONS}" class="button1" /> </fieldset> - - {S_FORM_TOKEN} </form> </div> @@ -318,11 +314,11 @@ <fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} {L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select> <input class="button2" type="submit" name="submit" value="{L_GO}" /> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -347,11 +343,11 @@ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};"> <input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" /> <input class="button2" type="button" name="cancel" value="{L_RESET}" onclick="document.forms['set-permissions'].reset(); init_colours(active_pmask + active_fmask);" /> + {S_FORM_TOKEN} </fieldset> <br /><br /> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 912e58b43c..eec975ad25 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -108,6 +108,7 @@ <fieldset class="quick"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" type="submit" name="next" value="{L_PROFILE_TYPE_OPTIONS}" /> </fieldset> @@ -129,6 +130,7 @@ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};"> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" type="submit" name="next" value="{L_NEXT_STEP}" /> </fieldset> @@ -153,10 +155,11 @@ <fieldset class="quick" style="float: {S_CONTENT_FLOW_END};"> {S_HIDDEN_FIELDS} <input class="button1" type="submit" name="save" value="{L_SAVE}" /> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> - {S_FORM_TOKEN} + </form> <!-- ELSE --> @@ -216,8 +219,8 @@ <input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select> <input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" /> <input type="hidden" name="create" value="1" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index 14a367ce27..890a3ba569 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -97,11 +97,10 @@ <p class="quick"> {S_HIDDEN_FIELDS} - + {S_FORM_TOKEN} <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 7d84146267..0f2b23dcef 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -51,9 +51,9 @@ <input class="button1" type="submit" id="update" name="update" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </p> </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index 482fbcb02c..9306e30269 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -50,9 +50,9 @@ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -88,9 +88,9 @@ <p class="quick"> <input class="button2" name="add" type="submit" value="{L_ADD_RANK}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html index 221a776a24..23fcfbdeb8 100644 --- a/phpBB/adm/style/acp_reasons.html +++ b/phpBB/adm/style/acp_reasons.html @@ -52,9 +52,9 @@ <p class="submit-buttons"> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -116,10 +116,10 @@ <input type="text" name="reason_title" /> <input class="button2" name="addreason" type="submit" value="{L_ADD_NEW_REASON}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index d4937c6ecc..0879780749 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -59,9 +59,8 @@ <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> - - {S_FORM_TOKEN} </form> <!-- ELSEIF S_INDEX --> @@ -90,8 +89,8 @@ <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" id="continue" name="continue" value="{L_CONTINUE}" onclick="popup_progress_bar('{S_CONTINUE_INDEXING}');" /> <input class="button2" type="submit" id="cancel" name="cancel" value="{L_CANCEL}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -141,8 +140,9 @@ <input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" /> <!-- ENDIF --> </p> - </fieldset> {S_FORM_TOKEN} + </fieldset> + </form> <!-- END backend --> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index a067e1a16b..4b3bcddf1d 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -25,9 +25,9 @@ <p class="quick"> <input class="button1" type="submit" name="update" value="{L_DELETE}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_EDIT_IMAGESET --> @@ -147,8 +147,8 @@ <fieldset class="submit-buttons"> <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> <input class="button2" type="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME --> @@ -170,10 +170,9 @@ <dt><label for="template_file">{L_FILE}:</label></dt> <dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="button2" type="submit" value="{L_SELECT}" /></dd> </dl> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> - - {S_FORM_TOKEN} </form> <!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) --> @@ -253,10 +252,9 @@ <fieldset class="submit-buttons"> <legend>{L_SUBMIT}</legend> {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} <input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" /> </fieldset> - - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -301,12 +299,10 @@ <p class="quick"> <span class="small"><a href="#" onclick="marklist('acp_styles', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('acp_styles', 'delete', false); return false;">{L_UNMARK_ALL}</a></span><br /> - + {S_FORM_TOKEN} <input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" /> </p> </fieldset> - - {S_FORM_TOKEN} </form> <!-- ELSEIF S_EXPORT --> @@ -360,11 +356,12 @@ </dl> <p class="quick"> + {S_FORM_TOKEN} <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> </p> </fieldset> - {S_FORM_TOKEN} + </form> <!-- ELSEIF S_FRONTEND --> @@ -508,9 +505,9 @@ <fieldset class="submit-buttons"> <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 593889e7d1..2e4b3ef8f2 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -46,8 +46,8 @@ <fieldset class="quick"> <input type="submit" name="update" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -69,8 +69,8 @@ <fieldset class="quick"> {L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -109,8 +109,8 @@ <fieldset class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_SIGNATURE --> @@ -143,9 +143,9 @@ <!-- IF S_GROUP_OPTIONS --> <fieldset class="quick"> {L_USER_GROUP_ADD}: <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_ATTACHMENTS --> @@ -201,8 +201,8 @@ <fieldset class="quick"> <input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" /> <p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSEIF S_PERMISSIONS --> @@ -217,8 +217,8 @@ <fieldset class="quick" style="text-align: left;"> {L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" name="select" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <div class="clearfix"> </div> diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html index 2b5745ebb6..20b5b60050 100644 --- a/phpBB/adm/style/acp_users_avatar.html +++ b/phpBB/adm/style/acp_users_avatar.html @@ -70,7 +70,7 @@ <fieldset class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form>
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index da699968c5..0611ccba46 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -61,10 +61,10 @@ <p class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> <input type="hidden" name="action" value="" /> + {S_FORM_TOKEN} </p> </fieldset> -{S_FORM_TOKEN} </form> <!-- IF not S_USER_FOUNDER or S_FOUNDER --> @@ -134,11 +134,11 @@ <p class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html index b8b847bd14..07a9bc5c78 100644 --- a/phpBB/adm/style/acp_users_prefs.html +++ b/phpBB/adm/style/acp_users_prefs.html @@ -152,7 +152,7 @@ <fieldset class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form>
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index 959494f5e3..0d1c6f8e46 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -61,7 +61,6 @@ <fieldset class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> - - {S_FORM_TOKEN} </form>
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index e51b5ab68d..239d35f119 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -27,7 +27,7 @@ t: '{LA_BBCODE_T_HELP}', tip: '{L_STYLES_TIP}' <!-- BEGIN custom_tags --> - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}' <!-- END custom_tags --> } @@ -77,7 +77,7 @@ <!-- IF .custom_tags --> <br /><br /> <!-- BEGIN custom_tags --> - <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')"<!-- ENDIF --> /> + <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> /> <!-- END custom_tags --> <!-- ENDIF --> @@ -112,6 +112,6 @@ <fieldset class="submit-buttons"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> <input class="button2" type="submit" name="preview" value="{L_PREVIEW}" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form>
\ No newline at end of file diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index 3f99637418..9bd0bf11a0 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -27,9 +27,9 @@ <p class="submit-buttons"> <input class="button1" type="submit" id="submit" name="save" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </p> </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -65,9 +65,8 @@ <!-- END words --> </tbody> </table> - - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index d8eaa81d6b..8e6f0b7295 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -117,6 +117,10 @@ a:active { text-decoration: none; } +.install-body p a { + font-weight: bold; +} + /* Main blocks ---------------------------------------- */ #wrap { diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index b1e14ba8cf..fbb6a7b409 100755 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -78,4 +78,4 @@ function dE(n, s, type) </ul> </div> - <div id="main"> + <div id="main" class="install-body"> diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index c9059d8801..318795f4cf 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -201,7 +201,7 @@ <h2>{files.TITLE}</h2> - <!-- IF files.STATUS eq 'not_modified' --><div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="dE('not_modified', 0);">{L_TOGGLE_DISPLAY}</a></div><!-- ENDIF --> + <!-- IF files.STATUS eq 'not_modified' --><div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div><!-- ENDIF --> <p>{files.EXPLAIN}</p> <div style="display: <!-- IF files.STATUS neq 'not_modified' -->block<!-- ELSE -->none<!-- ENDIF -->;" id="{files.STATUS}"> diff --git a/phpBB/common.php b/phpBB/common.php index 2e488b423d..ebffd46228 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -203,7 +203,7 @@ $cache = new cache(); $db = new $sql_db(); // Connect to DB -$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); +$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false); // We do not need this any longer, unset for safety purposes unset($dbpasswd); diff --git a/phpBB/develop/adjust_uids.php b/phpBB/develop/adjust_uids.php new file mode 100755 index 0000000000..d301f3cadb --- /dev/null +++ b/phpBB/develop/adjust_uids.php @@ -0,0 +1,129 @@ +<?php +/** +* Repair bbcodes converted with RC6 +* +* You should make a backup from your users, posts and privmsgs table in case something goes wrong +* Forum descriptions and rules need to be re-submitted manually +* +*/ +die("Please read the first lines of this script for instructions on how to enable it"); + +set_time_limit(0); +@ini_set('memory_limit', '512M'); + +define('IN_PHPBB', true); +$phpbb_root_path = './../'; +$phpEx = substr(strrchr(__FILE__, '.'), 1); +include($phpbb_root_path . 'common.'.$phpEx); + +// Start session management +$user->session_begin(); +$auth->acl($user->data); +$user->setup(); + +$echos = 0; + + +// Adjust user signatures +$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid + FROM ' . USERS_TABLE . ' + ORDER BY user_id ASC'; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['user_sig_bbcode_uid']; + + // Only if a bbcode uid is present, the signature present and a size tag used... + if (!empty($bbcode_uid) && strpos($row['user_sig'], $bbcode_uid) === false) + { + $row['user_sig'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['user_sig']); + + $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig = '" . $db->sql_escape($row['user_sig']) . "' + WHERE user_id = " . $row['user_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '<br />User: ' . "{$row['user_id']}\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + + +// Now adjust posts +$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode + FROM ' . POSTS_TABLE . ' + ORDER BY post_id ASC'; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['bbcode_uid']; + + // Only if a bbcode uid is present, bbcode enabled and a size tag used... + if ($row['enable_bbcode'] && !empty($bbcode_uid) && strpos($row['post_text'], $bbcode_uid) === false) + { + $row['post_text'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['post_text']); + + $sql = 'UPDATE ' . POSTS_TABLE . " SET post_text = '" . $db->sql_escape($row['post_text']) . "' + WHERE post_id = " . $row['post_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '<br />Post: ' . "{$row['post_id']} \n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Now to the private messages +$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode + FROM ' . PRIVMSGS_TABLE; +$result = $db->sql_query($sql); + +while ($row = $db->sql_fetchrow($result)) +{ + $bbcode_uid = $row['bbcode_uid']; + + // Only if a bbcode uid is present, bbcode enabled and a size tag used... + if ($row['enable_bbcode'] && !empty($bbcode_uid) && strpos($row['message_text'], $bbcode_uid) === false) + { + $row['message_text'] = preg_replace('/\:[0-9a-z]{8}\]/', ":$bbcode_uid]", $row['message_text']); + + $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET message_text = '" . $db->sql_escape($row['message_text']) . "' + WHERE msg_id = " . $row['msg_id']; + $db->sql_query($sql); + + if ($echos > 200) + { + echo '<br />' . "\n"; + $echos = 0; + } + + echo '.'; + $echos++; + + flush(); + } +} +$db->sql_freeresult($result); + +// Done +$db->sql_close(); +echo 'done'; +?>
\ No newline at end of file diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php new file mode 100644 index 0000000000..5ad23b0f55 --- /dev/null +++ b/phpBB/develop/mysql_upgrader.php @@ -0,0 +1,1362 @@ +<?php +/** +* +* @package phpBB3 +* @version $Id$ +* @copyright (c) 2006 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x +* +*/ + + +// +// Security message: +// +// This script is potentially dangerous. +// Remove or comment the next line (die(".... ) to enable this script. +// Do NOT FORGET to either remove this script or disable it after you have used it. +// +die("Please read the first lines of this script for instructions on how to enable it"); + +define('IN_PHPBB', true); +$phpEx = substr(strrchr(__FILE__, '.'), 1); +include($phpbb_root_path . 'common.' . $phpEx); + +$prefix = $table_prefix; + +$newline = "\n"; + +if (PHP_SAPI !== 'cli') +{ + $newline = '<br>'; +} + +$sql = 'DESCRIBE ' . POSTS_TABLE . ' post_text'; +$result = $db->sql_query($sql); + +$row = $db->sql_fetchrow($result); + +$db->sql_freeresult($result); + +$mysql_indexer = false; + +if (strtolower($row['Type']) === 'mediumtext') +{ + $mysql_indexer = true; +} + +echo "USE $dbname;$newline$newline"; + + +@set_time_limit(0); + +$schema_data = get_schema_struct(); +$dbms_type_map = array( + 'mysql_41' => array( + 'INT:' => 'int(%d)', + 'BINT' => 'bigint(20)', + 'UINT' => 'mediumint(8) UNSIGNED', + 'UINT:' => 'int(%d) UNSIGNED', + 'TINT:' => 'tinyint(%d)', + 'USINT' => 'smallint(4) UNSIGNED', + 'BOOL' => 'tinyint(1) UNSIGNED', + 'VCHAR' => 'varchar(255)', + 'VCHAR:' => 'varchar(%d)', + 'CHAR:' => 'char(%d)', + 'XSTEXT' => 'text', + 'XSTEXT_UNI'=> 'varchar(100)', + 'STEXT' => 'text', + 'STEXT_UNI' => 'varchar(255)', + 'TEXT' => 'text', + 'TEXT_UNI' => 'text', + 'MTEXT' => 'mediumtext', + 'MTEXT_UNI' => 'mediumtext', + 'TIMESTAMP' => 'int(11) UNSIGNED', + 'DECIMAL' => 'decimal(5,2)', + 'DECIMAL:' => 'decimal(%d,2)', + 'PDECIMAL' => 'decimal(6,3)', + 'PDECIMAL:' => 'decimal(%d,3)', + 'VCHAR_UNI' => 'varchar(255)', + 'VCHAR_UNI:'=> 'varchar(%d)', + 'VCHAR_CI' => 'varchar(255)', + 'VARBINARY' => 'varbinary(255)', + ), + + 'mysql_40' => array( + 'INT:' => 'int(%d)', + 'BINT' => 'bigint(20)', + 'UINT' => 'mediumint(8) UNSIGNED', + 'UINT:' => 'int(%d) UNSIGNED', + 'TINT:' => 'tinyint(%d)', + 'USINT' => 'smallint(4) UNSIGNED', + 'BOOL' => 'tinyint(1) UNSIGNED', + 'VCHAR' => 'varbinary(255)', + 'VCHAR:' => 'varbinary(%d)', + 'CHAR:' => 'binary(%d)', + 'XSTEXT' => 'blob', + 'XSTEXT_UNI'=> 'blob', + 'STEXT' => 'blob', + 'STEXT_UNI' => 'blob', + 'TEXT' => 'blob', + 'TEXT_UNI' => 'blob', + 'MTEXT' => 'mediumblob', + 'MTEXT_UNI' => 'mediumblob', + 'TIMESTAMP' => 'int(11) UNSIGNED', + 'DECIMAL' => 'decimal(5,2)', + 'DECIMAL:' => 'decimal(%d,2)', + 'PDECIMAL' => 'decimal(6,3)', + 'PDECIMAL:' => 'decimal(%d,3)', + 'VCHAR_UNI' => 'blob', + 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')), + 'VCHAR_CI' => 'blob', + 'VARBINARY' => 'varbinary(255)', + ), +); + +foreach ($schema_data as $table_name => $table_data) +{ + $table_name = str_replace('phpbb_', $prefix, $table_name); + // Write comment about table + echo "# Table: '{$table_name}'$newline"; + + // Create Table statement + $generator = $textimage = false; + + $line = "ALTER TABLE {$table_name} $newline"; + + // Table specific so we don't get overlap + $modded_array = array(); + + // Write columns one by one... + foreach ($table_data['COLUMNS'] as $column_name => $column_data) + { + // Get type + if (strpos($column_data[0], ':') !== false) + { + list($orig_column_type, $column_length) = explode(':', $column_data[0]); + $column_type = sprintf($dbms_type_map['mysql_41'][$orig_column_type . ':'], $column_length); + + if (isset($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0])) + { + switch ($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0]) + { + case 'mult': + if (($column_length * $dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][1]) > $dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][2]) + { + $modded_array[$column_name] = $column_type; + } + break; + } + } + + $orig_column_type .= ':'; + } + else + { + $orig_column_type = $column_data[0]; + $other_column_type = $dbms_type_map['mysql_40'][$column_data[0]]; + if ($other_column_type == 'text' || $other_column_type == 'blob') + { + $modded_array[$column_name] = $column_type; + } + $column_type = $dbms_type_map['mysql_41'][$column_data[0]]; + } + + // Adjust default value if db-dependant specified + if (is_array($column_data[1])) + { + $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default']; + } + + $line .= "\tMODIFY {$column_name} {$column_type} "; + + // For hexadecimal values do not use single quotes + if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob') + { + $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' "; + } + $line .= 'NOT NULL'; + + if (isset($column_data[2])) + { + if ($column_data[2] == 'auto_increment') + { + $line .= ' auto_increment'; + } + else if ($column_data[2] == 'true_sort') + { + $line .= ' COLLATE utf8_unicode_ci'; + } + else if ($column_data[2] == 'no_sort') + { + $line .= ' COLLATE utf8_bin'; + } + } + else if (preg_match('/(?:var)?char|(?:medium)?text/i', $column_type)) + { + $line .= ' COLLATE utf8_bin'; + } + + $line .= ",$newline"; + } + + // Write Keys + if (isset($table_data['KEYS'])) + { + foreach ($table_data['KEYS'] as $key_name => $key_data) + { + $temp = ''; + if (!is_array($key_data[1])) + { + $key_data[1] = array($key_data[1]); + } + + $temp .= ($key_data[0] == 'INDEX') ? "\tADD KEY" : ''; + $temp .= ($key_data[0] == 'UNIQUE') ? "\tADD UNIQUE" : ''; + $repair = false; + foreach ($key_data[1] as $key => $col_name) + { + if (isset($modded_array[$col_name])) + { + $repair = true; + } + } + if ($repair) + { + $line .= "\tDROP INDEX " . $key_name . ",$newline"; + $line .= $temp; + $line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),$newline"; + } + } + } + + //$line .= "\tCONVERT TO CHARACTER SET `utf8`$newline"; + $line .= "\tDEFAULT CHARSET=utf8 COLLATE=utf8_bin;$newline$newline"; + + echo $line . "$newline"; +} + +/** +* Define the basic structure +* The format: +* array('{TABLE_NAME}' => {TABLE_DATA}) +* {TABLE_DATA}: +* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment})) +* PRIMARY_KEY = {column_name(s)} +* KEYS = array({key_name} = array({key_type}, {column_name(s)})), +* +* Column Types: +* INT:x => SIGNED int(x) +* BINT => BIGINT +* UINT => mediumint(8) UNSIGNED +* UINT:x => int(x) UNSIGNED +* TINT:x => tinyint(x) +* USINT => smallint(4) UNSIGNED (for _order columns) +* BOOL => tinyint(1) UNSIGNED +* VCHAR => varchar(255) +* CHAR:x => char(x) +* XSTEXT_UNI => text for storing 100 characters (topic_title for example) +* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI +* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.) +* MTEXT_UNI => mediumtext (post text, large text) +* VCHAR:x => varchar(x) +* TIMESTAMP => int(11) UNSIGNED +* DECIMAL => decimal number (5,2) +* DECIMAL: => decimal number (x,2) +* PDECIMAL => precision decimal number (6,3) +* PDECIMAL: => precision decimal number (x,3) +* VCHAR_UNI => varchar(255) BINARY +* VCHAR_CI => varchar_ci for postgresql, others VCHAR +*/ +function get_schema_struct() +{ + $schema_data = array(); + + $schema_data['phpbb_attachments'] = array( + 'COLUMNS' => array( + 'attach_id' => array('UINT', NULL, 'auto_increment'), + 'post_msg_id' => array('UINT', 0), + 'topic_id' => array('UINT', 0), + 'in_message' => array('BOOL', 0), + 'poster_id' => array('UINT', 0), + 'is_orphan' => array('BOOL', 1), + 'physical_filename' => array('VCHAR', ''), + 'real_filename' => array('VCHAR', ''), + 'download_count' => array('UINT', 0), + 'attach_comment' => array('TEXT_UNI', ''), + 'extension' => array('VCHAR:100', ''), + 'mimetype' => array('VCHAR:100', ''), + 'filesize' => array('UINT:20', 0), + 'filetime' => array('TIMESTAMP', 0), + 'thumbnail' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'attach_id', + 'KEYS' => array( + 'filetime' => array('INDEX', 'filetime'), + 'post_msg_id' => array('INDEX', 'post_msg_id'), + 'topic_id' => array('INDEX', 'topic_id'), + 'poster_id' => array('INDEX', 'poster_id'), + 'is_orphan' => array('INDEX', 'is_orphan'), + ), + ); + + $schema_data['phpbb_acl_groups'] = array( + 'COLUMNS' => array( + 'group_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'auth_option_id' => array('UINT', 0), + 'auth_role_id' => array('UINT', 0), + 'auth_setting' => array('TINT:2', 0), + ), + 'KEYS' => array( + 'group_id' => array('INDEX', 'group_id'), + 'auth_opt_id' => array('INDEX', 'auth_option_id'), + 'auth_role_id' => array('INDEX', 'auth_role_id'), + ), + ); + + $schema_data['phpbb_acl_options'] = array( + 'COLUMNS' => array( + 'auth_option_id' => array('UINT', NULL, 'auto_increment'), + 'auth_option' => array('VCHAR:50', ''), + 'is_global' => array('BOOL', 0), + 'is_local' => array('BOOL', 0), + 'founder_only' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'auth_option_id', + 'KEYS' => array( + 'auth_option' => array('INDEX', 'auth_option'), + ), + ); + + $schema_data['phpbb_acl_roles'] = array( + 'COLUMNS' => array( + 'role_id' => array('UINT', NULL, 'auto_increment'), + 'role_name' => array('VCHAR_UNI', ''), + 'role_description' => array('TEXT_UNI', ''), + 'role_type' => array('VCHAR:10', ''), + 'role_order' => array('USINT', 0), + ), + 'PRIMARY_KEY' => 'role_id', + 'KEYS' => array( + 'role_type' => array('INDEX', 'role_type'), + 'role_order' => array('INDEX', 'role_order'), + ), + ); + + $schema_data['phpbb_acl_roles_data'] = array( + 'COLUMNS' => array( + 'role_id' => array('UINT', 0), + 'auth_option_id' => array('UINT', 0), + 'auth_setting' => array('TINT:2', 0), + ), + 'PRIMARY_KEY' => array('role_id', 'auth_option_id'), + 'KEYS' => array( + 'ath_op_id' => array('INDEX', 'auth_option_id'), + ), + ); + + $schema_data['phpbb_acl_users'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'auth_option_id' => array('UINT', 0), + 'auth_role_id' => array('UINT', 0), + 'auth_setting' => array('TINT:2', 0), + ), + 'KEYS' => array( + 'user_id' => array('INDEX', 'user_id'), + 'auth_option_id' => array('INDEX', 'auth_option_id'), + 'auth_role_id' => array('INDEX', 'auth_role_id'), + ), + ); + + $schema_data['phpbb_banlist'] = array( + 'COLUMNS' => array( + 'ban_id' => array('UINT', NULL, 'auto_increment'), + 'ban_userid' => array('UINT', 0), + 'ban_ip' => array('VCHAR:40', ''), + 'ban_email' => array('VCHAR_UNI:100', ''), + 'ban_start' => array('TIMESTAMP', 0), + 'ban_end' => array('TIMESTAMP', 0), + 'ban_exclude' => array('BOOL', 0), + 'ban_reason' => array('VCHAR_UNI', ''), + 'ban_give_reason' => array('VCHAR_UNI', ''), + ), + 'PRIMARY_KEY' => 'ban_id', + 'KEYS' => array( + 'ban_end' => array('INDEX', 'ban_end'), + 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')), + 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')), + 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')), + ), + ); + + $schema_data['phpbb_bbcodes'] = array( + 'COLUMNS' => array( + 'bbcode_id' => array('TINT:3', 0), + 'bbcode_tag' => array('VCHAR:16', ''), + 'bbcode_helpline' => array('VCHAR_UNI', ''), + 'display_on_posting' => array('BOOL', 0), + 'bbcode_match' => array('TEXT_UNI', ''), + 'bbcode_tpl' => array('MTEXT_UNI', ''), + 'first_pass_match' => array('MTEXT_UNI', ''), + 'first_pass_replace' => array('MTEXT_UNI', ''), + 'second_pass_match' => array('MTEXT_UNI', ''), + 'second_pass_replace' => array('MTEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'bbcode_id', + 'KEYS' => array( + 'display_on_post' => array('INDEX', 'display_on_posting'), + ), + ); + + $schema_data['phpbb_bookmarks'] = array( + 'COLUMNS' => array( + 'topic_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + ), + 'PRIMARY_KEY' => array('topic_id', 'user_id'), + ); + + $schema_data['phpbb_bots'] = array( + 'COLUMNS' => array( + 'bot_id' => array('UINT', NULL, 'auto_increment'), + 'bot_active' => array('BOOL', 1), + 'bot_name' => array('STEXT_UNI', ''), + 'user_id' => array('UINT', 0), + 'bot_agent' => array('VCHAR', ''), + 'bot_ip' => array('VCHAR', ''), + ), + 'PRIMARY_KEY' => 'bot_id', + 'KEYS' => array( + 'bot_active' => array('INDEX', 'bot_active'), + ), + ); + + $schema_data['phpbb_config'] = array( + 'COLUMNS' => array( + 'config_name' => array('VCHAR', ''), + 'config_value' => array('VCHAR_UNI', ''), + 'is_dynamic' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'config_name', + 'KEYS' => array( + 'is_dynamic' => array('INDEX', 'is_dynamic'), + ), + ); + + $schema_data['phpbb_confirm'] = array( + 'COLUMNS' => array( + 'confirm_id' => array('CHAR:32', ''), + 'session_id' => array('CHAR:32', ''), + 'confirm_type' => array('TINT:3', 0), + 'code' => array('VCHAR:8', ''), + 'seed' => array('UINT:10', 0), + ), + 'PRIMARY_KEY' => array('session_id', 'confirm_id'), + 'KEYS' => array( + 'confirm_type' => array('INDEX', 'confirm_type'), + ), + ); + + $schema_data['phpbb_disallow'] = array( + 'COLUMNS' => array( + 'disallow_id' => array('UINT', NULL, 'auto_increment'), + 'disallow_username' => array('VCHAR_UNI:255', ''), + ), + 'PRIMARY_KEY' => 'disallow_id', + ); + + $schema_data['phpbb_drafts'] = array( + 'COLUMNS' => array( + 'draft_id' => array('UINT', NULL, 'auto_increment'), + 'user_id' => array('UINT', 0), + 'topic_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'save_time' => array('TIMESTAMP', 0), + 'draft_subject' => array('XSTEXT_UNI', ''), + 'draft_message' => array('MTEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'draft_id', + 'KEYS' => array( + 'save_time' => array('INDEX', 'save_time'), + ), + ); + + $schema_data['phpbb_extensions'] = array( + 'COLUMNS' => array( + 'extension_id' => array('UINT', NULL, 'auto_increment'), + 'group_id' => array('UINT', 0), + 'extension' => array('VCHAR:100', ''), + ), + 'PRIMARY_KEY' => 'extension_id', + ); + + $schema_data['phpbb_extension_groups'] = array( + 'COLUMNS' => array( + 'group_id' => array('UINT', NULL, 'auto_increment'), + 'group_name' => array('VCHAR_UNI', ''), + 'cat_id' => array('TINT:2', 0), + 'allow_group' => array('BOOL', 0), + 'download_mode' => array('BOOL', 1), + 'upload_icon' => array('VCHAR', ''), + 'max_filesize' => array('UINT:20', 0), + 'allowed_forums' => array('TEXT', ''), + 'allow_in_pm' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'group_id', + ); + + $schema_data['phpbb_forums'] = array( + 'COLUMNS' => array( + 'forum_id' => array('UINT', NULL, 'auto_increment'), + 'parent_id' => array('UINT', 0), + 'left_id' => array('UINT', 0), + 'right_id' => array('UINT', 0), + 'forum_parents' => array('MTEXT', ''), + 'forum_name' => array('STEXT_UNI', ''), + 'forum_desc' => array('TEXT_UNI', ''), + 'forum_desc_bitfield' => array('VCHAR:255', ''), + 'forum_desc_options' => array('UINT:11', 7), + 'forum_desc_uid' => array('VCHAR:8', ''), + 'forum_link' => array('VCHAR_UNI', ''), + 'forum_password' => array('VCHAR_UNI:40', ''), + 'forum_style' => array('USINT', 0), + 'forum_image' => array('VCHAR', ''), + 'forum_rules' => array('TEXT_UNI', ''), + 'forum_rules_link' => array('VCHAR_UNI', ''), + 'forum_rules_bitfield' => array('VCHAR:255', ''), + 'forum_rules_options' => array('UINT:11', 7), + 'forum_rules_uid' => array('VCHAR:8', ''), + 'forum_topics_per_page' => array('TINT:4', 0), + 'forum_type' => array('TINT:4', 0), + 'forum_status' => array('TINT:4', 0), + 'forum_posts' => array('UINT', 0), + 'forum_topics' => array('UINT', 0), + 'forum_topics_real' => array('UINT', 0), + 'forum_last_post_id' => array('UINT', 0), + 'forum_last_poster_id' => array('UINT', 0), + 'forum_last_post_subject' => array('XSTEXT_UNI', ''), + 'forum_last_post_time' => array('TIMESTAMP', 0), + 'forum_last_poster_name'=> array('VCHAR_UNI', ''), + 'forum_last_poster_colour'=> array('VCHAR:6', ''), + 'forum_flags' => array('TINT:4', 32), + 'display_on_index' => array('BOOL', 1), + 'enable_indexing' => array('BOOL', 1), + 'enable_icons' => array('BOOL', 1), + 'enable_prune' => array('BOOL', 0), + 'prune_next' => array('TIMESTAMP', 0), + 'prune_days' => array('UINT', 0), + 'prune_viewed' => array('UINT', 0), + 'prune_freq' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'forum_id', + 'KEYS' => array( + 'left_right_id' => array('INDEX', array('left_id', 'right_id')), + 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'), + ), + ); + + $schema_data['phpbb_forums_access'] = array( + 'COLUMNS' => array( + 'forum_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'session_id' => array('CHAR:32', ''), + ), + 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'), + ); + + $schema_data['phpbb_forums_track'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'mark_time' => array('TIMESTAMP', 0), + ), + 'PRIMARY_KEY' => array('user_id', 'forum_id'), + ); + + $schema_data['phpbb_forums_watch'] = array( + 'COLUMNS' => array( + 'forum_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'notify_status' => array('BOOL', 0), + ), + 'KEYS' => array( + 'forum_id' => array('INDEX', 'forum_id'), + 'user_id' => array('INDEX', 'user_id'), + 'notify_stat' => array('INDEX', 'notify_status'), + ), + ); + + $schema_data['phpbb_groups'] = array( + 'COLUMNS' => array( + 'group_id' => array('UINT', NULL, 'auto_increment'), + 'group_type' => array('TINT:4', 1), + 'group_founder_manage' => array('BOOL', 0), + 'group_name' => array('VCHAR_CI', ''), + 'group_desc' => array('TEXT_UNI', ''), + 'group_desc_bitfield' => array('VCHAR:255', ''), + 'group_desc_options' => array('UINT:11', 7), + 'group_desc_uid' => array('VCHAR:8', ''), + 'group_display' => array('BOOL', 0), + 'group_avatar' => array('VCHAR', ''), + 'group_avatar_type' => array('TINT:2', 0), + 'group_avatar_width' => array('USINT', 0), + 'group_avatar_height' => array('USINT', 0), + 'group_rank' => array('UINT', 0), + 'group_colour' => array('VCHAR:6', ''), + 'group_sig_chars' => array('UINT', 0), + 'group_receive_pm' => array('BOOL', 0), + 'group_message_limit' => array('UINT', 0), + 'group_legend' => array('BOOL', 1), + ), + 'PRIMARY_KEY' => 'group_id', + 'KEYS' => array( + 'group_legend' => array('INDEX', 'group_legend'), + ), + ); + + $schema_data['phpbb_icons'] = array( + 'COLUMNS' => array( + 'icons_id' => array('UINT', NULL, 'auto_increment'), + 'icons_url' => array('VCHAR', ''), + 'icons_width' => array('TINT:4', 0), + 'icons_height' => array('TINT:4', 0), + 'icons_order' => array('UINT', 0), + 'display_on_posting' => array('BOOL', 1), + ), + 'PRIMARY_KEY' => 'icons_id', + 'KEYS' => array( + 'display_on_posting' => array('INDEX', 'display_on_posting'), + ), + ); + + $schema_data['phpbb_lang'] = array( + 'COLUMNS' => array( + 'lang_id' => array('TINT:4', NULL, 'auto_increment'), + 'lang_iso' => array('VCHAR:30', ''), + 'lang_dir' => array('VCHAR:30', ''), + 'lang_english_name' => array('VCHAR_UNI:100', ''), + 'lang_local_name' => array('VCHAR_UNI:255', ''), + 'lang_author' => array('VCHAR_UNI:255', ''), + ), + 'PRIMARY_KEY' => 'lang_id', + 'KEYS' => array( + 'lang_iso' => array('INDEX', 'lang_iso'), + ), + ); + + $schema_data['phpbb_log'] = array( + 'COLUMNS' => array( + 'log_id' => array('UINT', NULL, 'auto_increment'), + 'log_type' => array('TINT:4', 0), + 'user_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'topic_id' => array('UINT', 0), + 'reportee_id' => array('UINT', 0), + 'log_ip' => array('VCHAR:40', ''), + 'log_time' => array('TIMESTAMP', 0), + 'log_operation' => array('TEXT_UNI', ''), + 'log_data' => array('MTEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'log_id', + 'KEYS' => array( + 'log_type' => array('INDEX', 'log_type'), + 'forum_id' => array('INDEX', 'forum_id'), + 'topic_id' => array('INDEX', 'topic_id'), + 'reportee_id' => array('INDEX', 'reportee_id'), + 'user_id' => array('INDEX', 'user_id'), + ), + ); + + $schema_data['phpbb_moderator_cache'] = array( + 'COLUMNS' => array( + 'forum_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'username' => array('VCHAR_UNI:255', ''), + 'group_id' => array('UINT', 0), + 'group_name' => array('VCHAR_UNI', ''), + 'display_on_index' => array('BOOL', 1), + ), + 'KEYS' => array( + 'disp_idx' => array('INDEX', 'display_on_index'), + 'forum_id' => array('INDEX', 'forum_id'), + ), + ); + + $schema_data['phpbb_modules'] = array( + 'COLUMNS' => array( + 'module_id' => array('UINT', NULL, 'auto_increment'), + 'module_enabled' => array('BOOL', 1), + 'module_display' => array('BOOL', 1), + 'module_basename' => array('VCHAR', ''), + 'module_class' => array('VCHAR:10', ''), + 'parent_id' => array('UINT', 0), + 'left_id' => array('UINT', 0), + 'right_id' => array('UINT', 0), + 'module_langname' => array('VCHAR', ''), + 'module_mode' => array('VCHAR', ''), + 'module_auth' => array('VCHAR', ''), + ), + 'PRIMARY_KEY' => 'module_id', + 'KEYS' => array( + 'left_right_id' => array('INDEX', array('left_id', 'right_id')), + 'module_enabled' => array('INDEX', 'module_enabled'), + 'class_left_id' => array('INDEX', array('module_class', 'left_id')), + ), + ); + + $schema_data['phpbb_poll_options'] = array( + 'COLUMNS' => array( + 'poll_option_id' => array('TINT:4', 0), + 'topic_id' => array('UINT', 0), + 'poll_option_text' => array('TEXT_UNI', ''), + 'poll_option_total' => array('UINT', 0), + ), + 'KEYS' => array( + 'poll_opt_id' => array('INDEX', 'poll_option_id'), + 'topic_id' => array('INDEX', 'topic_id'), + ), + ); + + $schema_data['phpbb_poll_votes'] = array( + 'COLUMNS' => array( + 'topic_id' => array('UINT', 0), + 'poll_option_id' => array('TINT:4', 0), + 'vote_user_id' => array('UINT', 0), + 'vote_user_ip' => array('VCHAR:40', ''), + ), + 'KEYS' => array( + 'topic_id' => array('INDEX', 'topic_id'), + 'vote_user_id' => array('INDEX', 'vote_user_id'), + 'vote_user_ip' => array('INDEX', 'vote_user_ip'), + ), + ); + + $schema_data['phpbb_posts'] = array( + 'COLUMNS' => array( + 'post_id' => array('UINT', NULL, 'auto_increment'), + 'topic_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'poster_id' => array('UINT', 0), + 'icon_id' => array('UINT', 0), + 'poster_ip' => array('VCHAR:40', ''), + 'post_time' => array('TIMESTAMP', 0), + 'post_approved' => array('BOOL', 1), + 'post_reported' => array('BOOL', 0), + 'enable_bbcode' => array('BOOL', 1), + 'enable_smilies' => array('BOOL', 1), + 'enable_magic_url' => array('BOOL', 1), + 'enable_sig' => array('BOOL', 1), + 'post_username' => array('VCHAR_UNI:255', ''), + 'post_subject' => array('XSTEXT_UNI', '', 'true_sort'), + 'post_text' => array('MTEXT_UNI', '', ($GLOBALS['mysql_indexer']) ? 'true_sort' : 'no_sort'), + 'post_checksum' => array('VCHAR:32', ''), + 'post_attachment' => array('BOOL', 0), + 'bbcode_bitfield' => array('VCHAR:255', ''), + 'bbcode_uid' => array('VCHAR:8', ''), + 'post_postcount' => array('BOOL', 1), + 'post_edit_time' => array('TIMESTAMP', 0), + 'post_edit_reason' => array('STEXT_UNI', ''), + 'post_edit_user' => array('UINT', 0), + 'post_edit_count' => array('USINT', 0), + 'post_edit_locked' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'post_id', + 'KEYS' => array( + 'forum_id' => array('INDEX', 'forum_id'), + 'topic_id' => array('INDEX', 'topic_id'), + 'poster_ip' => array('INDEX', 'poster_ip'), + 'poster_id' => array('INDEX', 'poster_id'), + 'post_approved' => array('INDEX', 'post_approved'), + 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')), + ), + ); + + $schema_data['phpbb_privmsgs'] = array( + 'COLUMNS' => array( + 'msg_id' => array('UINT', NULL, 'auto_increment'), + 'root_level' => array('UINT', 0), + 'author_id' => array('UINT', 0), + 'icon_id' => array('UINT', 0), + 'author_ip' => array('VCHAR:40', ''), + 'message_time' => array('TIMESTAMP', 0), + 'enable_bbcode' => array('BOOL', 1), + 'enable_smilies' => array('BOOL', 1), + 'enable_magic_url' => array('BOOL', 1), + 'enable_sig' => array('BOOL', 1), + 'message_subject' => array('XSTEXT_UNI', ''), + 'message_text' => array('MTEXT_UNI', ''), + 'message_edit_reason' => array('STEXT_UNI', ''), + 'message_edit_user' => array('UINT', 0), + 'message_attachment' => array('BOOL', 0), + 'bbcode_bitfield' => array('VCHAR:255', ''), + 'bbcode_uid' => array('VCHAR:8', ''), + 'message_edit_time' => array('TIMESTAMP', 0), + 'message_edit_count' => array('USINT', 0), + 'to_address' => array('TEXT_UNI', ''), + 'bcc_address' => array('TEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'msg_id', + 'KEYS' => array( + 'author_ip' => array('INDEX', 'author_ip'), + 'message_time' => array('INDEX', 'message_time'), + 'author_id' => array('INDEX', 'author_id'), + 'root_level' => array('INDEX', 'root_level'), + ), + ); + + $schema_data['phpbb_privmsgs_folder'] = array( + 'COLUMNS' => array( + 'folder_id' => array('UINT', NULL, 'auto_increment'), + 'user_id' => array('UINT', 0), + 'folder_name' => array('VCHAR_UNI', ''), + 'pm_count' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'folder_id', + 'KEYS' => array( + 'user_id' => array('INDEX', 'user_id'), + ), + ); + + $schema_data['phpbb_privmsgs_rules'] = array( + 'COLUMNS' => array( + 'rule_id' => array('UINT', NULL, 'auto_increment'), + 'user_id' => array('UINT', 0), + 'rule_check' => array('UINT', 0), + 'rule_connection' => array('UINT', 0), + 'rule_string' => array('VCHAR_UNI', ''), + 'rule_user_id' => array('UINT', 0), + 'rule_group_id' => array('UINT', 0), + 'rule_action' => array('UINT', 0), + 'rule_folder_id' => array('INT:11', 0), + ), + 'PRIMARY_KEY' => 'rule_id', + 'KEYS' => array( + 'user_id' => array('INDEX', 'user_id'), + ), + ); + + $schema_data['phpbb_privmsgs_to'] = array( + 'COLUMNS' => array( + 'msg_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'author_id' => array('UINT', 0), + 'pm_deleted' => array('BOOL', 0), + 'pm_new' => array('BOOL', 1), + 'pm_unread' => array('BOOL', 1), + 'pm_replied' => array('BOOL', 0), + 'pm_marked' => array('BOOL', 0), + 'pm_forwarded' => array('BOOL', 0), + 'folder_id' => array('INT:11', 0), + ), + 'KEYS' => array( + 'msg_id' => array('INDEX', 'msg_id'), + 'author_id' => array('INDEX', 'author_id'), + 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')), + ), + ); + + $schema_data['phpbb_profile_fields'] = array( + 'COLUMNS' => array( + 'field_id' => array('UINT', NULL, 'auto_increment'), + 'field_name' => array('VCHAR_UNI', ''), + 'field_type' => array('TINT:4', 0), + 'field_ident' => array('VCHAR:20', ''), + 'field_length' => array('VCHAR:20', ''), + 'field_minlen' => array('VCHAR', ''), + 'field_maxlen' => array('VCHAR', ''), + 'field_novalue' => array('VCHAR_UNI', ''), + 'field_default_value' => array('VCHAR_UNI', ''), + 'field_validation' => array('VCHAR_UNI:20', ''), + 'field_required' => array('BOOL', 0), + 'field_show_on_reg' => array('BOOL', 0), + 'field_hide' => array('BOOL', 0), + 'field_no_view' => array('BOOL', 0), + 'field_active' => array('BOOL', 0), + 'field_order' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'field_id', + 'KEYS' => array( + 'fld_type' => array('INDEX', 'field_type'), + 'fld_ordr' => array('INDEX', 'field_order'), + ), + ); + + $schema_data['phpbb_profile_fields_data'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'user_id', + ); + + $schema_data['phpbb_profile_fields_lang'] = array( + 'COLUMNS' => array( + 'field_id' => array('UINT', 0), + 'lang_id' => array('UINT', 0), + 'option_id' => array('UINT', 0), + 'field_type' => array('TINT:4', 0), + 'lang_value' => array('VCHAR_UNI', ''), + ), + 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'), + ); + + $schema_data['phpbb_profile_lang'] = array( + 'COLUMNS' => array( + 'field_id' => array('UINT', 0), + 'lang_id' => array('UINT', 0), + 'lang_name' => array('VCHAR_UNI', ''), + 'lang_explain' => array('TEXT_UNI', ''), + 'lang_default_value' => array('VCHAR_UNI', ''), + ), + 'PRIMARY_KEY' => array('field_id', 'lang_id'), + ); + + $schema_data['phpbb_ranks'] = array( + 'COLUMNS' => array( + 'rank_id' => array('UINT', NULL, 'auto_increment'), + 'rank_title' => array('VCHAR_UNI', ''), + 'rank_min' => array('UINT', 0), + 'rank_special' => array('BOOL', 0), + 'rank_image' => array('VCHAR', ''), + ), + 'PRIMARY_KEY' => 'rank_id', + ); + + $schema_data['phpbb_reports'] = array( + 'COLUMNS' => array( + 'report_id' => array('UINT', NULL, 'auto_increment'), + 'reason_id' => array('USINT', 0), + 'post_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'user_notify' => array('BOOL', 0), + 'report_closed' => array('BOOL', 0), + 'report_time' => array('TIMESTAMP', 0), + 'report_text' => array('MTEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'report_id', + ); + + $schema_data['phpbb_reports_reasons'] = array( + 'COLUMNS' => array( + 'reason_id' => array('USINT', NULL, 'auto_increment'), + 'reason_title' => array('VCHAR_UNI', ''), + 'reason_description' => array('MTEXT_UNI', ''), + 'reason_order' => array('USINT', 0), + ), + 'PRIMARY_KEY' => 'reason_id', + ); + + $schema_data['phpbb_search_results'] = array( + 'COLUMNS' => array( + 'search_key' => array('VCHAR:32', ''), + 'search_time' => array('TIMESTAMP', 0), + 'search_keywords' => array('MTEXT_UNI', ''), + 'search_authors' => array('MTEXT', ''), + ), + 'PRIMARY_KEY' => 'search_key', + ); + + $schema_data['phpbb_search_wordlist'] = array( + 'COLUMNS' => array( + 'word_id' => array('UINT', NULL, 'auto_increment'), + 'word_text' => array('VCHAR_UNI', ''), + 'word_common' => array('BOOL', 0), + 'word_count' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'word_id', + 'KEYS' => array( + 'wrd_txt' => array('UNIQUE', 'word_text'), + 'wrd_cnt' => array('INDEX', 'word_count'), + ), + ); + + $schema_data['phpbb_search_wordmatch'] = array( + 'COLUMNS' => array( + 'post_id' => array('UINT', 0), + 'word_id' => array('UINT', 0), + 'title_match' => array('BOOL', 0), + ), + 'KEYS' => array( + 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')), + 'word_id' => array('INDEX', 'word_id'), + 'post_id' => array('INDEX', 'post_id'), + ), + ); + + $schema_data['phpbb_sessions'] = array( + 'COLUMNS' => array( + 'session_id' => array('CHAR:32', ''), + 'session_user_id' => array('UINT', 0), + 'session_last_visit' => array('TIMESTAMP', 0), + 'session_start' => array('TIMESTAMP', 0), + 'session_time' => array('TIMESTAMP', 0), + 'session_ip' => array('VCHAR:40', ''), + 'session_browser' => array('VCHAR:150', ''), + 'session_forwarded_for' => array('VCHAR:255', ''), + 'session_page' => array('VCHAR_UNI', ''), + 'session_viewonline' => array('BOOL', 1), + 'session_autologin' => array('BOOL', 0), + 'session_admin' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'session_id', + 'KEYS' => array( + 'session_time' => array('INDEX', 'session_time'), + 'session_user_id' => array('INDEX', 'session_user_id'), + ), + ); + + $schema_data['phpbb_sessions_keys'] = array( + 'COLUMNS' => array( + 'key_id' => array('CHAR:32', ''), + 'user_id' => array('UINT', 0), + 'last_ip' => array('VCHAR:40', ''), + 'last_login' => array('TIMESTAMP', 0), + ), + 'PRIMARY_KEY' => array('key_id', 'user_id'), + 'KEYS' => array( + 'last_login' => array('INDEX', 'last_login'), + ), + ); + + $schema_data['phpbb_sitelist'] = array( + 'COLUMNS' => array( + 'site_id' => array('UINT', NULL, 'auto_increment'), + 'site_ip' => array('VCHAR:40', ''), + 'site_hostname' => array('VCHAR', ''), + 'ip_exclude' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'site_id', + ); + + $schema_data['phpbb_smilies'] = array( + 'COLUMNS' => array( + 'smiley_id' => array('UINT', NULL, 'auto_increment'), + // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed. + 'code' => array('VCHAR_UNI:50', ''), + 'emotion' => array('VCHAR_UNI:50', ''), + 'smiley_url' => array('VCHAR:50', ''), + 'smiley_width' => array('USINT', 0), + 'smiley_height' => array('USINT', 0), + 'smiley_order' => array('UINT', 0), + 'display_on_posting'=> array('BOOL', 1), + ), + 'PRIMARY_KEY' => 'smiley_id', + 'KEYS' => array( + 'display_on_post' => array('INDEX', 'display_on_posting'), + ), + ); + + $schema_data['phpbb_styles'] = array( + 'COLUMNS' => array( + 'style_id' => array('USINT', NULL, 'auto_increment'), + 'style_name' => array('VCHAR_UNI:255', ''), + 'style_copyright' => array('VCHAR_UNI', ''), + 'style_active' => array('BOOL', 1), + 'template_id' => array('USINT', 0), + 'theme_id' => array('USINT', 0), + 'imageset_id' => array('USINT', 0), + ), + 'PRIMARY_KEY' => 'style_id', + 'KEYS' => array( + 'style_name' => array('UNIQUE', 'style_name'), + 'template_id' => array('INDEX', 'template_id'), + 'theme_id' => array('INDEX', 'theme_id'), + 'imageset_id' => array('INDEX', 'imageset_id'), + ), + ); + + $schema_data['phpbb_styles_template'] = array( + 'COLUMNS' => array( + 'template_id' => array('USINT', NULL, 'auto_increment'), + 'template_name' => array('VCHAR_UNI:255', ''), + 'template_copyright' => array('VCHAR_UNI', ''), + 'template_path' => array('VCHAR:100', ''), + 'bbcode_bitfield' => array('VCHAR:255', 'kNg='), + 'template_storedb' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'template_id', + 'KEYS' => array( + 'tmplte_nm' => array('UNIQUE', 'template_name'), + ), + ); + + $schema_data['phpbb_styles_template_data'] = array( + 'COLUMNS' => array( + 'template_id' => array('USINT', 0), + 'template_filename' => array('VCHAR:100', ''), + 'template_included' => array('TEXT', ''), + 'template_mtime' => array('TIMESTAMP', 0), + 'template_data' => array('MTEXT_UNI', ''), + ), + 'KEYS' => array( + 'tid' => array('INDEX', 'template_id'), + 'tfn' => array('INDEX', 'template_filename'), + ), + ); + + $schema_data['phpbb_styles_theme'] = array( + 'COLUMNS' => array( + 'theme_id' => array('USINT', NULL, 'auto_increment'), + 'theme_name' => array('VCHAR_UNI:255', ''), + 'theme_copyright' => array('VCHAR_UNI', ''), + 'theme_path' => array('VCHAR:100', ''), + 'theme_storedb' => array('BOOL', 0), + 'theme_mtime' => array('TIMESTAMP', 0), + 'theme_data' => array('MTEXT_UNI', ''), + ), + 'PRIMARY_KEY' => 'theme_id', + 'KEYS' => array( + 'theme_name' => array('UNIQUE', 'theme_name'), + ), + ); + + $schema_data['phpbb_styles_imageset'] = array( + 'COLUMNS' => array( + 'imageset_id' => array('USINT', NULL, 'auto_increment'), + 'imageset_name' => array('VCHAR_UNI:255', ''), + 'imageset_copyright' => array('VCHAR_UNI', ''), + 'imageset_path' => array('VCHAR:100', ''), + ), + 'PRIMARY_KEY' => 'imageset_id', + 'KEYS' => array( + 'imgset_nm' => array('UNIQUE', 'imageset_name'), + ), + ); + + $schema_data['phpbb_styles_imageset_data'] = array( + 'COLUMNS' => array( + 'image_id' => array('USINT', NULL, 'auto_increment'), + 'image_name' => array('VCHAR:200', ''), + 'image_filename' => array('VCHAR:200', ''), + 'image_lang' => array('VCHAR:30', ''), + 'image_height' => array('USINT', 0), + 'image_width' => array('USINT', 0), + 'imageset_id' => array('USINT', 0), + ), + 'PRIMARY_KEY' => 'image_id', + 'KEYS' => array( + 'i_d' => array('INDEX', 'imageset_id'), + ), + ); + + $schema_data['phpbb_topics'] = array( + 'COLUMNS' => array( + 'topic_id' => array('UINT', NULL, 'auto_increment'), + 'forum_id' => array('UINT', 0), + 'icon_id' => array('UINT', 0), + 'topic_attachment' => array('BOOL', 0), + 'topic_approved' => array('BOOL', 1), + 'topic_reported' => array('BOOL', 0), + 'topic_title' => array('XSTEXT_UNI', '', 'true_sort'), + 'topic_poster' => array('UINT', 0), + 'topic_time' => array('TIMESTAMP', 0), + 'topic_time_limit' => array('TIMESTAMP', 0), + 'topic_views' => array('UINT', 0), + 'topic_replies' => array('UINT', 0), + 'topic_replies_real' => array('UINT', 0), + 'topic_status' => array('TINT:3', 0), + 'topic_type' => array('TINT:3', 0), + 'topic_first_post_id' => array('UINT', 0), + 'topic_first_poster_name' => array('VCHAR_UNI', ''), + 'topic_first_poster_colour' => array('VCHAR:6', ''), + 'topic_last_post_id' => array('UINT', 0), + 'topic_last_poster_id' => array('UINT', 0), + 'topic_last_poster_name' => array('VCHAR_UNI', ''), + 'topic_last_poster_colour' => array('VCHAR:6', ''), + 'topic_last_post_subject' => array('XSTEXT_UNI', ''), + 'topic_last_post_time' => array('TIMESTAMP', 0), + 'topic_last_view_time' => array('TIMESTAMP', 0), + 'topic_moved_id' => array('UINT', 0), + 'topic_bumped' => array('BOOL', 0), + 'topic_bumper' => array('UINT', 0), + 'poll_title' => array('STEXT_UNI', ''), + 'poll_start' => array('TIMESTAMP', 0), + 'poll_length' => array('TIMESTAMP', 0), + 'poll_max_options' => array('TINT:4', 1), + 'poll_last_vote' => array('TIMESTAMP', 0), + 'poll_vote_change' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => 'topic_id', + 'KEYS' => array( + 'forum_id' => array('INDEX', 'forum_id'), + 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')), + 'last_post_time' => array('INDEX', 'topic_last_post_time'), + 'topic_approved' => array('INDEX', 'topic_approved'), + 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')), + 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')), + ), + ); + + $schema_data['phpbb_topics_track'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + 'topic_id' => array('UINT', 0), + 'forum_id' => array('UINT', 0), + 'mark_time' => array('TIMESTAMP', 0), + ), + 'PRIMARY_KEY' => array('user_id', 'topic_id'), + 'KEYS' => array( + 'forum_id' => array('INDEX', 'forum_id'), + ), + ); + + $schema_data['phpbb_topics_posted'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + 'topic_id' => array('UINT', 0), + 'topic_posted' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => array('user_id', 'topic_id'), + ); + + $schema_data['phpbb_topics_watch'] = array( + 'COLUMNS' => array( + 'topic_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'notify_status' => array('BOOL', 0), + ), + 'KEYS' => array( + 'topic_id' => array('INDEX', 'topic_id'), + 'user_id' => array('INDEX', 'user_id'), + 'notify_stat' => array('INDEX', 'notify_status'), + ), + ); + + $schema_data['phpbb_user_group'] = array( + 'COLUMNS' => array( + 'group_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'group_leader' => array('BOOL', 0), + 'user_pending' => array('BOOL', 1), + ), + 'KEYS' => array( + 'group_id' => array('INDEX', 'group_id'), + 'user_id' => array('INDEX', 'user_id'), + 'group_leader' => array('INDEX', 'group_leader'), + ), + ); + + $schema_data['phpbb_users'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', NULL, 'auto_increment'), + 'user_type' => array('TINT:2', 0), + 'group_id' => array('UINT', 3), + 'user_permissions' => array('MTEXT', ''), + 'user_perm_from' => array('UINT', 0), + 'user_ip' => array('VCHAR:40', ''), + 'user_regdate' => array('TIMESTAMP', 0), + 'username' => array('VCHAR_CI', ''), + 'username_clean' => array('VCHAR_CI', ''), + 'user_password' => array('VCHAR_UNI:40', ''), + 'user_passchg' => array('TIMESTAMP', 0), + 'user_pass_convert' => array('BOOL', 0), + 'user_email' => array('VCHAR_UNI:100', ''), + 'user_email_hash' => array('BINT', 0), + 'user_birthday' => array('VCHAR:10', ''), + 'user_lastvisit' => array('TIMESTAMP', 0), + 'user_lastmark' => array('TIMESTAMP', 0), + 'user_lastpost_time' => array('TIMESTAMP', 0), + 'user_lastpage' => array('VCHAR_UNI:200', ''), + 'user_last_confirm_key' => array('VCHAR:10', ''), + 'user_last_search' => array('TIMESTAMP', 0), + 'user_warnings' => array('TINT:4', 0), + 'user_last_warning' => array('TIMESTAMP', 0), + 'user_login_attempts' => array('TINT:4', 0), + 'user_inactive_reason' => array('TINT:2', 0), + 'user_inactive_time' => array('TIMESTAMP', 0), + 'user_posts' => array('UINT', 0), + 'user_lang' => array('VCHAR:30', ''), + 'user_timezone' => array('DECIMAL', 0), + 'user_dst' => array('BOOL', 0), + 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'), + 'user_style' => array('USINT', 0), + 'user_rank' => array('UINT', 0), + 'user_colour' => array('VCHAR:6', ''), + 'user_new_privmsg' => array('TINT:4', 0), + 'user_unread_privmsg' => array('TINT:4', 0), + 'user_last_privmsg' => array('TIMESTAMP', 0), + 'user_message_rules' => array('BOOL', 0), + 'user_full_folder' => array('INT:11', -3), + 'user_emailtime' => array('TIMESTAMP', 0), + 'user_topic_show_days' => array('USINT', 0), + 'user_topic_sortby_type' => array('VCHAR:1', 't'), + 'user_topic_sortby_dir' => array('VCHAR:1', 'd'), + 'user_post_show_days' => array('USINT', 0), + 'user_post_sortby_type' => array('VCHAR:1', 't'), + 'user_post_sortby_dir' => array('VCHAR:1', 'a'), + 'user_notify' => array('BOOL', 0), + 'user_notify_pm' => array('BOOL', 1), + 'user_notify_type' => array('TINT:4', 0), + 'user_allow_pm' => array('BOOL', 1), + 'user_allow_viewonline' => array('BOOL', 1), + 'user_allow_viewemail' => array('BOOL', 1), + 'user_allow_massemail' => array('BOOL', 1), + 'user_options' => array('UINT:11', 895), + 'user_avatar' => array('VCHAR', ''), + 'user_avatar_type' => array('TINT:2', 0), + 'user_avatar_width' => array('USINT', 0), + 'user_avatar_height' => array('USINT', 0), + 'user_sig' => array('MTEXT_UNI', ''), + 'user_sig_bbcode_uid' => array('VCHAR:8', ''), + 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''), + 'user_from' => array('VCHAR_UNI:100', ''), + 'user_icq' => array('VCHAR:15', ''), + 'user_aim' => array('VCHAR_UNI', ''), + 'user_yim' => array('VCHAR_UNI', ''), + 'user_msnm' => array('VCHAR_UNI', ''), + 'user_jabber' => array('VCHAR_UNI', ''), + 'user_website' => array('VCHAR_UNI:200', ''), + 'user_occ' => array('TEXT_UNI', ''), + 'user_interests' => array('TEXT_UNI', ''), + 'user_actkey' => array('VCHAR:32', ''), + 'user_newpasswd' => array('VCHAR_UNI:40', ''), + 'user_form_salt' => array('VCHAR_UNI:32', ''), + + ), + 'PRIMARY_KEY' => 'user_id', + 'KEYS' => array( + 'user_birthday' => array('INDEX', 'user_birthday'), + 'user_email_hash' => array('INDEX', 'user_email_hash'), + 'user_type' => array('INDEX', 'user_type'), + 'username_clean' => array('UNIQUE', 'username_clean'), + ), + ); + + $schema_data['phpbb_warnings'] = array( + 'COLUMNS' => array( + 'warning_id' => array('UINT', NULL, 'auto_increment'), + 'user_id' => array('UINT', 0), + 'post_id' => array('UINT', 0), + 'log_id' => array('UINT', 0), + 'warning_time' => array('TIMESTAMP', 0), + ), + 'PRIMARY_KEY' => 'warning_id', + ); + + $schema_data['phpbb_words'] = array( + 'COLUMNS' => array( + 'word_id' => array('UINT', NULL, 'auto_increment'), + 'word' => array('VCHAR_UNI', ''), + 'replacement' => array('VCHAR_UNI', ''), + ), + 'PRIMARY_KEY' => 'word_id', + ); + + $schema_data['phpbb_zebra'] = array( + 'COLUMNS' => array( + 'user_id' => array('UINT', 0), + 'zebra_id' => array('UINT', 0), + 'friend' => array('BOOL', 0), + 'foe' => array('BOOL', 0), + ), + 'PRIMARY_KEY' => array('user_id', 'zebra_id'), + ); + + return $schema_data; +} + +?>
\ No newline at end of file diff --git a/phpBB/develop/repair_bots.php b/phpBB/develop/repair_bots.php new file mode 100755 index 0000000000..c5aaa75d9b --- /dev/null +++ b/phpBB/develop/repair_bots.php @@ -0,0 +1,151 @@ +<?php +/** +* Rebuild BOTS +* +* You should make a backup from your whole database. Things can and will go wrong. +* This will only work if no BOTs were added. +* +*/ +die("Please read the first lines of this script for instructions on how to enable it"); + +set_time_limit(0); + +define('IN_PHPBB', true); +$phpbb_root_path = './../'; +$phpEx = substr(strrchr(__FILE__, '.'), 1); +include($phpbb_root_path . 'common.'.$phpEx); +include($phpbb_root_path . '/includes/functions_user.'.$phpEx); + + +// Start session management +$user->session_begin(); +$auth->acl($user->data); +$user->setup(); + +$bots = array( + 'AdsBot [Google]' => array('AdsBot-Google', ''), + 'Alexa [Bot]' => array('ia_archiver', ''), + 'Alta Vista [Bot]' => array('Scooter/', ''), + 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''), + 'Baidu [Spider]' => array('Baiduspider+(', ''), + 'Exabot [Bot]' => array('Exabot/', ''), + 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''), + 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), + 'Francis [Bot]' => array('http://www.neomo.de/', ''), + 'Gigabot [Bot]' => array('Gigabot/', ''), + 'Google Adsense [Bot]' => array('Mediapartners-Google', ''), + 'Google Desktop' => array('Google Desktop', ''), + 'Google Feedfetcher' => array('Feedfetcher-Google', ''), + 'Google [Bot]' => array('Googlebot', ''), + 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''), + 'Heritrix [Crawler]' => array('heritrix/1.', ''), + 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''), + 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''), + 'ichiro [Crawler]' => array('ichiro/2', ''), + 'Majestic-12 [Bot]' => array('MJ12bot/', ''), + 'Metager [Bot]' => array('MetagerBot/', ''), + 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''), + 'MSN [Bot]' => array('msnbot/', ''), + 'MSNbot Media' => array('msnbot-media/', ''), + 'NG-Search [Bot]' => array('NG-Search/', ''), + 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''), + 'Nutch/CVS [Bot]' => array('NutchCVS/', ''), + 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''), + 'Online link [Validator]' => array('online link validator', ''), + 'psbot [Picsearch]' => array('psbot/0', ''), + 'Seekport [Bot]' => array('Seekbot/', ''), + 'Sensis [Crawler]' => array('Sensis Web Crawler', ''), + 'SEO Crawler' => array('SEO search Crawler/', ''), + 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''), + 'SEOSearch [Crawler]' => array('SEOsearch/', ''), + 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''), + 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''), + 'Synoo [Bot]' => array('SynooBot/', ''), + 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''), + 'TurnitinBot [Bot]' => array('TurnitinBot/', ''), + 'Voyager [Bot]' => array('voyager/1.0', ''), + 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''), + 'W3C [Linkcheck]' => array('W3C-checklink/', ''), + 'W3C [Validator]' => array('W3C_*Validator', ''), + 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''), + 'YaCy [Bot]' => array('yacybot', ''), + 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), + 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), + 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), + 'YahooSeeker [Bot]' => array('YahooSeeker/', ''), +); + +$bot_ids = array(); +user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE); +foreach($bot_ids as $bot) +{ + user_delete('remove', $bot); +} +// Done +add_bots($bots); +echo 'done'; + + +/** +* Add the search bots into the database +* This code should be used in execute_last if the source database did not have bots +* If you are converting bots this function should not be called +* @todo We might want to look at sharing the bot list between the install code and this code for consistency +*/ +function add_bots($bots) +{ + global $db, $config; + + $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id', false, $result); + $db->sql_freeresult($result); + $db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE); + + if (!$group_id) + { + add_default_groups(); + + $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'"; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id', false, $result); + $db->sql_freeresult($result); + + } + + + + + foreach ($bots as $bot_name => $bot_ary) + { + $user_row = array( + 'user_type' => USER_IGNORE, + 'group_id' => $group_id, + 'username' => $bot_name, + 'user_regdate' => time(), + 'user_password' => '', + 'user_colour' => '9E8DA7', + 'user_email' => '', + 'user_lang' => $config['default_lang'], + 'user_style' => 1, + 'user_timezone' => 0, + 'user_allow_massemail' => 0, + ); + + $user_id = user_add($user_row); + + if ($user_id) + { + $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'bot_active' => 1, + 'bot_name' => $bot_name, + 'user_id' => $user_id, + 'bot_agent' => $bot_ary[0], + 'bot_ip' => $bot_ary[1]) + ); + $db->sql_query($sql); + } + } +} + +?>
\ No newline at end of file diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7d92aa6a5a..340c83aff9 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -53,6 +53,7 @@ <ol> <li><a href="#changelog">Changelog</a> <ol style="list-style-type: lower-roman;"> + <li><a href="#v30rc7">Changes since RC-7</a></li> <li><a href="#v30rc6">Changes since RC-6</a></li> <li><a href="#v30rc5">Changes since RC-5</a></li> <li><a href="#v30rc4">Changes since RC-4</a></li> @@ -78,7 +79,42 @@ <div class="content"> - <a name="v30rc6"></a><h3>1.i. Changes since 3.0.RC6</h3> + <a name="v30rc7"></a><h3>1.i. Changes since 3.0.RC7</h3> + + <ul> + <li>[Fix] Fixed MSSQL related bug in the update system</li> + <li>[Fix] Display "Return to" links on unwritable forums (Bug #14824)</li> + <li>[Fix] Mitigating different realpath() handling between PHP versions (fixing confirm box redirects)</li> + <li>[Fix] Fix signature editing - ability to remove signature (Bug #14820)</li> + <li>[Fix] Send correct activation key by forcing reactivation for inactive user (Bug #14819)</li> + <li>[Fix] Adding correct IP for private messages sent by issuing warnings (Bug #14781)</li> + <li>[Fix] Open private message notification (Bug #14773)</li> + <li>[Fix] Fixing false new private message indicator (Bug #14627)</li> + <li>[Fix] Let newly activated passwords work if users were converted (Bug #14787)</li> + <li>[Fix] Quote bbcode fixes. Letting parse quote="[" and re-allowing whitelisted bbcodes within username portion (Bug #14770)</li> + <li>[Fix] Allow alternative text for styled buttons if images turned off, but CSS staying on</li> + <li>[Sec] Fix bbcode helpline display for custom bbcodes - this requires style changes for any custom style (Bug #14850)</li> + <li>[Fix] Correctly count announcements when filtering forums by date (Bug #14877)</li> + <li>[Fix] Allow charset names containing underscores or spaces</li> + <li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li> + <li>[Change] Do not assign converted votes to the first option in a vote.</li> + <li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li> + <li>[Fix] Require founder status for some actions on founder-only groups (Bug #15119)</li> + <li>[Fix] Allow changing the "now" option of date CPFs (Bug #15111)</li> + <li>[Change] Some improvements to the caching of avatars</li> + <li>[Change] Set template recompilation to be disabled by default. All mod and style authors and all those who want to modify their styles should enabled it after installation.</li> + <li>[Change] Disable debug mode. All mod and style authors should enable DEBUG and DEBUG_EXTRA.</li> + <li>[Fix] Check error reporting level for all error level. This fixes a problem for hosts having manipulated the error handler. (Bug #14831)</li> + <li>[Feature] Constant PHPBB_DB_NEW_LINK introduced which can be used to force phpBB to create a new database connection instead of reusing an existing one if the dbms supports it (Bug #14927)</li> + <li>[Fix] Automatic URL parsing no longer allows dots in the schema but can parse URLs starting after a dot (Bug #15110)</li> + <li>[Fix] Dynamic width for birthday select boxes (Bug #15149)</li> + <li>[Fix] Recache Moderators when copying permissions. (Bug #15384)</li> + <li>[Fix] Propagate sort options in mcp_forums (Bug #15464)</li> + <li>[Change] Do not allow [size=0] bbcodes (font-size of 0)</li> + <li>[Fix] No duplication of active topics (Bug #15474)</li> + </ul> + + <a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3> <ul> <li>[Fix] Submitting language changes using acp_language (Bug #14736)</li> @@ -88,7 +124,7 @@ <li>[Fix] Able to request new password (Bug #14743)</li> </ul> - <a name="v30rc5"></a><h3>1.ii. Changes since 3.0.RC5</h3> + <a name="v30rc5"></a><h3>1.iii. Changes since 3.0.RC5</h3> <ul> <li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li> @@ -151,7 +187,7 @@ <li>[Sec] New password hashing mechanism for storing passwords (#i42)</li> </ul> - <a name="v30rc4"></a><h3>1.iii. Changes since 3.0.RC4</h3> + <a name="v30rc4"></a><h3>1.iv. Changes since 3.0.RC4</h3> <ul> <li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li> @@ -202,7 +238,7 @@ <li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li> </ul> - <a name="v30rc3"></a><h3>1.iv. Changes since 3.0.RC3</h3> + <a name="v30rc3"></a><h3>1.v. Changes since 3.0.RC3</h3> <ul> <li>[Fix] Fixing some subsilver2 and prosilver style issues</li> @@ -311,7 +347,7 @@ </ul> - <a name="v30rc2"></a><h3>1.v. Changes since 3.0.RC2</h3> + <a name="v30rc2"></a><h3>1.vi. Changes since 3.0.RC2</h3> <ul> <li>[Fix] Re-allow searching within the memberlist</li> @@ -357,7 +393,7 @@ </ul> - <a name="v30rc1"></a><h3>1.vi. Changes since 3.0.RC1</h3> + <a name="v30rc1"></a><h3>1.vii. Changes since 3.0.RC1</h3> <ul> <li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index afd2655bd7..4f9e4ded70 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -261,7 +261,7 @@ <a name="update_full"></a><h3>4.i. Full package</h3> - <p>The full package is normally meant for new installations, but if you want to replace all source files this package comes in handy.</p> + <p>The full package is normally meant for new installations only, but if you want to replace all source files this package comes in handy.</p> <p>First you should make a copy of your existing <em>config.php</em> file, keep it in a safe place! Next delete all the existing phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directory in place. You can leave alternative styles in-place too. With this complete you can upload the new phpBB3 files (see <a href="#install">New installation</a> for details if necessary). Once complete copy back your saved <em>config.php</em>, 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> @@ -271,6 +271,8 @@ <a name="update_files"></a><h3>4.ii. Changed files only</h3> + <p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p> + <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.0</samp> you should select the phpBB-3.0.0_to_3.0.1.zip/tar.gz file.</p> <p>The directory structure has been preserved enabling you (if you wish) to simply upload the 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 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> @@ -279,7 +281,9 @@ <a name="update_patch"></a><h3>4.iii. Patch file</h3> - <p>The patch file is probably the best solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach we recommend the <a href="update_auto">Automatic update package</a> explained below.</p> + <p>The patch file package is for those wanting to update through the patch application, and being compfortable with it.</p> + + <p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p> <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.0 you need the phpBB-3.0.0_to_3.0.1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p> @@ -289,12 +293,14 @@ <a name="update_auto"></a><h3>4.iv. Automatic update package</h3> + <p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p> + <p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p> - <p>To perform the update, either follow the instructions from the <code>Administration Control Panel -> System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or following the instructions listed below.</p> + <p>To perform the update, either follow the instructions from the <code>Administration Control Panel->System</code> 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> <ul> - <li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there.</li> + <li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li> <li>Upload the archives contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li> <li>After the install folder is present, phpBB3 will go offline automatically.</li> <li>Point your browser to the install directory, for example <samp>http://www.example.com/phpBB3/install/</samp></li> diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 9161050511..3510bc448e 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -105,9 +105,9 @@ <p>We give support for the following installation types:</p> <ul> - <li>Updates from phpBB3 RC1 to any higher version</li> - <li>Conversions from phpBB 2.0.x to phpBB3 RC1 and higher</li> - <li>New installations of phpBB3 RC1 and higher</li> + <li>Updates from phpBB3 RC1 to the latest version</li> + <li>Conversions from phpBB 2.0.x to the latest version</li> + <li>New installations of phpBB3 - always only the latest released version</li> </ul> </div> @@ -136,9 +136,9 @@ <p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p> - <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin->System->Language Packs</code> and install the now appeared new language pack. To install the style image packs you should unarchive the file/s into the styles/subsilver2/imageset directory, again you must retain the directory structure. Once installed the languages will become immediately available.</p> + <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin->System->Language Packs</code> and install the now appeared new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p> - <p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed</p> + <p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed.</p> <a name="styles"></a><h3>2.ii. Styles</h3> @@ -150,6 +150,8 @@ <p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your <samp>styles/</samp> directory. You then need to visit <code>Administration -> Styles</code>, you should see the new style available, click install and it will become available for all your users.</p> + <p><strong>Please note</strong> that if you create your own style or modify existing ones, please remember to enable the "Recompile stale style components" setting within the <code>Admin->General->Load Settings</code> screen. This setting allows the cache to detect changes made to the style and automatically refresh it. If this setting is disabled, you will not see your changes taking effect.</p> + <a name="mods"></a><h3>2.iii. Modifications</h3> <p>Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:</p> @@ -292,7 +294,7 @@ <ul> <li>Conversions may fail to complete on large boards under some hosts</li> <li>Updates may fail to complete on large update sets under some hosts</li> - <li>URL redirects are not working correctly under PHP 5.2.4 and certain conditions due to a bug within this PHP version</li> + <li>Smilies placed directly after bbcode tags will not get parsed. Smilies always need to be separated by spaces.</li> </ul> </div> diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index b5aeeccdc3..124ac74bb9 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -184,7 +184,7 @@ class ... <li><strong>acp</strong><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li> <li><strong>dbal</strong><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code> <ul> - <li><code>/includes/db/dbal.php</code><br />Base DBAL class, defining the overall framework as well as common detominators</li> + <li><code>/includes/db/dbal.php</code><br />Base DBAL class, defining the overall framework</li> <li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li> <li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li> <li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li> @@ -955,6 +955,10 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; </li> </ul> + <h4>Exiting</h4> + + <p>Your page should either call <code>page_footer()</code> in the end to trigger output through the template engine and terminate the script, or alternatively at least call the <code>exit_handler()</code>. That call is necessary because it provides a method for external applications embedding phpBB to be called at the end of the script.</p> + </div> <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> @@ -1421,8 +1425,8 @@ div <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> </pre></div><br /> </div> diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html index 2aab028a78..b7fd702987 100644 --- a/phpBB/docs/hook_system.html +++ b/phpBB/docs/hook_system.html @@ -384,6 +384,7 @@ a:active { color: #368AD2; } <div class="codebox"><pre> PHPBB_MSG_HANDLER (overwrite message handler) +PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect) PHPBB_ROOT_PATH (overwrite $phpbb_root_path) PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path) </pre></div> diff --git a/phpBB/download/file.php b/phpBB/download/file.php index 0cc5b1465b..c3ba3820f9 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -32,6 +32,9 @@ if (isset($_GET['avatar'])) exit; } unset($dbpasswd); + + // worst-case default + $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0'; $config = $cache->obtain_config(); $filename = $_GET['avatar']; @@ -53,9 +56,28 @@ if (isset($_GET['avatar'])) $db->sql_close(); exit; } - + $ext = substr(strrchr($filename, '.'), 1); - $filename = intval($filename); + $stamp = (int) substr(stristr($filename, '_'), 1); + $filename = (int) $filename; + + // let's see if we have to send the file at all + $last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false; + if (strpos(strtolower($browser), 'msie 6.0') === false) + { + if ($last_load !== false && $last_load <= $stamp) + { + header('Not Modified', true, 304); + // seems that we need those too ... browsers + header('Pragma: public'); + header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000)); + exit(); + } + else + { + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT'); + } + } if (!in_array($ext, array('png', 'gif', 'jpg', 'jpeg'))) { @@ -68,7 +90,7 @@ if (isset($_GET['avatar'])) $db->sql_close(); exit; } - + if (!$filename) { // no way such an avatar could exist. They are not following the rules, stop the show. @@ -81,7 +103,7 @@ if (isset($_GET['avatar'])) exit; } - send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext); + send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser); if (!empty($cache)) { @@ -267,16 +289,13 @@ else * A simplified function to deliver avatars * The argument needs to be checked before calling this function. */ -function send_avatar_to_browser($file) +function send_avatar_to_browser($file, $browser) { global $config, $phpbb_root_path; $prefix = $config['avatar_salt'] . '_'; $image_dir = $config['avatar_path']; - // worst-case default - $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0'; - // Adjust image_dir path (no trailing slash) if (substr($image_dir, -1, 1) == '/' || substr($image_dir, -1, 1) == '\\') { @@ -290,7 +309,7 @@ function send_avatar_to_browser($file) } $file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file; - if ((@file_exists($file_path) && @is_readable($file_path)) || headers_sent()) + if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent()) { header('Pragma: public'); diff --git a/phpBB/download/index.htm b/phpBB/download/index.htm new file mode 100755 index 0000000000..ee1f723a7d --- /dev/null +++ b/phpBB/download/index.htm @@ -0,0 +1,10 @@ +<html> +<head> +<title></title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<body bgcolor="#FFFFFF" text="#000000"> + +</body> +</html> diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 2b9eca6c88..775e8d4495 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -67,6 +67,11 @@ class acm unset($this->var_expires); unset($this->sql_rowset); unset($this->sql_row_pointer); + + $this->vars = array(); + $this->var_expires = array(); + $this->sql_rowset = array(); + $this->sql_row_pointer = array(); } /** @@ -232,6 +237,11 @@ class acm unset($this->sql_rowset); unset($this->sql_row_pointer); + $this->vars = array(); + $this->var_expires = array(); + $this->sql_rowset = array(); + $this->sql_row_pointer = array(); + $this->is_modified = false; } diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 39d437b725..bb8f437b80 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -45,7 +45,7 @@ class acp_forums if ($update && !check_form_key($form_key)) { $update = false; - $error[] = $user->lang['FORM_INVALID']; + $errors[] = $user->lang['FORM_INVALID']; } // Check additional permissions @@ -239,6 +239,7 @@ class acp_forums // Now insert the data $db->sql_multi_insert(ACL_USERS_TABLE, $users_sql_ary); $db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary); + cache_moderators(); } $auth->acl_clear_prefetch(); diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index 97864d0e27..537c0425a2 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -89,15 +89,17 @@ class acp_icons } unset($imglist); - $dir = @opendir($phpbb_root_path . $img_path); - while (($file = @readdir($dir)) !== false) + if ($dir = @opendir($phpbb_root_path . $img_path)) { - if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file)) + while (($file = readdir($dir)) !== false) { - $_paks[] = $file; + if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file)) + { + $_paks[] = $file; + } } + closedir($dir); } - @closedir($dir); } // What shall we do today? Oops, I believe that's trademarked ... diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 73872c9b72..5740e8af9b 100755 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -143,6 +143,7 @@ class acp_inactive 'action' => $action, 'mark' => $mark, 'submit' => 1, + 'start' => $start, ); confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields)); } @@ -166,7 +167,7 @@ class acp_inactive if ($row = $db->sql_fetchrow($result)) { // Send the messages - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger(); $usernames = array(); @@ -216,7 +217,7 @@ class acp_inactive $inactive = array(); $inactive_count = 0; - view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort); + $start = view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort); foreach ($inactive as $row) { @@ -246,6 +247,8 @@ class acp_inactive 'S_SORT_DIR' => $s_sort_dir, 'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start), 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true), + + 'U_ACTION' => $this->u_action . '&start=' . $start, )); $this->tpl_name = 'acp_inactive'; diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 06385fd97b..d41e1f4a62 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -287,6 +287,7 @@ class acp_main // Clear permissions $auth->acl_clear_prefetch(); + cache_moderators(); add_log('admin', 'LOG_PURGE_CACHE'); break; @@ -322,7 +323,7 @@ class acp_main $avatar_dir_size += filesize($phpbb_root_path . $config['avatar_path'] . '/' . $file); } } - @closedir($avatar_dir); + closedir($avatar_dir); // This bit of code translates the avatar directory size into human readable format // Borrowed the code from the PHP.net annoted manual, origanally written by: diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 9acfbe41c1..309f5d5e74 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -480,9 +480,9 @@ class acp_profile } else if ($field_type == FIELD_DATE && $key == 'field_default_value') { - $always_now = request_var('always_now', 0); - - if ($always_now || $var == 'now') + $always_now = request_var('always_now', -1); + + if ($always_now == 1 || ($always_now === -1 && $var == 'now')) { $now = getdate(); diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 9e04ede90b..31e99a6b0c 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -637,7 +637,7 @@ parse_css_file = {PARSE_CSS_FILE} } } } - @closedir($dp); + closedir($dp); } unset($installed); @@ -993,6 +993,11 @@ parse_css_file = {PARSE_CSS_FILE} $filename = "{$cache_prefix}_$file.html.$phpEx"; + if (!file_exists("{$phpbb_root_path}cache/$filename")) + { + continue; + } + $template->assign_block_vars('file', array( 'U_VIEWSOURCE' => $this->u_action . "&action=cache&id=$template_id&source=$file", @@ -1855,15 +1860,17 @@ parse_css_file = {PARSE_CSS_FILE} $imageset_root = "{$phpbb_root_path}styles/{$style_row['imageset_path']}/imageset/"; - $dh = @opendir($imageset_root); - while (($fname = readdir($dh)) !== false) + if ($dh = @opendir($imageset_root)) { - if ($fname[0] != '.' && $fname != 'CVS' && is_dir("$imageset_root$fname")) + while (($fname = readdir($dh)) !== false) { - $files[key($files)]['exclude'] .= ',' . $fname . '/imageset.cfg'; + if ($fname[0] != '.' && $fname != 'CVS' && is_dir("$imageset_root$fname")) + { + $files[key($files)]['exclude'] .= ',' . $fname . '/imageset.cfg'; + } } + closedir($dh); } - @closedir($dh); $imageset_lang = array(); diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 1ab4726e8b..dbb25bdbbd 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -37,7 +37,7 @@ class acp_update $errstr = ''; $errno = 0; - $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); + $info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); if ($info === false) { diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 344df3169d..260acbbc52 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -43,7 +43,7 @@ class acp_users $user_id = request_var('u', 0); $action = request_var('action', ''); - $submit = (isset($_POST['update'])) ? true : false; + $submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false; $form_name = 'acp_users'; add_form_key($form_name); @@ -322,6 +322,16 @@ class acp_users WHERE user_id = $user_id"; $db->sql_query($sql); } + else + { + // Grabbing the last confirm key - we only send a reminder + $sql = 'SELECT user_actkey + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . $user_id; + $result = $db->sql_query($sql); + $user_actkey = (string) $db->sql_fetchfield('user_actkey'); + $db->sql_freeresult($result); + } $messenger = new messenger(false); @@ -774,8 +784,9 @@ class acp_users if ($update_password) { $sql_ary += array( - 'user_password' => phpbb_hash($data['new_password']), - 'user_passchg' => time(), + 'user_password' => phpbb_hash($data['new_password']), + 'user_passchg' => time(), + 'user_pass_convert' => 0, ); $user->reset_login_keys($user_id); @@ -1767,12 +1778,36 @@ class acp_users $user->add_lang(array('groups', 'acp/groups')); $group_id = request_var('g', 0); - + + if ($group_id) + { + // Check the founder only entry for this group to make sure everything is well + $sql = 'SELECT group_founder_manage + FROM ' . GROUPS_TABLE . ' + WHERE group_id = ' . $group_id; + $result = $db->sql_query($sql); + $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); + $db->sql_freeresult($result); + + if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) + { + trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + } + else + { + $founder_manage = 0; + } + switch ($action) { case 'demote': case 'promote': case 'default': + if (!$group_id) + { + trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } group_user_attributes($action, $group_id, $user_id); if ($action == 'default') @@ -1825,19 +1860,6 @@ class acp_users trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - // Check the founder only entry for this group to make sure everything is well - $sql = 'SELECT group_founder_manage - FROM ' . GROUPS_TABLE . ' - WHERE group_id = ' . $group_id; - $result = $db->sql_query($sql); - $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); - $db->sql_freeresult($result); - - if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) - { - trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); - } - // Add user/s to group if ($error = group_user_add($group_id, $user_id)) { diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 18e92d70c0..8257f8a48e 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -19,10 +19,14 @@ if (!defined('IN_PHPBB')) /** * valid external constants: * PHPBB_MSG_HANDLER +* PHPBB_DB_NEW_LINK * PHPBB_ROOT_PATH * PHPBB_ADMIN_PATH */ +// QA-related +// define('PHPBB_QA', 1); + // User related define('ANONYMOUS', 1); @@ -169,7 +173,7 @@ define('FIELD_DATE', 6); // Additional constants - +define('VOTE_CONVERTED', 9999); // Table names define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups'); diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php index 589ca39258..0a65fc12ca 100644 --- a/phpBB/includes/db/db_tools.php +++ b/phpBB/includes/db/db_tools.php @@ -500,7 +500,7 @@ class phpbb_db_tools case 'mssql': $sql = "SELECT c.name FROM syscolumns c - LEFT JOIN sysobjects o (ON c.id = o.id) + LEFT JOIN sysobjects o ON c.id = o.id WHERE o.name = '{$table}'"; $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) @@ -709,22 +709,26 @@ class phpbb_db_tools case 'mssql': $sql .= " {$column_type} "; + $sql_default = " {$column_type} "; - // we do not support MSSQL DEFAULTs for the near future - /*if (!is_null($column_data[1])) + // For adding columns we need the default definition + if (!is_null($column_data[1])) { // For hexadecimal values do not use single quotes if (strpos($column_data[1], '0x') === 0) { - $sql .= 'DEFAULT (' . $column_data[1] . ') '; + $sql_default .= 'DEFAULT (' . $column_data[1] . ') '; } else { - $sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; + $sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; } - }*/ + } $sql .= 'NOT NULL'; + $sql_default .= 'NOT NULL'; + + $return_array['column_type_sql_default'] = $sql_default; break; case 'mysql_40': @@ -828,7 +832,7 @@ class phpbb_db_tools break; case 'mssql': - $statements[] = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql']; + $statements[] = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default']; break; case 'mysql_40': diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index a68ce1e2a4..ed6ba71fea 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -787,6 +787,6 @@ class dbal /** * This variable holds the class name to use later */ -$sql_db = 'dbal_' . $dbms; +$sql_db = (!empty($dbms)) ? 'dbal_' . basename($dbms) : 'dbal'; ?>
\ No newline at end of file diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ab27b62656..8620134311 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -89,7 +89,8 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false) if ($type == 'array') { reset($default); - list($sub_key_type, $sub_type) = each(current($default)); + $default = current($default); + list($sub_key_type, $sub_type) = each($default); $sub_type = gettype($sub_type); $sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type; $sub_key_type = gettype($sub_key_type); @@ -286,7 +287,7 @@ function phpbb_hash($password) } $random = substr($random, 0, $count); } - + $hash = _hash_crypt_private($password, _hash_gensalt_private($random, $itoa64), $itoa64); if (strlen($hash) == 34) @@ -683,6 +684,12 @@ if (!function_exists('realpath')) // Put the slashes back to the native operating systems slashes $resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved); + // Check for DIRECTORY_SEPARATOR at the end (and remove it!) + if (substr($resolved, -1) == DIRECTORY_SEPARATOR) + { + return substr($resolved, 0, -1); + } + return $resolved; // We got here, in the end! } } @@ -694,7 +701,15 @@ else */ function phpbb_realpath($path) { - return realpath($path); + $path = realpath($path); + + // Check for DIRECTORY_SEPARATOR at the end (and remove it!) + if (substr($path, -1) == DIRECTORY_SEPARATOR) + { + return substr($path, 0, -1); + } + + return $path; } } @@ -2034,7 +2049,8 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg if ($timespan === false) { - $timespan = $config['form_token_lifetime']; + // we enforce a minimum value of half a minute here. + $timespan = max(30, $config['form_token_lifetime']); } if ($minimum_time === false) { @@ -2749,8 +2765,9 @@ function get_preg_expression($mode) case 'url': case 'url_inline': $inline = ($mode == 'url') ? ')' : ''; + $scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..." // generated with regex generation file in the develop folder - return "[a-z][a-z\d+\-.]*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?"; + return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?"; break; case 'www_url': @@ -2862,6 +2879,12 @@ function msg_handler($errno, $msg_text, $errfile, $errline) global $cache, $db, $auth, $template, $config, $user; global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text; + // Do not display notices if we suppress them via @ + if (error_reporting() == 0) + { + return; + } + // Message handler is stripping text. In case we need it, we are possible to define long text... if (isset($msg_long_text) && $msg_long_text && !$msg_text) { @@ -2874,9 +2897,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline) case E_WARNING: // Check the error reporting level and return if the error level does not match - // Additionally do not display notices if we suppress them via @ // If DEBUG is defined the default level is E_ALL - if (($errno & ((defined('DEBUG') && error_reporting()) ? E_ALL : error_reporting())) == 0) + if (($errno & ((defined('DEBUG')) ? E_ALL : error_reporting())) == 0) { return; } diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 05872a907a..268eccbca4 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2674,6 +2674,19 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li { global $db, $user; + $sql = 'SELECT COUNT(user_id) AS user_count + FROM ' . USERS_TABLE . ' + WHERE user_type = ' . USER_INACTIVE . + (($limit_days) ? " AND user_inactive_time >= $limit_days" : ''); + $result = $db->sql_query($sql); + $user_count = (int) $db->sql_fetchfield('user_count'); + $db->sql_freeresult($result); + + if ($offset >= $user_count) + { + $offset = ($offset - $limit < 0) ? 0 : $offset - $limit; + } + $sql = 'SELECT user_id, username, user_regdate, user_lastvisit, user_inactive_time, user_inactive_reason FROM ' . USERS_TABLE . ' WHERE user_type = ' . USER_INACTIVE . @@ -2705,16 +2718,8 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li $users[] = $row; } - - $sql = 'SELECT COUNT(user_id) AS user_count - FROM ' . USERS_TABLE . ' - WHERE user_type = ' . USER_INACTIVE . - (($limit_days) ? " AND user_inactive_time >= $limit_days" : ''); - $result = $db->sql_query($sql); - $user_count = (int) $db->sql_fetchfield('user_count'); - $db->sql_freeresult($result); - return; + return $offset; } /** @@ -2775,7 +2780,7 @@ function get_database_size() $sql = 'SHOW TABLE STATUS FROM ' . $db_name; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql, 7200); $database_size = 0; while ($row = $db->sql_fetchrow($result)) @@ -2825,7 +2830,7 @@ function get_database_size() case 'mssql_odbc': $sql = 'SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize FROM sysfiles'; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql, 7200); $database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false; $db->sql_freeresult($result); break; @@ -2867,7 +2872,7 @@ function get_database_size() case 'oracle': $sql = 'SELECT SUM(bytes) as dbsize FROM user_segments'; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql, 7200); $database_size = ($row = $db->sql_fetchrow($result)) ? $row['dbsize'] : false; $db->sql_freeresult($result); break; diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index cbd38cd478..b072895226 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -622,11 +622,11 @@ function make_clickable($text, $server_url = false, $class = 'postlink') // Be sure to not let the matches cross over. ;) // relative urls for this board - $magic_url_match[] = '#(^|[\n\t (>])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; + $magic_url_match[] = '#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')"; // matches a xxxx://aaaaa.bbb.cccc. ... - $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('url_inline') . ')#ie'; + $magic_url_match[] = '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#ie'; $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')"; // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index b75747a862..05630342d1 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -826,8 +826,9 @@ function display_custom_bbcodes() 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'", 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), 'BBCODE_TAG' => $row['bbcode_tag'], - 'BBCODE_HELPLINE' => str_replace(array('&', '"', "'", '<', '>'), array('\&', '\"', '\\\'', '<', '>'), $row['bbcode_helpline'])) - ); + 'BBCODE_HELPLINE' => $row['bbcode_helpline'], + 'A_BBCODE_HELPLINE' => str_replace(array('&', '"', "'", '<', '>'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']), + )); $i++; } diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 3e4bd27bcc..f43ef7c5c7 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -250,37 +250,39 @@ function get_tables($db) * @param array $dbms should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()} * necessary extensions should be loaded already */ -function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true) +function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true) { global $phpbb_root_path, $phpEx, $config, $lang; + $dbms = $dbms_details['DRIVER']; + if ($load_dbal) { // Include the DB layer - include($phpbb_root_path . 'includes/db/' . $dbms['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); } // Instantiate it and set return on error true - $sql_db = 'dbal_' . $dbms['DRIVER']; + $sql_db = 'dbal_' . $dbms; $db = new $sql_db(); $db->sql_return_on_error(true); // Check that we actually have a database name before going any further..... - if ($dbms['DRIVER'] != 'sqlite' && $dbms['DRIVER'] != 'oracle' && $dbname === '') + if ($dbms_details['DRIVER'] != 'sqlite' && $dbms_details['DRIVER'] != 'oracle' && $dbname === '') { $error[] = $lang['INST_ERR_DB_NO_NAME']; return false; } // Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea - if ($dbms['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0) + if ($dbms_details['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0) { $error[] = $lang['INST_ERR_DB_FORUM_PATH']; return false; } // Check the prefix length to ensure that index names are not too long and does not contain invalid characters - switch ($dbms['DRIVER']) + switch ($dbms_details['DRIVER']) { case 'mysql': case 'mysqli': @@ -342,7 +344,7 @@ function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost } // Make sure that the user has selected a sensible DBAL for the DBMS actually installed - switch ($dbms['DRIVER']) + switch ($dbms_details['DRIVER']) { case 'mysqli': if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<')) diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 6bce44209a..be78ad2999 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -165,12 +165,7 @@ class messenger if (!file_exists($tpl_file)) { - $tpl_file = "{$phpbb_root_path}language/$template_lang/email/$template_file.txt"; - - if (!file_exists($tpl_file)) - { - trigger_error("Could not find email template file [ $tpl_file ]", E_USER_ERROR); - } + trigger_error("Could not find email template file [ $tpl_file ]", E_USER_ERROR); } if (($data = @file_get_contents($tpl_file)) === false) @@ -327,7 +322,7 @@ class messenger $headers[] = 'Sender: <' . $config['board_email'] . '>'; $headers[] = 'MIME-Version: 1.0'; $headers[] = 'Message-ID: <' . md5(unique_id(time())) . '@' . $config['server_name'] . '>'; - $headers[] = 'Date: ' . gmdate('D, d M Y H:i:s T', time()); + $headers[] = 'Date: ' . date('r', time()); $headers[] = 'Content-Type: text/plain; charset=UTF-8'; // format=flowed $headers[] = 'Content-Transfer-Encoding: 8bit'; // 7bit @@ -607,7 +602,7 @@ class queue continue 2; } - include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx); + include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx); $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']); if (!$this->jabber->connect()) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 485ba5028b..9ed2d78cb7 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -34,7 +34,7 @@ function generate_smilies($mode, $forum_id) $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - + $user->setup('posting', (int) $row['forum_style']); } else @@ -1227,7 +1227,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id // Now, we are able to really send out notifications if (sizeof($msg_users)) { - include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger(); $msg_list_ary = array(); @@ -1628,7 +1628,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u // Display edit info if edit reason given or user is editing his post, which is not the last within the topic. if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post'))) { - $sql_data[POSTS_TABLE]['sql'] = array( + $data['post_edit_reason'] = truncate_string($data['post_edit_reason'], 255, false); + + $sql_data[POSTS_TABLE]['sql'] = array( 'post_edit_time' => $current_time, 'post_edit_reason' => $data['post_edit_reason'], 'post_edit_user' => (int) $data['post_edit_user'], diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 68e77ec421..5476517440 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -313,6 +313,50 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) } /** +* Update user PM count +*/ +function update_pm_counts() +{ + global $user, $db; + + // Update unread count + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE pm_unread = 1 + AND folder_id <> ' . PRIVMSGS_OUTBOX . ' + AND user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $user->data['user_unread_privmsg'] = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); + + // Update new pm count + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE pm_new = 1 + AND folder_id IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') + AND user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $user->data['user_new_privmsg'] = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); + + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( + 'user_unread_privmsg' => (int) $user->data['user_unread_privmsg'], + 'user_new_privmsg' => (int) $user->data['user_new_privmsg'], + )) . ' WHERE user_id = ' . $user->data['user_id']); + + // Ok, here we need to repair something, other boxes than privmsgs_no_box and privmsgs_hold_box should not carry the pm_new flag. + if (!$user->data['user_new_privmsg']) + { + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + SET pm_new = 0 + WHERE pm_new = 1 + AND folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') + AND user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + } +} + +/** * Place new messages into appropriate folder */ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) @@ -321,15 +365,14 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) if (!$user->data['user_new_privmsg']) { - return 0; + return array('not_moved' => 0, 'removed' => 0); } - $user_new_privmsg = (int) $user->data['user_new_privmsg']; $user_message_rules = (int) $user->data['user_message_rules']; $user_id = (int) $user->data['user_id']; $action_ary = $move_into_folder = array(); - $num_not_moved = $num_removed = 0; + $num_removed = 0; // Newly processing on-hold messages if ($release) @@ -339,62 +382,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) WHERE folder_id = ' . PRIVMSGS_HOLD_BOX . " AND user_id = $user_id"; $db->sql_query($sql); - - // If there are no rows affected there is something wrong with the new and unread message count. - // We try to fix this on our way down... - if (!$db->sql_affectedrows()) - { - // Update unread count - $sql = 'SELECT COUNT(msg_id) as num_messages - FROM ' . PRIVMSGS_TO_TABLE . ' - WHERE pm_unread = 1 - AND folder_id <> ' . PRIVMSGS_OUTBOX . ' - AND user_id = ' . $user_id; - $result = $db->sql_query($sql); - $num_messages = (int) $db->sql_fetchfield('num_messages'); - $db->sql_freeresult($result); - - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_unread_privmsg = ' . $num_messages . ' WHERE user_id = ' . $user_id); - $user->data['user_unread_privmsg'] = $num_messages; - - // Update new pm count - $sql = 'SELECT COUNT(msg_id) as num_messages - FROM ' . PRIVMSGS_TO_TABLE . ' - WHERE pm_new = 1 - AND folder_id IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') - AND user_id = ' . $user_id; - $result = $db->sql_query($sql); - $num_messages = (int) $db->sql_fetchfield('num_messages'); - $db->sql_freeresult($result); - - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = ' . $num_messages . ' WHERE user_id = ' . $user_id); - $user->data['user_new_privmsg'] = $num_messages; - - // Ok, here we need to repair something, other boxes than privmsgs_no_box and privmsgs_hold_box should not carry the pm_new flag. - if (!$num_messages) - { - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' - SET pm_new = 0 - WHERE pm_new = 1 - AND folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ') - AND user_id = ' . $user_id; - $db->sql_query($sql); - } - - // The function needs this value to be up-to-date - $user_new_privmsg = (int) $user->data['user_new_privmsg']; - } - } - else - { - // If not relasing we need to check the number of not moved messages... - $sql = 'SELECT COUNT(msg_id) as num_messages - FROM ' . PRIVMSGS_TO_TABLE . " - WHERE user_id = $user_id - AND folder_id = " . PRIVMSGS_HOLD_BOX; - $result = $db->sql_query($sql); - $num_not_moved = (int) $db->sql_fetchfield('num_messages'); - $db->sql_freeresult($result); } // Get those messages not yet placed into any box @@ -413,7 +400,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) while ($row = $db->sql_fetchrow($result)) { $action_ary[$row['msg_id']][] = array('action' => false); - $move_into_folder[PRIVMSGS_INBOX][] = $row['msg_id']; } $db->sql_freeresult($result); } @@ -501,7 +487,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) if (!$is_match) { $action_ary[$row['msg_id']][] = array('action' => false); - $move_into_folder[PRIVMSGS_INBOX][] = $row['msg_id']; } } @@ -509,14 +494,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } // We place actions into arrays, to save queries. - $num_new = $num_unread = 0; $sql = $unread_ids = $delete_ids = $important_ids = array(); foreach ($action_ary as $msg_id => $msg_ary) { // It is allowed to execute actions more than once, except placing messages into folder - $folder_action = false; - $message_removed = false; + $folder_action = $message_removed = false; foreach ($msg_ary as $pos => $rule_ary) { @@ -531,7 +514,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // Folder actions have precedence, so we will remove any other ones $folder_action = true; $move_into_folder[(int) $rule_ary['folder_id']][] = $msg_id; - $num_new++; break; case ACTION_MARK_AS_READ: @@ -563,10 +545,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } } -// $num_new += sizeof(array_unique($delete_ids)); -// $num_unread += sizeof(array_unique($delete_ids)); - $num_unread += sizeof(array_unique($unread_ids)); - // Do not change the order of processing // The number of queries needed to be executed here highly depends on the defined rules and are // only gone through if new messages arrive. @@ -574,7 +552,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // Delete messages if (sizeof($delete_ids)) { - $num_removed = sizeof($delete_ids); + $num_removed += sizeof($delete_ids); delete_pm($user_id, $delete_ids, PRIVMSGS_NO_BOX); } @@ -680,6 +658,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } $db->sql_freeresult($result); + $num_removed += sizeof($delete_ids); delete_pm($user_id, $delete_ids, $dest_folder); } } @@ -687,9 +666,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // if ($full_folder_action == FULL_FOLDER_HOLD) { - $num_not_moved += sizeof($msg_ary); - $num_new -= sizeof($msg_ary); - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET folder_id = ' . PRIVMSGS_HOLD_BOX . ' WHERE folder_id = ' . PRIVMSGS_NO_BOX . " @@ -715,10 +691,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) AND user_id = $user_id"; $db->sql_query($sql); } - else - { - $num_new += $db->sql_affectedrows(); - } } } @@ -733,26 +705,19 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $db->sql_query($sql); } - // Update unread and new status field - if ($num_unread || $num_new) - { - $set_sql = ($num_unread) ? 'user_unread_privmsg = user_unread_privmsg - ' . $num_unread : ''; - if ($num_new) - { - $set_sql .= ($set_sql != '') ? ', ' : ''; - $set_sql .= 'user_new_privmsg = user_new_privmsg - ' . $num_new; - } - - $db->sql_query('UPDATE ' . USERS_TABLE . " SET $set_sql WHERE user_id = $user_id"); + // Update new/unread count + update_pm_counts(); - $user->data['user_new_privmsg'] -= $num_new; - $user->data['user_unread_privmsg'] -= $num_unread; - } + // Now check how many messages got not moved... + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . " + WHERE user_id = $user_id + AND folder_id = " . PRIVMSGS_HOLD_BOX; + $result = $db->sql_query($sql); + $num_not_moved = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); - return array( - 'not_moved' => $num_not_moved, - 'deleted' => $num_removed, - ); + return array('not_moved' => $num_not_moved, 'removed' => $num_removed); } /** diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 97b71823ac..6cccd7ffe5 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -1062,8 +1062,15 @@ class custom_profile_admin extends custom_profile 'field_length' => $this->vars['field_length'] ); - $always_now = request_var('always_now', 0); - $s_checked = ($always_now || $this->vars['field_default_value'] == 'now') ? true : false; + $always_now = request_var('always_now', -1); + if ($always_now == -1) + { + $s_checked = ($this->vars['field_default_value'] == 'now') ? true : false; + } + else + { + $s_checked = ($always_now) ? true : false; + } $options = array( 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)), diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8501175d5f..fa7025f2c2 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -370,6 +370,11 @@ function user_delete($mode, $user_id, $post_username = false) // Remove reports $db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE user_id = ' . $user_id); + if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD) + { + avatar_delete('user', $user_row); + } + switch ($mode) { case 'retain': @@ -659,7 +664,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) */ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '') { - global $db, $user, $auth; + global $db, $user, $auth, $cache; // Delete stale bans $sql = 'DELETE FROM ' . BANLIST_TABLE . ' @@ -1043,10 +1048,14 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); + $cache->destroy('sql', BANLIST_TABLE); + return true; } - // There was nothing to ban/exclude + // There was nothing to ban/exclude. But destroying the cache because of the removal of stale bans. + $cache->destroy('sql', BANLIST_TABLE); + return false; } @@ -1055,7 +1064,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas */ function user_unban($mode, $ban) { - global $db, $user, $auth; + global $db, $user, $auth, $cache; // Delete stale bans $sql = 'DELETE FROM ' . BANLIST_TABLE . ' @@ -1112,6 +1121,8 @@ function user_unban($mode, $ban) add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); } + $cache->destroy('sql', BANLIST_TABLE); + return false; } @@ -1993,31 +2004,38 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var // Collect images $dp = @opendir($path); + if (!$dp) + { + return array($user->lang['NO_AVATAR_CATEGORY'] => array()); + } + while (($file = readdir($dp)) !== false) { if ($file[0] != '.' && preg_match('#^[^&"\'<>]+$#i', $file) && is_dir("$path/$file")) { $avatar_row_count = $avatar_col_count = 0; - $dp2 = @opendir("$path/$file"); - while (($sub_file = readdir($dp2)) !== false) + if ($dp2 = @opendir("$path/$file")) { - if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $sub_file)) + while (($sub_file = readdir($dp2)) !== false) { - $avatar_list[$file][$avatar_row_count][$avatar_col_count] = array( - 'file' => "$file/$sub_file", - 'filename' => $sub_file, - 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $sub_file))), - ); - $avatar_col_count++; - if ($avatar_col_count == $items_per_column) + if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $sub_file)) { - $avatar_row_count++; - $avatar_col_count = 0; + $avatar_list[$file][$avatar_row_count][$avatar_col_count] = array( + 'file' => "$file/$sub_file", + 'filename' => $sub_file, + 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $sub_file))), + ); + $avatar_col_count++; + if ($avatar_col_count == $items_per_column) + { + $avatar_row_count++; + $avatar_col_count = 0; + } } } + closedir($dp2); } - closedir($dp2); } } closedir($dp); @@ -2045,7 +2063,7 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var 'S_CAT_OPTIONS' => $s_category_options) ); - $avatar_list = $avatar_list[$category]; + $avatar_list = (isset($avatar_list[$category])) ? $avatar_list[$category] : array(); foreach ($avatar_list as $avatar_row_ary) { diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index 5f736e62b4..d97fbb7107 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -126,7 +126,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''), - 'PAGINATION' => generate_pagination($url . "&i=$id&action=$action&mode=$mode" . (($merge_select) ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), + 'PAGINATION' => generate_pagination($url . "&i=$id&action=$action&mode=$mode&sd=$sort_dir&sk=$sort_key&st=$sort_days" . (($merge_select) ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start), 'TOTAL_TOPICS' => ($forum_topics == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $forum_topics), )); diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index d67a51cd89..707fe22685 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -73,6 +73,14 @@ function mcp_front_view($id, $mode, $action) } $db->sql_freeresult($result); + if (empty($post_list)) + { + $total = 0; + } + } + + if ($total) + { $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_list) . ' diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 0faa1dc8b7..37ea7e5132 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -599,7 +599,7 @@ function close_report($report_id_list, $mode, $action) } } - foreach($post_info as $post) + foreach ($post_info as $post) { $forum_ids[$post['forum_id']] = $post['forum_id']; $topic_ids[$post['topic_id']] = $post['topic_id']; diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index cab102f1f7..315a2c1362 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -418,7 +418,7 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0) $pm_data = array( 'from_user_id' => $user->data['user_id'], - 'from_user_ip' => $user->data['user_ip'], + 'from_user_ip' => $user->ip, 'from_username' => $user->data['username'], 'enable_sig' => false, 'enable_bbcode' => true, diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 311c75b410..6e601e1499 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -208,6 +208,12 @@ class bbcode_firstpass extends bbcode return '[size=' . $stx . ']' . $in . '[/size]'; } + // Do not allow size=0 + if ($stx <= 0) + { + return '[size=' . $stx . ']' . $in . '[/size]'; + } + return '[size=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/size:' . $this->bbcode_uid . ']'; } @@ -674,7 +680,11 @@ class bbcode_firstpass extends bbcode /** * If you change this code, make sure the cases described within the following reports are still working: - * #3572, #14667 + * #3572 - [quote="[test]test"]test [ test[/quote] - (correct: parsed) + * #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed) + * #14770 - [quote="["]test[/quote] (correct: parsed) + * [quote="[i]test[/i]"]test[/quote] (correct: parsed) + * [quote="[quote]test[/quote]"]test[/quote] (correct: NOT parsed) */ $in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in))); @@ -684,6 +694,9 @@ class bbcode_firstpass extends bbcode return ''; } + // To let the parser not catch tokens within quote_username quotes we encode them before we start this... + $in = preg_replace('#quote="(.*?)"\]#ie', "'quote="' . str_replace(array('[', ']'), array('[', ']'), '\$1') . '"]'", $in); + $tok = ']'; $out = '['; @@ -709,7 +722,7 @@ class bbcode_firstpass extends bbcode if ($tok == ']') { - if ($buffer == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[') + if (strtolower($buffer) == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[') { // we have found a closing tag $out .= array_pop($close_tags) . ']'; @@ -745,7 +758,9 @@ class bbcode_firstpass extends bbcode if (isset($m[1]) && $m[1]) { - $username = preg_replace('#\[(?!b|i|u|color|url|email|/b|/i|/u|/color|/url|/email)#iU', '[$1', $m[1]); + $username = str_replace(array('[', ']'), array('[', ']'), $m[1]); + $username = preg_replace('#\[(?!b|i|u|color|url|email|/b|/i|/u|/color|/url|/email)#iU', '[$1', $username); + $end_tags = array(); $error = false; @@ -765,7 +780,7 @@ class bbcode_firstpass extends bbcode if ($error) { - $username = str_replace('[', '[', str_replace(']', ']', $m[1])); + $username = $m[1]; } $out .= 'quote="' . $username . '":' . $this->bbcode_uid . ']'; @@ -805,7 +820,7 @@ class bbcode_firstpass extends bbcode if ($tok == '[') { // Search the text for the next tok... if an ending quote comes first, then change tok to [] - $pos1 = strpos($in, '[/quote'); + $pos1 = stripos($in, '[/quote'); // If the token ] comes first, we change it to ] $pos2 = strpos($in, ']'); // If the token [ comes first, we change it to [ @@ -1073,7 +1088,7 @@ class parse_message extends bbcode_firstpass } // Check for "empty" message - if (!utf8_clean_string($this->message)) + if ($mode !== 'sig' && !utf8_clean_string($this->message)) { $this->warn_msg[] = $user->lang['TOO_FEW_CHARS']; return $this->warn_msg; diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 91d70d074e..1cd28fc6d2 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -54,6 +54,7 @@ class fulltext_mysql extends search_backend if (function_exists('mb_ereg')) { $this->mbstring_regex = true; + mb_regex_encoding('UTF-8'); } $error = false; @@ -152,7 +153,6 @@ class fulltext_mysql extends search_backend } else if ($this->mbstring_regex) { - mb_regex_encoding('UTF-8'); mb_ereg_search_init($split_keywords, '(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)'); while (($word = mb_ereg_search_regs())) @@ -285,7 +285,6 @@ class fulltext_mysql extends search_backend } else if ($this->mbstring_regex) { - mb_regex_encoding('UTF-8'); mb_ereg_search_init($text, '(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)'); $text = array(); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 6ddc97fff8..6149063dea 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -905,48 +905,59 @@ class session } $banned = false; + $cache_ttl = 3600; + $where_sql = array(); $sql = 'SELECT ban_ip, ban_userid, ban_email, ban_exclude, ban_give_reason, ban_end FROM ' . BANLIST_TABLE . ' - WHERE (ban_end >= ' . time() . ' OR ban_end = 0)'; + WHERE '; // Determine which entries to check, only return those if ($user_email === false) { - $sql .= " AND ban_email = ''"; + $where_sql[] = "ban_email = ''"; } if ($user_ips === false) { - $sql .= " AND (ban_ip = '' OR ban_exclude = 1)"; + $where_sql[] = "(ban_ip = '' OR ban_exclude = 1)"; } if ($user_id === false) { - $sql .= ' AND (ban_userid = 0 OR ban_exclude = 1)'; + $where_sql[] = '(ban_userid = 0 OR ban_exclude = 1)'; } else { - $sql .= ' AND (ban_userid = ' . $user_id; + $cache_ttl = ($user_id == ANONYMOUS) ? 3600 : 0; + $_sql = '(ban_userid = ' . $user_id; if ($user_email !== false) { - $sql .= " OR ban_email <> ''"; + $_sql .= " OR ban_email <> ''"; } if ($user_ips !== false) { - $sql .= " OR ban_ip <> ''"; + $_sql .= " OR ban_ip <> ''"; } - $sql .= ')'; + $_sql .= ')'; + + $where_sql[] = $_sql; } - $result = $db->sql_query($sql); + $sql .= (sizeof($where_sql)) ? implode(' AND ', $where_sql) : ''; + $result = $db->sql_query($sql, $cache_ttl); $ban_triggered_by = 'user'; while ($row = $db->sql_fetchrow($result)) { + if ($row['ban_end'] && $row['ban_end'] < time()) + { + continue; + } + $ip_banned = false; if (!empty($row['ban_ip'])) { @@ -1007,7 +1018,8 @@ class session // If the session is empty we need to create a valid one... if (empty($this->session_id)) { - $this->session_create(ANONYMOUS); + // This seems to be no longer needed? - #14971 +// $this->session_create(ANONYMOUS); } // Initiate environment ... since it won't be set at this stage @@ -1052,6 +1064,9 @@ class session $message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : ''; $message .= '<br /><br /><em>' . $this->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>'; + // To circumvent session_begin returning a valid value and the check_ban() not called on second page view, we kill the session again + $this->session_kill(false); + trigger_error($message); } diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index 134729ffe9..355c9898c2 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -63,7 +63,8 @@ class ucp_activate $sql_ary = array( 'user_actkey' => '', 'user_password' => $user_row['user_newpasswd'], - 'user_newpasswd' => '' + 'user_newpasswd' => '', + 'user_pass_convert' => 0, ); $sql = 'UPDATE ' . USERS_TABLE . ' diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index e843e89139..04155e8522 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -249,25 +249,13 @@ class ucp_pm // If new messages arrived, place them into the appropriate folder $num_not_moved = $num_removed = 0; + $release = request_var('release', 0); if ($user->data['user_new_privmsg'] && $action == 'view_folder') { - $return = place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); + $return = place_pm_into_folder($global_privmsgs_rules, $release); $num_not_moved = $return['not_moved']; - - // Make sure num_not_moved is valid. - if ($user->data['user_new_privmsg'] < 0 || $num_not_moved < 0) - { - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_new_privmsg = 0, user_unread_privmsg = 0 - WHERE user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - - $num_not_moved = $user->data['user_new_privmsg'] = $user->data['user_unread_privmsg'] = 0; - } - - // Assign the number of private messages being removed due to rules. - $num_removed = $return['deleted']; + $num_removed = $return['removed']; } if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index ff5ab13716..6b56b52a5d 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -732,7 +732,7 @@ function compose_pm($id, $mode, $action) { $message_link = ''; } - $message_parser->message = $message_link . '[quote="' . $quote_username . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; + $message_parser->message = $message_link . '[quote="' . $quote_username . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; } if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh) diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index 77971f7e68..e7f144af51 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -768,7 +768,7 @@ function utf8_recode($string, $encoding) } // If nothing works, check if we have a custom transcoder available - if (!preg_match('#^[a-z0-9\\-]+$#', $encoding)) + if (!preg_match('#^[a-z0-9_ \\-]+$#', $encoding)) { // Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR); diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 91a9951e90..d4972c5a00 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -31,7 +31,7 @@ unset($dbpasswd); */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', - 'version' => '1.0.RC7', + 'version' => '1.0.RC8', 'phpbb_version' => '3.0.0', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, @@ -571,7 +571,7 @@ if (!$get_info) 'primary' => 'vote_desc.topic_id', 'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE), - array('poll_option_id', 1, ''), + array('poll_option_id', VOTE_CONVERTED, ''), array('topic_id', 'vote_desc.topic_id', ''), array('vote_user_id', 'vote_voters.vote_user_id', 'phpbb_user_id'), array('vote_user_ip', 'vote_voters.vote_user_ip', 'decode_ip'), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 4d878b15c0..0145c2746a 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.RC7'; +$updates_to_version = '3.0.RC8'; // Return if we "just include it" to find out for which version the database update is responsuble for if (defined('IN_PHPBB') && defined('IN_INSTALL')) @@ -1014,7 +1014,7 @@ if ($exit) </div> <div id="page-footer"> - Powered by phpBB © 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a> + Powered by <a href="http://www.phpbb.com/">phpBB</a> © 2000, 2002, 2005, 2007 phpBB Group </div> </div> @@ -1178,7 +1178,7 @@ if (version_compare($current_version, '3.0.RC2', '<=')) } $db->sql_freeresult($result); - foreach($smileys as $id => $code) + foreach ($smileys as $id => $code) { // 2.0 only entitized lt and gt; We need to do something about double quotes. if (strchr($code, '"') === false) @@ -1759,7 +1759,7 @@ function column_exists($dbms, $table, $column_name) case 'mssql': $sql = "SELECT c.name FROM syscolumns c - LEFT JOIN sysobjects o (ON c.id = o.id) + LEFT JOIN sysobjects o ON c.id = o.id WHERE o.name = '{$table}'"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1913,7 +1913,6 @@ function prepare_column_data($dbms, $column_data, $table_name, $column_name) } $sql = ''; - $return_array = array(); switch ($dbms) @@ -1938,22 +1937,26 @@ function prepare_column_data($dbms, $column_data, $table_name, $column_name) case 'mssql': $sql .= " {$column_type} "; + $sql_default = " {$column_type} "; - // we do not support MSSQL DEFAULTs for the near future - /*if (!is_null($column_data[1])) + // For adding columns we need the default definition + if (!is_null($column_data[1])) { // For hexadecimal values do not use single quotes if (strpos($column_data[1], '0x') === 0) { - $sql .= 'DEFAULT (' . $column_data[1] . ') '; + $sql_default .= 'DEFAULT (' . $column_data[1] . ') '; } else { - $sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; + $sql_default .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; } - }*/ + } $sql .= 'NOT NULL'; + $sql_default .= 'NOT NULL'; + + $return_array['column_type_sql_default'] = $sql_default; break; case 'mysql_40': @@ -2059,7 +2062,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) break; case 'mssql': - $sql = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql']; + $sql = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default']; _sql($sql, $errored, $error_ary); break; diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 6fd5016a42..d1e36ec4a4 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -184,8 +184,8 @@ class install_convert extends module 'L_CONTINUE' => $lang['CONTINUE_OLD_CONVERSION'], 'S_CONTINUE' => true, - 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1", - 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}", + 'U_NEW_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=intro&new_conv=1&language=$language", + 'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$options['tag']}{$options['step']}&language=$language", )); return; @@ -261,7 +261,7 @@ class install_convert extends module */ function list_convertors($sub) { - global $lang, $template, $phpbb_root_path, $phpEx; + global $lang, $language, $template, $phpbb_root_path, $phpEx; $this->page_title = $lang['SUB_INTRO']; @@ -327,7 +327,7 @@ class install_convert extends module 'SOFTWARE' => $convertors[$index]['forum_name'], 'VERSION' => $convertors[$index]['version'], - 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=" . $convertors[$index]['tag'], + 'U_CONVERT' => $this->p_master->module_url . "?mode={$this->mode}&language=$language&sub=settings&tag=" . $convertors[$index]['tag'], )); } } @@ -336,7 +336,7 @@ class install_convert extends module */ function get_convert_settings($sub) { - global $lang, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; + global $lang, $language, $template, $db, $phpbb_root_path, $phpEx, $config, $cache; require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); @@ -528,7 +528,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $lang['BEGIN_CONVERT'], // 'S_HIDDEN' => $s_hidden_fields, - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag=$convertor_tag&language=$language", )); return; @@ -576,7 +576,7 @@ class install_convert extends module 'TITLE' => $lang['STAGE_SETTINGS'], 'BODY' => $lang['CONV_OPTIONS_BODY'], 'L_SUBMIT' => $lang['BEGIN_CONVERT'], - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=settings&tag=$convertor_tag&language=$language", )); } @@ -858,7 +858,7 @@ class install_convert extends module $template->assign_vars(array( 'L_SUBMIT' => $user->lang['INSTALL_TEST'], - 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}", + 'U_ACTION' => $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}&language=$language", )); return; } @@ -1177,7 +1177,7 @@ class install_convert extends module if (!empty($schema['group_by'])) { $schema['group_by'] = array($schema['group_by']); - foreach($sql_data['select_fields'] as $select) + foreach ($sql_data['select_fields'] as $select) { $alias = strpos(strtolower($select), ' as '); $select = ($alias) ? substr($select, 0, $alias) : $select; @@ -1530,7 +1530,7 @@ class install_convert extends module */ function save_convert_progress($step) { - global $convert; + global $convert, $language; // Save convertor Status set_config('convert_progress', serialize(array( @@ -1551,7 +1551,7 @@ class install_convert extends module 'dbpasswd' => $convert->src_dbpasswd, )), true); - return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step"; + return $this->p_master->module_url . "?mode={$this->mode}&sub=in_progress&tag={$convert->convertor_tag}$step&language=$language"; } /** @@ -1559,7 +1559,7 @@ class install_convert extends module */ function finish_conversion() { - global $db, $phpbb_root_path, $convert, $config, $user, $template; + global $db, $phpbb_root_path, $convert, $config, $language, $user, $template; $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' @@ -1574,7 +1574,7 @@ class install_convert extends module // And finally, add a note to the log add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']); - $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final"; + $url = $this->p_master->module_url . "?mode={$this->mode}&sub=final&language=$language"; $template->assign_vars(array( 'L_SUBMIT' => $user->lang['FINAL_STEP'], diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index ca86816e9c..3afdb66e1e 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -9,11 +9,6 @@ */ /** -* @todo: check for those functions being 'available'? Though not able to check with function_exists, we need to create test cases -* ini_get(), glob, getimagesize, fsockopen, readfile -*/ - -/** */ if (!defined('IN_INSTALL')) { @@ -487,7 +482,7 @@ class install_install extends module 'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'], )); - $directories = array('config.'.$phpEx, 'images/avatars/upload/'); + $directories = array('config.' . $phpEx, 'images/avatars/upload/'); foreach ($directories as $dir) { @@ -936,7 +931,7 @@ class install_install extends module // Note that all we check is that the file has _something_ in it // We don't compare the contents exactly - if they can't upload // a single file correctly, it's likely they will have other problems.... - if (filesize($phpbb_root_path . 'config.'.$phpEx) > 10) + if (filesize($phpbb_root_path . 'config.' . $phpEx) > 10) { $written = true; } @@ -1116,11 +1111,18 @@ class install_install extends module // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); + if (!isset($available_dbms[$data['dbms']])) + { + // Someone's been silly and tried providing a non-existant dbms + $this->p_master->redirect("index.$phpEx?mode=install"); + } + + $dbms = $available_dbms[$data['dbms']]['DRIVER']; + // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); @@ -1393,11 +1395,18 @@ class install_install extends module // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); + if (!isset($available_dbms[$data['dbms']])) + { + // Someone's been silly and tried providing a non-existant dbms + $this->p_master->redirect("index.$phpEx?mode=install"); + } + + $dbms = $available_dbms[$data['dbms']]['DRIVER']; + // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 320747b60b..22d3af9d2a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -604,7 +604,7 @@ class install_update extends module // Before we do anything, let us diff the files and store the raw file information "somewhere" $get_files = false; - $file_list = false; //$cache->get('_diff_files'); + $file_list = $cache->get('_diff_files'); if ($file_list === false || $file_list['status'] != -1) { @@ -1513,7 +1513,7 @@ class install_update extends module { case 'version_info': global $phpbb_root_path, $phpEx; - $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); + $info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); if ($info !== false) { diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index eb333b7e5a..51e87629fe 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -144,7 +144,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1'); @@ -213,7 +213,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', 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 ('version', '3.0.RC7'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC8'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 5b109efdc5..0cc1064916 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -96,11 +96,11 @@ $lang = array_merge($lang, array( 'AVATAR_STORAGE_PATH' => 'Avatar storage path', 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.', 'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions', - 'MAX_AVATAR_SIZE_EXPLAIN' => 'Height x Width in pixels.', + 'MAX_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.', 'MAX_FILESIZE' => 'Maximum avatar file size', 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files.', 'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions', - 'MIN_AVATAR_SIZE_EXPLAIN' => 'Height x Width in pixels.', + 'MIN_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.', )); // Message Settings diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 35a3d1b2b6..a9a3547338 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -115,14 +115,14 @@ $lang = array_merge($lang, array( 'FIRST' => 'First', 'ICONS_ADD' => 'Add a new icon', - 'ICON_NONE_ADDED' => 'No icons were added.', + 'ICONS_NONE_ADDED' => 'No icons were added.', 'ICONS_ONE_ADDED' => 'The icon has been added successfully.', 'ICONS_ADDED' => 'The icons have been added successfully.', 'ICONS_CONFIG' => 'Icon configuration', 'ICONS_DELETED' => 'The icon has been removed successfully.', 'ICONS_EDIT' => 'Edit icon', 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.', - 'ICON_NONE_EDITED' => 'No icons were updated.', + 'ICONS_NONE_EDITED' => 'No icons were updated.', 'ICONS_EDITED' => 'The icons have been updated successfully.', 'ICONS_HEIGHT' => 'Icon height', 'ICONS_IMAGE' => 'Icon image', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index f6ab75fc5b..f7e672e22b 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -575,6 +575,7 @@ $lang = array_merge($lang, array( 'TOPICS' => 'Topics', 'TOPIC_ICON' => 'Topic icon', 'TOPIC_LOCKED' => 'This topic is locked, you cannot edit posts or make further replies.', + 'TOPIC_LOCKED_SHORT'=> 'Topic locked', 'TOPIC_MOVED' => 'Moved topic', 'TOPIC_REVIEW' => 'Topic review', 'TOPIC_TITLE' => 'Topic title', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 55ed3eaa88..15a5c6dca4 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -190,8 +190,8 @@ $lang = array_merge($lang, array( <h2>Go live with your phpBB3!</h2> <p>Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>, see the <a href="%3$s">README</a> for further information.</p><p><strong>Please now delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.</strong></p>', 'INSTALL_INTRO' => 'Welcome to Installation', -// TODO: write some more introductions here - 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p> + + 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p> <ul> <li>The Database Type - the database you will be using.</li> @@ -277,9 +277,8 @@ $lang = array_merge($lang, array( 'NO_CONVERT_SPECIFIED' => 'No convertor specified.', 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel', 'NO_TABLES_FOUND' => 'No tables found.', -// TODO: Write some explanatory introduction text - 'OVERVIEW_BODY' => 'Welcome to our public release candidate of the next-generation of phpBB after 2.0.x, phpBB 3.0! This release is intended for wider scale use to help us identifying last bugs and problematic areas.</p><p>Please read <a href="../docs/INSTALL.html">our installation guide</a> for more information about installing phpBB3</p><p><strong style="text-transform: uppercase;">Note:</strong> This release is <strong style="text-transform: uppercase;">still not final</strong>. You may want to wait for the full final release before running it live.</p><p>This installation system will guide you through the process of installing phpBB, converting from a different software package or updating to the latest version of phpBB. For more information on each option, select it from the menu above.', + 'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBBâ„¢ is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a seven year long package lineup. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.', 'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support', 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.', @@ -305,7 +304,6 @@ $lang = array_merge($lang, array( 'REFRESH_PAGE' => 'Refresh page to continue conversion', 'REFRESH_PAGE_EXPLAIN' => 'If set to yes, the convertor will refresh the page to continue the conversion after having finished a step. If this is your first conversion for testing purposes and to determine any errors in advance, we suggest to set this to No.', -// 'REQUIRED' => 'Required', 'REQUIREMENTS_TITLE' => 'Installation compatibility', 'REQUIREMENTS_EXPLAIN' => 'Before proceeding with the full installation phpBB will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB. Please ensure you read through the results thoroughly and do not proceed until all the required tests are passed. If you wish to use any of the features depending on the optional tests, you should ensure that these tests are passed also.', 'RETRY_WRITE' => 'Retry writing config', @@ -337,8 +335,7 @@ $lang = array_merge($lang, array( 'SUB_LICENSE' => 'License', 'SUB_SUPPORT' => 'Support', 'SUCCESSFUL_CONNECT' => 'Successful connection', -// TODO: Write some text on obtaining support - 'SUPPORT_BODY' => 'During the release candidate phase full support will be given at <a href="http://www.phpbb.com/community/viewforum.php?f=46">the phpBB 3.0.x support forums</a>. We will provide answers to general setup questions, configuration problems, conversion problems and support for determining common problems mostly related to bugs. We also allow discussions about modifications and custom code/style additions.</p><p>For additional assistance, please refer to our <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a> and <a href="http://www.phpbb.com/support/documentation/3.0/">the online documentation</a>.</p><p>To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?', + 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="http://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and imagesets, please post in the appropriate <a href="http://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=571070">The phpBB Welcome Package</a><br /><a href="http://www.phpbb.com/support/">Support Section</a><br /><a href="http://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="http://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />', 'SYNC_FORUMS' => 'Starting to synchronise forums', 'SYNC_POST_COUNT' => 'Synchronising post_counts', 'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.', @@ -383,7 +380,7 @@ $lang = array_merge($lang, array( 'COLLECTING_FILE_DIFFS' => 'Collecting file differences', 'COMPLETE_LOGIN_TO_BOARD' => 'You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory!', 'CONTINUE_UPDATE_NOW' => 'Continue the update process now', - 'CURRENT_FILE' => 'Current original file', + 'CURRENT_FILE' => 'Beginning of current original file', 'CURRENT_VERSION' => 'Current version', 'DATABASE_TYPE' => 'Database type', @@ -393,7 +390,7 @@ $lang = array_merge($lang, array( 'DESTINATION' => 'Destination file', 'DIFF_INLINE' => 'Inline', 'DIFF_RAW' => 'Raw unified diff', - 'DIFF_SEP_EXPLAIN' => 'End of current file / Begin of new updated file', + 'DIFF_SEP_EXPLAIN' => 'End of current original file / Beginning of new updated file', 'DIFF_SIDE_BY_SIDE' => 'Side by Side', 'DIFF_UNIFIED' => 'Unified diff', 'DO_NOT_UPDATE' => 'Do not update this file', @@ -450,7 +447,7 @@ $lang = array_merge($lang, array( 'MERGING_FILES' => 'Merging differences', 'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.', - 'NEW_FILE' => 'New updated file', + 'NEW_FILE' => 'End of new updated file', 'NEW_USERNAME' => 'New username', 'NO_AUTH_UPDATE' => 'Not authorised to update', 'NO_ERRORS' => 'No errors', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 27989f3c60..337a21c11f 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -105,6 +105,7 @@ $lang = array_merge($lang, array( 'VIEW_UNREAD_POST' => 'First unread post', 'VISIT_WEBSITE' => 'WWW', 'VOTE_SUBMITTED' => 'Your vote has been cast.', + 'VOTE_CONVERTED' => 'Changing votes is not supported for converted polls.', )); diff --git a/phpBB/posting.php b/phpBB/posting.php index 926b542699..4bf60f03fe 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1131,7 +1131,7 @@ $message_parser->decode_message($post_data['bbcode_uid']); if ($mode == 'quote' && !$submit && !$preview && !$refresh) { - $message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; + $message_parser->message = '[quote="' . $post_data['quote_username'] . '"]' . censor_text(trim($message_parser->message)) . "[/quote]\n"; } if (($mode == 'reply' || $mode == 'quote') && !$submit && !$preview && !$refresh) diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html index f48f49efb4..7472abaee6 100644 --- a/phpBB/styles/prosilver/template/attachment.html +++ b/phpBB/styles/prosilver/template/attachment.html @@ -66,7 +66,8 @@ <param name="loop" value="true" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="never" /> - <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never"></embed> + <param name="allowNetworking" value="internal" /> + <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed> </object> <!-- ELSEIF _file.S_QUICKTIME_FILE --> <object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16"> diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html index a600a7c92a..bb90c46ced 100644 --- a/phpBB/styles/prosilver/template/bbcode.html +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -37,4 +37,4 @@ <!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email --> -<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="none" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allowNetworking="none"></embed></object><!-- END flash -->
\ No newline at end of file +<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html index bc61b0a392..5b783915a4 100644 --- a/phpBB/styles/prosilver/template/confirm_body.html +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -1,7 +1,6 @@ <!-- INCLUDE overall_header.html --> <form id="confirm" action="{S_CONFIRM_ACTION}" method="post"> -{S_FORM_TOKEN} <div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 61747f7e56..5631ab67d1 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -34,7 +34,7 @@ function initInsertions() { var doc; - if( document.forms[form_name]) + if (document.forms[form_name]) { doc = document; } @@ -44,11 +44,16 @@ function initInsertions() } var textarea = doc.forms[form_name].elements[text_name]; + if (is_ie && typeof(baseHeight) != 'number') { textarea.focus(); baseHeight = doc.selection.createRange().duplicate().boundingHeight; - // document.body.focus(); + + if (!document.forms[form_name]) + { + document.body.focus(); + } } } diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index 95e9304943..ac0d4bb36d 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -16,7 +16,6 @@ <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT --> <form method="post" action="{S_LOGIN_ACTION}" class="headerspace"> - {S_FORM_TOKEN} <h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a> • <a href="{U_REGISTER}">{L_REGISTER}</a></h3> <fieldset class="quick-login"> <label for="username">{L_USERNAME}:</label> <input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" /> diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html index 323668628d..95324bd161 100644 --- a/phpBB/styles/prosilver/template/jumpbox.html +++ b/phpBB/styles/prosilver/template/jumpbox.html @@ -1,17 +1,17 @@ +<!-- IF S_VIEWTOPIC --> + <p></p><p><a href="{U_VIEW_FORUM}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {FORUM_NAME}</a></p> +<!-- ELSEIF S_VIEWFORUM --> + <p></p><p><a href="{U_INDEX}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {L_INDEX}</a></p> +<!-- ELSEIF SEARCH_TOPIC --> + <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p> +<!-- ELSEIF S_SEARCH_ACTION --> + <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p> +<!-- ENDIF --> + <!-- IF S_DISPLAY_JUMPBOX --> <form method="post" id="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(document.jumpbox.f.value == -1){return false;}"> - <!-- IF U_POST_REPLY_TOPIC --> - <p><a href="{U_VIEW_FORUM}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {FORUM_NAME}</a></p> - <!-- ELSEIF U_POST_NEW_TOPIC --> - <p><a href="{U_INDEX}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {L_INDEX}</a></p> - <!-- ELSEIF SEARCH_TOPIC --> - <p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p> - <!-- ELSEIF S_SEARCH_ACTION --> - <p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p> - <!-- ENDIF --> - <!-- IF $CUSTOM_FIELDSET_CLASS --> <fieldset class="{$CUSTOM_FIELDSET_CLASS}"> <!-- ELSE --> diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html index f1837c5193..650d53f097 100644 --- a/phpBB/styles/prosilver/template/login_body.html +++ b/phpBB/styles/prosilver/template/login_body.html @@ -1,7 +1,6 @@ <!-- INCLUDE overall_header.html --> <form action="{S_LOGIN_ACTION}" method="post" id="login"> -{S_FORM_TOKEN} <div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html index ddc0080125..329205e2a2 100644 --- a/phpBB/styles/prosilver/template/mcp_approve.html +++ b/phpBB/styles/prosilver/template/mcp_approve.html @@ -1,8 +1,8 @@ <!-- INCLUDE overall_header.html --> <form id="confirm" action="{S_CONFIRM_ACTION}" method="post"> -{S_FORM_TOKEN} <div class="panel"> + {S_FORM_TOKEN} <div class="inner"><span class="corners-top"><span></span></span> <div class="content"> diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html index 84a174827e..c803ba253f 100644 --- a/phpBB/styles/prosilver/template/mcp_ban.html +++ b/phpBB/styles/prosilver/template/mcp_ban.html @@ -78,6 +78,7 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="bansubmit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <div class="panel"> @@ -122,7 +123,6 @@ </div> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index c612f72ad2..ceb10f4b76 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -100,8 +100,8 @@ </select> <input class="button2" type="submit" value="{L_SUBMIT}" /> <div><a href="#" onclick="marklist('mcp', 'topic_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'topic_id_list', false); return false;">{L_UNMARK_ALL}</a></div> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index 3431d4f925..a186d95970 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -46,6 +46,7 @@ <!-- ENDIF --> <span class="corners-bottom"><span></span></span></div> + {S_FORM_TOKEN} </div> <!-- IF .unapproved --> @@ -55,8 +56,7 @@ <div><a href="#" onclick="marklist('mcp_queue', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp_queue', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div> </fieldset> <!-- ENDIF --> - {S_FORM_TOKEN} - </form> + </form> <!-- ENDIF --> <!-- IF S_SHOW_REPORTS --> diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html index 415cee547d..bf1e867be3 100644 --- a/phpBB/styles/prosilver/template/mcp_logs.html +++ b/phpBB/styles/prosilver/template/mcp_logs.html @@ -63,7 +63,7 @@ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> • <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> • <span>{PAGINATION}</span><!-- ELSE --> • {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> </li> </ul> - + {S_FORM_TOKEN} <span class="corners-bottom"><span></span></span></div> </div> @@ -76,10 +76,10 @@ </fieldset> <!-- ENDIF --> <!-- ELSE --> + {S_FORM_TOKEN} <span class="corners-bottom"><span></span></span></div> </div> <!-- ENDIF --> - {S_FORM_TOKEN} </form> <br /> diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html index 59c69795d1..804d76b14b 100644 --- a/phpBB/styles/prosilver/template/mcp_move.html +++ b/phpBB/styles/prosilver/template/mcp_move.html @@ -24,13 +24,13 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="button1" /> <input type="submit" name="cancel" value="{L_NO}" class="button2" /> + {S_FORM_TOKEN} </fieldset> </div> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html index dda7ff90d3..045a7619ed 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_front.html +++ b/phpBB/styles/prosilver/template/mcp_notes_front.html @@ -21,8 +21,8 @@ <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html index 19f2faacbe..a039aec04a 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_user.html +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -44,6 +44,7 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="action[add_feedback]" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <div class="panel"> @@ -116,7 +117,6 @@ <div><a href="#" onclick="marklist('mcp', 'marknote', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('mcp', 'marknote', false); return false;">{L_UNMARK_ALL}</a></div> </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 5a3ba7f24c..b7c59b9a8b 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -32,8 +32,8 @@ <!-- ENDIF --> <input class="button2" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" /> <input type="hidden" name="report_id_list[]" value="{REPORT_ID}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> @@ -60,8 +60,8 @@ <input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" /> <input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" /> <input type="hidden" name="post_id_list[]" value="{POST_ID}" /> + {S_FORM_TOKEN} </p> - {S_FORM_TOKEN} </form> <!-- ENDIF --> @@ -121,8 +121,8 @@ <span>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span> </dd> </dl> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> @@ -138,8 +138,8 @@ </select> <input class="button2" type="submit" value="{L_SUBMIT}" /> </dd> </dl> - </fieldset> {S_FORM_TOKEN} + </fieldset> </form> <!-- ENDIF --> @@ -196,8 +196,8 @@ <fieldset class="submit-buttons"> <input class="button1" type="submit" name="action[add_feedback]" value="{L_SUBMIT}" /> <input class="button2" type="reset" value="{L_RESET}" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <span class="corners-bottom"><span></span></span></div> diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index 805d7d7e09..e2f140667c 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -5,6 +5,7 @@ <fieldset class="forum-selection"> <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label> <input type="submit" name="sort" value="{L_GO}" class="button2" /> + {S_FORM_TOKEN} </fieldset> <h2>{L_TITLE}</h2> @@ -90,7 +91,6 @@ <div><a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div> </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index a515c4f7ed..bc878f496c 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -5,6 +5,7 @@ <fieldset class="forum-selection"> <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label> <input type="submit" name="sort" value="{L_GO}" class="button2" /> + {S_FORM_TOKEN} </fieldset> <h2>{L_TITLE}</h2> @@ -79,7 +80,6 @@ <div><a href="#" onclick="marklist('mcp', 'report_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'report_id_list', false); return false;">{L_UNMARK_ALL}</a></div> </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 111030914d..122f861fd7 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -161,10 +161,10 @@ onload_functions.push('subPanels()'); </select> <input class="button1" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" /> <div><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></div> -</fieldset> - {S_HIDDEN_FIELDS} {S_FORM_TOKEN} +</fieldset> + </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html index fb02c4e9de..264152d3ae 100644 --- a/phpBB/styles/prosilver/template/mcp_viewlogs.html +++ b/phpBB/styles/prosilver/template/mcp_viewlogs.html @@ -37,8 +37,10 @@ <td class="bg1" colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td> </tr> <!-- END log --> +<div> + {S_FORM_TOKEN} +</div> </table> -{S_FORM_TOKEN} </form> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html index e861136463..fc8fa37fab 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_front.html +++ b/phpBB/styles/prosilver/template/mcp_warn_front.html @@ -23,8 +23,8 @@ <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <div class="panel"> diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index 250d542808..a432df4240 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -57,10 +57,10 @@ <!-- ENDIF --> <span class="corners-bottom"><span></span></span></div> -</div> - {S_FORM_TOKEN} +</div> + </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html index 1fb0ea0a0a..5937598a52 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_post.html +++ b/phpBB/styles/prosilver/template/mcp_warn_post.html @@ -65,8 +65,8 @@ <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html index 64ed5b0085..c807a6b640 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_user.html +++ b/phpBB/styles/prosilver/template/mcp_warn_user.html @@ -49,8 +49,8 @@ <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html index ce4eec9ad8..e8870d8921 100644 --- a/phpBB/styles/prosilver/template/memberlist_email.html +++ b/phpBB/styles/prosilver/template/memberlist_email.html @@ -57,8 +57,9 @@ </fieldset> </div> <span class="corners-bottom"><span></span></span></div> -</div> {S_FORM_TOKEN} +</div> + </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index e6174510b7..9bb1f90a58 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -76,12 +76,12 @@ <dd>{L_IM_SENT_JABBER}</dd> </dl> <!-- ENDIF --> + {S_FORM_TOKEN} </fieldset> <span class="corners-bottom"><span></span></span></div> </div> <a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a> -{S_FORM_TOKEN} </form> <script type="text/javascript"> diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index f79f192983..1d1d45bf8e 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -113,9 +113,10 @@ function insert_single(user) <fieldset class="submit-buttons"> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SEARCH}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} + </form> diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 754f92ab0c..f8eece7a5a 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -38,7 +38,8 @@ <!-- IF S_USER_PM_POPUP --> if ({S_NEW_PM}) { - popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg'); + var url = '{UA_POPUP_PM}'; + window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400'); } <!-- ENDIF --> @@ -109,7 +110,7 @@ <fieldset> <input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" /> <input class="button2" value="{L_SEARCH}" type="submit" /><br /> - <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_HIDDEN_FIELDS} + <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS} </fieldset> </form> </div> diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index c235e49d04..40f9503ca1 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -28,28 +28,10 @@ e: '{LA_BBCODE_E_HELP}', d: '{LA_BBCODE_D_HELP}' <!-- BEGIN custom_tags --> - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}' <!-- END custom_tags --> } - function checkForm() - { - if (document.getElementById(text_name).value.length < 2 && load_draft == false) - { - if (!upload) - { - alert('{LA_EMPTY_MESSAGE}'); - return false; - } - upload = false; - return true; - } - else - { - return true; - } - } - var panels = new Array('options-panel', 'attach-panel', 'poll-panel'); var show_panel = 'options-panel'; diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 6c0f325a13..6ec79dfb8b 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -30,7 +30,7 @@ </dl> <!-- ENDIF --> <dl class="pmlist"> - <dt><textarea id="username_list" name="username_list" class="inputbox"></textarea></dt> + <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2"></textarea></dt> <dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd> <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd> <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" /></dd> diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html index 754d8a5218..b81c8162d7 100644 --- a/phpBB/styles/prosilver/template/posting_layout.html +++ b/phpBB/styles/prosilver/template/posting_layout.html @@ -21,7 +21,7 @@ </div> <!-- ENDIF --> -<form id="postform" method="post" action="{S_POST_ACTION}" onsubmit="return checkForm(this);"{S_FORM_ENCTYPE}> +<form id="postform" method="post" action="{S_POST_ACTION}"{S_FORM_ENCTYPE}> <!-- IF S_DRAFT_LOADED --> <div class="panel"> @@ -68,7 +68,7 @@ <!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 --> <!-- INCLUDE posting_editor.html --> - + {S_FORM_TOKEN} <span class="corners-bottom"><span></span></span></div> </div> @@ -77,7 +77,7 @@ <!-- IF S_SHOW_POLL_BOX or S_POLL_DELETE --><!-- INCLUDE posting_poll_body.html --><!-- ENDIF --> <!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF --> -{S_FORM_TOKEN} + </form> <!-- IF not S_PRIVMSGS --> <script type="text/javascript"> diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html index d7caf00743..b0c6e08049 100644 --- a/phpBB/styles/prosilver/template/report_body.html +++ b/phpBB/styles/prosilver/template/report_body.html @@ -40,12 +40,12 @@ <fieldset class="submit-buttons"> <input type="submit" name="submit" class="button1" value="{L_SUBMIT}" /> <input type="submit" name="cancel" class="button2" value="{L_CANCEL}" /> + {S_FORM_TOKEN} </fieldset> </div> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index 3645f5147e..9aaee00d58 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -44,12 +44,11 @@ <input type="submit" name="agreed" id="agreed" value="{L_AGREE}" class="button1" /> <input type="submit" name="not_agreed" value="{L_NOT_AGREE}" class="button2" /> <!-- ENDIF --> + {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} </fieldset> <span class="corners-bottom"><span></span></span></div> </div> - - {S_HIDDEN_FIELDS} - {S_FORM_TOKEN} </form> <!-- ELSEIF S_AGREEMENT --> diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index a263d50d2b..8052fdc435 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -48,6 +48,7 @@ <label for="sk">{L_SORT_BY}: <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label> <label><select name="sd" id="sd">{S_ORDER_SELECT}</select></label> <input class="button2" type="submit" name="sort" value="{L_SORT}" /> + {S_FORM_TOKEN} </fieldset> <hr /> @@ -69,9 +70,9 @@ <fieldset class="display-actions"> <input class="button2" type="submit" name="delete" value="{L_DELETE_MARKED}" /> <div><a href="#" onclick="marklist('ucp', 'attachment', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('ucp', 'attachment', false); return false;">{L_UNMARK_ALL}</a></div> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html index 9b5821671a..4b3b14b4b7 100644 --- a/phpBB/styles/prosilver/template/ucp_footer.html +++ b/phpBB/styles/prosilver/template/ucp_footer.html @@ -6,7 +6,7 @@ <span class="corners-bottom"><span></span></span></div> </div> <!-- IF S_COMPOSE_PM --> -{S_FORM_TOKEN} +<div>{S_FORM_TOKEN}</div> </form> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index e9c67a0f10..1eda763570 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -74,6 +74,7 @@ <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" /> <!-- ELSE --> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <!-- ENDIF --> <input type="submit" name="update" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <!-- ELSEIF S_LIST --> @@ -187,6 +188,7 @@ <fieldset class="submit-buttons"> <input class="button1" type="submit" name="addusers" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </fieldset> <!-- ELSE --> @@ -221,7 +223,6 @@ </div> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html index b6327a9324..a147dbf89f 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_membership.html +++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html @@ -140,6 +140,7 @@ <!-- IF S_CHANGE_DEFAULT --> <div class="left-box"> <input class="button2" type="submit" name="change_default" value="{L_CHANGE_DEFAULT_GROUP}" /> + {S_FORM_TOKEN} </div> <!-- ENDIF --> @@ -152,13 +153,12 @@ <option value="demote">{L_DEMOTE_SELECTED}</option> </select> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> + {S_FORM_TOKEN} </div> <!-- ENDIF --> </fieldset> <!-- ENDIF --> - -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 8613921907..a2bfb6cb9e 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -67,9 +67,9 @@ <fieldset class="display-actions"> <input type="submit" name="unbookmark" value="{L_REMOVE_BOOKMARK_MARKED}" class="button2" /> <div><a href="#" onclick="marklist('ucp', '', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('ucp', '', false); return false;">{L_UNMARK_ALL}</a></div> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html index a012df0095..dffe0a37ef 100644 --- a/phpBB/styles/prosilver/template/ucp_main_drafts.html +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -18,6 +18,7 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SAVE}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <!-- ELSE --> @@ -61,11 +62,12 @@ <fieldset class="display-actions"> <input class="button2" type="submit" name="delete" value="{L_DELETE_MARKED}" /> <div><a href="#" onclick="marklist('postform', '', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('postform', '', false); return false;">{L_UNMARK_ALL}</a></div> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> <!-- ENDIF --> -{S_FORM_TOKEN} + </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index f2d7ddc6f1..9dd28a0956 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -82,9 +82,9 @@ <fieldset class="display-actions"> <input type="submit" name="unwatch" value="{L_UNWATCH_MARKED}" class="button2" /> <div><a href="#" onclick="marklist('ucp', '', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('ucp', '', false); return false;">{L_UNMARK_ALL}</a></div> + {S_FORM_TOKEN} </fieldset> <!-- ENDIF --> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html index 1063d15857..acf6f24af1 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html @@ -1,2 +1,2 @@ -{S_FORM_TOKEN} +<div>{S_FORM_TOKEN}</div> </form> diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html index 2cc3107548..f9eb1cc102 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html @@ -7,17 +7,16 @@ <!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF --> - <ul class="linklist"> - <!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM --> - <li class="buttons"> - <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span>{L_POST_REPLY_PM}</span></a></div> - <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n"><span>{L_UCP_PM_COMPOSE}</span></a></div><!-- ENDIF --> - <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span>{L_FORWARD_PM}</span></a></div><!-- ENDIF --> - </li> + <div class="buttons"> + <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div> + <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF --> + <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF --> + </div> <!-- ENDIF --> <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE --> + <ul class="linklist"> <li class="rightside pagination"> <!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF --> <!-- IF FOLDER_CUR_MESSAGES neq 0 --> @@ -25,5 +24,5 @@ <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> • <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> • <span>{PAGINATION}</span><!-- ELSE --> • {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> <!-- ENDIF --> </li> - <!-- ENDIF --> </ul> + <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html index 3fe24f04ee..cbb9054f4f 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_options.html +++ b/phpBB/styles/prosilver/template/ucp_pm_options.html @@ -14,7 +14,7 @@ <ol class="def-rules"> <!-- BEGIN rule --> - <li><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="right-box button2" /><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --></li> + <li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --></li> <!-- BEGINELSE --> <li><strong>{L_NO_RULES_DEFINED}</strong></li> <!-- END rule --> @@ -124,8 +124,8 @@ </fieldset> <span class="corners-bottom"><span></span></span></div> + {S_FORM_TOKEN} </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index 76608ee8cf..86323a1c42 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -27,8 +27,8 @@ <input type="hidden" name="export_option" value="CSV" /> <input class="button1" type="submit" name="submit_export" value="{L_EXPORT_FOLDER}" /> <input class="button2" type="reset" value="Reset" name="reset" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ELSE --> diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index a95bd19260..9022346627 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -101,8 +101,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <script type="text/javascript"> diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html index cc505f9100..74af90ca5a 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_post.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html @@ -44,8 +44,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html index 993a0146e9..dc773584df 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_view.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html @@ -87,8 +87,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_avatar.html b/phpBB/styles/prosilver/template/ucp_profile_avatar.html index ae010a6f28..2669ed3c22 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_avatar.html +++ b/phpBB/styles/prosilver/template/ucp_profile_avatar.html @@ -12,8 +12,8 @@ <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" /> <!-- ELSE --> <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <!-- ENDIF --> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 0266e22881..1bd54619b9 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -50,9 +50,9 @@ <dl> <dt><label for="bday_day">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt> <dd> - <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 40px;">{S_BIRTHDAY_DAY_OPTIONS}</select></label> - <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 40px;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label> - <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 60px;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label> + <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label> + <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label> + <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label> </dd> </dl> <!-- ENDIF --> @@ -72,8 +72,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html index de41b9c440..edd58d5e25 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html +++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html @@ -56,8 +56,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html index c3dc11cd0d..dbaeac3254 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_signature.html +++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html @@ -44,8 +44,8 @@ <input type="reset" name="reset" value="{L_RESET}" class="button2" /> <input type="submit" name="preview" value="{L_PREVIEW}" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 8fd722e241..5b5309ce93 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -132,11 +132,11 @@ {S_HIDDEN_FIELDS} <input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" id ="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html index e54bac40af..7dbc23b733 100644 --- a/phpBB/styles/prosilver/template/ucp_remind.html +++ b/phpBB/styles/prosilver/template/ucp_remind.html @@ -21,12 +21,12 @@ <dt> </dt> <dd>{S_HIDDEN_FIELDS}<input type="submit" name="submit" id="submit" class="button1" value="{L_SUBMIT}" tabindex="2" /> <input type="reset" value="{L_RESET}" name="reset" class="button2" /></dd> </dl> + {S_FORM_TOKEN} </fieldset> </div> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html index aef7e476e0..840e972995 100644 --- a/phpBB/styles/prosilver/template/ucp_resend.html +++ b/phpBB/styles/prosilver/template/ucp_resend.html @@ -20,14 +20,13 @@ </dl> <dl> <dt> </dt> - <dd>{S_HIDDEN_FIELDS}<input type="submit" name="submit" id="submit" class="button1" value="{L_SUBMIT}" tabindex="2" /> <input type="reset" value="{L_RESET}" name="reset" class="button2" /></dd> + <dd>{S_HIDDEN_FIELDS}{S_FORM_TOKEN}<input type="submit" name="submit" id="submit" class="button1" value="{L_SUBMIT}" tabindex="2" /> <input type="reset" value="{L_RESET}" name="reset" class="button2" /></dd> </dl> </fieldset> </div> <span class="corners-bottom"><span></span></span></div> </div> -{S_FORM_TOKEN} </form> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html index e1e3cd05c7..3c1b1cddce 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_foes.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html @@ -34,8 +34,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html index 30af33df1a..1e0efbfdf8 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_friends.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html @@ -34,8 +34,8 @@ <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> + {S_FORM_TOKEN} </fieldset> -{S_FORM_TOKEN} </form> <!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index d91c05d3f2..1a731e0451 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -39,7 +39,7 @@ <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <div class="buttons"> - <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></span></a></div> + <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div> </div> <!-- ENDIF --> @@ -183,7 +183,7 @@ <div class="topic-actions"> <!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO --> <div class="buttons"> - <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></span></a></div> + <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div> </div> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index c1a8f3b067..2238f402aa 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -32,7 +32,7 @@ <div class="buttons"> <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO --> - <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div> + <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div> <!-- ENDIF --> </div> @@ -103,9 +103,10 @@ </div> <span class="corners-bottom"><span></span></span></div> + {S_FORM_TOKEN} + {S_HIDDEN_FIELDS} </div> - {S_FORM_TOKEN} - {S_HIDDEN_FIELDS} + </form> <hr /> @@ -201,10 +202,10 @@ <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF --> <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF --> <!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF --> - <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF --> + <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF --> + <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF --> + <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF --> + <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF --> <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF --> </ul> </dd> @@ -239,7 +240,7 @@ <div class="topic-actions"> <div class="buttons"> <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO --> - <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}"><span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></span></a></div> + <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div> <!-- ENDIF --> </div> @@ -257,8 +258,8 @@ <form method="post" action="{S_MOD_ACTION}"> <fieldset class="quickmod"> <label>{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" /> + {S_FORM_TOKEN} </fieldset> - {S_FORM_TOKEN} </form> <!-- ENDIF --> diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 74707ddaea..fc0b306a6c 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -280,7 +280,7 @@ .rtl li.header dl.icon dt { /* Tweak for headers alignment when folder icon used */ padding-right: 0; - padding-left: 44px; + padding-left: 50px; } .rtl dl.icon dt { diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 6d07dd3511..6cffdc5930 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -23,19 +23,23 @@ width: 100%; height: 100%; background-position: 0 0; + position: relative; + overflow: hidden; } /* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */ -.buttons div span { display: none; } -.buttons div a:hover { background-image: none; } +/*.buttons div span { display: none; }*/ +/*.buttons div a:hover { background-image: none; }*/ +.buttons div span { position: absolute; width: 100%; height: 100%; cursor: pointer;} +.buttons div a:hover span { background-position: 0 100%; } /* Big button images */ -.reply-icon, .reply-icon a { background: transparent none 0 0 no-repeat; } -.post-icon, .post-icon a { background: transparent none 0 0 no-repeat; } -.locked-icon, .locked-icon a { background: transparent none 0 0 no-repeat; } -.pmreply-icon, .pmreply-icon a { background: none 0 0 no-repeat; } -.newpm-icon, .newpm-icon a { background: none 0 0 no-repeat; } -.forwardpm-icon, .forwardpm-icon a { background: none 0 0 no-repeat; } +.reply-icon span { background: transparent none 0 0 no-repeat; } +.post-icon span { background: transparent none 0 0 no-repeat; } +.locked-icon span { background: transparent none 0 0 no-repeat; } +.pmreply-icon span { background: none 0 0 no-repeat; } +.newpm-icon span { background: none 0 0 no-repeat; } +.forwardpm-icon span { background: none 0 0 no-repeat; } /* Set big button dimensions */ .buttons div.reply-icon { width: {IMG_BUTTON_TOPIC_REPLY_WIDTH}px; height: {IMG_BUTTON_TOPIC_REPLY_HEIGHT}px; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index e8b405fefb..06a05b5616 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -647,12 +647,12 @@ Colours and backgrounds for buttons.css -------------------------------------------------------------- */ /* Big button images */ -.reply-icon, .reply-icon a { background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); } -.post-icon, .post-icon a { background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}") ;} -.locked-icon, .locked-icon a { background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); } -.pmreply-icon, .pmreply-icon a { background-image: url("{IMG_BUTTON_PM_REPLY_SRC}") ;} -.newpm-icon, .newpm-icon a { background-image: url("{IMG_BUTTON_PM_NEW_SRC}") ;} -.forwardpm-icon, .forwardpm-icon a { background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}") ;} +.reply-icon span { background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); } +.post-icon span { background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}"); } +.locked-icon span { background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); } +.pmreply-icon span { background-image: url("{IMG_BUTTON_PM_REPLY_SRC}") ;} +.newpm-icon span { background-image: url("{IMG_BUTTON_PM_NEW_SRC}") ;} +.forwardpm-icon span { background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}") ;} a.print { background-image: url("{T_THEME_PATH}/images/icon_print.gif"); diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index dfc0a38e37..936b53f78a 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -107,7 +107,7 @@ li.header dl.icon { li.header dl.icon dt { /* Tweak for headers alignment when folder icon used */ padding-left: 0; - padding-right: 44px; + padding-right: 50px; } /* Forum list column styles */ diff --git a/phpBB/styles/subsilver2/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html index c3352be251..d54994fe67 100644 --- a/phpBB/styles/subsilver2/template/attachment.html +++ b/phpBB/styles/subsilver2/template/attachment.html @@ -63,7 +63,8 @@ <param name="loop" value="true" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="never" /> - <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never"></embed> + <param name="allowNetworking" value="internal" /> + <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed> </object> <!-- ELSEIF _file.S_QUICKTIME_FILE --> <object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16"> diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html index 19059c5b60..50162740d0 100644 --- a/phpBB/styles/subsilver2/template/bbcode.html +++ b/phpBB/styles/subsilver2/template/bbcode.html @@ -63,7 +63,7 @@ <param name="loop" value="false" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="never" /> - <param name="allowNetworking" value="none" /> - <embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allowNetworking="none" ></embed> + <param name="allowNetworking" value="internal" /> + <embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed> </object> <!-- END flash --> diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 72de8ef8ff..53b8b6222f 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -48,7 +48,11 @@ function initInsertions() { textarea.focus(); baseHeight = doc.selection.createRange().duplicate().boundingHeight; - // document.body.focus(); + + if (!document.forms[form_name]) + { + document.body.focus(); + } } } diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index f718c568ca..fff71a90d6 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -130,7 +130,7 @@ </tr> <!-- ENDIF --> <tr> - <td class="cat" colspan="4" align="center"><input class="btnlite" type="submit" name="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> + <td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> </tr> </table> {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index b57a273e25..5adfeab6cd 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -26,7 +26,7 @@ t: '{LA_BBCODE_T_HELP}', tip: '{L_STYLES_TIP}' <!-- BEGIN custom_tags --> - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}' <!-- END custom_tags --> } diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html index e66bfd9f1e..a0ec30e9ba 100644 --- a/phpBB/styles/subsilver2/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -42,7 +42,7 @@ <td class="row2" nowrap="nowrap"><select name="ch">{S_CHARACTER_OPTIONS}</select> <span class="genmed">{L_POST_CHARACTERS}</span></td> </tr> <tr> - <td class="cat" colspan="4" align="center">{S_HIDDEN_FIELDS}<input class="btnlite" name="submit" type="submit" value="{L_SEARCH}" /> <input class="btnlite" type="reset" value="{L_RESET}" /></td> + <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> </tr> </table> diff --git a/phpBB/styles/subsilver2/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html index e7b84390c7..1681fe3849 100644 --- a/phpBB/styles/subsilver2/template/ucp_footer.html +++ b/phpBB/styles/subsilver2/template/ucp_footer.html @@ -2,7 +2,7 @@ <!-- IF not S_PRIVMSGS or S_SHOW_DRAFTS --> {S_FORM_TOKEN}</form><!-- ENDIF --></td> </tr> </table> -<!-- IF S_SHOW_PM_BOX and S_POST_ACTION -->{S_FORM_TOKEN}</form><!-- ENDIF --> +<!-- IF (S_SHOW_PM_BOX or S_EDIT_POST) and S_POST_ACTION -->{S_FORM_TOKEN}</form><!-- ENDIF --> <br clear="all" /> diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index b6c9e8d437..c196bc60a0 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -148,7 +148,7 @@ </table> <!-- ENDIF --> - <!-- IF S_IS_POSTABLE or .topicrow --> + <!-- IF not S_DISPLAY_ACTIVE and (S_IS_POSTABLE or .topicrow) --> <table class="tablebg" width="100%" cellspacing="1"> <tr> <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 46a5ccf5e7..c0ea87fede 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -14,7 +14,7 @@ define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -include($phpbb_root_path . 'common.'.$phpEx); +include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); // Start session @@ -211,6 +211,8 @@ $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); // Limit topics to certain time frame, obtain correct topic count +// global announcements must not be counted, normal announcements have to +// be counted, as forum_topics(_real) includes them if ($sort_days) { $min_post_time = time() - ($sort_days * 86400); @@ -218,8 +220,8 @@ if ($sort_days) $sql = 'SELECT COUNT(topic_id) AS num_topics FROM ' . TOPICS_TABLE . " WHERE forum_id = $forum_id - AND topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ") - AND topic_last_post_time >= $min_post_time + AND ((topic_type <> " . POST_GLOBAL . " AND topic_last_post_time >= $min_post_time) + OR topic_type = " . POST_ANNOUNCE . ") " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1'); $result = $db->sql_query($sql); $topics_count = (int) $db->sql_fetchfield('num_topics'); @@ -292,6 +294,7 @@ $template->assign_vars(array( 'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 'fid[]=' . $forum_id), 'S_SINGLE_MODERATOR' => (!empty($moderators[$forum_id]) && sizeof($moderators[$forum_id]) > 1) ? false : true, 'S_IS_LOCKED' => ($forum_data['forum_status'] == ITEM_LOCKED) ? true : false, + 'S_VIEWFORUM' => true, 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '', 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '', diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 9d2a6b61c0..f24eebd1a7 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -116,34 +116,43 @@ if ($view && !$post_id) $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $sql = 'SELECT topic_id, forum_id - FROM ' . TOPICS_TABLE . ' - WHERE forum_id = ' . $row['forum_id'] . " - AND topic_moved_id = 0 - AND topic_last_post_time $sql_condition {$row['topic_last_post_time']} - " . (($auth->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . " - ORDER BY topic_last_post_time $sql_ordering"; - $result = $db->sql_query_limit($sql, 1); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - if (!$row) { $user->setup('viewtopic'); + // OK, the topic doesn't exist. This error message is not helpful, but technically correct. trigger_error(($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS'); } else { - $topic_id = $row['topic_id']; + $sql = 'SELECT topic_id, forum_id + FROM ' . TOPICS_TABLE . ' + WHERE forum_id = ' . $row['forum_id'] . " + AND topic_moved_id = 0 + AND topic_last_post_time $sql_condition {$row['topic_last_post_time']} + " . (($auth->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . " + ORDER BY topic_last_post_time $sql_ordering"; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - // Check for global announcement correctness? - if (!$row['forum_id'] && !$forum_id) + if (!$row) { - trigger_error('NO_TOPIC'); + $user->setup('viewtopic'); + trigger_error(($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS'); } - else if ($row['forum_id']) + else { - $forum_id = $row['forum_id']; + $topic_id = $row['topic_id']; + + // Check for global announcement correctness? + if (!$row['forum_id'] && !$forum_id) + { + trigger_error('NO_TOPIC'); + } + else if ($row['forum_id']) + { + $forum_id = $row['forum_id']; + } } } } @@ -572,6 +581,7 @@ $template->assign_vars(array( 'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action">' . $topic_mod . '</select>' : '', 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&t=$topic_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id), + 'S_VIEWTOPIC' => true, 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false, 'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 't=' . $topic_id), @@ -653,13 +663,25 @@ if (!empty($topic_data['poll_start'])) if ($update && $s_can_vote) { - if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options']) + + if (!sizeof($voted_id) || sizeof($voted_id) > $topic_data['poll_max_options'] || in_array(VOTE_CONVERTED, $cur_voted_id)) { $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&start=$start"); meta_refresh(5, $redirect_url); - - $message = (!sizeof($voted_id)) ? 'NO_VOTE_OPTION' : 'TOO_MANY_VOTE_OPTIONS'; + if (!sizeof($voted_id)) + { + $message = 'NO_VOTE_OPTION'; + } + else if (sizeof($voted_id) > $topic_data['poll_max_options']) + { + $message = 'TOO_MANY_VOTE_OPTIONS'; + } + else + { + $message = 'VOTE_CONVERTED'; + } + $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'); trigger_error($message); } |
