diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:34 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:34 +0100 |
| commit | 89b37954f994a7cd517553d2d16686f91dcaae72 (patch) | |
| tree | b20e25768bc55be250454c439ffee08ce2981031 | |
| parent | 07633a66e8c9bbb2b288a286bfbea6f562eeca4d (diff) | |
| parent | 80d429a02d26da1f00777e62a0268d83f581f598 (diff) | |
| download | forums-89b37954f994a7cd517553d2d16686f91dcaae72.tar forums-89b37954f994a7cd517553d2d16686f91dcaae72.tar.gz forums-89b37954f994a7cd517553d2d16686f91dcaae72.tar.bz2 forums-89b37954f994a7cd517553d2d16686f91dcaae72.tar.xz forums-89b37954f994a7cd517553d2d16686f91dcaae72.zip | |
Merge commit 'release-3.0-B4'
237 files changed, 3495 insertions, 2525 deletions
diff --git a/phpBB/adm/images/file_conflict.gif b/phpBB/adm/images/file_conflict.gif Binary files differindex 8b42730474..4458c4ff23 100644 --- a/phpBB/adm/images/file_conflict.gif +++ b/phpBB/adm/images/file_conflict.gif diff --git a/phpBB/adm/images/file_modified.gif b/phpBB/adm/images/file_modified.gif Binary files differindex 4728cb3d50..17e8f976c3 100644 --- a/phpBB/adm/images/file_modified.gif +++ b/phpBB/adm/images/file_modified.gif diff --git a/phpBB/adm/images/file_new.gif b/phpBB/adm/images/file_new.gif Binary files differindex 1d6e15b59d..d0ec75876d 100644 --- a/phpBB/adm/images/file_new.gif +++ b/phpBB/adm/images/file_new.gif diff --git a/phpBB/adm/images/file_new_conflict.gif b/phpBB/adm/images/file_new_conflict.gif Binary files differindex 83fc598393..84efde4faa 100644 --- a/phpBB/adm/images/file_new_conflict.gif +++ b/phpBB/adm/images/file_new_conflict.gif diff --git a/phpBB/adm/images/file_not_modified.gif b/phpBB/adm/images/file_not_modified.gif Binary files differindex 98ed26db32..8f9b3d3839 100644 --- a/phpBB/adm/images/file_not_modified.gif +++ b/phpBB/adm/images/file_not_modified.gif diff --git a/phpBB/adm/images/file_up_to_date.gif b/phpBB/adm/images/file_up_to_date.gif Binary files differindex aff41a15c2..c372342646 100644 --- a/phpBB/adm/images/file_up_to_date.gif +++ b/phpBB/adm/images/file_up_to_date.gif diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 6c142fde3f..907fed3681 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -52,7 +52,7 @@ $phpbb_admin_path = './'; // Some oft used variables $safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; -$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; +$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; $module_id = request_var('i', ''); $mode = request_var('mode', ''); @@ -206,6 +206,7 @@ function adm_page_footer($copyright_html = true) $template->assign_vars(array( 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'VERSION' => $config['version']) ); diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 42de3e7060..698ea77f01 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -59,6 +59,7 @@ </fieldset> <fieldset class="submit-buttons"> + <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}" /> </fieldset> @@ -80,10 +81,10 @@ <dt><label for="exclude">{L_IP_EXCLUDE}:</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt> <dd><input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES} <input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" /> + </p> </fieldset> <fieldset> @@ -94,10 +95,10 @@ <dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}:</label></dt> <dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" /> + </p> </fieldset> <!-- ELSE --> @@ -207,16 +208,21 @@ <dd><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS} <input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</dd> <dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd> </dl> - </fieldset> - <fieldset class="submit-buttons"> + <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}" /> + </p> + </fieldset> </form> <!-- ELSE --> + <form id="extgroups" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_TITLE}</legend> + <table cellspacing="1"> <col class="row1" /><col class="row1" /><col class="row2" /> <thead> @@ -243,12 +249,11 @@ <!-- END groups --> </tbody> </table> - - <form id="extgroups" method="post" action="{U_ACTION}"> - <fieldset class="quick"> + <p class="quick"> {L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" /> <input class="button2" name="add" type="submit" value="{L_SUBMIT}" /> - </fieldset> + </p> + </fieldset> </form> <!-- ENDIF --> @@ -266,10 +271,10 @@ <dt><label for="extension_group">{L_EXTENSION_GROUP}</label></dt> <dd>{GROUP_SELECT_OPTIONS}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -278,6 +283,9 @@ <form id="change_ext" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_TITLE}</legend> + <table cellspacing="1"> <col class="row1" /><col class="row1" /><col class="row2" /> <thead> @@ -303,9 +311,10 @@ </tbody> </table> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> @@ -314,6 +323,9 @@ <form id="orphan" method="post" action="{U_ACTION}"> + <fieldset> + <legend>{L_TITLE}</legend> + <table cellspacing="1"> <thead> <tr> @@ -346,13 +358,15 @@ <br /> - <fieldset class="submit-buttons"> + <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}" /> + </p> + </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 4629200c97..eb42592f81 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -65,11 +65,11 @@ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt> <dd><input name="bangivereason" type="text" id="bangivereason" class="medium" /></dd> </dl> -</fieldset> -<fieldset class="submit-buttons"> +<p class="submit-buttons"> <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> <br /><br /> @@ -98,11 +98,11 @@ <dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt> <dd><input style="border: 0px;" type="text" name="unbangivereason" id="unbangivereason" class="full" disabled="disabled" /></dd> </dl> - </fieldset> - <fieldset class="submit-buttons"> + <p class="submit-buttons"> <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> </fieldset> <!-- ELSE --> @@ -114,4 +114,4 @@ </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index c1eb7e2193..4370b5e225 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -48,6 +48,7 @@ </fieldset> <fieldset class="submit-buttons"> + <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}" /> </fieldset> @@ -85,6 +86,10 @@ <p>{L_ACP_BBCODES_EXPLAIN}</p> + <form id="acp_bbcodes" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_ACP_BBCODES}</legend> + <table cellspacing="1" id="down"> <thead> <tr> @@ -102,14 +107,13 @@ </tbody> </table> - <form id="acp_bbcodes" method="post" action="{U_ACTION}"> - - <fieldset class="quick"> + <p class="quick"> <input class="button2" name="submit" type="submit" value="{L_ADD_BBCODE}" /> + </p> </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html index dd29017cb1..5ab0e079d4 100644 --- a/phpBB/adm/style/acp_board.html +++ b/phpBB/adm/style/acp_board.html @@ -40,10 +40,11 @@ </fieldset> <fieldset class="submit-buttons"> + <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}" /> </fieldset> </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index bc6c657490..0c4e718353 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -45,11 +45,11 @@ <dt><label for="bot_ip">{L_BOT_IP}:</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt> <dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" /></dd> </dl> - </fieldset> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> @@ -98,4 +98,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index bdc48ea0aa..2b141c0b37 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -28,13 +28,13 @@ <dd><input id="captcha_gd_noise" name="captcha_gd_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES} <input name="captcha_gd_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd> </dl> <!-- ENDIF --> -</fieldset> -<fieldset class="submit-buttons"> +<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}" /> +</p> </fieldset> </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index 8d4ba6ef5c..c73670d9a8 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -15,16 +15,16 @@ <dt><label for="user">{L_SELECT_FILE}:</label></dt> <dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd> </dl> - </fieldset> <!-- IF EXISTS --> - <fieldset class="submit-buttons"> + <p class="submit-buttons"> <input class="button1" type="submit" id="submit" name="submit" value="{L_START_RESTORE}" /> <input class="button2" type="submit" id="delete" name="delete" value="{L_DELETE_BACKUP}" /> <input class="button2" type="submit" id="download" name="download" value="{L_DOWNLOAD_BACKUP}" /> - </fieldset> + </p> <!-- ENDIF --> + </fieldset> </form> <!-- ELSE --> @@ -74,15 +74,15 @@ <!-- END tables --> </select><br /><br /><div align="right"><a href="#" onclick="selector(true)">{L_SELECT_ALL}</a><br /><a href="#" onclick="selector(false)">{L_DESELECT_ALL}</a></div></dd> </dl> - </fieldset> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html index 8bd0957786..14e7c392c2 100644 --- a/phpBB/adm/style/acp_disallow.html +++ b/phpBB/adm/style/acp_disallow.html @@ -14,10 +14,10 @@ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt> <dd><input id="user" type="text" name="disallowed_user" class="medium" /></dd> </dl> -</fieldset> -<fieldset class="quick"> +<p class="quick"> <input class="button1" type="submit" name="disallow" value="{L_SUBMIT}" /> +</p> </fieldset> <h1>{L_DELETE_DISALLOW_TITLE}</h1> @@ -31,10 +31,10 @@ <dt><label for="disallowed">{L_USERNAME}:</label></dt> <dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" name="allow" value="{L_SUBMIT}" /> + </p> <!-- ELSE --> <p>{L_NO_DISALLOWED}</p> <!-- ENDIF --> @@ -42,4 +42,4 @@ </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html index 5b3d19c8b6..a44b276bee 100644 --- a/phpBB/adm/style/acp_email.html +++ b/phpBB/adm/style/acp_email.html @@ -24,7 +24,7 @@ <dl> <dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt> <dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd> </dl> <dl> <dt><label for="subject">{L_SUBJECT}:</label></dt> @@ -42,13 +42,13 @@ <dt><label for="send">{L_SEND_IMMEDIATLY}:</label></dt> <dd><input id="send" type="checkbox" class="radio" name="send_immediatly" checked="checked" /></dd> </dl> -</fieldset> -<fieldset class="submit-buttons"> +<p class="submit-buttons"> <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> </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 63ed7cb883..427a1f07a4 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -7,6 +7,9 @@ <script type="text/javascript"> <!-- + /** + * Handle displaying/hiding several options based on the forum type + */ function display_options(value) { <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST --> @@ -20,6 +23,17 @@ } <!-- ENDIF --> + <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS --> + if (value == {FORUM_LINK}) + { + dE('cat_to_link_actions', 1); + } + else + { + dE('cat_to_link_actions', -1); + } + <!-- ENDIF --> + if (value == {FORUM_POST}) { dE('forum_post_options', 1); @@ -43,6 +57,41 @@ } } + /** + * Init the wanted display functionality if javascript is enabled. + * If javascript is not available, the user is still able to properly administrate. + */ + onload = function() + { + <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST --> + <!-- IF S_FORUM_POST --> + dE('type_actions', -1); + <!-- ENDIF --> + <!-- ENDIF --> + + <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS --> + <!-- IF S_FORUM_CAT --> + dE('cat_to_link_actions', -1); + <!-- ENDIF --> + <!-- ENDIF --> + + <!-- IF not S_FORUM_POST --> + dE('forum_post_options', -1); + <!-- ENDIF --> + + <!-- IF not S_FORUM_CAT --> + dE('forum_cat_options', -1); + <!-- ENDIF --> + + <!-- IF not S_FORUM_LINK --> + dE('forum_link_options', -1); + <!-- ENDIF --> + + <!-- IF S_FORUM_LINK --> + dE('forum_rules_options', -1); + <!-- ENDIF --> + } + //--> </script> @@ -68,7 +117,7 @@ <dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd> </dl> <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST --> - <div id="type_actions"<!-- IF S_FORUM_POST --> style="display: none;"<!-- ENDIF -->> + <div id="type_actions"> <dl> <dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}:</label></dt> <dd><input type="radio" class="radio" id="type_action" name="type_action" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</dd> @@ -76,6 +125,18 @@ </dl> </div> <!-- ENDIF --> + <!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS --> + <div id="cat_to_link_actions"> + <dl> + <dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}:</label></dt> + <!-- IF S_FORUMS_LIST --> + <dd><input type="radio" class="radio" name="action_subforums" value="move" checked="checked" /> {L_MOVE_SUBFORUMS_TO} <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd> + <!-- ELSE --> + <dd><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</dd> + <!-- ENDIF --> + </dl> + </div> + <!-- ENDIF --> <dl> <dt><label for="parent">{L_FORUM_PARENT}:</label></dt> <dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd> @@ -114,17 +175,17 @@ </dl> </fieldset> - <div id="forum_cat_options"<!-- IF not S_FORUM_CAT --> style="display: none;"<!-- ENDIF -->> + <div id="forum_cat_options"> <fieldset> <legend>{L_GENERAL_FORUM_SETTINGS}</legend> <dl> <dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}:</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt> <dd><input type="radio" class="radio" name="display_active" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="display_active" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</dd> </dl> - </fieldset> + </fieldset> </div> - <div id="forum_post_options"<!-- IF not S_FORUM_POST --> style="display: none;"<!-- ENDIF -->> + <div id="forum_post_options"> <fieldset> <legend>{L_GENERAL_FORUM_SETTINGS}</legend> <dl> @@ -192,7 +253,7 @@ </fieldset> </div> - <div id="forum_link_options"<!-- IF not S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->> + <div id="forum_link_options"> <fieldset> <legend>{L_GENERAL_FORUM_SETTINGS}</legend> <dl> @@ -206,7 +267,7 @@ </fieldset> </div> - <div id="forum_rules_options"<!-- IF S_FORUM_LINK --> style="display: none;"<!-- ENDIF -->> + <div id="forum_rules_options"> <fieldset> <legend>{L_FORUM_RULES}</legend> <dl> @@ -228,6 +289,7 @@ </div> <fieldset class="submit-buttons"> + <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}" /> </fieldset> @@ -275,10 +337,10 @@ <!-- ENDIF --> </dl> <!-- ENDIF --> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -329,7 +391,7 @@ <!-- ENDIF --> <!-- IF S_RESYNCED --> - <script language="javascript" type="text/javascript"> + <script type="text/javascript"> <!-- var close_waitscreen = 1; //--> @@ -351,7 +413,7 @@ <tr> <td style="width: 5%;">{forums.FOLDER_IMAGE}</td> <td> - <!-- IF forums.FORUM_IMAGE --><div style="float: left;">{forums.FORUM_IMAGE}</div><!-- ENDIF --> + <!-- IF forums.FORUM_IMAGE --><div style="float: left; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF --> <strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong> <!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF --> <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <b>{forums.FORUM_TOPICS}</b> / {L_POSTS}: <b>{forums.FORUM_POSTS}</b></span><!-- ENDIF --> @@ -361,18 +423,18 @@ {ICON_MOVE_UP_DISABLED} <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW--> - <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> - <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> + <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> + <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a> <!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW --> - <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> + <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a> {ICON_MOVE_DOWN_DISABLED} <!-- ELSE --> {ICON_MOVE_UP_DISABLED} {ICON_MOVE_DOWN_DISABLED} - <!-- ENDIF --> - <a href="{forums.U_EDIT}">{ICON_EDIT}</a> + <!-- ENDIF --> + <a href="{forums.U_EDIT}">{ICON_EDIT}</a> <!-- IF not forums.S_FORUM_LINK --> - <a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a> + <a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a> <!-- ELSE --> {ICON_SYNC_DISABLED} <!-- ENDIF --> @@ -387,11 +449,11 @@ <form id="fselect" method="post" action="{U_SEL_ACTION}"> <fieldset class="quick"> - {L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select> + {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}" /> </fieldset> - + </form> <form id="forums" method="post" action="{U_ACTION}"> @@ -399,7 +461,7 @@ <fieldset class="quick"> <input type="hidden" name="action" value="add" /> - <input type="text" name="forum_name" value="" /> + <input type="text" name="forum_name" value="" /> <input class="button2" name="addforum" type="submit" value="{L_CREATE_FORUM}" /> </fieldset> diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 3d4e274228..e2ed9d4529 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -54,6 +54,12 @@ <fieldset> <legend>{L_GROUP_SETTINGS_SAVE}</legend> + <!-- IF S_USER_FOUNDER --> + <dl> + <dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}:</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt> + <dd><input name="group_founder_manage" type="checkbox" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd> + </dl> + <!-- ENDIF --> <dl> <dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt> <dd><input name="group_legend" type="checkbox" class="radio" id="group_legend"{GROUP_LEGEND} /></dd> @@ -143,6 +149,7 @@ </fieldset> <fieldset class="submit-buttons"> + <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}" /> </fieldset> @@ -247,12 +254,12 @@ <dl> <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt> <dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -289,6 +296,11 @@ <tbody> <!-- BEGIN groups --> <!-- IF groups.S_SPECIAL --> + <!-- IF groups.S_FIRST_ROW --> + <tr> + <td colspan="5" class="row3">{L_NO_GROUPS_CREATED}</td> + </tr> + <!-- ENDIF --> </tbody> </table> @@ -331,4 +343,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index e3cfb5764a..1ea1061d82 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -12,6 +12,9 @@ <form id="acp_icons" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_TITLE}</legend> + <table cellspacing="1"> <thead> <tr> @@ -64,9 +67,10 @@ </tbody> </table> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> @@ -86,7 +90,6 @@ <!-- IF not S_PAK_OPTIONS --> <p>{L_NO_PAK_OPTIONS}</p> - </fieldset> <!-- ELSE --> <dl> @@ -96,12 +99,12 @@ <dt><label for="current">{L_CURRENT}</label><br /><span>{L_CURRENT_EXPLAIN}</span></dt> <dd><input type="radio" class="radio" id="current" name="current" value="keep" checked="checked" /> {L_KEEP_ALL} <input type="radio" class="radio" name="current" value="replace" /> {L_REPLACE_MATCHES} <input type="radio" class="radio" name="current" value="delete" /> {L_DELETE_ALL} </dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" id="import" name="import" value="{L_IMPORT_SUBMIT}" /> - </fieldset> + </p> <!-- ENDIF --> + </fieldset> </form> @@ -118,6 +121,10 @@ </div> <!-- ENDIF --> + <form id="acp_icons" method="post" action="{U_ACTION}"> + <fieldset class="tabular"> + <legend>{L_TITLE}<legend> + <div style="text-align: right;"><a href="{U_IMPORT}">{L_IMPORT}</a> | <a href="{U_EXPORT}">{L_EXPORT}</a></div> <table cellspacing="1"> @@ -163,14 +170,13 @@ </tbody> </table> - <form id="acp_icons" method="post" action="{U_ACTION}"> - - <fieldset class="quick"> + <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> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index 82bc7fed2f..22c38446f2 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -45,13 +45,14 @@ <dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt> <dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" /></dd> </dl> -</fieldset> -<fieldset class="submit-buttons"> +<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}" /> +</p> + </fieldset> </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index 22cbd3921c..bc05fc43fd 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -16,10 +16,10 @@ <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt> <dd>{RADIO_BUTTONS}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input type="submit" class="button2" value="{L_DOWNLOAD}" name="download" /> + </p> </fieldset> </form> @@ -50,10 +50,10 @@ <dt><label for="lang_author">{L_LANG_AUTHOR}:</label></dt> <dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" /></dd> </dl> - </fieldset> - <fieldset class="quick" style="margin-top: -15px;"> + <p class="quick" style="margin-top: -15px;"> <input type="submit" name="update_details" class="button2" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -245,4 +245,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index e267d54410..c9f7c0baf1 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -107,14 +107,14 @@ <dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd> </dl> </div> - </fieldset> - <fieldset class="submit-buttons"> + <p class="submit-buttons"> <input type="hidden" name="action" value="{ACTION}" /> <input type="hidden" name="m" value="{MODULE_ID}" /> <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> </form> @@ -209,4 +209,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index 1622fce7db..d8bbeb33dd 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -74,10 +74,10 @@ <dt><label for="role_description">{L_ROLE_DESCRIPTION}:</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt> <dd><textarea id="role_description" name="role_description" rows="3" cols="45">{ROLE_DESCRIPTION}</textarea></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input type="submit" class="button1" name="submit" value="{L_SUBMIT}" /> + </p> </fieldset> <!-- IF S_DISPLAY_ROLE_MASK --> @@ -229,4 +229,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index e04ae5a717..9e305e525c 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -61,23 +61,6 @@ </form> - <form id="select_single_forum" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_LOOK_UP_FORUM}</legend> - <dl> - <dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt> - <dd><select id="forum" name="forum_id[]">{S_FORUM_OPTIONS}</select></dd> - </dl> - </fieldset> - - <fieldset class="quick"> - {S_HIDDEN_FIELDS} - <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> - </fieldset> - - </form> - <!-- ENDIF --> <!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER --> @@ -89,7 +72,7 @@ <dl> <dt><label for="username">{L_FIND_USERNAME}:</label></dt> <dd><input class="medium" type="text" id="username" name="username[]" /></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd> <dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</dd> </dl> </fieldset> @@ -152,7 +135,7 @@ <p>{L_USERNAMES_EXPLAIN}</p> <dl> <dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd> - <dd class="full" style="text-align: left;"><div style="float: right;">[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</div><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</dd> + <dd class="full" style="text-align: left;"><div style="float: right;">[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</div><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</dd> </dl> </fieldset> @@ -239,7 +222,7 @@ <dl> <dt><label for="username">{L_FIND_USERNAME}:</label></dt> <dd><input type="text" id="username" name="username[]" /></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd> <dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</dd> </dl> </fieldset> diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index 020da77327..9db33f54b2 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -221,4 +221,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index b6a9fac56a..00710ccb4f 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -44,10 +44,10 @@ <dl> <dd class="full"><select name="f[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" value="{L_LOOK_UP_FORUM}" /> + </p> </fieldset> </form> @@ -88,16 +88,16 @@ <dt><label for="sticky">{L_PRUNE_STICKY}:</label></dt> <dd><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES} <input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> {S_HIDDEN_FIELDS} <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> + </p> </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index a477c24577..0db10e3ae4 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -43,15 +43,15 @@ <dt><label for="deactivate">{L_DEACTIVATE_DELETE}:</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt> <dd><input type="radio" class="radio" name="action" value="delete" /> {L_DELETE_USERS} <input type="radio" class="radio" id="deactivate" name="action" value="deactivate" checked="checked" /> {L_DEACTIVATE}</dd> </dl> -</fieldset> -<fieldset class="submit-buttons"> +<p class="submit-buttons"> <input type="hidden" name="prune" value="1" /> <input class="button1" type="submit" id="update" name="update" value="{L_SUBMIT}" /> <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> +</p> </fieldset> </form> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index b79ac9cf6b..1926af18a2 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -43,13 +43,13 @@ <dd><input name="min_posts" type="text" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd> </dl> </div> - </fieldset> - <fieldset class="submit-buttons"> + <p class="submit-buttons"> <input type="hidden" name="action" value="save" /> <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> </form> @@ -60,6 +60,10 @@ <p>{L_ACP_RANKS_EXPLAIN}</p> + <form id="acp_ranks" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_ACP_MANAGE_RANKS}</legend> + <table cellspacing="1"> <thead> <tr> @@ -81,14 +85,13 @@ </tbody> </table> - <form id="acp_ranks" method="post" action="{U_ACTION}"> - - <fieldset class="quick"> + <p class="quick"> <input class="button2" name="add" type="submit" value="{L_ADD_RANK}" /> + </p> </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html index be987dd294..4aaf7328e7 100644 --- a/phpBB/adm/style/acp_reasons.html +++ b/phpBB/adm/style/acp_reasons.html @@ -48,11 +48,11 @@ <dd>{TRANSLATED_DESCRIPTION}</dd> </dl> <!-- ENDIF --> - </fieldset> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> @@ -63,6 +63,10 @@ <p>{L_ACP_REASONS_EXPLAIN}</p> + <form id="reasons" method="post" action="{U_ACTION}"> + <fieldset class="tabuled"> + <legend>{L_ACP_REASONS}</legend> + <!-- IF .reasons --> <table cellspacing="1"> <col class="row1" /><col class="row1" /><col class="row2" /> @@ -107,17 +111,16 @@ <!-- ENDIF --> - <form id="reasons" method="post" action="{U_ACTION}"> - - <fieldset class="quick"> + <p class="quick"> <input type="hidden" name="action" value="add" /> <input type="text" name="reason_title" /> <input class="button2" name="addreason" type="submit" value="{L_ADD_NEW_REASON}" /> + </p> </fieldset> </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index 11f022ecbc..7a712892e8 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -13,7 +13,7 @@ <legend>{L_GENERAL_SEARCH_SETTINGS}</legend> <dl> <dt><label for="load_search">{L_YES_SEARCH}:</label><br /><span>{L_YES_SEARCH_EXPLAIN}</span></dt> - <dd><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> class="radio" /> {L_YES} <input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> class="radio" /> {L_NO}</dd> + <dd><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd> </dl> <dl> <dt><label for="search_interval">{L_SEARCH_INTERVAL}:</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt> @@ -55,6 +55,7 @@ <!-- END backend --> <fieldset class="submit-buttons"> + <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}" /> </fieldset> @@ -91,8 +92,13 @@ <!-- IF backend.S_STATS --> + <form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}"> + {backend.S_HIDDEN_FIELDS} + <fieldset class="tabular"> + <legend>{L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend> + <table cellspacing="1"> - <caption>» {L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption> + <caption>{backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption> <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" /> <thead> <tr> @@ -116,15 +122,13 @@ <!-- ENDIF --> - <form id="acp_search_index_{backend.NAME}" method="post" action="{U_ACTION}"> - {backend.S_HIDDEN_FIELDS} - - <fieldset class="quick"> + <p class="quick"> <!-- IF backend.S_INDEXED --> <input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" /> <!-- ELSE --> <input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" /> <!-- ENDIF --> + </p> </fieldset> </form> @@ -134,4 +138,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 8ac3e0c96b..6ee90b7d3d 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -22,10 +22,10 @@ <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> <dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" name="update" value="{L_DELETE}" /> + </p> </fieldset> </form> @@ -37,90 +37,83 @@ <h1>{L_TITLE}</h1> <p>{L_EXPLAIN}</p> - <script language="javascript" type="text/javascript" defer="defer"> + + <!-- IF SUCCESS --> + <div class="successbox"> + <p>{L_IMAGESET_UPDATED}</p> + </div> + <!-- ENDIF --> + + <!-- IF ERROR --> + <div class="errorbox"> + <p>{L_NO_IMAGE}</p> + </div> + <!-- ENDIF --> + + <script type="text/javascript" defer="defer"> <!-- function update_image(newimage) { - document.newimg.src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png"; + document.getElementById('newimg').src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png"; } //--> </script> + <form method="post" action="{U_ACTION}"> - - <table width="95%" cellspacing="1" cellpadding="1" border="0" align="center"> - <tr> - <td align="right">{L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit(); "> + + <fieldset class="quick" style="text-align: left;"> + <legend>{L_SELECT_IMAGE}</legend> + {L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit();"> <!-- BEGIN category --> <option class="sep" value="">{category.NAME}</option> <!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>{category.images.TEXT}</option> <!-- END images --> <!-- END category --> - </select> <input class="btnlite" type="submit" value="{L_SELECT}" tabindex="100" /> - </td> - </tr> - <tr> - <td> - <table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center"> - <tr> - <th colspan="2">{L_EDIT_IMAGESET}</th> - </tr> - <!-- IF SUCCESS --> - <tr> - <td class="row1" colspan="2" align="center"><span style="color: green">{L_IMAGESET_UPDATED}</span><br /></td> - </tr> - <!-- ENDIF --> - <!-- IF ERROR --> - <tr> - <td class="row1" colspan="2" align="center"><span style="color: red">{L_NO_IMAGE}</span><br /></td> - </tr> - <!-- ENDIF --> - <tr> - <td class="row1" colspan="2" align="center"> - <table width="100%" cellspacing="2" cellpadding="2" border="0"> - <tr> - <td width="50%" align="center"><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->"/></td> - <td width="50%" align="center"><img src="images/no_image.png" name="newimg" /></td> - </tr> - <tr> - <td class="gensmall" align="center">{L_CURRENT_IMAGE}</td> - <td class="gensmall" align="center">{L_SELECTED_IMAGE}</td> - </tr> - </table> - </td> - </tr> - <tr> - <th width="40%">{L_IMAGE_PARAMETER}</th> - <th>{L_IMAGE_VALUE}</th> - </tr> - <tr> - <td class="row1" width="40%"><b>{L_IMAGE}: </b></td> - <td class="row2"><select name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option> - <!-- BEGIN imagesetlist --> - <option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option> - <!-- BEGIN images --> - <option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option> - <!-- END images --> - <!-- END imagesetlist --> - </select> - </td> - </tr> - <tr> - <td class="row1" width="40%"><b>{L_INCLUDE_DIMENSIONS}: </b><br /><span class="gensmall">{L_DIMENSIONS_EXPLAIN}</span></td> - <td class="row2"><input type="radio" class="radio" name="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</td> - </tr> - <tr> - <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="{L_SUBMIT}" /> <input class="btnmain" type="reset" value="{L_RESET}" /></td> - </tr> - </table> - </td> - </tr> - </table> - + </select> <input class="button1" type="submit" value="{L_SELECT}" tabindex="100" /> + </fieldset> + + <fieldset> + <legend>{L_EDIT_IMAGESET}</legend> + <dl> + <dt><label>{L_CURRENT_IMAGE}:</label></dt> + <dd><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->" alt="" /></dd> + </dl> + <dl> + <dt><label>{L_SELECTED_IMAGE}:</label></dt> + <dd><img src="images/no_image.png" id="newimg" alt="" /></dd> + </dl> + </fieldset> + + <fieldset> + <legend>{L_IMAGE}</legend> + <dl> + <dt><label for="imgpath">{L_IMAGE}:</label></dt> + <dd><select id="imgpath" name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option> + <!-- BEGIN imagesetlist --> + <option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option> + <!-- BEGIN images --> + <option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option> + <!-- END images --> + <!-- END imagesetlist --> + </select> + </dd> + </dl> + <dl> + <dt><label for="imgsize">{L_INCLUDE_DIMENSIONS}:</label><br /><span>{L_DIMENSIONS_EXPLAIN}</span></dt> + <dd><input type="radio" class="radio" name="imgsize" id="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd> + </dl> + </fieldset> + + <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}" /> + </fieldset> + </form> <!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME --> - <script language="javascript" type="text/javascript" defer="defer"> + <script type="text/javascript" defer="defer"> <!-- function append_text_rows(form_name, value) { @@ -163,14 +156,14 @@ <legend>{L_SELECT_TEMPLATE}</legend> <dl> <dt><label for="template_file">{L_TEMPLATE_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="btnlite" type="submit" value="{L_SELECT}" /></dd> + <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> </fieldset> </form> <!-- IF TEMPLATE_FILE --> - <script language="javascript" type="text/javascript" defer="defer"> + <script type="text/javascript" defer="defer"> <!-- function change_editor_height(height) @@ -217,12 +210,13 @@ </dl> <dl> <dt><label for="text_rows">{L_TEMPLATE_EDITOR_HEIGHT}:</label></dt> - <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="btnlite" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd> + <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button2" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd> </dl> <textarea id="template_data" name="template_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{TEMPLATE_DATA}</textarea> </fieldset> <fieldset class="submit-buttons"> + <legend>{L_SUBMIT}</legend> {S_HIDDEN_FIELDS} <input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" /> </fieldset> @@ -232,15 +226,9 @@ <!-- ELSEIF S_EDIT_THEME --> - <script language="javascript" type="text/javascript"> + <script type="text/javascript"> <!-- - function swatch(field) - { - window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); - return false; - } - function change_editor_height(height) { editor = document.getElementById('css_data'); @@ -260,20 +248,20 @@ <p>{L_EDIT_THEME_EXPLAIN}</p> - <p>{L_SELECTED_THEME}: <b>{SELECTED_THEME}</b></p> + <p>{L_SELECTED_THEME}: <strong>{SELECTED_THEME}</strong></p> <!-- IF S_SHOWCSS --> <h3>{L_SHOW_CSS_NOTE}</h3> <p>{L_SHOW_CSS_EXPLAIN}</p> <!-- ENDIF --> - <form id="acp_styles" method="post" action="{U_ACTION}"> <fieldset> <legend>{L_SELECT_CLASS}</legend> <dl> <dt><label for="css_class">{L_SELECT_CLASS}:</label></dt> - <dd><select id="css_class" name="css_class" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_CLASSES}</select> <input class="btnlite" type="submit" id="select_class" name="select_class" value="{L_SELECT}" /></dd> + <dd><select id="css_class" name="css_class" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_CLASSES}</select></dd> + <dd><input class="button1" type="submit" id="select_class" name="select_class" value="{L_SELECT}" /></dd> </dl> <!-- IF S_CLASS --> <dl> @@ -295,7 +283,7 @@ <legend>{L_THEME_EDITOR}</legend> <dl> <dt><label for="text_rows">{L_THEME_EDITOR_HEIGHT}:</label></dt> - <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="btnlite" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd> + <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button1" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd> </dl> <textarea id="css_data" name="css_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{CSS_DATA}</textarea> </fieldset> @@ -309,7 +297,7 @@ <dd><input id="background_color" name="background_color" type="text" value="{BACKGROUND_COLOR}" size="6" /> <span>[ <a href="#" onclick="swatch('background_color'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd> </dl> <dl> - <dt><label for="backround_image">{L_BACKGROUND_IMAGE}:</label></td> + <dt><label for="backround_image">{L_BACKGROUND_IMAGE}:</label></dt> <dd><select id="background_image" name="background_image">{S_BACKGROUND_IMAGE}</select></dd> </dl> <dl> @@ -353,6 +341,7 @@ <!-- ENDIF --> <fieldset class="submit-buttons"> + <legend>{L_SUBMIT}</legend> {S_HIDDEN_FIELDS} <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> <!-- IF S_SHOWCSS --> @@ -377,13 +366,13 @@ <fieldset> <legend>{L_CUSTOM_CLASS}</legend> <dl> - <dt><label for="custom_class">{L_CSS_CLASS_NAME}:</label></dt></dt> + <dt><label for="custom_class">{L_CSS_CLASS_NAME}:</label></dt> <dd><input id="custom_class" name="custom_class" type="text" value="" maxlength="40" size="40" /></dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" id="add_custom" name="add_custom" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -392,7 +381,7 @@ <!-- ELSEIF S_CACHE --> - <script language="Javascript" type="text/javascript"> + <script type="text/javascript"> <!-- function viewsource(url) @@ -411,6 +400,8 @@ <p>{L_TEMPLATE_CACHE_EXPLAIN}</p> <form name="acp_styles" method="post" action="{U_ACTION}"> + <fieldset class="tabulated"> + <legend>{L_TEMPLATE_CACHE}</legend> <table cellspacing="1"> <thead> @@ -439,10 +430,11 @@ </tbody> </table> - <fieldset class="quick"> + <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 /> <input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" /> + </p> </fieldset> </form> @@ -492,10 +484,10 @@ <dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt> <dd>{FORMAT_BUTTONS}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> + </p> </fieldset> </form> @@ -562,6 +554,7 @@ <form id="acp_styles" method="post" action="{U_ACTION}"> <fieldset class="quick"> + <legend>{L_CREATE}</legend> {L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /> </fieldset> @@ -633,7 +626,8 @@ <!-- ENDIF --> </fieldset> - <fieldset class="quick"> + <fieldset class="submit-buttons"> + <legend>{L_SUBMIT}</legend> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> </fieldset> @@ -641,4 +635,4 @@ <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 1e3fe7190b..7bc81434d0 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -15,13 +15,13 @@ <dl> <dt><label for="username">{L_FIND_USERNAME}:</label></dt> <dd><input class="medium" type="text" id="username" name="username" /></dd> - <dd>[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</dd> + <dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</dd> <dd class="full" style="text-align: left;"><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</dd> </dl> - </fieldset> - <fieldset class="quick"> + <p class="quick"> <input type="submit" name="submituser" value="{L_SUBMIT}" class="button1" /> + </p> </fieldset> </form> @@ -83,9 +83,15 @@ <legend>{L_ACP_USER_OVERVIEW}</legend> <dl> <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt> - <dd><input type="text" id="user" name="user" value="{USER}" /><!-- IF S_USER_INACTIVE --> [{L_USER_IS_INACTIVE}]<!-- ENDIF --></dd> + <dd><input type="text" id="user" name="user" value="{USER}" /></dd> <!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF --> </dl> + <!-- IF S_USER_INACTIVE --> + <dl> + <dt><label>{L_USER_IS_INACTIVE}:</label></dt> + <dd><strong>{USER_INACTIVE_REASON}</strong></dd> + </dl> + <!-- ENDIF --> <dl> <dt><label>{L_REGISTERED}:</label></dt> <dd><strong>{USER_REGISTERED}</strong></dd> @@ -94,7 +100,7 @@ <dl> <dt><label>{L_REGISTERED_IP}:</label></dt> <dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd> - <dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</strong></dd> + <dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</dd> </dl> <!-- ENDIF --> <dl> @@ -542,9 +548,9 @@ var text_name = 'signature'; // Define the bbCode tags - bbcode = new Array(); - bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->); - imageTag = false; +bbcode = new Array(); +bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->); +imageTag = false; // Helpline messages var help_line = { @@ -557,11 +563,12 @@ var help_line = { o: '{LA_BBCODE_O_HELP}', p: '{LA_BBCODE_P_HELP}', w: '{LA_BBCODE_W_HELP}', - a: '{LA_BBCODE_A_HELP}', s: '{LA_BBCODE_S_HELP}', f: '{LA_BBCODE_F_HELP}', e: '{LA_BBCODE_E_HELP}', - d: '{LA_BBCODE_D_HELP}' + d: '{LA_BBCODE_D_HELP}', + t: '{LA_BBCODE_T_HELP}', + tip: '{L_STYLES_TIP}' <!-- BEGIN custom_tags --> ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' <!-- END custom_tags --> @@ -584,31 +591,31 @@ var help_line = { <legend>{L_SIGNATURE}</legend> <p>{L_SIGNATURE_EXPLAIN}</p> <div id="format-buttons"> - <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" /> - <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" /> - <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" /> - <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /> - <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" /> - <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" /> - <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" /> + <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> + <input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> <!-- IF S_BBCODE_IMG --> - <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /> + <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> <!-- ENDIF --> <!-- IF S_LINKS_ALLOWED --> - <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseover="helpline('d')" /> + <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" /> <!-- ENDIF --> <!-- IF S_BBCODE_FLASH --> - <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" /> + <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" /> <!-- ENDIF --> - {L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')"> + {L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')"> <option value="7">{L_FONT_TINY}</option> <option value="9">{L_FONT_SMALL}</option> <option value="12" selected="selected">{L_FONT_NORMAL}</option> <option value="18">{L_FONT_LARGE}</option> <option value="24">{L_FONT_HUGE}</option> </select> - <a href="#" onclick="bbstyle(-1); return false;" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a> <!-- IF .custom_tags --> <br /><br /> <!-- BEGIN custom_tags --> @@ -618,14 +625,8 @@ var help_line = { </div> <p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p> - <dl> - <dt style="width: 95px;"><script type="text/javascript"><!-- - colorPalette('v', 17, 13); - //--></script> - </dt> - <dd style="text-align: left; margin-left: 95px;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd> - <dd style="text-align: left; margin-left: 95px;"> - <!-- IF S_BBCODE_ALLOWED --> + <div style="text-align: left;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></div> + <div><!-- IF S_BBCODE_ALLOWED --> <input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE} <!-- ENDIF --> <!-- IF S_SMILIES_ALLOWED --> @@ -635,8 +636,7 @@ var help_line = { <input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL} <!-- ENDIF --> <br /><br /><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS} - </dd> - </dl> + </div> </fieldset> <fieldset class="quick"> @@ -740,4 +740,4 @@ var help_line = { <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index 44d5a5228e..17f734c29f 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -23,11 +23,11 @@ <dd><input id="replacement" type="text" name="replacement" value="{REPLACEMENT}" /></dd> </dl> {S_HIDDEN_FIELDS} - </fieldset> - <fieldset class="submit-buttons"> + <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}" /> + </p> </fieldset> </form> @@ -40,12 +40,12 @@ <form id="acp_words" method="post" action="{U_ACTION}"> - <fieldset class="quick"> + <fieldset class="tabulated"> + <legend>{L_ACP_WORDS}</legend> + <p class="quick"> {S_HIDDEN_FIELDS} <input class="button2" name="add" type="submit" value="{L_ADD_WORD}" /> - </fieldset> - - </form> + </p> <table cellspacing="1"> <thead> @@ -67,6 +67,9 @@ </tbody> </table> + </fieldset> + + </form> <!-- ENDIF --> -<!-- INCLUDE overall_footer.html -->
\ No newline at end of file +<!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 49ffae98af..bedb045397 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -23,7 +23,7 @@ html { body { /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */ - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0 url("../images/bg_header.gif") 0 0 repeat-x; font-size: 62.5%; /* This sets the default font size to be equivalent to 10px */ @@ -35,13 +35,13 @@ img { } h1 { - font: bold 1.8em 'Trebuchet MS', Verdana, sans-serif; + font: bold 1.8em "Lucida Grande", 'Trebuchet MS', Verdana, sans-serif; text-decoration: none; color: #333333; } h2, caption { - font: bold 1.2em Arial, Helvetica, sans-serif; + font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; text-decoration: none; line-height: 120%; text-align: left; @@ -54,6 +54,12 @@ p { font-size: 1.1em; } +ul { + list-style: disc; + margin-left: 2em; + margin-bottom: 1em; +} + hr { border: 0 none; border-top: 1px solid #999999; @@ -93,7 +99,7 @@ a:hover { } #page-header h1 { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; font-size: 1.5em; font-weight: normal; padding-top: 15px; @@ -237,6 +243,7 @@ span.corners-top span, span.corners-bottom span { #menu ul { list-style: none; + margin: 0; } /* Default list state */ @@ -274,7 +281,7 @@ span.corners-top span, span.corners-bottom span { display: block; padding: 5px; font-size: 0.9em; - font-family: Verdana; + font-family: "Lucida Grande", Verdana; color: #FFA34F; font-weight: bold; background: #006699 url("../images/cellpic3.gif") 0 0 repeat-x; @@ -304,7 +311,7 @@ table { } th, td { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; font-size: 1.1em; text-align: left; } @@ -377,7 +384,7 @@ fieldset p { legend { padding: 1px 0; - font-family: arial,Verdana,Sans-serif; + font-family: "Lucida Grande", Arial, Verdana,Sans-serif; font-size: 1.1em; font-weight: bold; color: #006699; @@ -395,7 +402,7 @@ legend { } input { - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; font-size: 100%; font-weight: normal; background-color: #FAFAFA; @@ -410,7 +417,7 @@ input { } select { - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; font-size: 100%; font-weight: normal; font-style: normal; @@ -436,7 +443,7 @@ option { } textarea { - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; font-size: 100%; width: 60%; padding: 2px; @@ -463,7 +470,7 @@ label img { vertical-align: middle; } -fieldset.quick { +fieldset.quick, p.quick { margin: 0 0 5px 0; padding: 5px 0 0 0; border: none; @@ -472,6 +479,14 @@ fieldset.quick { font-size: 1.1em; } +fieldset.quick legend { + display: none; +} + +fieldset.tabulated { + background-color: #DADFE4; +} + fieldset.nobg { margin: 15px 0 0 0; padding: 0; @@ -510,7 +525,7 @@ select#full_folder_action { Other general def. list properties defined in prosilver_main.css ---------------------------------------- */ dl { - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; } dt { @@ -596,7 +611,7 @@ input:focus, textarea:focus { } -/* Submit button fieldset +/* Submit button fieldset or paragraph ---------------------------------------- */ fieldset.submit-buttons { text-align: center; @@ -606,10 +621,21 @@ fieldset.submit-buttons { margin-top: -1px; } -fieldset.submit-buttons input { +p.submit-buttons { + text-align: center; + margin: 0; + padding: 4px; + margin-top: 10px; +} + +fieldset.submit-buttons input, p.submit-buttons input { padding: 3px 2px; } +fieldset.submit-buttons legend { + display: none; +} + /* Input field styles ---------------------------------------- */ @@ -712,7 +738,7 @@ a.button1, input.button1, input.button3, a.button2, input.button2 { width: auto !important; padding: 1px 3px 0 3px; - font-family: Verdana, Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #000; background-color: #EFEFEF; cursor: pointer; @@ -1012,7 +1038,7 @@ table.pmask td.name { ---------------------------------------- */ .sourcenum { color: gray; - font-family: 'Courier New', monospace; + font-family: Monaco, 'Courier New', monospace; font-size: 125%; font-weight: bold; line-height: 120%; @@ -1021,7 +1047,7 @@ table.pmask td.name { } .source { - font-family: 'Courier New', monospace; + font-family: Monaco, 'Courier New', monospace; font-size: 125%; line-height: 120%; padding: 0px; diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index 9591fc67d1..54e7e61f3a 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -23,7 +23,7 @@ var is_mac = (clientPC.indexOf('mac') != -1); */ function helpline(help) { - document.forms[form_name].helpbox.value = eval(help + '_help'); + document.forms[form_name].helpbox.value = help_line[help]; } /** @@ -64,29 +64,18 @@ function arraypop(thearray) return retval; } + /** -* Insert emoticon +* bbstyle */ -function smiley(text) -{ - text = ' ' + text + ' '; - - if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) +function bbstyle(bbnumber) +{ + if (bbnumber != -1) { - var caretPos = document.forms[form_name].elements[text_name].caretPos; - - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; - document.forms[form_name].elements[text_name].focus(); - } - else - { - var selStart = document.forms[form_name].elements[text_name].selectionStart; - var selEnd = document.forms[form_name].elements[text_name].selectionEnd; - - mozWrap(document.forms[form_name].elements[text_name], text, '') - document.forms[form_name].elements[text_name].focus(); - document.forms[form_name].elements[text_name].selectionStart = selStart + text.length; - document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length; + bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]); + } else { + insert_text('[*]'); + document.forms[form_name].elements[text_name].focus(); } } @@ -96,7 +85,9 @@ function smiley(text) function bbfontstyle(bbopen, bbclose) { theSelection = false; - document.forms[form_name].elements[text_name].focus(); + + var textarea = document.forms[form_name].elements[text_name]; + textarea.focus(); if ((clientVer >= 4) && is_ie && is_win) { @@ -120,59 +111,81 @@ function bbfontstyle(bbopen, bbclose) return; } - // Close image tag before adding - if (imageTag) - { - insert_text(bbtags[15]); - - // Remove the close image tag from the list - lastValue = arraypop(bbcode) - 1; - - // Return button back to normal state - document.forms[form_name].addbbcode14.value = 'Img'; - imageTag = false; - } + //The new position for the cursor after adding the bbcode + var new_pos = getCaretPosition(textarea).start + bbopen.length; // Open tag insert_text(bbopen + bbclose); - document.forms[form_name].elements[text_name].focus(); + // Center the cursor when we don't have a selection + // Gecko and proper browsers + if (!isNaN(textarea.selectionStart)) + { + textarea.selectionStart = new_pos; + textarea.selectionEnd = new_pos; + } + // IE + else if (document.selection) + { + var range = textarea.createTextRange(); + range.move("character", new_pos); + range.select(); + storeCaret(document.forms[form_name].elements[text_name]); + } - storeCaret(document.forms[form_name].elements[text_name]); + document.forms[form_name].elements[text_name].focus(); return; } /** * Insert text at position */ -function insert_text(text) +function insert_text(text, spaces, popup) { - if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) + var textarea; + + if (!popup) { - var caretPos = document.forms[form_name].elements[text_name].caretPos; - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; + textarea = document.forms[form_name].elements[text_name]; + } else + { + textarea = opener.document.forms[form_name].elements[text_name]; } - else if (document.forms[form_name].elements[text_name].selectionStart) + if (spaces) { - var selStart = document.forms[form_name].elements[text_name].selectionStart; - var selEnd = document.forms[form_name].elements[text_name].selectionEnd; - - mozWrap(document.forms[form_name].elements[text_name], text, '') - document.forms[form_name].elements[text_name].selectionStart = selStart + text.length; - document.forms[form_name].elements[text_name].selectionEnd = selEnd + text.length; + text = ' ' + text + ' '; } + + if (!isNaN(textarea.selectionStart)) + { + var sel_start = textarea.selectionStart; + var sel_end = textarea.selectionEnd; + + mozWrap(textarea, text, '') + textarea.selectionStart = sel_start + text.length; + textarea.selectionEnd = sel_end + text.length; + } + + else if (textarea.createTextRange && textarea.caretPos) + { + var caret_pos = textarea.caretPos; + caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; + + } + else { - document.forms[form_name].elements[text_name].value = document.forms[form_name].elements[text_name].value + text; + textarea.value = textarea.value + text; } + document.forms[form_name].elements[text_name].focus(); } /** * Add inline attachment at position */ -function attach_inline() +function attach_inline(index, filename) { - insert_text('[attachment=' + document.forms[form_name].elements['attachments'].value + ']' + document.forms[form_name].elements['attachments'].options[document.forms[form_name].elements['attachments'].selectedIndex].text + '[/attachment]'); + insert_text('[attachment=' + index + ']' + filename + '[/attachment]'); document.forms[form_name].elements[text_name].focus(); } @@ -187,11 +200,11 @@ function addquote(post_id, username) if (document.all) { - eval('divarea = document.all.' + message_name + ';'); + divarea = document.all[message_name]; } else { - eval("divarea = document.getElementById('" + message_name + "');"); + divarea = document.getElementById(message_name); } // Get text selection - not only the post content :( @@ -210,7 +223,15 @@ function addquote(post_id, username) if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null) { - if (document.all) + if (divarea.innerHTML) + { + theSelection = divarea.innerHTML.replace(/<br>/ig, '\n'); + theSelection = theSelection.replace(/<br\/>/ig, '\n'); + theSelection = theSelection.replace(/<\;/ig, '<'); + theSelection = theSelection.replace(/>\;/ig, '>'); + theSelection = theSelection.replace(/&\;/ig, '&'); + } + else if (document.all) { theSelection = divarea.innerText; } @@ -233,185 +254,6 @@ function addquote(post_id, username) } /** -* bbstyle -*/ -function bbstyle(bbnumber) -{ - donotinsert = false; - theSelection = false; - bblast = 0; - document.forms[form_name].elements[text_name].focus(); - - // Close all open tags & default button names - if (bbnumber == -1) - { - while (bbcode[0]) - { - butnumber = arraypop(bbcode) - 1; - document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1]; - buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value'); - - if (buttext != '[*]') - { - eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - } - } - - document.forms[form_name].addbbcode10.value = 'List'; - bbtags[10] = '[list]'; - - document.forms[form_name].addbbcode12.value = 'List='; - bbtags[12] = '[list=]'; - - // All tags are closed including image tags :D - imageTag = false; - document.forms[form_name].elements[text_name].focus(); - - return; - } - - // [*] doesn't have an end tag - noEndTag = (bbtags[bbnumber] == '[*]') - - if ((clientVer >= 4) && is_ie && is_win) - { - // Get text selection - theSelection = document.selection.createRange().text; - - if (theSelection) - { - // Add tags around selection - document.selection.createRange().text = bbtags[bbnumber] + theSelection + ((!noEndTag) ? bbtags[bbnumber+1] : ''); - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - } - else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) - { - mozWrap(document.forms[form_name].elements[text_name], bbtags[bbnumber], ((!noEndTag) ? bbtags[bbnumber+1] : '')); - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - - // Find last occurance of an open tag the same as the one just clicked - for (i = 0; i < bbcode.length; i++) - { - if (bbcode[i] == bbnumber+1) - { - bblast = i; - donotinsert = true; - } - } - - if (bbnumber == 10 && bbtags[10] != '[*]') - { - if (donotinsert) - { - document.forms[form_name].addbbcode12.value = 'List='; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = '[list=]'; - } - else - { - document.forms[form_name].addbbcode12.value = '[*]'; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = '[*]'; - } - } - - if (bbnumber == 12 && bbtags[12] != '[*]') - { - if (donotinsert) - { - document.forms[form_name].addbbcode10.value = 'List'; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = '[list]'; - } - else - { - document.forms[form_name].addbbcode10.value = '[*]'; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = '[*]'; - } - } - - // Close all open tags up to the one just clicked & default button names - if (donotinsert) - { - while (bbcode[bblast]) - { - butnumber = arraypop(bbcode) - 1; - - if (bbtags[butnumber] != '[*]') - { - insert_text(bbtags[butnumber + 1]); - } - else - { - insert_text(bbtags[butnumber]); - } - - buttext = eval('document.forms[form_name].addbbcode' + butnumber + '.value'); - - if (bbtags[butnumber] != '[*]') - { - eval('document.forms[form_name].addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); - } - imageTag = false; - } - document.forms[form_name].elements[text_name].focus(); - return; - } - else - { - // Open tags - - // Close image tag before adding another - if (imageTag && (bbnumber != 14)) - { - insert_text(bbtags[15]); - - // Remove the close image tag from the list - lastValue = arraypop(bbcode) - 1; - - // Return button back to normal state - document.forms[form_name].addbbcode14.value = 'Img'; - imageTag = false; - } - - // Open tag - insert_text(bbtags[bbnumber]); - - // Check to stop additional tags after an unclosed image tag - if (bbnumber == 14 && imageTag == false) - { - imageTag = 1; - } - - if (bbtags[bbnumber] != '[*]') - { - arraypush(bbcode, bbnumber + 1); - eval('document.forms[form_name].addbbcode'+bbnumber+'.value += "*"'); - } - - document.forms[form_name].elements[text_name].focus(); - return; - } - - storeCaret(document.forms[form_name].elements[text_name]); -} - -/** * From http://www.massless.org/mozedit/ */ function mozWrap(txtarea, open, close) @@ -440,7 +282,7 @@ function mozWrap(txtarea, open, close) } /** -* Insert at Claret position. Code from +* Insert at Caret position. Code from * http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 */ function storeCaret(textEl) @@ -465,7 +307,7 @@ function colorPalette(dir, width, height) numberList[3] = 'BF'; numberList[4] = 'FF'; - document.write('<table cellspacing="1" cellpadding="0" border="0" class="type2">'); + document.writeln('<table cellspacing="1" cellpadding="0" border="0">'); for (r = 0; r < 5; r++) { @@ -484,8 +326,8 @@ function colorPalette(dir, width, height) for (b = 0; b < 5; b++) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write('<td style="line-height: ' + height + 'px; background-color:#' + color + '; width: ' + width + 'px; height: ' + height + 'px;">'); - document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>'); + document.write('<td bgcolor="#' + color + '">'); + document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>'); document.writeln('</td>'); } @@ -502,3 +344,54 @@ function colorPalette(dir, width, height) } document.writeln('</table>'); } + + +/** +* Caret Position object +*/ +function caretPosition() +{ + var start = null; + var end = null; +} + + +/** +* Get the caret position in an textarea +*/ +function getCaretPosition(txtarea) +{ + var caretPos = new caretPosition(); + + // simple Gecko/Opera way + if(txtarea.selectionStart || txtarea.selectionStart == 0) + { + caretPos.start = txtarea.selectionStart; + caretPos.end = txtarea.selectionEnd; + } + // dirty and slow IE way + else if(document.selection) + { + // get current selection + var range = document.selection.createRange(); + + // a new selection of the whole textarea + var range_all = document.body.createTextRange(); + range_all.moveToElementText(txtarea); + + // calculate selection start point by moving beginning of range_all to beginning of range + var sel_start; + for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) + { + range_all.moveStart('character', 1); + } + + txtarea.sel_start = sel_start; + + // we ignore the end value for IE, this is already dirty enough and we don't need it + caretPos.start = txtarea.sel_start; + caretPos.end = txtarea.sel_start; + } + + return caretPos; +}
\ No newline at end of file diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html index f84f55d7b1..91a7f25480 100755 --- a/phpBB/adm/style/install_install.html +++ b/phpBB/adm/style/install_install.html @@ -54,12 +54,11 @@ <!-- ENDIF --> <!-- IF S_SHOW_DOWNLOAD --> - <fieldset> - <legend>{L_DL_CONFIG}</legend> - <p>{L_DL_CONFIG_EXPLAIN}</p> - </fieldset> + <h2>{L_DL_CONFIG}</h2> + <p>{L_DL_CONFIG_EXPLAIN}</p> <fieldset class="submit-buttons"> + <legend>{L_DL_CONFIG}</legend> {S_HIDDEN} <input class="button1" type="submit" id="dlconfig" name="dlconfig" value="{L_DL_DOWNLOAD}" /> <input class="button1" type="submit" id="dldone" name="dldone" value="{L_DL_DONE}" /> </fieldset> @@ -67,6 +66,7 @@ <!-- IF L_SUBMIT --> <fieldset class="submit-buttons"> + <legend>{L_SUBMIT}</legend> {S_HIDDEN} <!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /><!-- ENDIF --> </fieldset> @@ -74,4 +74,4 @@ </form> -<!-- INCLUDE install_footer.html -->
\ No newline at end of file +<!-- INCLUDE install_footer.html --> diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index 16ce338e30..5cdf2eeea0 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -1,5 +1,15 @@ <!-- INCLUDE install_header.html --> +<script type="text/javascript"> +<!-- +function popup(url, width, height) +{ + window.open(url.replace(/&/g, '&'), '_popup', 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width); + return false; +} +//--> +</script> + <!-- IF S_ERROR --> <h1>{L_NOTICE}</h1> <p style="color: red;">{ERROR_MSG}</p> @@ -82,9 +92,9 @@ <!-- ELSEIF S_FILE_CHECK --> - <h1>{L_COLLECTED_INFORMATIONS}</h1> + <h1>{L_COLLECTED_INFORMATION}</h1> - <p>{L_COLLECTED_INFORMATIONS_EXPLAIN}</p> + <p>{L_COLLECTED_INFORMATION_EXPLAIN}</p> <!-- IF S_NO_UPDATE_FILES --> <div class="errorbox"> @@ -110,9 +120,6 @@ <p>{files.EXPLAIN}</p> - <!--table cellspacing="1"> - <col class="row1" /><col class="row2" /><col class="row2" /> - <tbody --> <fieldset> <legend><img src="{T_IMAGE_PATH}file_{files.STATUS}.gif" alt="{files.L_STATUS}" /></legend> <!-- ELSE --> @@ -129,7 +136,7 @@ <br /><span>{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS}</span> <!-- ENDIF --> </dt> - <dd>[ <a href="{files.U_SHOW_DIFF}" onclick="popup({files.UA_SHOW_DIFF}, 700, 500);">{files.L_SHOW_DIFF}</a> ]</dd> + <dd>[ <a href="{files.U_SHOW_DIFF}" onclick="popup('{files.U_SHOW_DIFF}', 700, 500); return false;">{files.L_SHOW_DIFF}</a> ]</dd> <!-- IF files.S_CUSTOM --> <dd><input type="checkbox" name="no_update[]" value="{files.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</dd> <!-- ENDIF --> @@ -185,6 +192,25 @@ <p>{L_DOWNLOAD_UPDATE_METHOD_EXPLAIN}</p> + <form id="install_update" method="post" action="{U_ACTION}"> + + <fieldset> + <legend>{L_DOWNLOAD_AS}</legend> + <dl> + <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt> + <dd>{RADIO_BUTTONS}</dd> + </dl> + </fieldset> + + <fieldset class="submit-buttons"> + {S_HIDDEN_FIELDS} + <input type="submit" class="button2" value="{L_CHECK_FILES_AGAIN}" name="check_again" /> <input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" /> + </fieldset> + + </form> + + <br /><br /> + <p>{L_MAPPING_FILE_STRUCTURE}</p> <table cellspacing="1"> @@ -207,23 +233,6 @@ </tbody> </table> - <form id="install_update" method="post" action="{U_ACTION}"> - - <fieldset> - <legend>{L_DOWNLOAD_AS}</legend> - <dl> - <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt> - <dd>{RADIO_BUTTONS}</dd> - </dl> - </fieldset> - - <fieldset class="submit-buttons"> - {S_HIDDEN_FIELDS} - <input type="submit" class="button2" value="{L_CHECK_FILES_AGAIN}" name="check_again" /> <input type="submit" class="button1" value="{L_DOWNLOAD}" name="download" /> - </fieldset> - - </form> - <!-- ELSEIF S_FTP_UPLOAD --> <h1>{L_SELECT_FTP_SETTINGS}</h1> diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 44ff7ccd6a..79ec3240fd 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -19,7 +19,7 @@ <div id="page-footer"> <!-- IF S_COPYRIGHT_HTML --> Powered by phpBB {VERSION} © 2006 <a href="http://www.phpbb.com/">phpBB Group</a> - {L_TRANSLATION_INFO} + <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- ENDIF --> <!-- IF DEBUG_OUTPUT --> diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 0cdf9636e8..d5b3ff5f7e 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -83,20 +83,31 @@ function marklist(id, name, state) */ function trace(link) { - window.open(link, '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680'); + window.open(link.replace(/&/g, '&'), '_trace', 'height=515, resizable=yes, scrollbars=yes, width=680'); return false; } -<!-- IF S_INCLUDE_SWATCH --> - /** - * Color swatch - */ - function swatch() - { - window.open('{UA_SWATCH}', '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); - return false; - } -<!-- ENDIF --> +/** +* Find a member +*/ +function find_username() +{ + <!-- IF UA_FIND_USERNAME --> + window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); + <!-- ENDIF --> + return false; +} + +/** +* Color swatch +*/ +function swatch(field) +{ + <!-- IF UA_SWATCH --> + window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); + <!-- ENDIF --> + return false; +} //--> </script> diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index d841dbd31f..51b5bf9c63 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -186,7 +186,7 @@ <!-- ELSE --> <td class="preset preset_custom"> <!-- ENDIF --> - <a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}'); return false;"><span></span></a></td> + <a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '{p_mask.f_mask.category.S_ROW_COUNT}'); return false;"> </a></td> <!-- END category --> </tr> <tr class="row3"> diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index bcc3f037eb..9b422332a2 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,7 +17,7 @@ <!-- IF S_COPYRIGHT_HTML --> <br />Powered by phpBB {VERSION} © 2006 <a href="http://www.phpbb.com/">phpBB Group</a> - {TRANSLATION_INFO} + <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- ENDIF --> <!-- IF DEBUG_OUTPUT --> diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index b234ad6456..d555bc1443 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -73,16 +73,27 @@ function marklist(id, name, state) } } -<!-- IF S_INCLUDE_SWATCH --> - /** - * Color swatch - */ - function swatch() - { - window.open('{UA_SWATCH}', '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); - return false; - } -<!-- ENDIF --> +/** +* Find a member +*/ +function find_username() +{ + <!-- IF UA_FIND_USERNAME --> + window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); + <!-- ENDIF --> + return false; +} + +/** +* Color swatch +*/ +function swatch(field) +{ + <!-- IF UA_SWATCH --> + window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); + <!-- ENDIF --> + return false; +} //--> </script> diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php index 5d452218b0..3744a967a6 100644 --- a/phpBB/adm/swatch.php +++ b/phpBB/adm/swatch.php @@ -31,8 +31,14 @@ $template->set_filenames(array( $template->assign_vars(array( 'OPENER' => addslashes(request_var('form', '')), 'NAME' => request_var('name', ''), - 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",) -); + 'T_IMAGES_PATH' => "{$phpbb_root_path}images/", + + 'S_USER_LANG' => $user->lang['USER_LANG'], + 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], + 'S_CONTENT_ENCODING' => 'UTF-8', + 'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'], + 'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'], +)); $template->display('body'); diff --git a/phpBB/common.php b/phpBB/common.php index 73f30e17a5..295a0a4abd 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -199,11 +199,4 @@ unset($dbpasswd); // Grab global variables, re-cache if necessary $config = $cache->obtain_config(); -// Disable board if the install/ directory is still present -if (file_exists($phpbb_root_path . 'install') && !defined('ADMIN_START')) -{ - $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; - trigger_error($message); -} - ?>
\ No newline at end of file diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index b6fe49ced1..60324d94a8 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -889,7 +889,7 @@ function get_schema_struct() 'COLUMNS' => array( 'bbcode_id' => array('TINT:3', 0), 'bbcode_tag' => array('VCHAR:16', ''), - 'bbcode_helpline' => array('VCHAR', ''), + 'bbcode_helpline' => array('VCHAR_UNI', ''), 'display_on_posting' => array('BOOL', 0), 'bbcode_match' => array('TEXT_UNI', ''), 'bbcode_tpl' => array('MTEXT_UNI', ''), @@ -933,8 +933,8 @@ function get_schema_struct() $schema_data['phpbb_config'] = array( 'COLUMNS' => array( - 'config_name' => array('VCHAR:255', ''), - 'config_value' => array('VCHAR', ''), + 'config_name' => array('VCHAR', ''), + 'config_value' => array('VCHAR_UNI', ''), 'is_dynamic' => array('BOOL', 0), ), 'PRIMARY_KEY' => 'config_name', @@ -1089,6 +1089,7 @@ function get_schema_struct() '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', ''), @@ -1833,6 +1834,7 @@ function get_schema_struct() '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', ''), @@ -1889,7 +1891,7 @@ function get_schema_struct() 'user_msnm' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''), 'user_website' => array('VCHAR_UNI:200', ''), - 'user_occ' => array('VCHAR_UNI', ''), + 'user_occ' => array('TEXT_UNI', ''), 'user_interests' => array('TEXT_UNI', ''), 'user_actkey' => array('VCHAR:32', ''), 'user_newpasswd' => array('VCHAR_UNI:32', ''), diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 8785ae619d..69e51a1059 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -774,6 +774,14 @@ $sql = 'SELECT * WHERE username = '" . $db->sql_escape($username) . "'"; </pre></blockquote> + <h3>sql_query_limit():</h3> + + <p>We do not add limit statements to the sql query, but instead use <code>$db->sql_query_limit()</code>. You basically pass the query, the total number of lines to retrieve and the offset.</p> + + <p><strong>Note: </strong> Since Oracle handles limits differently and because of how we implemented this handling you need to take special care if you use <code>sql_query_limit</code> with an sql query retrieving data from more than one table.</p> + + <p>Make sure when using something like "SELECT x.*, y.jars" that there is not a column named jars in x; make sure that there is no overlap between an implicit column and the explicit columns.</p> + <h3>sql_build_array():</h3> <p>If you need to UPDATE or INSERT data, make use of the <code>$db->sql_build_array()</code> function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - <code>$sql_ary</code> - or directly within the statement if one one or two variables needs to be inserted/updated. An example of an insert statement would be:</p> @@ -856,6 +864,7 @@ SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1 <p>If the given array is empty, an error will be produced.</p> <h3>sql_build_query():</h3> + <p>The <code>$db->sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p> <blockquote><pre> @@ -1518,6 +1527,12 @@ div <a name="changes"></a><h1>5. Guidelines Changelog</h1> <div class="paragraph"> +<h2>Revision 1.9-1.10</h2> + +<ul class="menu"> + <li>Added sql_query_limit to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li> +</ul> + <h2>Revision 1.8</h2> <ul class="menu"> diff --git a/phpBB/download.php b/phpBB/download.php index 64d147fa79..790938a7d4 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -245,8 +245,19 @@ function send_file_to_browser($attachment, $upload_dir, $category) header("Content-Length: $size"); } - // Might not be ideal to store the contents, but file_get_contents is binary-safe as well as the recommended method - echo @file_get_contents($filename); + // Try to deliver in chunks + @set_time_limit(0); + + $fp = @fopen($filename, 'rb'); + + if ($fp !== false) + { + while (!feof($fp)) + { + echo fread($fp, 8192); + } + fclose($fp); + } flush(); exit; diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index a4e860b7bc..44ab731072 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -126,7 +126,7 @@ class acp_ban AND u.user_id = b.ban_userid AND b.ban_userid <> 0 AND u.user_id <> ' . ANONYMOUS . ' - ORDER BY u.username ASC'; + ORDER BY u.username_clean ASC'; break; case 'ip': diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index e4ea02ad4d..dd1897ecbd 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -76,7 +76,7 @@ class acp_bbcodes $bbcode_match = request_var('bbcode_match', ''); $bbcode_tpl = htmlspecialchars_decode(request_var('bbcode_tpl', '')); - $bbcode_helpline = request_var('bbcode_helpline', ''); + $bbcode_helpline = request_var('bbcode_helpline', '', true); break; } @@ -128,13 +128,17 @@ class acp_bbcodes $db->sql_freeresult($result); // Grab the end, interrogate the last closing tag - preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs); - if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || in_array(strtolower($regs[1]), $hard_coded)) + if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded))) { trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING); } } + if (!preg_match('#\[' . $data['bbcode_tag'] .'].*?\[/' . $data['bbcode_tag'] . ']#s', $bbcode_match)) + { + trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $sql_ary = array( 'bbcode_tag' => $data['bbcode_tag'], 'bbcode_match' => $bbcode_match, @@ -238,7 +242,7 @@ class acp_bbcodes $sql = 'SELECT * FROM ' . BBCODES_TABLE . ' - ORDER BY bbcode_id'; + ORDER BY bbcode_tag'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 84cc8ddd1c..a04ad9dc0f 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -47,7 +47,7 @@ class acp_board 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend2' => 'WARNINGS', - 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true), + 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), ) ); break; @@ -91,8 +91,8 @@ class acp_board 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']), - 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true), - 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true), + 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true), 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true) ) @@ -144,7 +144,7 @@ class acp_board 'bump_type' => false, 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']), 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true), + 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']), 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true), 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false), 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false), @@ -153,10 +153,10 @@ class acp_board 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int', 'type' => 'text:4:6', 'explain' => true), 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true), 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), - 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), + 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true), - 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), - 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), + 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), ) ); break; @@ -176,10 +176,10 @@ class acp_board 'legend2' => 'GENERAL_SETTINGS', 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), - 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), + 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), - 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), - 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true), + 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), + 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), ) ); break; @@ -197,7 +197,7 @@ class acp_board 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int', 'type' => 'custom', 'method' => 'password_length', 'explain' => true), 'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true), 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true), - 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), + 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), 'legend2' => 'GENERAL_OPTIONS', 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), @@ -346,11 +346,7 @@ class acp_board } $this->new_config = $config; - $cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => ''), true) : $this->new_config; - if (isset($_REQUEST['config'])) - { - utf8_normalize_nfc(&$cfg_array); - } + $cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config; $error = array(); // We validate the complete config if whished diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index cbd654fbcc..7a8acab445 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -1427,7 +1427,12 @@ class acp_database } $sql_data .= implode(",\n", $rows); - $sql_data .= "\n);\n\n"; + $sql_data .= "\n)"; + if ($db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli') + { + $sql_data .= ' CHARACTER SET `utf8` COLLATE `utf8_bin`'; + } + $sql_data .= ";\n\n"; break; diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php index adb7270332..70bdf30628 100644 --- a/phpBB/includes/acp/acp_disallow.php +++ b/phpBB/includes/acp/acp_disallow.php @@ -43,7 +43,7 @@ class acp_disallow $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user)); $db->sql_query($sql); - $cache->destroy('disallowed_usernames'); + $cache->destroy('_disallowed_usernames'); $message = $user->lang['DISALLOW_SUCCESSFUL']; add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user)); @@ -63,7 +63,7 @@ class acp_disallow WHERE disallow_id = ' . $disallowed_id; $db->sql_query($sql); - $cache->destroy('disallowed_usernames'); + $cache->destroy('_disallowed_usernames'); add_log('admin', 'LOG_DISALLOW_DELETE'); diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 7f4dde7211..fc524e0c75 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -524,6 +524,39 @@ class acp_forums } $db->sql_freeresult($result); + // Subforum move options + if ($action == 'edit' && $forum_data['forum_type'] == FORUM_CAT) + { + $subforums_id = array(); + $subforums = get_forum_branch($forum_id, 'children'); + + foreach ($subforums as $row) + { + $subforums_id[] = $row['forum_id']; + } + + $forums_list = make_forum_select($forum_data['parent_id'], $subforums_id); + + $sql = 'SELECT forum_id + FROM ' . FORUMS_TABLE . ' + WHERE forum_type = ' . FORUM_POST . " + AND forum_id <> $forum_id"; + $result = $db->sql_query($sql); + + if ($db->sql_fetchrow($result)) + { + $template->assign_vars(array( + 'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false??? + ); + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false, + 'S_FORUMS_LIST' => $forums_list) + ); + } + $s_show_display_on_index = false; if ($forum_data['parent_id'] > 0) @@ -586,6 +619,8 @@ class acp_forums 'S_SHOW_DISPLAY_ON_INDEX' => $s_show_display_on_index, 'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false, 'S_FORUM_ORIG_POST' => (isset($old_forum_type) && $old_forum_type == FORUM_POST) ? true : false, + 'S_FORUM_ORIG_CAT' => (isset($old_forum_type) && $old_forum_type == FORUM_CAT) ? true : false, + 'S_FORUM_ORIG_LINK' => (isset($old_forum_type) && $old_forum_type == FORUM_LINK) ? true : false, 'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false, 'S_FORUM_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false, 'S_ENABLE_INDEXING' => ($forum_data['enable_indexing']) ? true : false, @@ -615,8 +650,8 @@ class acp_forums $forum_data = $this->get_forum_info($forum_id); $subforums_id = array(); - $subforums = get_forum_branch($forum_id, 'children'); + foreach ($subforums as $row) { $subforums_id[] = $row['forum_id']; @@ -647,6 +682,7 @@ class acp_forums 'FORUM_NAME' => $forum_data['forum_name'], 'S_FORUM_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false, + 'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false, 'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false, 'S_FORUMS_LIST' => $forums_list, 'S_ERROR' => (sizeof($errors)) ? true : false, @@ -801,7 +837,7 @@ class acp_forums */ function update_forum_data(&$forum_data) { - global $db, $user; + global $db, $user, $cache; $errors = array(); @@ -942,6 +978,123 @@ class acp_forums $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0; $forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = ''; } + else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_LINK) + { + // Has subforums? + if ($row['right_id'] - $row['left_id'] > 1) + { + // We are turning a category into a link - but need to decide what to do with the subforums. + $action_subforums = request_var('action_subforums', ''); + $subforums_to_id = request_var('subforums_to_id', 0); + + if ($action_subforums == 'delete') + { + $log_action_forums = 'FORUMS'; + $rows = get_forum_branch($row['forum_id'], 'children', 'descending', false); + + foreach ($rows as $_row) + { + // Do not remove the forum id we are about to change. ;) + if ($_row['forum_id'] == $row['forum_id']) + { + continue; + } + + $forum_ids[] = $_row['forum_id']; + $errors = array_merge($errors, $this->delete_forum_content($_row['forum_id'])); + } + + if (sizeof($errors)) + { + return $errors; + } + + if (sizeof($forum_ids)) + { + $sql = 'DELETE FROM ' . FORUMS_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forum_ids); + $db->sql_query($sql); + + $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forum_ids); + $db->sql_query($sql); + + $sql = 'DELETE FROM ' . ACL_USERS_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forum_ids); + $db->sql_query($sql); + + // Delete forum ids from extension groups table + $sql = 'SELECT group_id, allowed_forums + FROM ' . EXTENSION_GROUPS_TABLE; + $result = $db->sql_query($sql); + + while ($_row = $db->sql_fetchrow($result)) + { + if (!$_row['allowed_forums']) + { + continue; + } + + $allowed_forums = unserialize(trim($_row['allowed_forums'])); + $allowed_forums = array_diff($allowed_forums, $forum_ids); + + $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . " + SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "' + WHERE group_id = {$_row['group_id']}"; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + + $cache->destroy('_extensions'); + } + } + else if ($action_subforums == 'move') + { + if (!$subforums_to_id) + { + return array($user->lang['NO_DESTINATION_FORUM']); + } + + $log_action_forums = 'MOVE_FORUMS'; + + $sql = 'SELECT forum_name + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . $subforums_to_id; + $result = $db->sql_query($sql); + $_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$_row) + { + return array($user->lang['NO_FORUM']); + } + + $subforums_to_name = $_row['forum_name']; + + $sql = 'SELECT forum_id + FROM ' . FORUMS_TABLE . " + WHERE parent_id = {$row['forum_id']}"; + $result = $db->sql_query($sql); + + while ($_row = $db->sql_fetchrow($result)) + { + $this->move_forum($_row['forum_id'], $subforums_to_id); + } + $db->sql_freeresult($result); + + $sql = 'UPDATE ' . FORUMS_TABLE . " + SET parent_id = $subforums_to_id + WHERE parent_id = {$row['forum_id']}"; + $db->sql_query($sql); + } + + // Adjust the left/right id + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET right_id = left_id + 1 + WHERE forum_id = ' . $row['forum_id']; + $db->sql_query($sql); + } + } if (sizeof($errors)) { @@ -1533,8 +1686,6 @@ class acp_forums set_config('upload_dir_size', (int) $row['stat'], true); - add_log('admin', 'LOG_RESYNC_STATS'); - return array(); } diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 9df1c52d65..e81dc9883f 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -54,6 +54,12 @@ class acp_groups { trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING); } + + // Check if the user is allowed to manage this group if set to founder only. + if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage']) + { + trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING); + } } // Which page? @@ -214,9 +220,10 @@ class acp_groups } $name_ary = array_unique(explode("\n", $name_ary)); + $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name']; // Add user/s to group - if ($error = group_user_add($group_id, false, $name_ary, $group_row['group_name'], $default, $leader, 0, $group_row)) + if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, $leader, 0, $group_row)) { trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING); } @@ -262,13 +269,22 @@ class acp_groups $delete = request_var('delete', ''); $submit_ary = array( - 'colour' => request_var('group_colour', ''), - 'rank' => request_var('group_rank', 0), - 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0, - 'legend' => isset($_REQUEST['group_legend']) ? 1 : 0, - 'message_limit' => request_var('group_message_limit', 0) + 'colour' => request_var('group_colour', ''), + 'rank' => request_var('group_rank', 0), + 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0, + 'legend' => isset($_REQUEST['group_legend']) ? 1 : 0, + 'message_limit' => request_var('group_message_limit', 0), ); + if ($user->data['user_type'] == USER_FOUNDER) + { + $submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0; + } + else + { + $submit_ary['founder_manage'] = 0; + } + if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink']) { $data['width'] = request_var('width', ''); @@ -328,7 +344,7 @@ class acp_groups // were made. $group_attributes = array(); - $test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit'); + $test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit', 'founder_manage'); foreach ($test_variables as $test) { if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test])) @@ -434,6 +450,8 @@ class acp_groups if (isset($group_row['group_avatar']) && $group_row['group_avatar']) { + $avatar_img = ''; + switch ($group_row['group_avatar_type']) { case AVATAR_UPLOAD: @@ -444,8 +462,8 @@ class acp_groups $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } else @@ -482,16 +500,19 @@ class acp_groups 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false, 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, + 'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name, 'GROUP_INTERNAL_NAME' => $group_name, 'GROUP_DESC' => $group_desc_data['text'], 'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '', + 'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '', 'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '', 'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0, 'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '', + 'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'], 'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'], 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'], diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 2834d25181..68eeaab5b4 100755 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -132,7 +132,7 @@ class acp_inactive // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']); - $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username'); + $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username_clean'); $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); diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php index afb2ba329a..d216ff7f9b 100644 --- a/phpBB/includes/acp/acp_jabber.php +++ b/phpBB/includes/acp/acp_jabber.php @@ -148,7 +148,7 @@ class acp_jabber $template->assign_vars(array( 'U_ACTION' => $this->u_action, 'JAB_ENABLE' => $new['jab_enable'], - 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.xmpp.net/" rel="external">', '</a>'), + 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'), 'JAB_HOST' => $new['jab_host'], 'JAB_PORT' => $new['jab_port'], 'JAB_USERNAME' => $new['jab_username'], diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 61310cff01..6c962d9405 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -107,11 +107,11 @@ class acp_language $hidden_data = build_hidden_fields(array( 'file' => $this->language_file, 'dir' => $this->language_directory, - 'method' => $method, - 'entry' => $_POST['entry']), - true + 'method' => $method) ); + $hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP); + $template->assign_vars(array( 'S_UPLOAD' => true, 'NAME' => $method, diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php index d233d7c885..211b932115 100644 --- a/phpBB/includes/acp/acp_logs.php +++ b/phpBB/includes/acp/acp_logs.php @@ -68,7 +68,7 @@ class acp_logs // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'u.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $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); @@ -127,8 +127,8 @@ class acp_logs } $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], - 'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username'] : '', + 'USERNAME' => $row['username_full'], + 'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username_full'] : '', 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index a321057fa2..d7e327e4d3 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -324,7 +324,7 @@ class acp_main foreach ($log_data as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => $row['action']) diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 1323c7aee4..c426e4607d 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -265,7 +265,7 @@ class acp_modules // Category/not category? $is_cat = (!$module_data['module_basename']) ? true : false; - // Get module informations + // Get module information $module_infos = $this->get_module_infos(); // Build name options @@ -488,7 +488,7 @@ class acp_modules } /** - * Get available module informations from module files + * Get available module information from module files */ function get_module_infos($module = '', $module_class = false) { @@ -580,14 +580,10 @@ class acp_modules $right = $row['right_id']; - /** - * @todo think about using module class here - */ if (!$ignore_acl && $row['module_auth']) { - $is_auth = false; - eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $auth->acl_getf_global("\\1")', '(int) $config["\\1"]'), $row['module_auth']) . ');'); - if (!$is_auth) + // We use zero as the forum id to check - global setting. + if (!p_master::module_auth($row['module_auth'], 0)) { continue; } diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 9ce7f3ed92..8bfe2b8b36 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -936,7 +936,7 @@ class acp_profile $field_id = request_var('field_id', 0); - // Collect all informations, if something is going wrong, abort the operation + // Collect all information, if something is going wrong, abort the operation $profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array(); $default_lang_id = $lang_defs['iso'][$config['default_lang']]; diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 6b1eefe8e6..f858da6a16 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -457,7 +457,7 @@ class acp_search /** * @todo remove Javascript */ - return '<script language="javascript" type="text/javascript"> + return '<script type="text/javascript"> <!-- close_waitscreen = 1; //--> diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 4377dd7e20..c4c1c85793 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -978,7 +978,7 @@ pagination_sep = \'{PAGINATION_SEP}\' foreach ($classes as $class) { $selected = ($class == $edit_class) ? ' selected="selected"' : ''; - $s_classes .= '<option value="' . $class . '"' . $selected . '>' . $class . '</option>'; + $s_classes .= '<option value="' . $class . '" title="' . $class . '"' . $selected . '>' . truncate_string($class, 40, false, '...') . '</option>'; } $template->assign_vars(array( diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 30c4e27b63..314514b8e2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -140,7 +140,7 @@ class acp_users // Prevent normal users/admins change/view founders if they are not a founder by themselves if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER) { - trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action), E_USER_WARNING); } switch ($mode) @@ -620,8 +620,8 @@ class acp_users $data = array( 'username' => request_var('user', $user_row['username'], true), 'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0), - 'email' => request_var('user_email', $user_row['user_email']), - 'email_confirm' => request_var('email_confirm', ''), + 'email' => strtolower(request_var('user_email', $user_row['user_email'])), + 'email_confirm' => strtolower(request_var('email_confirm', '')), 'user_password' => request_var('user_password', '', true), 'password_confirm' => request_var('password_confirm', '', true), 'warnings' => request_var('warnings', $user_row['user_warnings']), @@ -841,6 +841,31 @@ class acp_users $last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit']; + $inactive_reason = ''; + if ($user_row['user_type'] == USER_INACTIVE) + { + $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN']; + + switch ($user_row['user_inactive_reason']) + { + case INACTIVE_REGISTER: + $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER']; + break; + + case INACTIVE_PROFILE: + $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE']; + break; + + case INACTIVE_MANUAL: + $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL']; + break; + + case INACTIVE_REMIND: + $inactive_reason = $user->lang['INACTIVE_REASON_REMIND']; + break; + } + } + $template->assign_vars(array( 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), @@ -865,6 +890,7 @@ class acp_users 'USER_EMAIL' => $user_row['user_email'], 'USER_WARNINGS' => $user_row['user_warnings'], 'USER_POSTS' => $user_row['user_posts'], + 'USER_INACTIVE_REASON' => $inactive_reason, ) ); @@ -923,7 +949,7 @@ class acp_users // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'l.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $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); @@ -951,7 +977,7 @@ class acp_users foreach ($log_data as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => nl2br($row['action']), @@ -983,15 +1009,13 @@ class acp_users 'yim' => request_var('yim', $user_row['user_yim']), 'jabber' => request_var('jabber', $user_row['user_jabber']), 'website' => request_var('website', $user_row['user_website']), - 'location' => request_var('location', $user_row['user_from'], true), - 'occupation' => request_var('occupation', $user_row['user_occ'], true), - 'interests' => request_var('interests', $user_row['user_interests'], true), + 'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)), + 'occupation' => utf8_normalize_nfc(request_var('occupation', $user_row['user_occ'], true)), + 'interests' => utf8_normalize_nfc(request_var('interests', $user_row['user_interests'], true)), 'bday_day' => 0, 'bday_month' => 0, 'bday_year' => 0, ); - - utf8_normalize_nfc(array(&$data['location'], &$data['occupation'], &$data['interests'])); if ($user_row['user_birthday']) { @@ -1161,7 +1185,7 @@ class acp_users case 'prefs': $data = array( - 'dateformat' => request_var('dateformat', $user_row['user_dateformat']), + 'dateformat' => request_var('dateformat', $user_row['user_dateformat'], true), 'lang' => request_var('lang', $user_row['user_lang']), 'tz' => request_var('tz', (float) $user_row['user_timezone']), 'style' => request_var('style', $user_row['user_style']), @@ -1551,10 +1575,8 @@ class acp_users $enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false; $enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false; $enable_urls = request_var('enable_urls', true); - $signature = request_var('signature', $user_row['user_sig'], true); - - utf8_normalize_nfc(&$signature); - + $signature = utf8_normalize_nfc(request_var('signature', $user_row['user_sig'], true)); + $preview = (isset($_POST['preview'])) ? true : false; if ($submit || $preview) @@ -1821,6 +1843,19 @@ 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)) { @@ -1855,7 +1890,7 @@ class acp_users $db->sql_freeresult($result); // Select box for other groups - $sql = 'SELECT group_id, group_name, group_type + $sql = 'SELECT group_id, group_name, group_type, group_founder_manage FROM ' . GROUPS_TABLE . ' ' . ((sizeof($id_ary)) ? 'WHERE ' . $db->sql_in_set('group_id', $id_ary, true) : '') . ' ORDER BY group_type DESC, group_name ASC'; @@ -1869,6 +1904,12 @@ class acp_users continue; } + // Do not display those groups not allowed to be managed + if ($user->data['user_type'] != USER_FOUNDER && $row['group_founder_manage']) + { + continue; + } + $s_group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>'; } $db->sql_freeresult($result); @@ -1925,7 +1966,7 @@ class acp_users if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') { - $sql .= " ESCAPE '\\'"; + $sql .= " ESCAPE '\\' "; } $sql .= 'AND is_global = 1 @@ -1945,7 +1986,7 @@ class acp_users if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') { - $sql .= " ESCAPE '\\'"; + $sql .= " ESCAPE '\\' "; } $sql .= 'AND is_local = 1 diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php index 8fe99b8c80..e087c4f8af 100644 --- a/phpBB/includes/acp/acp_words.php +++ b/phpBB/includes/acp/acp_words.php @@ -68,12 +68,10 @@ class acp_words break; case 'save': - $word_id = request_var('id', 0); - $word = request_var('word', '', true); - $replacement = request_var('replacement', '', true); + $word_id = request_var('id', 0); + $word = utf8_normalize_nfc(request_var('word', '', true)); + $replacement = utf8_normalize_nfc(request_var('replacement', '', true)); - utf8_normalize_nfc(array(&$word, &$replacement)); - if (!$word || !$replacement) { trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING); diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 436e3f017b..35b0cd29e2 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -293,7 +293,7 @@ class auth_admin extends auth $sql = 'SELECT user_id as ug_id, username as ug_name FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary)) . ' - ORDER BY username ASC'; + ORDER BY username_clean ASC'; } else { @@ -606,7 +606,7 @@ class auth_admin extends auth $sql = 'SELECT user_id, username FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $auth_ary['users']) . ' - ORDER BY username'; + ORDER BY username_clean ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1068,6 +1068,7 @@ class auth_admin extends auth 'S_FIELD_NAME' => 'setting[' . $ug_id . '][' . $forum_id . '][' . $permission . ']', 'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission") : '', + 'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '', 'PERMISSION' => $user->lang['acl_' . $permission]['lang']) ); diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 8ee4a23abb..c174fc6769 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -478,11 +478,11 @@ class auth $sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? "user_id = $user_id" : $db->sql_in_set('user_id', $user_id)) : ''; $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : ''; - $sql_opts = $sql_escape = ''; + $sql_opts = ''; if ($opts !== false) { - $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape); + $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts); } $hold_ary = array(); @@ -512,7 +512,7 @@ class auth 'ORDER_BY' => 'a.forum_id, ao.auth_option' )); - $result = $db->sql_query($sql . $sql_escape); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { @@ -588,11 +588,11 @@ class auth $sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? "user_id = $user_id" : $db->sql_in_set('user_id', $user_id)) : ''; $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : ''; - $sql_opts = $sql_escape = ''; + $sql_opts = ''; if ($opts !== false) { - $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape); + $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts); } $hold_ary = array(); @@ -620,7 +620,7 @@ class auth 'ORDER_BY' => 'a.forum_id, ao.auth_option' )); - $result = $db->sql_query($sql . $sql_escape); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { @@ -642,11 +642,11 @@ class auth $sql_group = ($group_id !== false) ? ((!is_array($group_id)) ? "group_id = $group_id" : $db->sql_in_set('group_id', $group_id)) : ''; $sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : ''; - $sql_opts = $sql_escape = ''; + $sql_opts = ''; if ($opts !== false) { - $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape); + $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts); } $hold_ary = array(); @@ -674,7 +674,7 @@ class auth 'ORDER_BY' => 'a.forum_id, ao.auth_option' )); - $result = $db->sql_query($sql . $sql_escape); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { @@ -791,7 +791,7 @@ class auth /** * Fill auth_option statement for later querying based on the supplied options */ - function build_auth_option_statement($key, $auth_options, &$sql_opts, &$sql_escape) + function build_auth_option_statement($key, $auth_options, &$sql_opts) { global $db; @@ -802,7 +802,7 @@ class auth if (strpos($auth_options, '_') !== false) { $sql_opts = "AND $key LIKE '" . $db->sql_escape(str_replace('_', "\_", $auth_options)) . "'"; - $sql_escape = ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : ''; + $sql_opts .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\' " : ''; } else { @@ -816,7 +816,7 @@ class auth } else { - $is_like_expression = $is_underline = false; + $is_like_expression = false; foreach ($auth_options as $option) { @@ -824,11 +824,6 @@ class auth { $is_like_expression = true; } - - if (strpos($option, '_') !== false) - { - $is_underline = true; - } } if (!$is_like_expression) @@ -841,15 +836,26 @@ class auth foreach ($auth_options as $option) { - $sql[] = $key . " LIKE '" . $db->sql_escape(str_replace('_', "\_", $option)) . "'"; + if (strpos($option, '%') !== false) + { + if (strpos($option, '_') !== false) + { + $_sql = $key . " LIKE '" . $db->sql_escape(str_replace('_', "\_", $option)) . "'"; + $_sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : ''; + $sql[] = $_sql; + } + else + { + $sql[] = $key . " LIKE '" . $db->sql_escape($option) . "'"; + } + } + else + { + $sql[] = $key . " = '" . $db->sql_escape($option) . "'"; + } } $sql_opts = 'AND (' . implode(' OR ', $sql) . ')'; - - if ($is_underline) - { - $sql_escape = ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : ''; - } } } } diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 618ad0a387..3be896cfd6 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -20,7 +20,7 @@ function login_db(&$username, &$password) { global $db, $config; - $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts + $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts FROM ' . USERS_TABLE . " WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; $result = $db->sql_query($sql); @@ -95,8 +95,32 @@ function login_db(&$username, &$password) } } - // Password correct... - if (md5($password) == $row['user_password']) + // If the password convert flag is set we need to convert it + if ($row['user_pass_convert']) + { + // in phpBB2 passwords were used exactly as they were sent + $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : ''; + $password_old_format = (STRIP) ? stripslashes($password_old_format) : $password_old_format; + $password_new_format = ''; + + set_var($password_new_format, $password_old_format, 'string'); + + if ($password == $password_new_format && md5($password_old_format) == $row['user_password']) + { + // Update the password in the users table to the new format and remove user_pass_convert flag + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_password = \'' . $db->sql_escape(md5($password_new_format)) . '\', + user_pass_convert = 0 + WHERE user_id = ' . $row['user_id']; + $db->sql_query($sql); + + $row['user_pass_convert'] = 0; + $row['user_password'] = md5($password_new_format); + } + } + + // Check password ... + if (!$row['user_pass_convert'] && md5($password) == $row['user_password']) { // Successful, reset login attempts (the user passed all stages) $sql = 'UPDATE ' . USERS_TABLE . ' diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php index 988da577c0..8241db1c4f 100644 --- a/phpBB/includes/auth/auth_ldap.php +++ b/phpBB/includes/auth/auth_ldap.php @@ -230,8 +230,8 @@ function acp_ldap(&$new) <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd> </dl> <dl> - <dt><label for="ldap_uid">' . $user->lang['LDAP_EMAIL'] . ':</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt> - <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd> + <dt><label for="ldap_email">' . $user->lang['LDAP_EMAIL'] . ':</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt> + <dd><input type="text" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd> </dl> '; diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 409aab18e4..9536abddd3 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -221,7 +221,7 @@ class bbcode { $this->bbcode_cache[$bbcode_id] = array( 'preg' => array( - '#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id)), + '#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id, true)), ) ); } @@ -300,7 +300,7 @@ class bbcode { $this->bbcode_cache[$bbcode_id] = array( 'preg' => array( - '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id))) + '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id, true))) ) ); } @@ -381,7 +381,7 @@ class bbcode /** * Return bbcode template */ - function bbcode_tpl($tpl_name, $bbcode_id = -1) + function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false) { if (empty($bbcode_hardtpl)) { @@ -403,7 +403,7 @@ class bbcode $template_bitfield = new bitfield($this->template_bitfield); } - if ($bbcode_id != -1 && !$template_bitfield->get($bbcode_id)) + if ($bbcode_id != -1 && !$template_bitfield->get($bbcode_id) && !$skip_bitfield_check) { return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false; } diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php index e249a46c04..10c61836a5 100644 --- a/phpBB/includes/captcha/captcha_gd.php +++ b/phpBB/includes/captcha/captcha_gd.php @@ -16,33 +16,18 @@ */ class captcha { + var $width = 360; + var $height = 96; + function execute($code) { global $config; $stats = gd_info(); - if (substr($stats['GD Version'], 0, 7) === 'bundled') - { - $bundled = true; - } - else - { - $bundled = false; - } + $bundled = (substr($stats['GD Version'], 0, 7) === 'bundled') ? true : false; preg_match('/[\\d.]+/', $stats['GD Version'], $version); - if (version_compare($version[0], '2.0.1', '>=')) - { - $gd_version = 2; - } - else - { - $gd_version = 1; - } - - // set dimension of image - $lx = 360; - $ly = 96; + $gd_version = (version_compare($version[0], '2.0.1', '>=')) ? 2 : 1; // create the image, stay compat with older versions of GD if ($gd_version === 2) @@ -56,7 +41,7 @@ class captcha $func2 = 'imagecolorclosest'; } - $image = $func1($lx, $ly); + $image = $func1($this->width, $this->height); if ($bundled) { @@ -65,7 +50,7 @@ class captcha // set background color $back = imagecolorallocate($image, mt_rand(224, 255), mt_rand(224, 255), mt_rand(224, 255)); - imagefilledrectangle($image, 0, 0, $lx, $ly, $back); + imagefilledrectangle($image, 0, 0, $this->width, $this->height, $back); // allocates the 216 websafe color palette to the image if ($gd_version === 1) @@ -82,7 +67,6 @@ class captcha } } - // fill with noise or grid if ($config['captcha_gd_noise']) { @@ -92,7 +76,7 @@ class captcha $size = mt_rand(8, 23); $angle = mt_rand(0, 360); $x = mt_rand(0, 360); - $y = mt_rand(0, (int)($ly - ($size / 5))); + $y = mt_rand(0, (int)($this->height - ($size / 5))); $color = $func2($image, mt_rand(160, 224), mt_rand(160, 224), mt_rand(160, 224)); $text = chr(mt_rand(45, 250)); imagettftext($image, $size, $angle, $x, $y, $color, $this->get_font(), $text); @@ -101,15 +85,16 @@ class captcha else { // generate grid - for ($i = 0; $i < $lx; $i += 13) + for ($i = 0; $i < $this->width; $i += 13) { $color = $func2($image, mt_rand(160, 224), mt_rand(160, 224), mt_rand(160, 224)); - imageline($image, $i, 0, $i, $ly, $color); + imageline($image, $i, 0, $i, $this->height, $color); } - for ($i = 0; $i < $ly; $i += 11) + + for ($i = 0; $i < $this->height; $i += 11) { $color = $func2($image, mt_rand(160, 224), mt_rand(160, 224), mt_rand(160, 224)); - imageline($image, 0, $i, $lx, $i, $color); + imageline($image, 0, $i, $this->width, $i, $color); } } @@ -120,7 +105,7 @@ class captcha $text = strtoupper($code[$i]); $angle = mt_rand(-30, 30); $size = mt_rand(20, 40); - $y = mt_rand((int)($size * 1.5), (int)($ly - ($size / 7))); + $y = mt_rand((int)($size * 1.5), (int)($this->height - ($size / 7))); $color = $func2($image, mt_rand(0, 127), mt_rand(0, 127), mt_rand(0, 127)); $shadow = $func2($image, mt_rand(127, 254), mt_rand(127, 254), mt_rand(127, 254)); diff --git a/phpBB/includes/captcha/captcha_non_gd.php b/phpBB/includes/captcha/captcha_non_gd.php index e4ab36f30b..41bd22868e 100644 --- a/phpBB/includes/captcha/captcha_non_gd.php +++ b/phpBB/includes/captcha/captcha_non_gd.php @@ -17,6 +17,8 @@ class captcha { var $filtered_pngs; + var $width = 320; + var $height = 50; /** * Define filtered pngs on init @@ -32,9 +34,7 @@ class captcha */ function execute($code) { - $total_width = 320; - $total_height = 50; - $img_height = 40; + $img_height = $this->height - 10; $img_width = 0; list($usec, $sec) = explode(' ', microtime()); @@ -45,7 +45,7 @@ class captcha for ($i = 0; $i < $code_len; $i++) { - $char = $code{$i}; + $char = $code[$i]; $width = mt_rand(0, 4); $raw_width = $this->filtered_pngs[$char]['width']; @@ -59,11 +59,11 @@ class captcha } } - $offset_x = mt_rand(0, $total_width - $img_width); - $offset_y = mt_rand(0, $total_height - $img_height); + $offset_x = mt_rand(0, $this->width - $img_width); + $offset_y = mt_rand(0, $this->height - $img_height); $image = ''; - for ($i = 0; $i < $total_height; $i++) + for ($i = 0; $i < $this->height; $i++) { $image .= chr(0); @@ -79,14 +79,14 @@ class captcha $image .= $this->randomise(substr($hold_chars[$code{$j}][$i - $offset_y - 1], 1), $char_widths[$j]); } - for ($j = $offset_x + $img_width; $j < $total_width; $j++) + for ($j = $offset_x + $img_width; $j < $this->width; $j++) { $image .= chr(mt_rand(140, 255)); } } else { - for ($j = 0; $j < $total_width; $j++) + for ($j = 0; $j < $this->width; $j++) { $image .= chr(mt_rand(140, 255)); } @@ -94,7 +94,7 @@ class captcha } unset($hold_chars); - $image = $this->create_png($image, $total_width, $total_height); + $image = $this->create_png($image, $this->width, $this->height); // Output image header('Content-Type: image/png'); diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index d2d3efedaa..da5efcf55a 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -307,15 +307,15 @@ class dbal } else { - return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')'; + return $field . ($negate ? ' NOT IN ' : ' IN ') . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')'; } } /** * Run more than one insert statement. * - * @param $sql_ary array multi-dimensional array holding the statement data. - * @param $table string table name to run the statements on + * @param string $table table name to run the statements on + * @param array &$sql_ary multi-dimensional array holding the statement data. * * @return bool false if no statements were executed. * @access public @@ -332,7 +332,6 @@ class dbal case 'mysql': case 'mysql4': case 'mysqli': - case 'sqlite': $this->sql_query('INSERT INTO ' . $table . ' ' . $this->sql_build_array('MULTI_INSERT', $sql_ary)); break; diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index f95f99969c..439cb725fb 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -116,9 +116,6 @@ class dbal_mssql extends dbal $this->sql_report('start', $query); } - // For now, MSSQL has no real UTF-8 support - $query = utf8_decode($query); - $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->sql_add_num_queries($this->query_result); diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index 12e3ca686e..2cb3bf0f2d 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -114,9 +114,6 @@ class dbal_mssql_odbc extends dbal $this->sql_report('start', $query); } - // For now, MSSQL has no real UTF-8 support - $query = utf8_decode($query); - $this->last_query_text = $query; $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; $this->sql_add_num_queries($this->query_result); diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index e8a0ce3605..8f65c667a7 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -219,52 +219,6 @@ class dbal_oracle extends dbal { $this->query_result = false; - // Any implicit columns exist? - if (strpos($query, '.*') !== false) - { - // This sucker does a few things for us. It grabs all the explicitly named columns and what tables are being used - preg_match('/SELECT (?:DISTINCT )?(.*?)FROM(.*?)(?:WHERE|(ORDER|GROUP) BY|$)/s', $query, $tables); - - // The prefixes of the explicit columns don't matter, they simply get in the way - preg_match_all('/\.(\w+)/', trim($tables[1]), $columns); - - // Flip lets us do an easy isset() call - $columns = array_flip($columns[1]); - - $table_data = trim($tables[2]); - - // Grab the implicitly named columns, they need expanding... - preg_match_all('/(\w)\.\*/', $query, $info); - - $cols = array(); - - foreach ($info[1] as $table_alias) - { - // We need to get the name of the aliased table - preg_match('/(\w+) ' . $table_alias . '/', $table_data, $table_name); - $table_name = $table_name[1]; - - $sql = "SELECT column_name - FROM all_tab_cols - WHERE table_name = '" . strtoupper($table_name) . "'"; - - $result = $this->sql_query($sql); - while ($row = $this->sql_fetchrow($result)) - { - if (!isset($columns[strtolower($row['column_name'])])) - { - $cols[] = $table_alias . '.' . strtolower($row['column_name']); - } - } - $this->sql_freeresult($result); - - // Remove the implicity .* with it's full expansion - $query = str_replace($table_alias . '.*', implode(', ', $cols), $query); - - unset($cols); - } - } - $query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset; return $this->sql_query($query, $cache_ttl); diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php index fd2d557a19..ca8d16fd3e 100644 --- a/phpBB/includes/diff/diff.php +++ b/phpBB/includes/diff/diff.php @@ -23,17 +23,12 @@ include_once($phpbb_root_path . 'includes/diff/renderer.' . $phpEx); * Code from pear.php.net, Text_Diff-0.2.1 (beta) package * http://pear.php.net/package/Text_Diff/ * -* Modified by Acyd Burn to meet our coding standards +* Modified by phpBB Group to meet our coding standards * and being able to integrate into phpBB -*/ - -/** +* * General API for generating and formatting diffs - the differences between * two sequences of strings. * -* The PHP diff code used in this package was originally written by Geoffrey -* T. Dairiki and is used with his permission. -* * @package phpBB3 * @author Geoffrey T. Dairiki <dairiki@dairiki.org> */ @@ -182,7 +177,7 @@ class diff /** * Removes trailing newlines from a line of text. This is meant to be used with array_walk(). * - * @param string $line The line to trim. + * @param string &$line The line to trim. * @param integer $key The index of the line in the array. Not used. */ function trim_newlines(&$line, $key) diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php index c230d865cd..5fcb317dd5 100644 --- a/phpBB/includes/diff/engine.php +++ b/phpBB/includes/diff/engine.php @@ -19,11 +19,9 @@ if (!defined('IN_PHPBB')) * Code from pear.php.net, Text_Diff-0.2.1 (beta) package * http://pear.php.net/package/Text_Diff/ * -* Modified by Acyd Burn to meet our coding standards +* Modified by phpBB Group to meet our coding standards * and being able to integrate into phpBB -*/ - -/** +* * Class used internally by Diff to actually compute the diffs. This class is * implemented using native PHP code. * diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php index 408addb858..984fd65708 100644 --- a/phpBB/includes/diff/renderer.php +++ b/phpBB/includes/diff/renderer.php @@ -19,11 +19,9 @@ if (!defined('IN_PHPBB')) * Code from pear.php.net, Text_Diff-0.2.1 (beta) package * http://pear.php.net/package/Text_Diff/ * -* Modified by Acyd Burn to meet our coding standards +* Modified by phpBB Group to meet our coding standards * and being able to integrate into phpBB -*/ - -/** +* * A class to render Diffs in different formats. * * This class renders the diff in classic diff format. It is intended that @@ -86,7 +84,7 @@ class diff_renderer /** * Renders a diff. * - * @param diff $diff A diff object. + * @param diff &$diff A diff object. * * @return string The formatted output. */ diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 91a818d454..9c8163bd14 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -153,7 +153,7 @@ function gen_rand_string($num_chars = 8) /** * Return unique id -* @param $extra additional entropy +* @param string $extra additional entropy */ function unique_id($extra = 'c') { @@ -237,7 +237,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, */ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false) { - global $config, $auth, $template, $user, $db, $phpEx; + global $config, $auth, $template, $user, $db; if (!$config['load_jumpbox']) { @@ -401,9 +401,9 @@ if (!function_exists('stripos')) * Find position of first occurrence of a case-insensitive string * * @param string $haystack is the string to search in - * @param string needle is the string to search for + * @param string $needle is the string to search for * - * @return Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. + * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. * Note that the needle may be a string of one or more characters. * If needle is not found, stripos() will return boolean FALSE. */ @@ -502,7 +502,7 @@ if (!function_exists('realpath')) else if (isset($_SERVER['SCRIPT_FILENAME']) && !empty($_SERVER['SCRIPT_FILENAME'])) { // Warning: If chdir() has been used this will lie! - // @todo This has some problems sometime (CLI can create them easily) + // Warning: This has some problems sometime (CLI can create them easily) $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/' . $path; $absolute = true; $path_prefix = ''; @@ -614,6 +614,10 @@ else if (!function_exists('htmlspecialchars_decode')) { + /** + * A wrapper for htmlspecialchars_decode + * @ignore + */ function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT) { return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); @@ -675,20 +679,24 @@ function style_select($default = '', $all = false) */ function tz_select($default = '', $truncate = false) { - global $sys_timezone, $user; + global $user; $tz_select = ''; foreach ($user->lang['tz_zones'] as $offset => $zone) { if ($truncate) { - $zone = (utf8_strlen($zone) > 70) ? utf8_substr($zone, 0, 70) . '...' : $zone; + $zone_trunc = truncate_string($zone, 50, false, '...'); + } + else + { + $zone_trunc = $zone; } if (is_numeric($offset)) { $selected = ($offset == $default) ? ' selected="selected"' : ''; - $tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>'; + $tz_select .= '<option title="'.$zone.'" value="' . $offset . '"' . $selected . '>' . $zone_trunc . '</option>'; } } @@ -1861,7 +1869,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa } } - // The result parameter is always an array, holding the relevant informations... + // The result parameter is always an array, holding the relevant information... if ($result['status'] == LOGIN_SUCCESS) { $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); @@ -2093,7 +2101,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po function get_context($text, $words, $length = 400) { // first replace all whitespaces with single spaces - $text = preg_replace('/\s+/', ' ', $text); + $text = preg_replace('/\s+/u', ' ', $text); $word_indizes = array(); if (sizeof($words)) @@ -2358,19 +2366,19 @@ function make_clickable($text, $server_url = false) // Be sure to not let the matches cross over. ;) // relative urls for this board - $magic_url_match[] = '#(^|[\n ]|\()(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; + $magic_url_match[] = '#(^|[\n\t (])(' . preg_quote($server_url, '#') . ')/(([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; $magic_url_replace[] = "'\$1<!-- l --><a href=\"\$2/' . preg_replace('/(&|\?)sid=[0-9a-f]{32}/', '\\1', '\$3') . '\">' . preg_replace('/(&|\?)sid=[0-9a-f]{32}/', '\\1', '\$3') . '</a><!-- l -->'"; // matches a xxxx://aaaaa.bbb.cccc. ... - $magic_url_match[] = '#(^|[\n ]|\()([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; + $magic_url_match[] = '#(^|[\n\t (])([\w]+:/{2}.*?([^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; $magic_url_replace[] = "'\$1<!-- m --><a href=\"\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- m -->'"; // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing - $magic_url_match[] = '#(^|[\n ]|\()(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; + $magic_url_match[] = '#(^|[\n\t (])(w{3}\.[\w\-]+\.[\w\-.\~]+(?:[^[ \t\n\r<"\'\)&]+|&(?!lt;|quot;))*)#ie'; $magic_url_replace[] = "'\$1<!-- w --><a href=\"http://\$2\">' . ((strlen('\$2') > 55) ? substr(str_replace('&', '&', '\$2'), 0, 39) . ' ... ' . substr(str_replace('&', '&', '\$2'), -10) : '\$2') . '</a><!-- w -->'"; // matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode. - $magic_url_match[] = '/(^|[\n ]|\()(' . get_preg_expression('email') . ')/ie'; + $magic_url_match[] = '/(^|[\n\t )])(' . get_preg_expression('email') . ')/ie'; $magic_url_replace[] = "'\$1<!-- e --><a href=\"mailto:\$2\">' . ((strlen('\$2') > 55) ? substr('\$2', 0, 39) . ' ... ' . substr('\$2', -10) : '\$2') . '</a><!-- e -->'"; } @@ -2493,14 +2501,14 @@ function extension_allowed($forum_id, $extension, &$extensions) /** * Little helper for the build_hidden_fields function */ -function _build_hidden_fields($key, $value, $specialchar) +function _build_hidden_fields($key, $value, $specialchar, $stripslashes) { $hidden_fields = ''; if (!is_array($value)) { - $key = ($specialchar) ? htmlspecialchars($key) : $key; - $value = ($specialchar) ? htmlspecialchars($value) : $value; + $value = ($stripslashes) ? stripslashes($value) : $value; + $value = ($specialchar) ? htmlspecialchars($value, ENT_COMPAT, 'UTF-8') : $value; $hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n"; } @@ -2508,7 +2516,10 @@ function _build_hidden_fields($key, $value, $specialchar) { foreach ($value as $_key => $_value) { - $hidden_fields .= _build_hidden_fields($key . '[' . $_key . ']', $_value, $specialchar); + $_key = ($stripslashes) ? stripslashes($_key) : $_key; + $_key = ($specialchar) ? htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') : $_key; + + $hidden_fields .= _build_hidden_fields($key . '[' . $_key . ']', $_value, $specialchar, $stripslashes); } } @@ -2517,14 +2528,23 @@ function _build_hidden_fields($key, $value, $specialchar) /** * Build simple hidden fields from array +* +* @param array $field_ary an array of values to build the hidden field from +* @param bool $specialchar if true, keys and values get specialchared +* @param bool $stripslashes if true, keys and values get stripslashed +* +* @return string the hidden fields */ -function build_hidden_fields($field_ary, $specialchar = false) +function build_hidden_fields($field_ary, $specialchar = false, $stripslashes = false) { $s_hidden_fields = ''; foreach ($field_ary as $name => $vars) { - $s_hidden_fields .= _build_hidden_fields($name, $vars, $specialchar); + $name = ($stripslashes) ? stripslashes($name) : $name; + $name = ($specialchar) ? htmlspecialchars($name, ENT_COMPAT, 'UTF-8') : $name; + + $s_hidden_fields .= _build_hidden_fields($name, $vars, $specialchar, $stripslashes); } return $s_hidden_fields; @@ -2660,7 +2680,7 @@ function get_backtrace() $trace['file'] = substr($trace['file'], 1); $args = array(); - // If include/require/include_once is not called, do not show arguments - they may contain sensible informations + // If include/require/include_once is not called, do not show arguments - they may contain sensible information if (!in_array($trace['function'], array('include', 'require', 'include_once'))) { unset($trace['args']); @@ -2721,11 +2741,12 @@ function get_preg_expression($mode) * Truncates string while retaining special characters if going over the max length * The default max length is 60 at the moment */ -function truncate_string($string, $max_length = 60, $allow_reply = true) +function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '') { $chars = array(); $strip_reply = false; + $stripped = false; if ($allow_reply && strpos($string, 'Re: ') === 0) { $strip_reply = true; @@ -2740,16 +2761,100 @@ function truncate_string($string, $max_length = 60, $allow_reply = true) { // Cut off the last elements from the array $string = implode('', array_slice($chars, 0, $max_length)); + $stripped = true; } if ($strip_reply) { $string = 'Re: ' . $string; } + + if ($append != '' && $stripped) + { + $string = $string . $append; + } return $string; } +/** +* Get username details for placing into templates. +* +* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour) or full (for obtaining a html string representing a coloured link to the users profile). +* @param int $user_id The users id +* @param string $username The users name +* @param string $username_colour The users colour +* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. +* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} +* +* @return string A string consisting of what is wanted based on $mode. +*/ +function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) +{ + global $phpbb_root_path, $phpEx, $user; + + $full_string = $profile_url = ''; + $username_colour = ($username_colour) ? '#' . $username_colour : ''; + + if ($guest_username === false) + { + $username = ($username) ? $username : $user->lang['GUEST']; + } + else + { + $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']); + } + + // Only show the link if not anonymous + if ($user_id && $user_id != ANONYMOUS) + { + $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); + $profile_url .= '&u=' . (int) $user_id; + } + else + { + $profile_url = ''; + } + + switch ($mode) + { + case 'profile': + return $profile_url; + break; + + case 'username': + return $username; + break; + + case 'colour': + return $username_colour; + break; + + case 'full': + default: + + $tpl = ''; + if (!$profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if (!$profile_url && $username_colour) + { + $tpl = '<span style="color: {USERNAME_COLOUR}; font-weight: bold;">{USERNAME}</span>'; + } + else if ($profile_url && !$username_colour) + { + $tpl = '<a href="{PROFILE_URL}">{USERNAME}</a>'; + } + else if ($profile_url && $username_colour) + { + $tpl = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR}; font-weight: bold;">{USERNAME}</a>'; + } + + return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl); + break; + } +} /** * Wrapper for php's checkdnsrr function. @@ -2773,6 +2878,12 @@ function phpbb_checkdnsrr($host, $type = '') @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); + // If output is empty, the nslookup failed + if (empty($output)) + { + return NULL; + } + foreach ($output as $line) { if (!trim($line)) @@ -2820,27 +2931,21 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // 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_EXTRA is defined the default level is E_ALL - if (($errno & ((defined('DEBUG_EXTRA') && error_reporting()) ? E_ALL : error_reporting())) == 0) + // If DEBUG is defined the default level is E_ALL + if (($errno & ((defined('DEBUG') && error_reporting()) ? E_ALL : error_reporting())) == 0) { return; } - /** - * @todo Think about removing the if-condition within the final product, since we no longer enable DEBUG by default and we will maybe adjust the error reporting level - */ - if (defined('DEBUG')) + if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false) { - if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false) - { - // remove complete path to installation, with the risk of changing backslashes meant to be there - $errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); - $msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); + // remove complete path to installation, with the risk of changing backslashes meant to be there + $errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile); + $msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text); - echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; - } + echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n"; } - + break; case E_USER_ERROR: @@ -3004,7 +3109,7 @@ function page_header($page_title = '', $display_online_list = true) // Specify escape character for MSSQL if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') { - $reading_sql .= " ESCAPE '\\'"; + $reading_sql .= " ESCAPE '\\' "; } } @@ -3041,7 +3146,7 @@ function page_header($page_title = '', $display_online_list = true) $reading_sql . ((!$config['load_online_guests']) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . ' AND u.user_id = s.session_user_id - ORDER BY u.username ASC, s.session_ip ASC'; + ORDER BY u.username_clean ASC, s.session_ip ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -3344,7 +3449,8 @@ function page_footer($run_cron = true) } $template->assign_vars(array( - 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', + 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", '', true, $user->session_id) : '') ); @@ -3385,7 +3491,7 @@ function page_footer($run_cron = true) if ($cron_type) { - $template->assign_var('RUN_CRON_TASK', '<img src="' . $phpbb_root_path . 'cron.' . $phpEx . '?cron_type=' . $cron_type . '" width="1" height="1" alt="cron" />'); + $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=' . $cron_type) . '" width="1" height="1" alt="cron" />'); } } diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index c85802dafb..c00a2cd3d9 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -160,7 +160,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = if ($return_array) { - // Include some more informations... + // Include some more information... $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? true : false) : (($row['forum_id'] == $select_id) ? true : false); $forum_list[$row['forum_id']] = array_merge(array('padding' => $padding, 'selected' => $selected), $row); } @@ -471,7 +471,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) sync('forum', 'forum_id', $forum_ids, true); } - // Update posted informations + // Update posted information update_posted_info($topic_ids); } @@ -482,6 +482,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) { global $db, $config; + $approved_topics = 0; $forum_ids = $topic_ids = array(); if (is_array($where_ids)) @@ -502,7 +503,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) 'posts' => delete_posts($where_type, $where_ids, false, true) ); - $sql = 'SELECT topic_id, forum_id + $sql = 'SELECT topic_id, forum_id, topic_approved FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set($where_type, $where_ids); $result = $db->sql_query($sql); @@ -511,6 +512,11 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) { $forum_ids[] = $row['forum_id']; $topic_ids[] = $row['topic_id']; + + if ($row['topic_approved']) + { + $approved_topics++; + } } $db->sql_freeresult($result); @@ -545,7 +551,10 @@ function delete_topics($where_type, $where_ids, $auto_sync = true) sync('topic_reported', $where_type, $where_ids); } - set_config('num_topics', $config['num_topics'] - sizeof($return['topics']), true); + if ($approved_topics) + { + set_config('num_topics', $config['num_topics'] - $approved_topics, true); + } return $return; } @@ -571,9 +580,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = return false; } + $approved_posts = 0; $post_ids = $topic_ids = $forum_ids = $post_counts = array(); - $sql = 'SELECT post_id, poster_id, post_postcount, topic_id, forum_id + $sql = 'SELECT post_id, poster_id, post_approved, post_postcount, topic_id, forum_id FROM ' . POSTS_TABLE . ' WHERE ' . $db->sql_in_set($where_type, array_map('intval', $where_ids)); $result = $db->sql_query($sql); @@ -589,6 +599,11 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = { $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1; } + + if ($row['post_approved']) + { + $approved_posts++; + } } $db->sql_freeresult($result); @@ -658,7 +673,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = sync('forum', 'forum_id', $forum_ids, true); } - set_config('num_posts', $config['num_posts'] - sizeof($post_ids), true); + if ($approved_posts) + { + set_config('num_posts', $config['num_posts'] - $approved_posts, true); + } return sizeof($post_ids); } @@ -924,7 +942,7 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = true) } /** -* Update/Sync posted informations for topics +* Update/Sync posted information for topics */ function update_posted_info(&$topic_ids) { @@ -1928,8 +1946,6 @@ function split_sql_file($sql, $delimiter) /** * Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username * and group names must be carried through for the moderators table -* -* @todo let the admin define if he wants to display moderators (forum-based) - display_on_index already present and checked for... */ function cache_moderators() { @@ -2128,7 +2144,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id case 'user': $log_type = LOG_USERS; - $sql_forum = 'AND l.reportee_id = ' . intval($user_id); + $sql_forum = 'AND l.reportee_id = ' . (int) $user_id; break; case 'users': @@ -2145,7 +2161,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id return; } - $sql = "SELECT l.*, u.username + $sql = "SELECT l.*, u.username, u.user_colour FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u WHERE l.log_type = $log_type AND u.user_id = l.user_id @@ -2170,10 +2186,15 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id $log[$i] = array( 'id' => $row['log_id'], - 'reportee_id' => $row['reportee_id'], - 'reportee_username' => '', + + 'reportee_id' => $row['reportee_id'], + 'reportee_username' => '', + 'reportee_username_full'=> '', + 'user_id' => $row['user_id'], - 'username' => '<a href="' . $profile_url . '&u=' . $row['user_id'] . '">' . $row['username'] . '</a>', + 'username' => $row['username'], + 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url), + 'ip' => $row['log_ip'], 'time' => $row['log_time'], 'forum_id' => $row['forum_id'], @@ -2256,21 +2277,31 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id } } - if ($reportee_id_list) + if (sizeof($reportee_id_list)) { $reportee_id_list = array_unique($reportee_id_list); $reportee_names_list = array(); - if (!function_exists('user_get_id_name')) + $sql = 'SELECT user_id, username, user_colour + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_id', $reportee_id_list); + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) { - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + $reportee_names_list[$row['user_id']] = $row; } - - user_get_id_name($reportee_id_list, $reportee_names_list); + $db->sql_freeresult($result); foreach ($log as $key => $row) { - $log[$key]['reportee_username'] = (isset($reportee_names_list[$row['reportee_id']])) ? '<a href="' . $profile_url . '&u=' . $row['reportee_id'] . '">' . $reportee_names_list[$row['reportee_id']] . '</a>' : false; + if (!isset($reportee_names_list[$row['reportee_id']])) + { + continue; + } + + $log[$key]['reportee_username'] = $reportee_names_list[$row['reportee_id']]['username']; + $log[$key]['reportee_username_full'] = get_username_string('full', $row['reportee_id'], $reportee_names_list[$row['reportee_id']]['username'], $reportee_names_list[$row['reportee_id']]['user_colour'], false, $profile_url); } } @@ -2369,7 +2400,7 @@ function view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limi { global $db; - $sql = 'SELECT user_id, username, user_warnings, user_last_warning + $sql = 'SELECT user_id, username, user_colour, user_warnings, user_last_warning FROM ' . USERS_TABLE . ' WHERE user_warnings > 0 ' . (($limit_days) ? "AND user_last_warning >= $limit_days" : '') . " diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index cb8f963528..663b6bfe19 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -309,16 +309,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod { $last_post_subject = $row['forum_last_post_subject']; $last_post_time = $user->format_date($row['forum_last_post_time']); - - $last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST']; - $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : ''; - $last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['forum_last_poster_id']); - $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id']; } else { - $last_post_subject = $last_post_time = $last_poster = $last_poster_colour = $last_poster_url = $last_post_url = ''; + $last_post_subject = $last_post_time = $last_post_url = ''; } // Output moderator listing ... if applicable @@ -350,8 +345,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'SUBFORUMS' => $subforums_list, 'LAST_POST_SUBJECT' => censor_text($last_post_subject), 'LAST_POST_TIME' => $last_post_time, - 'LAST_POSTER' => $last_poster, - 'LAST_POSTER_COLOUR' => $last_poster_colour, + 'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'MODERATORS' => $moderators_list, 'L_SUBFORUM_STR' => $l_subforums, @@ -359,7 +355,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'L_MODERATOR_STR' => $l_moderator, 'U_VIEWFORUM' => ($row['forum_type'] != FORUM_LINK || ($row['forum_flags'] & FORUM_FLAG_LINK_TRACK)) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : $row['forum_link'], - 'U_LAST_POSTER' => $last_poster_url, + 'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), 'U_LAST_POST' => $last_post_url) ); } @@ -587,6 +583,10 @@ function get_moderators(&$forum_moderators, $forum_id = false) /** * User authorisation levels output +* +* @param string $mode Can be forum or topic. Not in use at the moment. +* @param int $forum_id The current forum the user is in. +* @param int $forum_status The forums status bit. */ function gen_forum_auth_level($mode, $forum_id, $forum_status) { @@ -597,8 +597,8 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status) $rules = array( ($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'], ($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'], - ($auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'], - ($auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'], + ($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'], + ($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'], ); if ($config['allow_attachments']) @@ -712,7 +712,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ $extensions = $cache->obtain_attach_extensions(); } - // Look for missing attachment informations... + // Look for missing attachment information... $attach_ids = array(); foreach ($attachment_data as $pos => $attachment) { @@ -744,7 +744,17 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ $attachment_data[$attach_ids[$row['attach_id']]] = $row; } $db->sql_freeresult($result); + } + // Sort correctly (please note that the attachment_data array itself get changed by this + if ($config['display_order']) + { + // Ascending sort + krsort($attachment_data); + } + else + { + // Descending sort ksort($attachment_data); } @@ -959,12 +969,10 @@ function display_custom_bbcodes() // Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing) $num_predefined_bbcodes = 22; - /* - * @todo while adjusting custom bbcodes, think about caching this query as well as correct ordering - */ $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline FROM ' . BBCODES_TABLE . ' - WHERE display_on_posting = 1'; + WHERE display_on_posting = 1 + ORDER BY bbcode_tag'; $result = $db->sql_query($sql); $i = 0; @@ -974,7 +982,7 @@ 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' => str_replace(array('&', '"', "'", '<', '>'), array('\&', '\"', '\\\'', '<', '>'), $row['bbcode_helpline'])) ); $i++; @@ -1051,7 +1059,7 @@ function display_user_activity(&$userdata) $forum_sql GROUP BY forum_id ORDER BY num_posts DESC"; - $result = $db->sql_query_limit($sql, 1, 0, 3600); + $result = $db->sql_query_limit($sql, 1); $active_f_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -1073,7 +1081,7 @@ function display_user_activity(&$userdata) $forum_sql GROUP BY topic_id ORDER BY num_posts DESC"; - $result = $db->sql_query_limit($sql, 1, 0, 3600); + $result = $db->sql_query_limit($sql, 1); $active_t_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 75eda9b10c..4625ba47d0 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -962,7 +962,7 @@ class smtp_class function smtp_class() { - if (defined('DEBUG_EXTRA')) + if (defined('DEBUG')) { $this->backtrace = true; $this->backtrace_log = array(); @@ -987,7 +987,7 @@ class smtp_class { fputs($this->socket, $command . "\r\n"); - (!$private_info) ? $this->add_backtrace("# $command") : $this->add_backtrace('# Ommitting sensitive Informations'); + (!$private_info) ? $this->add_backtrace("# $command") : $this->add_backtrace('# Ommitting sensitive information'); // We could put additional code here } @@ -1368,33 +1368,53 @@ class smtp_class } /** -* Encodes the given string for proper display in UTF-8 ... nabbed -* from php.net and modified. There is an alternative encoding method which -* may produce less output but it's questionable as to its worth in this -* scenario. +* Encodes the given string for proper display in UTF-8. * * This version is using base64 encoded data. The downside of this * is if the mail client does not understand this encoding the user * is basically doomed with an unreadable subject. +* +* Please note that this version fully supports RFC 2045 section 6.8. */ function mail_encode($str) { // define start delimimter, end delimiter and spacer - $end = '?='; - $start = '=?UTF-8?B?'; - $spacer = "$end $start"; + $start = "=?UTF-8?B?"; + $end = "?="; + $spacer = $end . ' ' . $start; + $split_length = 64; + + $encoded_str = base64_encode($str); - // determine length of encoded text within chunks and ensure length is even - $length = 76 - strlen($start) - strlen($end); - $length = floor($length / 2) * 2; + // If encoded string meets the limits, we just return with the correct data. + if (strlen($encoded_str) <= $split_length) + { + return $start . $encoded_str . $end; + } + + // If there is only ASCII data, we just return what we want, correctly splitting the lines. + if (strlen($str) === utf8_strlen($str)) + { + return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end; + } - // encode the string and split it into chunks with spacers after each chunk - $str = chunk_split(base64_encode($str), $length, $spacer); + // UTF-8 data, compose encoded lines + $array = utf8_str_split($str); + $str = ''; - // remove trailing spacer and add start and end delimiters - $str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str); + while (sizeof($array)) + { + $text = ''; + + while (sizeof($array) && strlen(base64_encode($text . $array[0])) <= $split_length) + { + $text .= array_shift($array); + } + + $str .= $start . base64_encode($text) . $end . ' '; + } - return $start . $str . $end; + return substr($str, 0, -1); } ?>
\ No newline at end of file diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 89dda74700..753e043c16 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -213,12 +213,11 @@ class p_master /** * Check module authorisation - * @todo Have a look at the eval statement and replace with other code... */ - function module_auth($module_auth) + function module_auth($module_auth, $forum_id = false) { global $auth, $config; - + $module_auth = trim($module_auth); // Generally allowed to access module if module_auth is empty @@ -227,8 +226,45 @@ class p_master return true; } + // With the code below we make sure only those elements get eval'd we really want to be checked + preg_match_all('/(?: + "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | + \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | + [(),] | + [^\s(),]+)/x', $module_auth, $match); + + $tokens = $match[0]; + for ($i = 0, $size = sizeof($tokens); $i < $size; $i++) + { + $token = &$tokens[$i]; + + switch ($token) + { + case ')': + case '(': + case '&&': + case '||': + case ',': + break; + + default: + if (!preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))#', $token)) + { + $token = ''; + } + break; + } + } + + $module_auth = implode(' ', $tokens); + + // Make sure $id seperation is working fine + $module_auth = str_replace(' , ', ',', $module_auth); + + $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; + $is_auth = false; - eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', '(int) $this->acl_forum_id', '(int) $auth->acl_getf_global("\\1")', '(int) $config["\\1"]'), $module_auth) . ');'); + eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth) . ');'); return $is_auth; } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index b15466b487..49ed4932a3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -96,8 +96,8 @@ function generate_smilies($mode, $forum_id) } /** -* Update Post Informations (First/Last Post in topic/forum) -* Should be used instead of sync() if only the last post informations are out of sync... faster +* Update Post Information (First/Last Post in topic/forum) +* Should be used instead of sync() if only the last post information are out of sync... faster * * @param string $type Can be forum|topic * @param mixed $ids topic/forum ids @@ -367,7 +367,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage // Check Image Size, if it is an image if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE) { - $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']); + $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']); } // Admins and mods are allowed to exceed the allowed filesize @@ -561,6 +561,12 @@ function create_thumbnail($source, $destination, $mimetype) list($new_width, $new_height) = get_img_size_format($width, $height); + // Do not create a thumbnail if the resulting width/height is bigger than the original one + if ($new_width > $width && $new_height > $height) + { + return false; + } + $used_imagick = false; // Only use imagemagick if defined and the passthru function not disabled @@ -686,7 +692,7 @@ function posting_gen_inline_attachments(&$attachment_data) /** * Generate inline attachment entry */ -function posting_gen_attachment_entry(&$attachment_data, &$filename_data) +function posting_gen_attachment_entry($attachment_data, &$filename_data) { global $template, $config, $phpbb_root_path, $phpEx, $user; @@ -700,8 +706,10 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) 'S_HAS_ATTACHMENTS' => true) ); - $count = 0; - foreach ($attachment_data as $attach_row) + // We display the posted attachments within the desired order. + ($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data); + + foreach ($attachment_data as $count => $attach_row) { $hidden = ''; $attach_row['real_filename'] = basename($attach_row['real_filename']); @@ -723,8 +731,6 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) 'U_VIEW_ATTACHMENT' => $download_link, 'S_HIDDEN' => $hidden) ); - - $count++; } } @@ -857,7 +863,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id global $config, $phpbb_root_path, $phpEx; // Go ahead and pull all data for this topic - $sql = 'SELECT u.username, u.user_id, p.* + $sql = 'SELECT u.username, u.user_id, u.user_colour, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u WHERE p.topic_id = $topic_id AND p.poster_id = u.user_id @@ -890,20 +896,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id foreach ($rowset as $i => $row) { - $poster_id = $row['user_id']; - $poster = $row['username']; + $poster_id = $row['user_id']; + $post_subject = $row['post_subject']; + $message = censor_text($row['post_text']); + $message = str_replace("\n", '<br />', $message); - // Handle anon users posting with usernames - if ($poster_id == ANONYMOUS) - { - $poster = ($row['post_username']) ? $row['post_username'] : $user->lang['GUEST']; - $poster_rank = ($row['post_username']) ? $user->lang['GUEST'] : ''; - } - - $post_subject = $row['post_subject']; - $message = $row['post_text']; - $message = censor_text($message); - $message = str_replace("\n", '<br />', $message); $decoded_message = false; if ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) @@ -925,7 +922,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $post_subject = censor_text($post_subject); $template->assign_block_vars($mode . '_row', array( - 'POSTER_NAME' => $poster, + 'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POST_SUBJECT' => $post_subject, 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']), 'POST_DATE' => $user->format_date($row['post_time']), @@ -934,7 +935,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id 'U_POST_ID' => $row['post_id'], 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', - 'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes($poster) : '') + 'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '') ); unset($rowset[$i]); } @@ -1123,7 +1124,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id )); $messenger->send($addr['method']); - $messenger->reset(); } } unset($msg_list_ary); @@ -1241,7 +1241,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) $sql_data[FORUMS_TABLE] = 'forum_posts = forum_posts - 1'; } - $sql_data[TOPICS_TABLE] = 'topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . ", topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'"; + $sql_data[TOPICS_TABLE] = 'topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'"; $sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : ''); $next_post_id = (int) $row['post_id']; @@ -1387,11 +1387,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $subject = truncate_string($subject); $data['topic_title'] = truncate_string($data['topic_title']); - // Collect some basic informations about which tables and which rows to update/insert + // Collect some basic information about which tables and which rows to update/insert $sql_data = array(); $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id']; - // Collect Informations + // Collect Information switch ($post_mode) { case 'post': diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 58d854b928..d67478b190 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -120,7 +120,7 @@ function get_folder($user_id, $folder_id = false) $folder = array(); - // Get folder informations + // Get folder information $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(pm_unread) as num_unread FROM ' . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id @@ -242,7 +242,7 @@ function clean_sentbox($num_sentbox_messages) } /** -* Check Rule against Message Informations +* Check Rule against Message Information */ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) { @@ -297,7 +297,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) $auth2 = new auth(); $auth2->acl($userdata); - if (!$auth2->acl_get('a_') && !$auth->acl_get('m_') && !$auth2->acl_getf_global('m_')) + if (!$auth2->acl_get('a_') && !$auth2->acl_get('m_') && !$auth2->acl_getf_global('m_')) { return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']); } @@ -429,7 +429,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $row['author_in_group'] = $memberships[$row['user_id']]; } - // Check Rule - this should be very quick since we have all informations we need + // Check Rule - this should be very quick since we have all information we need $is_match = false; foreach ($user_rules as $rule_row) { @@ -515,11 +515,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // 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. - $num_not_moved = 0; + $num_not_moved = $num_removed = 0; // Delete messages if (sizeof($delete_ids)) { + $num_removed = sizeof($delete_ids); delete_pm($user_id, $delete_ids, PRIVMSGS_NO_BOX); } @@ -694,7 +695,10 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $user->data['user_unread_privmsg'] -= $num_unread; } - return $num_not_moved; + return array( + 'not_moved' => $num_not_moved, + 'deleted' => $num_removed, + ); } /** @@ -911,7 +915,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) return false; } - // Get PM Informations for later deleting + // Get PM Information for later deleting $sql = 'SELECT msg_id, pm_unread, pm_new FROM ' . PRIVMSGS_TO_TABLE . ' WHERE ' . $db->sql_in_set('msg_id', array_map('intval', $msg_ids)) . " @@ -952,7 +956,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) $db->sql_query($sql); // Set delete flag for those intended to receive the PM - // We do not remove the message actually, to retain some basic informations (sent time for example) + // We do not remove the message actually, to retain some basic information (sent time for example) $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET pm_deleted = 1 WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows)); @@ -962,7 +966,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) } else { - // Delete Private Message Informations + // Delete private message data $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id AND folder_id = $folder_id @@ -1058,7 +1062,7 @@ function rebuild_header($check_ary) } /** -* Print out/assign recipient informations +* Print out/assign recipient information */ function write_pm_addresses($check_ary, $author_id, $plaintext = false) { @@ -1166,15 +1170,30 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false) { foreach ($adr_ary as $id => $row) { - $template->assign_block_vars($check_type . '_recipient', array( - 'NAME' => $row['name'], - 'IS_GROUP' => ($type == 'group'), - 'IS_USER' => ($type == 'user'), - 'COLOUR' => ($row['colour']) ? $row['colour'] : '', + $tpl_ary = array( + 'IS_GROUP' => ($type == 'group') ? true : false, + 'IS_USER' => ($type == 'user') ? true : false, 'UG_ID' => $id, - 'U_VIEW' => ($type == 'user') ? (($id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $id) : '') : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id), - 'TYPE' => $type) + 'NAME' => $row['name'], + 'COLOUR' => ($row['colour']) ? '#' . $row['colour'] : '', + 'TYPE' => $type, ); + + if ($type == 'user') + { + $tpl_ary = array_merge($tpl_ary, array( + 'U_VIEW' => get_username_string('profile', $id, $row['name'], $row['colour']), + 'NAME_FULL' => get_username_string('full', $id, $row['name'], $row['colour']), + )); + } + else + { + $tpl_ary = array_merge($tpl_ary, array( + 'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id), + )); + } + + $template->assign_block_vars($check_type . '_recipient', $tpl_ary); } } } @@ -1233,11 +1252,11 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr $current_time = time(); - // Collect some basic informations about which tables and which rows to update/insert + // Collect some basic information about which tables and which rows to update/insert $sql_data = array(); $root_level = 0; - // Recipient Informations + // Recipient Information $recipients = $to = $bcc = array(); if ($mode != 'edit') @@ -1604,7 +1623,6 @@ function pm_notification($mode, $author, $recipients, $subject, $message) ); $messenger->send($addr['method']); - $messenger->reset(); } unset($msg_list_ary); diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index b35781e198..494288a600 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -579,7 +579,7 @@ class custom_profile if (gettype($value) == 'string') { - utf8_normalize_nfc(&$value); + $value = utf8_normalize_nfc($value); } } @@ -865,8 +865,7 @@ class custom_profile case FIELD_STRING: case FIELD_TEXT: - $var = request_var($var_name, $profile_row['field_default_value'], true); - utf8_normalize_nfc(&$var); + $var = utf8_normalize_nfc(request_var($var_name, $profile_row['field_default_value'], true)); break; case FIELD_INT: diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a7a76cf526..ff32e4447d 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -9,7 +9,7 @@ */ /** -* Responsible for holding all file relevant informations, as well as doing file-specific operations. +* Responsible for holding all file relevant information, as well as doing file-specific operations. * The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on. * @package phpBB3 */ diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 15daa0c999..d22add63ea 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -142,7 +142,8 @@ function user_add($user_row, $cp_data = false) 'username' => $user_row['username'], 'username_clean' => utf8_clean_string($user_row['username']), 'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '', - 'user_email' => $user_row['user_email'], + 'user_pass_convert' => 0, + 'user_email' => strtolower($user_row['user_email']), 'user_email_hash' => (int) crc32(strtolower($user_row['user_email'])) . strlen($user_row['user_email']), 'group_id' => $user_row['group_id'], 'user_type' => $user_row['user_type'], @@ -170,6 +171,7 @@ function user_add($user_row, $cp_data = false) 'user_posts' => 0, 'user_dst' => 0, 'user_colour' => '', + 'user_occ' => '', 'user_interests' => '', 'user_avatar' => '', 'user_avatar_type' => 0, @@ -408,7 +410,7 @@ function user_delete($mode, $user_id, $post_username = false) AND folder_id = ' . PRIVMSGS_NO_BOX; $db->sql_query($sql); - // Delete all to-informations + // Delete all to-information $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . ' WHERE user_id = ' . $user_id; $db->sql_query($sql); @@ -1115,8 +1117,7 @@ function validate_match($string, $optional = false, $match) * Also checks if it includes the " character, which we don't allow in usernames. * Used for registering, changing names, and posting anonymously with a username * -* @todo do we really check and disallow the " character in usernames as written above. Has it only be forgotten to include the check? -* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) +* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) */ function validate_username($username) { @@ -1218,7 +1219,9 @@ function validate_email($email) { global $config, $db, $user; - if (strtolower($user->data['user_email']) == strtolower($email)) + $email = strtolower($email); + + if (strtolower($user->data['user_email']) == $email) { return false; } @@ -1249,7 +1252,7 @@ function validate_email($email) { $sql = 'SELECT user_email_hash FROM ' . USERS_TABLE . " - WHERE user_email_hash = " . crc32(strtolower($email)) . strlen($email); + WHERE user_email_hash = " . crc32($email) . strlen($email); $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -1528,10 +1531,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow 'group_receive_pm' => 'int', 'group_legend' => 'int', 'group_message_limit' => 'int', + + 'group_founder_manage' => 'int', ); // Those are group-only attributes - $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit'); + $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_founder_manage'); // Check data if (!utf8_strlen($name) || utf8_strlen($name) > 40) @@ -1718,7 +1723,7 @@ function group_delete($group_id, $group_name = false) /** * Add user(s) to group * -* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' +* @return mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' */ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false) { @@ -2014,7 +2019,6 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $messenger->save_queue(); @@ -2264,6 +2268,7 @@ function group_update_listings($group_id) { if (!function_exists('cache_moderators')) { + global $phpbb_root_path, $phpEx; include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); } cache_moderators(); diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index b20bd63a08..bf9ef5280d 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -67,7 +67,10 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'), + 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), + 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), + 'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id), 'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id), 'S_CAN_FORK' => $auth->acl_get('m_', $forum_id), @@ -79,7 +82,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_FORUM_LOGS' => ($auth->acl_gets('a_', 'm_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&mode=forum_logs&f=' . $forum_id) : '', - 'S_MCP_ACTION' => $url . "&i=$id&action=$action&mode=$mode&start=$start" . (($action == 'merge_select') ? $selected_ids : ''), + 'S_MCP_ACTION' => $url . "&i=$id&mode=$mode&start=$start" . (($action == 'merge_select') ? $selected_ids : ''), 'PAGINATION' => generate_pagination($url . "&i=$id&action=$action&mode=$mode" . (($action == 'merge_select') ? $selected_ids : ''), $forum_topics, $topics_per_page, $start), 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start), @@ -111,7 +114,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, false, $folder_img, $folder_alt, $topic_type); @@ -127,7 +130,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $topic_id) ? true : false, 'U_SELECT_TOPIC' => $url . "&i=$id&mode=topic_view&action=merge&to_topic_id=" . $row['topic_id'] . $selected_ids, 'U_MCP_QUEUE' => $u_mcp_queue, - 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports'), + 'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '', 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt), @@ -137,12 +140,25 @@ function mcp_forum_view($id, $mode, $action, $forum_info) 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '', 'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '', + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'TOPIC_TYPE' => $topic_type, 'TOPIC_TITLE' => $topic_title, 'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'], 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'TOPIC_ID' => $row['topic_id'], 'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? 'checked="checked" ' : '', + 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), + 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], + 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false, 'S_TOPIC_UNAPPROVED' => $topic_unapproved, @@ -159,14 +175,13 @@ function mcp_resync_topics($topic_ids) { global $auth, $db, $template, $phpEx, $user, $phpbb_root_path; - if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', 'm_'))) + if (!sizeof($topic_ids)) { - return; + trigger_error($user->lang['NO_TOPIC_SELECTED']); } - if (!sizeof($topic_ids)) + if (check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_'))) { - trigger_error($user->lang['NO_TOPIC_SELECTED']); return; } diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 8b798fc1b2..acfedb583f 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -134,7 +134,7 @@ function mcp_front_view($id, $mode, $action) $global_id = $forum_list[0]; $sql = $db->sql_build_query('SELECT', array( - 'SELECT' => 'r.*, p.post_id, p.post_subject, u.username, t.topic_id, t.topic_title, f.forum_id, f.forum_name', + 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( REPORTS_TABLE => 'r', @@ -176,11 +176,14 @@ function mcp_front_view($id, $mode, $action) 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"), 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), - 'U_REPORTER' => ($row['user_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + + 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), + 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'TOPIC_TITLE' => $row['topic_title'], - 'REPORTER' => ($row['user_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $row['username'], 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'REPORT_TIME' => $user->format_date($row['report_time'])) ); @@ -218,11 +221,11 @@ function mcp_front_view($id, $mode, $action) foreach ($log as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'TIME' => $user->format_date($row['time']), 'ACTION' => $row['action'], - 'U_VIEWTOPIC' => (!empty($row['viewtopic'])) ? $row['viewtopic'] : '', + 'U_VIEW_TOPIC' => (!empty($row['viewtopic'])) ? $row['viewtopic'] : '', 'U_VIEWLOGS' => (!empty($row['viewlogs'])) ? $row['viewlogs'] : '') ); } diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index f9cf7d27df..44acc10174 100755 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -102,7 +102,7 @@ class mcp_logs // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'u.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $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); @@ -146,7 +146,7 @@ class mcp_logs } $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => $row['action'], diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 1fe9233ba9..a59d965300 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -207,7 +207,9 @@ function lock_unlock($action, $ids) $l_prefix = 'POST'; } - if (!($forum_id = check_ids($ids, $table, $sql_id, array('m_lock')))) + $orig_ids = $ids; + + if (!check_ids($ids, $table, $sql_id, array('m_lock'))) { // Make sure that for f_user_lock only the lock action is triggered. if ($action != 'lock') @@ -215,13 +217,16 @@ function lock_unlock($action, $ids) return; } - if (!($forum_id = check_ids($ids, $table, $sql_id, array('f_user_lock')))) + $ids = $orig_ids; + + if (!check_ids($ids, $table, $sql_id, array('f_user_lock'))) { return; } } + unset($orig_ids); - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_', 'action'))); $s_hidden_fields = build_hidden_fields(array( $sql_id . '_list' => $ids, @@ -241,7 +246,7 @@ function lock_unlock($action, $ids) foreach ($data as $id => $row) { - add_log('mod', $forum_id, $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']); + add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']); } $success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS'; @@ -272,7 +277,10 @@ function change_topic_type($action, $topic_ids) { global $auth, $user, $db, $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_')))) + // For changing topic types, we only allow operations in one forum. + $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_'), true); + + if ($forum_id === false) { return; } @@ -420,7 +428,10 @@ function mcp_move_topic($topic_ids) global $auth, $user, $db, $template; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', 'm_move'))) + // Here we limit the operation to one forum only + $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true); + + if ($forum_id === false) { return; } @@ -575,12 +586,13 @@ function mcp_delete_topic($topic_ids) { global $auth, $user, $db, $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', 'm_delete'))) + if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete'))) { return; } - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $forum_id = request_var('f', 0); $s_hidden_fields = build_hidden_fields(array( 'topic_id_list' => $topic_ids, @@ -598,7 +610,7 @@ function mcp_delete_topic($topic_ids) foreach ($data as $topic_id => $row) { - add_log('mod', $forum_id, 0, 'LOG_TOPIC_DELETED', $row['topic_title']); + add_log('mod', $row['forum_id'], 0, 'LOG_TOPIC_DELETED', $row['topic_title']); } $return = delete_topics('topic_id', $topic_ids); @@ -630,12 +642,13 @@ function mcp_delete_post($post_ids) { global $auth, $user, $db, $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($post_ids, POSTS_TABLE, 'post_id', 'm_delete'))) + if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_delete'))) { return; } - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $forum_id = request_var('f', 0); $s_hidden_fields = build_hidden_fields(array( 'post_id_list' => $post_ids, @@ -649,7 +662,7 @@ function mcp_delete_post($post_ids) { if (!function_exists('delete_posts')) { - include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx); + include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); } // Count the number of topics that are affected @@ -750,13 +763,14 @@ function mcp_fork_topic($topic_ids) global $auth, $user, $db, $template, $config; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', 'm_'))) + if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_'))) { return; } $to_forum_id = request_var('to_forum_id', 0); - $redirect = request_var('redirect', $user->data['session_page']); + $forum_id = request_var('forum_id', 0); + $redirect = request_var('redirect', build_url(array('_f_', 'action'))); $additional_msg = $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( @@ -835,11 +849,6 @@ function mcp_fork_topic($topic_ids) $new_topic_id = $db->sql_nextid(); $new_topic_id_list[$topic_id] = $new_topic_id; - /** - * @todo enable? (is this still needed?) - * markread('topic', $to_forum_id, $new_topic_id); - */ - if ($topic_row['poll_start']) { $poll_rows = array(); diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 302ace9755..84bba18bb7 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -142,6 +142,7 @@ class mcp_notes // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -154,14 +155,14 @@ class mcp_notes $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('a' => 'u.username', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); + $sort_by_sql = array('a' => 'u.username_clean', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -181,7 +182,7 @@ class mcp_notes foreach ($log_data as $row) { $template->assign_block_vars('usernotes', array( - 'REPORT_BY' => $row['username'], + 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => $user->format_date($row['time']), 'ACTION' => $row['action'], 'IP' => $row['ip'], diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 201137a9a4..a1cc7f4331 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -91,7 +91,6 @@ function mcp_post_details($id, $mode, $action) // Set some vars $users_ary = $usernames_ary = array(); $post_id = $post_info['post_id']; - $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username']; // Process message, leave it uncensored $message = $post_info['post_text']; @@ -126,7 +125,6 @@ function mcp_post_details($id, $mode, $action) 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), - 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $post_info['user_id']) : '', 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&p=$post_id") . "#p$post_id\">", '</a>'), @@ -136,7 +134,11 @@ function mcp_post_details($id, $mode, $action) 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']), 'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']), - 'POSTER_NAME' => $poster, + 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), @@ -157,7 +159,7 @@ function mcp_post_details($id, $mode, $action) foreach ($log_data as $row) { $template->assign_block_vars('usernotes', array( - 'REPORT_BY' => $row['username'], + 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => $user->format_date($row['time']), 'ACTION' => $row['action'], 'ID' => $row['id']) @@ -383,6 +385,23 @@ function change_poster(&$post_info, $userdata) $db->sql_query($sql); } + // refresh search cache of this post + $search_type = basename($config['search_type']); + + if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx)) + { + require("{$phpbb_root_path}includes/search/$search_type.$phpEx"); + + // We do some additional checks in the module to ensure it can actually be utilised + $error = false; + $search = new $search_type($error); + + if (!$error && method_exists($search, 'destroy_cache')) + { + $search->destroy_cache(array(), array($post_info['user_id'], $userdata['user_id'])); + } + } + $from_username = $post_info['username']; $to_username = $userdata['username']; diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 0f6fae18ee..df23bcd98f 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -99,14 +99,6 @@ class mcp_queue ); } - // Set some vars - if ($post_info['user_id'] == ANONYMOUS) - { - $poster = ($post_info['post_username']) ? $post_info['post_username'] : $user->lang['GUEST']; - } - - $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username']; - // Process message, leave it uncensored $message = $post_info['post_text']; $message = str_replace("\n", '<br />', $message); @@ -133,7 +125,6 @@ class mcp_queue 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), - 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $post_info['user_id']) : '', 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&mode=unapproved_topics' : '&mode=unapproved_posts')) . "&start=$start\">", '</a>'), @@ -141,7 +132,11 @@ class mcp_queue 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']), 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']), - 'POSTER_NAME' => $poster, + 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), @@ -253,7 +248,7 @@ class mcp_queue if (sizeof($post_ids)) { - $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username + $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' AND t.topic_id = p.topic_id @@ -284,7 +279,7 @@ class mcp_queue } else { - $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_first_poster_name AS username + $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour FROM ' . TOPICS_TABLE . " t WHERE forum_id IN (0, $forum_list) AND topic_approved = 0 @@ -322,31 +317,30 @@ class mcp_queue foreach ($rowset as $row) { - if ($row['poster_id'] == ANONYMOUS) - { - $poster = (!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']; - } - else - { - $poster = $row['username']; - } - $global_topic = ($row['forum_id']) ? false : true; if ($global_topic) { $row['forum_id'] = $global_id; } + if (empty($row['post_username'])) + { + $row['post_username'] = $user->lang['GUEST']; + } + $template->assign_block_vars('postrow', array( 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''), 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&f={$row['forum_id']}&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')), - 'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['poster_id']) : '', + + 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'POST_ID' => $row['post_id'], 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'POST_SUBJECT' => $row['post_subject'], - 'POSTER' => $poster, 'POST_TIME' => $user->format_date($row['post_time'])) ); } @@ -383,19 +377,18 @@ function approve_post($post_id_list, $mode) global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_approve'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve'))) { trigger_error('NOT_AUTHORIZED'); } - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_'))); $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( 'i' => 'queue', 'mode' => $mode, 'post_id_list' => $post_id_list, - 'f' => $forum_id, 'action' => 'approve', 'redirect' => $redirect) ); @@ -409,8 +402,8 @@ function approve_post($post_id_list, $mode) // If Topic -> total_topics = total_topics+1, total_posts = total_posts+1, forum_topics = forum_topics+1, forum_posts = forum_posts+1 // If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1 - $total_topics = $total_posts = $forum_topics = $forum_posts = 0; - $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = array(); + $total_topics = $total_posts = 0; + $forum_topics_posts = $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = $forum_id_list = array(); $update_forum_information = false; @@ -418,13 +411,26 @@ function approve_post($post_id_list, $mode) { $topic_id_list[$post_data['topic_id']] = 1; + if ($post_data['forum_id']) + { + $forum_id_list[$post_data['forum_id']] = 1; + } + // Topic or Post. ;) if ($post_data['topic_first_post_id'] == $post_id) { if ($post_data['forum_id']) { + if (!isset($forum_topics_posts[$post_data['forum_id']])) + { + $forum_topics_posts[$post_data['forum_id']] = array( + 'forum_posts' => 0, + 'forum_topics' => 0 + ); + } + $total_topics++; - $forum_topics++; + $forum_topics_posts[$post_data['forum_id']]['forum_topics']++; } $topic_approve_sql[] = $post_data['topic_id']; @@ -433,18 +439,23 @@ function approve_post($post_id_list, $mode) { if (!isset($topic_replies_sql[$post_data['topic_id']])) { - $topic_replies_sql[$post_data['topic_id']] = 1; - } - else - { - $topic_replies_sql[$post_data['topic_id']]++; + $topic_replies_sql[$post_data['topic_id']] = 0; } + $topic_replies_sql[$post_data['topic_id']]++; } if ($post_data['forum_id']) { + if (!isset($forum_topics_posts[$post_data['forum_id']])) + { + $forum_topics_posts[$post_data['forum_id']] = array( + 'forum_posts' => 0, + 'forum_topics' => 0 + ); + } + $total_posts++; - $forum_posts++; + $forum_topics_posts[$post_data['forum_id']]['forum_posts']++; } $post_approve_sql[] = $post_id; @@ -483,16 +494,19 @@ function approve_post($post_id_list, $mode) } } - if ($forum_topics || $forum_posts) + if (sizeof($forum_topics_posts)) { - $sql = 'UPDATE ' . FORUMS_TABLE . ' - SET '; - $sql .= ($forum_topics) ? "forum_topics = forum_topics + $forum_topics" : ''; - $sql .= ($forum_topics && $forum_posts) ? ', ' : ''; - $sql .= ($forum_posts) ? "forum_posts = forum_posts + $forum_posts" : ''; - $sql .= " WHERE forum_id = $forum_id"; + foreach ($forum_topics_posts as $forum_id => $row) + { + $sql = 'UPDATE ' . FORUMS_TABLE . ' + SET '; + $sql .= ($row['forum_topics']) ? "forum_topics = forum_topics + {$row['forum_topics']}" : ''; + $sql .= ($row['forum_topics'] && $row['forum_posts']) ? ', ' : ''; + $sql .= ($row['forum_posts']) ? "forum_posts = forum_posts + {$row['forum_posts']}" : ''; + $sql .= " WHERE forum_id = $forum_id"; - $db->sql_query($sql); + $db->sql_query($sql); + } } if ($total_topics) @@ -510,9 +524,9 @@ function approve_post($post_id_list, $mode) if ($update_forum_information) { - update_post_information('forum', $forum_id); + update_post_information('forum', array_keys($forum_id_list)); } - unset($topic_id_list); + unset($topic_id_list, $forum_id_list); $messenger = new messenger(); @@ -539,17 +553,16 @@ function approve_post($post_id_list, $mode) 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])), 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])), - 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&e=0", - 'U_VIEW_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&p=$post_id&e=$post_id") + 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&e=0", + 'U_VIEW_POST' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&p=$post_id&e=$post_id") ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } + $messenger->save_queue(); + // Send out normal user notifications $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); @@ -558,19 +571,19 @@ function approve_post($post_id_list, $mode) if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id']) { // Forum Notifications - user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $forum_id, $post_data['topic_id'], $post_id); + user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id); } else { // Topic Notifications - user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $forum_id, $post_data['topic_id'], $post_id); + user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id); } } unset($post_info); - if ($forum_topics) + if ($total_topics) { - $success_msg = ($forum_topics == 1) ? 'TOPIC_APPROVED_SUCCESS' : 'TOPICS_APPROVED_SUCCESS'; + $success_msg = ($total_topics == 1) ? 'TOPIC_APPROVED_SUCCESS' : 'TOPICS_APPROVED_SUCCESS'; } else { @@ -609,12 +622,12 @@ function disapprove_post($post_id_list, $mode) global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_approve'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve'))) { trigger_error('NOT_AUTHORIZED'); } - $redirect = request_var('redirect', build_url(array('t', 'mode')) . '&mode=unapproved_topics'); + $redirect = request_var('redirect', build_url(array('t', 'mode', '_f_')) . '&mode=unapproved_topics'); $reason = request_var('reason', '', true); $reason_id = request_var('reason_id', 0); $success_msg = $additional_msg = ''; @@ -623,7 +636,6 @@ function disapprove_post($post_id_list, $mode) 'i' => 'queue', 'mode' => $mode, 'post_id_list' => $post_id_list, - 'f' => $forum_id, 'action' => 'disapprove', 'redirect' => $redirect) ); @@ -660,42 +672,52 @@ function disapprove_post($post_id_list, $mode) // If Topic -> forum_topics_real -= 1 // If Post -> topic_replies_real -= 1 - $forum_topics_real = 0; - $topic_replies_real_sql = $post_disapprove_sql = $topic_id_list = array(); + $num_disapproved = 0; + $forum_topics_real = $topic_id_list = $forum_id_list = $topic_replies_real_sql = $post_disapprove_sql = array(); foreach ($post_info as $post_id => $post_data) { $topic_id_list[$post_data['topic_id']] = 1; + if ($post_data['forum_id']) + { + $forum_id_list[$post_data['forum_id']] = 1; + } + // Topic or Post. ;) if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_last_post_id'] == $post_id) { if ($post_data['forum_id']) { - $forum_topics_real++; + if (!isset($forum_topics_real[$post_data['forum_id']])) + { + $forum_topics_real[$post_data['forum_id']] = 0; + } + $forum_topics_real[$post_data['forum_id']]++; + $num_disapproved++; } } else { if (!isset($topic_replies_real_sql[$post_data['topic_id']])) { - $topic_replies_real_sql[$post_data['topic_id']] = 1; - } - else - { - $topic_replies_real_sql[$post_data['topic_id']]++; + $topic_replies_real_sql[$post_data['topic_id']] = 0; } + $topic_replies_real_sql[$post_data['topic_id']]++; } $post_disapprove_sql[] = $post_id; } - if ($forum_topics_real) + if (sizeof($forum_topics_real)) { - $sql = 'UPDATE ' . FORUMS_TABLE . " - SET forum_topics_real = forum_topics_real - $forum_topics_real - WHERE forum_id = $forum_id"; - $db->sql_query($sql); + foreach ($forum_topics_real as $forum_id => $topics_real) + { + $sql = 'UPDATE ' . FORUMS_TABLE . " + SET forum_topics_real = forum_topics_real - $topics_real + WHERE forum_id = $forum_id"; + $db->sql_query($sql); + } } if (sizeof($topic_replies_real_sql)) @@ -722,8 +744,12 @@ function disapprove_post($post_id_list, $mode) unset($post_disapprove_sql, $topic_replies_real_sql); update_post_information('topic', array_keys($topic_id_list)); - update_post_information('forum', $forum_id); - unset($topic_id_list); + + if (sizeof($forum_id_list)) + { + update_post_information('forum', array_keys($forum_id_list)); + } + unset($topic_id_list, $forum_id_list); $messenger = new messenger(); @@ -753,16 +779,15 @@ function disapprove_post($post_id_list, $mode) ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } unset($post_info, $disapprove_reason); - if ($forum_topics_real) + $messenger->save_queue(); + + if (sizeof($forum_topics_real)) { - $success_msg = ($forum_topics_real == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS'; + $success_msg = ($num_disapproved == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS'; } else { diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index ebd1295090..7a84c872a5 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -64,7 +64,7 @@ class mcp_reports // closed reports are accessed by report id $report_id = request_var('r', 0); - $sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username + $sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.user_colour FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id AND r.report_closed = 0") . ' AND rr.reason_id = r.reason_id @@ -107,14 +107,6 @@ class mcp_reports ); } - // Set some vars - if ($post_info['user_id'] == ANONYMOUS) - { - $poster = ($post_info['post_username']) ? $post_info['post_username'] : $user->lang['GUEST']; - } - - $poster = ($post_info['user_colour']) ? '<span style="color:#' . $post_info['user_colour'] . '">' . $post_info['username'] . '</span>' : $post_info['username']; - // Process message, leave it uncensored $message = $post_info['post_text']; $message = str_replace("\n", '<br />', $message); @@ -129,7 +121,7 @@ class mcp_reports $template->assign_vars(array( 'S_MCP_REPORT' => true, - 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&p=$post_id&f=$forum_id"), + 'S_CLOSE_ACTION' => $this->u_action . '&p=' . $post_id . 'f=' . $forum_id, 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], @@ -144,22 +136,28 @@ class mcp_reports 'U_MCP_WARN_REPORTER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), - 'U_VIEW_PROFILE' => ($post_info['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $post_info['user_id']) : '', - 'U_VIEW_REPORTER_PROFILE' => ($report['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $report['user_id']) : '', 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']), 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']), - 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&mode=reports' : '&mode=reports_closed') . '&start=' . $start) . '">', '</a>'), + 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&mode=reports' : '&mode=reports_closed') . '&start=' . $start . '&f=' . $post_info['forum_id']) . '">', '</a>'), 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']), 'REPORT_REASON_TITLE' => $reason['title'], 'REPORT_REASON_DESCRIPTION' => $reason['description'], - 'REPORTER_NAME' => ($report['user_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $report['username'], 'REPORT_DATE' => $user->format_date($report['report_time']), 'REPORT_TEXT' => $report['report_text'], - 'POSTER_NAME' => $poster, + 'POST_AUTHOR_FULL' => get_username_string('full', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + + 'REPORTER_FULL' => get_username_string('full', $report['user_id'], $report['username'], $report['user_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $report['user_id'], $report['username'], $report['user_colour']), + 'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']), + 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), @@ -281,7 +279,7 @@ class mcp_reports if (sizeof($report_ids)) { - $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, r.user_id as reporter_id, ru.username as reporter_name, r.report_time, r.report_id + $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . ' AND t.topic_id = p.topic_id @@ -293,15 +291,6 @@ class mcp_reports $report_data = $rowset = array(); while ($row = $db->sql_fetchrow($result)) { - if ($row['poster_id'] == ANONYMOUS) - { - $poster = (!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']; - } - else - { - $poster = $row['username']; - } - $global_topic = ($row['forum_id']) ? false : true; if ($global_topic) { @@ -312,15 +301,21 @@ class mcp_reports 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&f={$row['forum_id']}&r={$row['report_id']}"), - 'U_VIEW_POSTER_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['poster_id']) : '', - 'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['reporter_id']) : '', + + 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + + 'REPORTER_FULL' => get_username_string('full', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'REPORTER' => get_username_string('username', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), + 'U_REPORTER' => get_username_string('profile', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']), 'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], - 'POSTER' => $poster, 'POST_ID' => $row['post_id'], 'POST_SUBJECT' => $row['post_subject'], 'POST_TIME' => $user->format_date($row['post_time']), - 'REPORTER' => ($row['reporter_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $row['reporter_name'], 'REPORT_TIME' => $user->format_date($row['report_time']), 'TOPIC_TITLE' => $row['topic_title']) ); @@ -335,7 +330,7 @@ class mcp_reports 'L_TITLE' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN'] : $user->lang['MCP_REPORTS_CLOSED'], 'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '', - 'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')), + 'S_MCP_ACTION' => $this->u_action, 'S_FORUM_OPTIONS' => $forum_options, 'S_CLOSED' => ($mode == 'reports_closed') ? true : false, @@ -359,18 +354,22 @@ function close_report($post_id_list, $mode, $action) global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_report'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report'))) { trigger_error('NOT_AUTHORIZED'); } if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false) { - $redirect = request_var('redirect', build_url(array('mode')) . '&mode=reports'); + $redirect = request_var('redirect', build_url(array('mode', '_f_', 'r')) . '&mode=reports'); + } + else if ($action == 'close' && !request_var('r', 0)) + { + $redirect = request_var('redirect', build_url(array('mode', '_f_', 'p')) . '&mode=reports'); } else { - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_'))); } $success_msg = ''; @@ -378,7 +377,6 @@ function close_report($post_id_list, $mode, $action) 'i' => 'reports', 'mode' => $mode, 'post_id_list' => $post_id_list, - 'f' => $forum_id, 'action' => $action, 'redirect' => $redirect) ); @@ -496,13 +494,12 @@ function close_report($post_id_list, $mode, $action) ); $messenger->send($reporter['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } unset($notify_reporters, $post_info); + $messenger->save_queue(); + $success_msg = (sizeof($post_id_list) == 1) ? 'REPORT_' . strtoupper($action) . 'D_SUCCESS' : 'REPORTS_' . strtoupper($action) . 'D_SUCCESS'; } else diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 3b674139e9..ae4ed9850c 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -32,14 +32,12 @@ function mcp_topic_view($id, $mode, $action) // Set up some vars $icon_id = request_var('icon', 0); - $subject = request_var('subject', '', true); + $subject = utf8_normalize_nfc(request_var('subject', '', true)); $start = request_var('start', 0); $to_topic_id = request_var('to_topic_id', 0); $to_forum_id = request_var('to_forum_id', 0); $post_id_list = request_var('post_id_list', array(0)); - utf8_normalize_nfc(&$subject); - // Split Topic? if ($action == 'split_all' || $action == 'split_beyond') { @@ -83,10 +81,11 @@ function mcp_topic_view($id, $mode, $action) $sql = 'SELECT u.username, u.user_colour, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u - WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . " - p.topic_id = {$topic_id} + WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . ' + p.topic_id = ' . $topic_id . ' ' . + ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . ' AND p.poster_id = u.user_id - ORDER BY $sort_order_sql"; + ORDER BY ' . $sort_order_sql; $result = $db->sql_query_limit($sql, $posts_per_page, $start); $rowset = array(); @@ -107,8 +106,6 @@ function mcp_topic_view($id, $mode, $action) foreach ($rowset as $i => $row) { $has_unapproved_posts = false; - $poster = ($row['poster_id'] != ANONYMOUS) ? $row['username'] : ((!$row['post_username']) ? $user->lang['GUEST'] : $row['post_username']); - $poster = ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster; $message = $row['post_text']; $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title']; @@ -127,7 +124,11 @@ function mcp_topic_view($id, $mode, $action) } $template->assign_block_vars('postrow', array( - 'POSTER_NAME' => $poster, + 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_DATE' => $user->format_date($row['post_time']), 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, @@ -141,8 +142,8 @@ function mcp_topic_view($id, $mode, $action) 'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details", - 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']), - 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id'])) + 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', + 'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') ); unset($rowset[$i]); @@ -179,7 +180,7 @@ function mcp_topic_view($id, $mode, $action) $template->assign_vars(array( 'TOPIC_TITLE' => $topic_info['topic_title'], - 'U_VIEWTOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']), + 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']), 'TO_TOPIC_ID' => $to_topic_id, 'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '', @@ -198,6 +199,7 @@ function mcp_topic_view($id, $mode, $action) 'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false, 'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false, 'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false, + 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, 'S_REPORT_VIEW' => ($action == 'reports') ? true : false, 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, @@ -223,6 +225,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) global $db, $template, $user, $phpEx, $phpbb_root_path, $auth; $post_id_list = request_var('post_id_list', array(0)); + $forum_id = request_var('forum_id', 0); $start = request_var('start', 0); if (!sizeof($post_id_list)) @@ -231,7 +234,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) return; } - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_split'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split'))) { return; } @@ -430,7 +433,7 @@ function merge_posts($topic_id, $to_topic_id) return; } - if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_merge'))) + if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge'))) { return; } @@ -445,7 +448,6 @@ function merge_posts($topic_id, $to_topic_id) 'action' => 'merge_posts', 'start' => $start, 'redirect' => $redirect, - 'f' => $forum_id, 't' => $topic_id) ); $success_msg = $return_link = ''; @@ -465,7 +467,7 @@ function merge_posts($topic_id, $to_topic_id) if (sizeof($topic_data)) { - $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $forum_id . '&t=' . $topic_id) . '">', '</a>'); + $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_data['forum_id'] . '&t=' . $topic_id) . '">', '</a>'); } // Link to the new topic diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index da76dc8b58..ef8d0132fc 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -88,9 +88,12 @@ function mcp_warn_front_view($id, $mode) { $template->assign_block_vars('highest', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNINGS' => $row['user_warnings'], ) @@ -99,7 +102,7 @@ function mcp_warn_front_view($id, $mode) // And now the 5 most recent users to get in trouble - $sql = 'SELECT u.user_id, u.username, u.user_warnings, w.warning_time + $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_warnings, w.warning_time FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w WHERE u.user_id = w.user_id ORDER BY w.warning_time DESC'; @@ -109,9 +112,12 @@ function mcp_warn_front_view($id, $mode) { $template->assign_block_vars('latest', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['warning_time']), 'WARNINGS' => $row['user_warnings'], ) @@ -137,7 +143,7 @@ function mcp_warn_list_view($id, $mode, $action) $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']); - $sort_by_sql = array('a' => 'username', 'b' => 'user_last_warning', 'c' => 'user_warnings'); + $sort_by_sql = array('a' => 'username_clean', 'b' => 'user_last_warning', 'c' => 'user_warnings'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -155,9 +161,12 @@ function mcp_warn_list_view($id, $mode, $action) { $template->assign_block_vars('user', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNINGS' => $row['user_warnings'], ) @@ -266,6 +275,7 @@ function mcp_warn_post_view($id, $mode, $action) // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -278,8 +288,8 @@ function mcp_warn_post_view($id, $mode, $action) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } @@ -350,6 +360,7 @@ function mcp_warn_user_view($id, $mode, $action) // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -362,8 +373,8 @@ function mcp_warn_user_view($id, $mode, $action) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 6538bd7721..797c2f5cfd 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -86,10 +86,13 @@ class bbcode_firstpass extends bbcode // Add newline at the end and in front of each quote block to prevent parsing errors (urls, smilies, etc.) if (strpos($this->message, '[quote') !== false) { - $in = str_replace("\r\n", "\n", $this->message); + $this->message = str_replace("\r\n", "\n", $this->message); - $this->message = preg_replace(array('#\[quote(=".*?")?\]([^\n])#is', '#([^\n])\[\/quote\]#is'), array("[quote\\1]\n\\2", "\\1\n[/quote]"), $this->message); - $this->message = preg_replace(array('#\[quote(=".*?")?\]([^\n])#is', '#([^\n])\[\/quote\]#is'), array("[quote\\1]\n\\2", "\\1\n[/quote]"), $this->message); + // We strip newlines and spaces after and before quotes in quotes (trimming) + $this->message = preg_replace(array('#\[quote(=".*?")?\]([\s|\n]+)#ius', '#([\s|\n]+)\[\/quote\]#ius'), array("[quote\\1]", "[/quote]"), $this->message); + + // Now we add exactly one newline + $this->message = preg_replace(array('#\[quote(=".*?")?\]#is', '#\[\/quote\]#is'), array("[quote\\1]\n", "\n[/quote]"), $this->message); } // Add other checks which needs to be placed before actually parsing anything (be it bbcodes, smilies, urls...) @@ -442,7 +445,7 @@ class bbcode_firstpass extends bbcode } $code = preg_replace('#^<span class="[a-z]+"><span class="([a-z]+)">(.*)</span></span>#s', '<span class="$1">$2</span>', $code); - $code = preg_replace('#(?:[\n\r\s\t]| )*</span>$#', '</span>', $code); + $code = preg_replace('#(?:[\n\r\s\t]| )*</span>$#u', '</span>', $code); // remove newline at the end if (!empty($code) && $code{strlen($code)-1} == "\n") @@ -600,7 +603,7 @@ class bbcode_firstpass extends bbcode $pos = strlen($in); for ($i = 0, $tok_len = strlen($tok); $i < $tok_len; ++$i) { - $tmp_pos = strpos($in, $tok{$i}); + $tmp_pos = strpos($in, $tok[$i]); if ($tmp_pos !== false && $tmp_pos < $pos) { $pos = $tmp_pos; @@ -608,7 +611,7 @@ class bbcode_firstpass extends bbcode } $buffer .= substr($in, 0, $pos); - $tok = $in{$pos}; + $tok = $in[$pos]; $in = substr($in, $pos + 1); if ($tok == ']') @@ -616,10 +619,15 @@ class bbcode_firstpass extends bbcode if ($buffer == '/quote' && sizeof($close_tags)) { // we have found a closing tag - // Add space at the end of the closing tag to allow following urls/smilies to be parsed correctly - $out .= array_pop($close_tags) . '] '; + $out .= array_pop($close_tags) . ']'; $tok = '['; $buffer = ''; + + // Add space at the end of the closing tag if not happened before to allow following urls/smilies to be parsed correctly + if (!$in || $in[0] !== ' ') + { + $out .= ' '; + } } else if (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m)) { @@ -656,14 +664,7 @@ class bbcode_firstpass extends bbcode else { $end_tag = array_pop($end_tags); - if ($end_tag != $tag) - { - $error = true; - } - else - { - $error = false; - } + $error = ($end_tag != $tag) ? true : false; } } @@ -696,9 +697,35 @@ class bbcode_firstpass extends bbcode } else { +/** +* Old quote code working fine, but having errors listed in bug #3572 +* +* $out .= $buffer . $tok; +* $tok = ($tok == '[') ? ']' : '[]'; +* $buffer = ''; +*/ + $out .= $buffer . $tok; - // $tok = ($tok == '[') ? ']' : '[]'; - $tok = '[]'; + + if ($tok == '[') + { + // Search the text for the next tok... if an ending quote comes first, then change tok to [] + $pos1 = strpos($in, '[/quote'); + $pos2 = strpos($in, ']'); + + if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2)) + { + $tok = '[]'; + } + else + { + $tok = ']'; + } + } + else + { + $tok = '[]'; + } $buffer = ''; } } @@ -906,14 +933,14 @@ class parse_message extends bbcode_firstpass // Do some general 'cleanup' first before processing message, // e.g. remove excessive newlines(?), smilies(?) // Transform \r\n and \r into \n - $match = array('#\r\n?#', "#([\n][\s]+){3,}#", '#(script|about|applet|activex|chrome):#i'); + $match = array('#\r\n?#', "#([\n][\s]+){3,}#u", '#(script|about|applet|activex|chrome):#i'); $replace = array("\n", "\n\n", "\\1:"); $this->message = preg_replace($match, $replace, trim($this->message)); // Message length check. -1 disables this check completely. if ($config['max_' . $mode . '_chars'] != -1) { - $msg_len = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#is', ' ', $this->message)); + $msg_len = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message)); if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars']) { @@ -1138,8 +1165,7 @@ class parse_message extends bbcode_firstpass $error = array(); $num_attachments = sizeof($this->attachment_data); - $this->filename_data['filecomment'] = request_var('filecomment', '', true); - utf8_normalize_nfc(&$this->filename_data['filecomment']); + $this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true)); $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false; $add_file = (isset($_POST['add_file'])) ? true : false; @@ -1256,8 +1282,7 @@ class parse_message extends bbcode_firstpass { if ($edit_comment) { - $actual_comment_list = request_var('comment_list', array(''), true); - utf8_normalize_nfc(&$actual_comment_list); + $actual_comment_list = utf8_normalize_nfc(request_var('comment_list', array(''), true)); $edit_comment = request_var('edit_comment', array(0 => '')); $edit_comment = key($edit_comment); @@ -1322,8 +1347,7 @@ class parse_message extends bbcode_firstpass { global $user, $db, $phpbb_root_path, $phpEx, $config; - $this->filename_data['filecomment'] = request_var('filecomment', '', true); - utf8_normalize_nfc(&$this->filename_data['filecomment']); + $this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true)); $attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array(); $this->attachment_data = array(); diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 755bd5b814..8a102a321d 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -103,9 +103,9 @@ class fulltext_mysql extends search_backend * Splits keywords entered by a user into an array of words stored in $this->split_words * Stores the tidied search query in $this->search_query * - * @param string $keywords Contains the keyword as entered by the user + * @param string &$keywords Contains the keyword as entered by the user * @param string $terms is either 'all' or 'any' - * @return false if no valid keywords were found and otherwise true + * @return bool false if no valid keywords were found and otherwise true */ function split_keywords(&$keywords, $terms) { @@ -116,7 +116,7 @@ class fulltext_mysql extends search_backend if ($terms == 'all') { - $match = array('#\sand\s#i', '#\sor\s#i', '#\snot\s#i', '#\+#', '#-#', '#\|#'); + $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#'); $replace = array(' +', ' |', ' -', ' +', ' -', ' |'); $keywords = preg_replace($match, $replace, $keywords); @@ -215,7 +215,7 @@ class fulltext_mysql extends search_backend /** * Performs a search on keywords depending on display specific params. * - * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered * @param int $start indicates the first index of the page * @param int $per_page number of ids each page is supposed to contain * @return total number of results @@ -412,7 +412,7 @@ class fulltext_mysql extends search_backend /** * Performs a search on an author's posts without caring about message contents. Depends on display specific params * - * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered * @param int $start indicates the first index of the page * @param int $per_page number of ids each page is supposed to contain * @return total number of results diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index b47076228a..df000f5e04 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -39,7 +39,7 @@ class fulltext_native extends search_backend /** * Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded. * - * @param boolean|string $error is passed by reference and should either be set to false on success or an error message on failure. + * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure. * * @access public */ @@ -173,7 +173,7 @@ class fulltext_native extends search_backend { $words = array(); - preg_match_all('#([^\\s+\\-|()]+)(?:$|[\\s+\\-|()])#', $keywords, $words); + preg_match_all('#([^\\s+\\-|()]+)(?:$|[\\s+\\-|()])#u', $keywords, $words); if (sizeof($words[1])) { $keywords = '(' . implode('|', $words[1]) . ')'; @@ -184,7 +184,7 @@ class fulltext_native extends search_backend $this->search_query = $keywords; $exact_words = array(); - preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#', $keywords, $exact_words); + preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#u', $keywords, $exact_words); $exact_words = $exact_words[1]; if (sizeof($exact_words)) @@ -341,17 +341,17 @@ class fulltext_native extends search_backend * Performs a search on keywords depending on display specific params. You have to run split_keywords() first. * * @param string $type contains either posts or topics depending on what should be searched for - * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched) - * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words) - * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query - * @param string $sort_key is the key of $sort_by_sql for the selected sorting - * @param string $sort_dir is either a or d representing ASC and DESC - * @param string $sort_days specifies the maximum amount of days a post may be old - * @param array $ex_fid_ary specifies an array of forum ids which should not be searched - * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts - * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched - * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty - * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered + * @param string &$fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched) + * @param string &$terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words) + * @param array &$sort_by_sql contains SQL code for the ORDER BY part of a query + * @param string &$sort_key is the key of $sort_by_sql for the selected sorting + * @param string &$sort_dir is either a or d representing ASC and DESC + * @param string &$sort_days specifies the maximum amount of days a post may be old + * @param array &$ex_fid_ary specifies an array of forum ids which should not be searched + * @param array &$m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts + * @param int &$topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched + * @param array &$author_ary an array of author ids if the author should be ignored during the search the array is empty + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered * @param int $start indicates the first index of the page * @param int $per_page number of ids each page is supposed to contain * @return boolean|int total number of results @@ -701,15 +701,15 @@ class fulltext_native extends search_backend * Performs a search on an author's posts without caring about message contents. Depends on display specific params * * @param string $type contains either posts or topics depending on what should be searched for - * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query - * @param string $sort_key is the key of $sort_by_sql for the selected sorting - * @param string $sort_dir is either a or d representing ASC and DESC - * @param string $sort_days specifies the maximum amount of days a post may be old - * @param array $ex_fid_ary specifies an array of forum ids which should not be searched - * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts - * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched - * @param array $author_ary an array of author ids - * @param array $id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered + * @param array &$sort_by_sql contains SQL code for the ORDER BY part of a query + * @param string &$sort_key is the key of $sort_by_sql for the selected sorting + * @param string &$sort_dir is either a or d representing ASC and DESC + * @param string &$sort_days specifies the maximum amount of days a post may be old + * @param array &$ex_fid_ary specifies an array of forum ids which should not be searched + * @param array &$m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts + * @param int &$topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched + * @param array &$author_ary an array of author ids + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered * @param int $start indicates the first index of the page * @param int $per_page number of ids each page is supposed to contain * @return boolean|int total number of results @@ -996,8 +996,8 @@ class fulltext_native extends search_backend * * @param string $mode Contains the post mode: edit, post, reply, quote * @param int $post_id The id of the post which is modified/created - * @param string $message New or updated post content - * @param string $subject New or updated post subject + * @param string &$message New or updated post content + * @param string &$subject New or updated post subject * @param int $poster_id Post author's user id * @param int $forum_id The id of the forum in which the post is located * @@ -1296,6 +1296,8 @@ class fulltext_native extends search_backend * @param string $allowed_chars String of special chars to allow * @param string $encoding Text encoding * @return string Cleaned up text, only alphanumeric chars are left + * + * @todo normalizer::cleanup being able to be used? */ function cleanup($text, $allowed_chars = null, $encoding = 'utf-8') { @@ -1303,9 +1305,7 @@ class fulltext_native extends search_backend static $conv = array(), $conv_loaded = array(); $words = $allow = array(); - /** - * Convert the text to UTF-8 - */ + // Convert the text to UTF-8 $encoding = strtolower($encoding); if ($encoding != 'utf-8') { @@ -1330,7 +1330,7 @@ class fulltext_native extends search_backend * If we use it more widely, an instance of that class should be held in a * a global variable instead */ - $text = utf_normalizer::nfc($text); + utf_normalizer::nfc($text); /** * The first thing we do is: diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php index 4c8387bd22..ee9fa0ea98 100755 --- a/phpBB/includes/search/search.php +++ b/phpBB/includes/search/search.php @@ -89,8 +89,8 @@ class search_backend /** * Retrieves cached search results * - * @param int result_count will contain the number of all results for the search (not only for the current page) - * @param array id_ary is filled with the ids belonging to the requested page that are stored in the cache + * @param int &$result_count will contain the number of all results for the search (not only for the current page) + * @param array &$id_ary is filled with the ids belonging to the requested page that are stored in the cache * * @return int SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE */ @@ -151,7 +151,7 @@ class search_backend /** * Caches post/topic ids * - * @param array id_ary contains a list of post or topic ids that shall be cached, the first element + * @param array &$id_ary contains a list of post or topic ids that shall be cached, the first element * must have the absolute index $start in the result set. */ function save_ids($search_key, $keywords, $author_ary, $result_count, &$id_ary, $start, $sort_dir) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index b69bcc5f44..ad6a049a65 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -140,7 +140,7 @@ class session { global $phpEx, $SID, $_SID, $db, $config, $phpbb_root_path; - // Give us some basic informations + // Give us some basic information $this->time_now = time(); $this->cookie_data = array('u' => 0, 'k' => ''); $this->update_session_page = $update_session_page; @@ -450,7 +450,6 @@ class session $this->check_ban($this->data['user_id'], $this->ip); } - $this->data['is_registered'] = (!$bot && $this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false; $this->data['is_bot'] = ($bot) ? true : false; @@ -471,6 +470,8 @@ class session // Only update session DB a minute or so after last update or if page changes if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) { + $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now; + $sql_ary = array('session_time' => $this->time_now, 'session_last_visit' => $this->time_now, 'session_admin' => 0); if ($this->update_session_page) @@ -481,6 +482,12 @@ class session $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE session_id = '" . $db->sql_escape($this->session_id) . "'"; $db->sql_query($sql); + + // Update the last visit time + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_lastvisit = ' . (int) $this->data['session_time'] . ' + WHERE user_id = ' . (int) $this->data['user_id']; + $db->sql_query($sql); } $SID = '?sid='; @@ -1032,7 +1039,8 @@ class user extends session /** * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language - * @todo if re-enabled we need to make sure only those languages installed are checked + * If re-enabled we need to make sure only those languages installed are checked + * Commented out so we do not loose the code. if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { @@ -1200,6 +1208,23 @@ class user extends session $this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang']; + // Disable board if the install/ directory is still present + // For the brave development army we do not care about this, else we need to comment out this everytime we develop locally + if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install')) + { + // Adjust the message slightly according to the permissions + if ($auth->acl_gets('a_', 'm_')) + { + $message = 'REMOVE_INSTALL'; + } + else + { + $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; + } + + trigger_error($message); + } + // Is board disabled and user not an admin or moderator? if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) { diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 36a0b8920b..76a89869f5 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -368,23 +368,12 @@ class template /** * Change already assigned key variable pair (one-dimensional - single loop entry) * - * Some Examples: - * <code> - * alter_block_array('loop', $vararray); // Insert vararray at the beginning - * alter_block_array('loop', $vararray, 2); // Insert vararray at position 2 - * alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value' - * alter_block_array('loop', $vararray, false); // Insert vararray at first position - * alter_block_array('loop', $vararray, true); // Insert vararray at last position (assign_block_vars equivalence) + * An example of how to use this function: + * {@example alter_block_array.php} * - * alter_block_array('loop', $vararray, 2, 'change'); // Change/Merge vararray with existing array at position 2 - * alter_block_array('loop', $vararray, array('KEY' => 'value'), 'change'); // Change/Merge vararray with existing array at the position where the key 'KEY' has the value of 'value' - * alter_block_array('loop', $vararray, false, 'change'); // Change/Merge vararray with existing array at first position - * alter_block_array('loop', $vararray, true, 'change'); // Change/Merge vararray with existing array at last position - * </code> - * - * @param string $blockname the blockname, for example 'loop' - * @param array $vararray the var array to insert/add or merge - * @param mixed $key Key to search for + * @param string $blockname the blockname, for example 'loop' + * @param array $vararray the var array to insert/add or merge + * @param mixed $key Key to search for * * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] * @@ -393,7 +382,7 @@ class template * If key is false the position is set to 0 * If key is true the position is set to the last entry * - * @param insert|change $mode Mode to execute + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') * * If insert, the vararray is inserted at the given position (position counting from zero). * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). @@ -401,7 +390,7 @@ class template * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) * - * @return false on error, true on success + * @return bool false on error, true on success * @access public */ function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index ad6bde9be7..1536411e9d 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -196,7 +196,6 @@ class ucp_groups ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $db->sql_freeresult($result); @@ -312,10 +311,11 @@ class ucp_groups // Hide hidden groups unless user is an admin with group privileges $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')'; + $sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type FROM ' . GROUPS_TABLE . ' - WHERE ' . $db->sql_in_set('group_id', $group_id_ary, true) . " - AND group_type $sql_and + WHERE ' . ((sizeof($group_id_ary)) ? $db->sql_in_set('group_id', $group_id_ary, true) . ' AND ' : '') . " + group_type $sql_and ORDER BY group_type DESC, group_name"; $result = $db->sql_query($sql); @@ -574,6 +574,8 @@ class ucp_groups if (isset($group_row['group_avatar']) && $group_row['group_avatar']) { + $avatar_img = ''; + switch ($group_row['group_avatar_type']) { case AVATAR_UPLOAD: @@ -584,8 +586,8 @@ class ucp_groups $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } else @@ -877,11 +879,12 @@ class ucp_groups } $name_ary = array_unique(explode("\n", $name_ary)); + $group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name']; $default = request_var('default', 0); // Add user/s to group - if ($error = group_user_add($group_id, false, $name_ary, $group_row['group_name'], $default, 0, 0, $group_row)) + if ($error = group_user_add($group_id, false, $name_ary, $group_name, $default, 0, 0, $group_row)) { trigger_error($user->lang[$error] . $return_page); } diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 67e1c4d155..57a8d0f86a 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -125,14 +125,15 @@ class ucp_main } $template->assign_block_vars('topicrow', array( - 'FORUM_ID' => $forum_id, - 'TOPIC_ID' => $topic_id, - 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], - 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), - 'LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : $row['topic_last_poster_name'], - 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '', - 'TOPIC_TITLE' => censor_text($row['topic_title']), - 'TOPIC_TYPE' => $topic_type, + 'FORUM_ID' => $forum_id, + 'TOPIC_ID' => $topic_id, + 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], + 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'TOPIC_TITLE' => censor_text($row['topic_title']), + 'TOPIC_TYPE' => $topic_type, 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), @@ -144,7 +145,7 @@ class ucp_main 'S_UNREAD' => $unread_topic, 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '', + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&t=$topic_id&view=unread") . '#unread', 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&t=$topic_id")) ); @@ -290,16 +291,11 @@ class ucp_main if ($row['forum_last_post_id']) { $last_post_time = $user->format_date($row['forum_last_post_time']); - - $last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST']; - $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : ''; - $last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['forum_last_poster_id']); - $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id']; } else { - $last_post_time = $last_poster = $last_poster_url = $last_post_url = ''; + $last_post_time = $last_post_url = ''; } $template->assign_block_vars('forumrow', array( @@ -312,10 +308,12 @@ class ucp_main 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'], 'LAST_POST_TIME' => $last_post_time, - 'LAST_POST_AUTHOR' => $last_poster, - 'LAST_POST_AUTHOR_COLOUR' => $last_poster_colour, - 'U_LAST_POST_AUTHOR' => $last_poster_url, + 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), + 'U_LAST_POST' => $last_post_url, 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])) ); @@ -420,7 +418,7 @@ class ucp_main $topic_id = $row['topic_moved_id']; } - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); @@ -430,14 +428,20 @@ class ucp_main $template->assign_block_vars('topicrow', array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, - 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'], - 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '', 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'], - 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '', + + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), 'REPLIES' => $replies, @@ -460,8 +464,6 @@ class ucp_main 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '', - 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '', 'U_VIEW_TOPIC' => $view_topic_url) ); } @@ -577,7 +579,7 @@ class ucp_main $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; $unread_topic = false; @@ -594,14 +596,16 @@ class ucp_main 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false, - 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'], - 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '', + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'], - 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '', + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")), 'POSTED_AT' => $user->format_date($row['topic_time']), @@ -612,8 +616,8 @@ class ucp_main 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '', - 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '', + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_VIEW_TOPIC' => $view_topic_url, 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_MOVE_UP' => ($row['order_id'] != 1) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_up=' . $row['order_id']) : '', @@ -660,11 +664,9 @@ class ucp_main if ($submit && $edit) { - $draft_subject = request_var('subject', '', true); - $draft_message = request_var('message', '', true); + $draft_subject = utf8_normalize_nfc(request_var('subject', '', true)); + $draft_message = utf8_normalize_nfc(request_var('message', '', true)); - utf8_normalize_nfc(array(&$draft_subject, &$draft_message)); - if ($draft_message && $draft_subject) { $draft_row = array( diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 14afc81686..b51f265df3 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -10,9 +10,8 @@ /** * Private Message Class * -* @param int $folder display folder with the id used -* @param inbox|outbox|sentbox display folder with the associated name -* +* $_REQUEST['folder'] display folder with the id used +* $_REQUEST['folder'] inbox|outbox|sentbox display folder with the associated name * * Display Messages (default to inbox) - mode=view * Display single message - mode=view&p=[msg_id] or &p=[msg_id] (short linkage) @@ -241,10 +240,11 @@ class ucp_pm } // If new messages arrived, place them into the appropiate folder - $num_not_moved = 0; + $num_not_moved = $num_removed = 0; + if ($user->data['user_new_privmsg'] && $action == 'view_folder') { - place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); + $return = place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); $num_not_moved = $user->data['user_new_privmsg']; // Make sure num_not_moved is valid. @@ -257,6 +257,9 @@ class ucp_pm $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']; } if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX) @@ -351,8 +354,10 @@ class ucp_pm 'CUR_FOLDER_ID' => $folder_id, 'CUR_FOLDER_NAME' => $folder_status['folder_name'], 'NUM_NOT_MOVED' => $num_not_moved, + 'NUM_REMOVED' => $num_removed, 'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $this->u_action . '&folder=' . $folder_id . '&release=1">', '</a>'), 'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved), + 'RULE_REMOVED_MESSAGES' => ($num_removed == 1) ? $user->lang['RULE_REMOVED_MESSAGE'] : sprintf($user->lang['RULE_REMOVED_MESSAGES'], $num_removed), 'S_FOLDER_OPTIONS' => $s_folder_options, 'S_TO_FOLDER_OPTIONS' => $s_to_folder_options, diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 98aa35117b..3cfb2f37a9 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -131,7 +131,7 @@ function compose_pm($id, $mode, $action) } else { - $sql = 'SELECT t.*, p.*, u.username as quote_username + $sql = 'SELECT t.folder_id, p.*, u.username as quote_username FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u WHERE t.user_id = ' . $user->data['user_id'] . " AND p.author_id = u.user_id @@ -147,7 +147,7 @@ function compose_pm($id, $mode, $action) } // check for outbox (not read) status, we do not allow editing if one user already having the message - $sql = 'SELECT p.*, t.* + $sql = 'SELECT p.*, t.folder_id FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p WHERE t.user_id = ' . $user->data['user_id'] . ' AND t.folder_id = ' . PRIVMSGS_OUTBOX . " @@ -302,9 +302,7 @@ function compose_pm($id, $mode, $action) { delete_pm($user->data['user_id'], $msg_id, $folder_id); - /** - * @todo jump to next message in "history"? - */ + // jump to next message in "history"? nope, not for the moment. But able to be included later. $meta_info = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&folder=$folder_id"); $message = $user->lang['MESSAGE_DELETED']; @@ -347,7 +345,7 @@ function compose_pm($id, $mode, $action) WHERE post_msg_id = $msg_id AND in_message = 1 AND is_orphan = 0 - ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC'); + ORDER BY filetime DESC"; $result = $db->sql_query($sql); $message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result)); $db->sql_freeresult($result); @@ -396,12 +394,10 @@ function compose_pm($id, $mode, $action) // Save Draft if ($save && $auth->acl_get('u_savedrafts')) { - $subject = request_var('subject', '', true); + $subject = utf8_normalize_nfc(request_var('subject', '', true)); $subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject; - $message = request_var('message', '', true); + $message = utf8_normalize_nfc(request_var('message', '', true)); - utf8_normalize_nfc(array(&$subject, &$message)); - if ($subject && $message) { if (confirm_box(true)) @@ -476,11 +472,9 @@ function compose_pm($id, $mode, $action) if ($submit || $preview || $refresh) { - $subject = request_var('subject', '', true); - $message_parser->message = request_var('message', '', true); + $subject = utf8_normalize_nfc(request_var('subject', '', true)); + $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); - utf8_normalize_nfc(array(&$subject, &$message_parser->message)); - $icon_id = request_var('icon', 0); $enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true; @@ -756,15 +750,30 @@ function compose_pm($id, $mode, $action) $type = ($type == 'u') ? 'u' : 'g'; $id = (int) $id; - $template->assign_block_vars($field . '_recipient', array( - 'NAME' => ${$type}[$id]['name'], - 'IS_GROUP' => ($type == 'g'), - 'IS_USER' => ($type == 'u'), - 'COLOUR' => (${$type}[$id]['colour']) ? ${$type}[$id]['colour'] : '', + $tpl_ary = array( + 'IS_GROUP' => ($type == 'g') ? true : false, + 'IS_USER' => ($type == 'u') ? true : false, 'UG_ID' => $id, - 'U_VIEW' => ($type == 'u') ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $id) : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id), - 'TYPE' => $type) + 'NAME' => ${$type}[$id]['name'], + 'COLOUR' => (${$type}[$id]['colour']) ? '#' . ${$type}[$id]['colour'] : '', + 'TYPE' => $type, ); + + if ($type == 'u') + { + $tpl_ary = array_merge($tpl_ary, array( + 'U_VIEW' => get_username_string('profile', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']), + 'NAME_FULL' => get_username_string('full', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']), + )); + } + else + { + $tpl_ary = array_merge($tpl_ary, array( + 'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id), + )); + } + + $template->assign_block_vars($field . '_recipient', $tpl_ary); } } } @@ -934,41 +943,35 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ $friend_list = (is_array($_REQUEST['add_' . $type])) ? array_map('intval', array_keys($_REQUEST['add_' . $type])) : array(); $user_id_ary = array_merge($user_id_ary, $friend_list); - if (sizeof($user_id_ary)) + foreach ($user_id_ary as $user_id) { - // We need to check their PM status (do they want to receive PM's?) - // Only check if not a moderator or admin, since they are allowed to override this user setting - if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) + if ($user_id == ANONYMOUS) { - $sql = 'SELECT user_id - FROM ' . USERS_TABLE . ' - WHERE ' . $db->sql_in_set('user_id', $user_id_ary) . ' - AND user_allow_pm = 1'; - $result = $db->sql_query($sql); + continue; + } - while ($row = $db->sql_fetchrow($result)) - { - if ($row['user_id'] == ANONYMOUS) - { - continue; - } + $address_list['u'][$user_id] = $type; + } + } - $address_list['u'][$row['user_id']] = $type; - } - $db->sql_freeresult($result); - } - else - { - foreach ($user_id_ary as $user_id) - { - if ($user_id == ANONYMOUS) - { - continue; - } + // Check for disallowed recipients + if (!empty($address_list['u'])) + { + // We need to check their PM status (do they want to receive PM's?) + // Only check if not a moderator or admin, since they are allowed to override this user setting + if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) + { + $sql = 'SELECT user_id + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_id', array_keys($address_list['u'])) . ' + AND user_allow_pm = 0'; + $result = $db->sql_query($sql); - $address_list['u'][$user_id] = $type; - } + while ($row = $db->sql_fetchrow($result)) + { + unset($address_list['u'][$row['user_id']]); } + $db->sql_freeresult($result); } } } diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index 9b86553569..9ce7f87740 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -247,12 +247,10 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $rule_option = request_var('rule_option', 0); $cond_option = request_var('cond_option', ''); $action_option = explode('|', request_var('action_option', '')); - $rule_string = ($cond_option != 'none') ? request_var('rule_string', '', true) : ''; + $rule_string = ($cond_option != 'none') ? utf8_normalize_nfc(request_var('rule_string', '', true)) : ''; $rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0; $rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0; - utf8_normalize_nfc(&$rule_string); - $action = (int) $action_option[0]; $folder_id = (int) $action_option[1]; @@ -640,10 +638,8 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule switch ($condition) { case 'text': - $rule_string = request_var('rule_string', '', true); + $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true)); - utf8_normalize_nfc(&$rule_string); - $template->assign_vars(array( 'S_TEXT_CONDITION' => true, 'CURRENT_STRING' => $rule_string, @@ -656,10 +652,8 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule case 'user': $rule_user_id = request_var('rule_user_id', 0); - $rule_string = request_var('rule_string', '', true); + $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true)); - utf8_normalize_nfc(&$rule_string); - if ($rule_string && !$rule_user_id) { $sql = 'SELECT user_id @@ -701,10 +695,8 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule case 'group': $rule_group_id = request_var('rule_group_id', 0); - $rule_string = request_var('rule_string', '', true); + $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true)); - utf8_normalize_nfc(&$rule_string); - $sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')'; $sql = 'SELECT group_id, group_name, group_type FROM ' . GROUPS_TABLE . " diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 862702d7fc..4277639d83 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -163,7 +163,7 @@ function view_folder($id, $mode, $folder_id, $folder) { foreach ($id_ary as $ug_id => $_id) { - $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : ''; + $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="font-weight: bold; color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : ''; if ($type == 'u') { @@ -191,7 +191,6 @@ function view_folder($id, $mode, $folder_id, $folder) $folder_alt = ($row['pm_unread']) ? 'NEW_MESSAGES' : 'NO_NEW_MESSAGES'; // Generate all URIs ... - $message_author = ($row['author_id'] != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['author_id']) . '">' . $row['username'] . '</a>' : $row['username']; $view_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=view&f=$folder_id&p=$message_id"); $remove_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=compose&action=delete&p=$message_id"); @@ -211,9 +210,13 @@ function view_folder($id, $mode, $folder_id, $folder) $template->assign_block_vars('messagerow', array( 'PM_CLASS' => ($row_indicator) ? 'pm_' . $row_indicator . '_colour' : '', + 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['username'], $row['user_colour'], $row['username']), + 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['username'], $row['user_colour'], $row['username']), + 'MESSAGE_AUTHOR' => get_username_string('username', $row['author_id'], $row['username'], $row['user_colour'], $row['username']), + 'U_MESSAGE_AUTHOR' => get_username_string('profile', $row['author_id'], $row['username'], $row['user_colour'], $row['username']), + 'FOLDER_ID' => $folder_id, 'MESSAGE_ID' => $message_id, - 'MESSAGE_AUTHOR' => $message_author, 'SENT_TIME' => $user->format_date($row['message_time']), 'SUBJECT' => censor_text($row['message_subject']), 'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '', @@ -437,7 +440,7 @@ function get_pm_from($folder_id, $folder, $user_id) // PM ordering options $limit_days = array(0 => $user->lang['ALL_MESSAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 't' => 'p.message_time', 's' => 'p.message_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.message_time', 's' => 'p.message_subject'); $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); @@ -516,7 +519,7 @@ function get_pm_from($folder_id, $folder, $user_id) $sql_start = $start; } - $sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username + $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.user_colour FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u WHERE t.user_id = $user_id AND p.author_id = u.user_id diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 8da8f0bd18..9a19baa257 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -49,7 +49,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Assign TO/BCC Addresses to template write_pm_addresses(array('to' => $message_row['to_address'], 'bcc' => $message_row['bcc_address']), $author_id); - $user_info = get_user_informations($author_id, $message_row); + $user_info = get_user_information($author_id, $message_row); // Parse the message and subject $message = $message_row['message_text']; @@ -92,7 +92,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) FROM ' . ATTACHMENTS_TABLE . " WHERE post_msg_id = $msg_id AND in_message = 1 - ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC'; + ORDER BY filetime DESC, post_msg_id ASC"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -165,7 +165,11 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); $template->assign_vars(array( - 'AUTHOR_NAME' => ($user_info['user_colour']) ? '<span style="color:#' . $user_info['user_colour'] . '">' . $user_info['username'] . '</span>' : $user_info['username'], + 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), + 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), + 'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), + 'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), + 'AUTHOR_RANK' => $user_info['rank_title'], 'RANK_IMAGE' => $user_info['rank_image'], 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '', @@ -192,7 +196,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&p=' . $message_row['msg_id'], true, $user->session_id) : '', 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', - 'U_AUTHOR_PROFILE' => ($author_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $author_id) : '', 'U_EMAIL' => $user_info['email'], 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '', 'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '', @@ -314,7 +317,6 @@ function message_history($msg_id, $user_id, $message_row, $folder) foreach ($rowset as $id => $row) { $author_id = $row['author_id']; - $author = $row['username']; $folder_id = (int) $row['folder_id']; $subject = $row['message_subject']; @@ -340,7 +342,11 @@ function message_history($msg_id, $user_id, $message_row, $folder) } $template->assign_block_vars('history_row', array( - 'AUTHOR_NAME' => $author, + 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']), + 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']), + 'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']), + 'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']), + 'SUBJECT' => $subject, 'SENT_DATE' => $user->format_date($row['message_time']), 'MESSAGE' => $message, @@ -351,7 +357,6 @@ function message_history($msg_id, $user_id, $message_row, $folder) 'U_MSG_ID' => $row['msg_id'], 'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'], - 'U_AUTHOR_PROFILE' => ($author_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$author_id") : '', 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '', 'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '') ); @@ -371,9 +376,9 @@ function message_history($msg_id, $user_id, $message_row, $folder) } /** -* Get User Informations (only for message display) +* Get user information (only for message display) */ -function get_user_informations($user_id, $user_row) +function get_user_information($user_id, $user_row) { global $db, $auth, $user, $cache; global $phpbb_root_path, $phpEx, $config; @@ -421,6 +426,7 @@ function get_user_informations($user_id, $user_row) if ($user_row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($user_row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -431,8 +437,8 @@ function get_user_informations($user_id, $user_row) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $user_row['user_avatar']; + $avatar_img .= $user_row['user_avatar']; $user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" alt="' . $user->lang['USER_AVATAR'] . '" />'; } diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 378562a2dd..e72673c023 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -31,7 +31,7 @@ class ucp_prefs $data = array( 'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']), - 'dateformat' => request_var('dateformat', $user->data['user_dateformat']), + 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), 'lang' => request_var('lang', $user->data['user_lang']), 'style' => request_var('style', (int) $user->data['user_style']), 'tz' => request_var('tz', (float) $user->data['user_timezone']), @@ -128,11 +128,11 @@ class ucp_prefs 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']), - 'S_LANG_OPTIONS' => language_select($data['lang']), - 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']), - 'S_TZ_OPTIONS' => tz_select($data['tz']), - 'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false, - 'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false) + 'S_LANG_OPTIONS' => language_select($data['lang']), + 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']), + 'S_TZ_OPTIONS' => tz_select($data['tz'], true), + 'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false, + 'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false) ); break; @@ -140,13 +140,13 @@ class ucp_prefs case 'view': $data = array( - 'topic_sk' => (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't', - 'topic_sd' => (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd', - 'topic_st' => (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0, + 'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'), + 'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'), + 'topic_st' => request_var('topic_st', (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0), - 'post_sk' => (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't', - 'post_sd' => (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a', - 'post_st' => (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0, + 'post_sk' => request_var('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'), + 'post_sd' => request_var('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'), + 'post_st' => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0), 'images' => request_var('images', (bool) $user->optionget('viewimg')), 'flash' => request_var('flash', (bool) $user->optionget('viewflash')), diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 840f63ff48..29055f0d89 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -35,8 +35,8 @@ class ucp_profile $data = array( 'username' => request_var('username', $user->data['username'], true), - 'email' => request_var('email', $user->data['user_email']), - 'email_confirm' => request_var('email_confirm', ''), + 'email' => strtolower(request_var('email', $user->data['user_email'])), + 'email_confirm' => strtolower(request_var('email_confirm', '')), 'new_password' => request_var('new_password', '', true), 'cur_password' => request_var('cur_password', '', true), 'password_confirm' => request_var('password_confirm', '', true), @@ -93,7 +93,7 @@ class ucp_profile 'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'], 'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'], 'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'], - 'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32(strtolower($data['email'])) . strlen($data['email']) : $user->data['user_email_hash'], + 'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32($data['email']) . strlen($data['email']) : $user->data['user_email_hash'], 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? md5($data['new_password']) : $user->data['user_password'], 'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0, ); @@ -125,7 +125,7 @@ class ucp_profile $key_len = ($key_len > 6) ? $key_len : 6; $user_actkey = substr($user_actkey, 0, $key_len); - $messenger = new messenger(); + $messenger = new messenger(false); $template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate'; $messenger->template($template_file, $user->data['user_lang']); @@ -139,7 +139,7 @@ class ucp_profile $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($username), + 'USERNAME' => htmlspecialchars_decode($data['username']), 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") ); @@ -172,8 +172,9 @@ class ucp_profile $messenger->im($row['user_jabber'], $row['username']); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($username), - 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") + 'USERNAME' => htmlspecialchars_decode($data['username']), + 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}", + 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") ); $messenger->send($row['user_notify_type']); @@ -181,8 +182,6 @@ class ucp_profile $db->sql_freeresult($result); } - $messenger->save_queue(); - user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE); $sql_ary += array( @@ -250,16 +249,14 @@ class ucp_profile 'yim' => request_var('yim', $user->data['user_yim']), 'jabber' => request_var('jabber', $user->data['user_jabber']), 'website' => request_var('website', $user->data['user_website']), - 'location' => request_var('location', $user->data['user_from'], true), - 'occupation' => request_var('occupation', $user->data['user_occ'], true), - 'interests' => request_var('interests', $user->data['user_interests'], true), + 'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)), + 'occupation' => utf8_normalize_nfc(request_var('occupation', $user->data['user_occ'], true)), + 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)), 'bday_day' => 0, 'bday_month' => 0, 'bday_year' => 0, ); - utf8_normalize_nfc(array(&$data['location'], &$data['occupation'], &$data['interests'])); - if ($user->data['user_birthday']) { list($data['bday_day'], $data['bday_month'], $data['bday_year']) = explode('-', $user->data['user_birthday']); @@ -412,9 +409,7 @@ class ucp_profile $enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false; $enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false; $enable_urls = request_var('enable_urls', true); - $signature = request_var('signature', (string) $user->data['user_sig'], true); - - utf8_normalize_nfc(&$signature); + $signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true)); if ($submit || $preview) { @@ -608,8 +603,8 @@ class ucp_profile $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $user->data['user_avatar']; + $avatar_img .= $user->data['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $user->data['user_avatar_width'] . '" height="' . $user->data['user_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 1e8ff69733..fcbc2675f8 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -100,13 +100,22 @@ class ucp_register return; } - // Try to manually determine the timezone + // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1 $timezone = date('Z') / 3600; $is_dst = date('I'); - $timezone = ($is_dst) ? $timezone - 1 : $timezone; - if (!isset($user->lang['tz_zones'][(string) $timezone])) + if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1)) { + $timezone = ($is_dst) ? $timezone - 1 : $timezone; + + if (!isset($user->lang['tz_zones'][(string) $timezone])) + { + $timezone = $config['board_timezone']; + } + } + else + { + $is_dst = $config['board_dst']; $timezone = $config['board_timezone']; } @@ -115,8 +124,8 @@ class ucp_register 'password_confirm' => request_var('password_confirm', '', true), 'new_password' => request_var('new_password', '', true), 'cur_password' => request_var('cur_password', '', true), - 'email' => request_var('email', ''), - 'email_confirm' => request_var('email_confirm', ''), + 'email' => strtolower(request_var('email', '')), + 'email_confirm' => strtolower(request_var('email_confirm', '')), 'confirm_code' => request_var('confirm_code', ''), 'lang' => request_var('lang', $user->lang_name), 'tz' => request_var('tz', (float) $timezone), @@ -364,8 +373,9 @@ class ucp_register $messenger->im($row['user_jabber'], $row['username']); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($data['username']), - 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey") + 'USERNAME' => htmlspecialchars_decode($data['username']), + 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id", + 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey") ); $messenger->send($row['user_notify_type']); diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index 7ce82093ca..924c096e04 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -23,7 +23,7 @@ class ucp_remind global $db, $user, $auth, $template; $username = request_var('username', '', true); - $email = request_var('email', ''); + $email = strtolower(request_var('email', '')); $submit = (isset($_POST['submit'])) ? true : false; if ($submit) diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index 62e796bc4b..fe5801b37d 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -23,7 +23,7 @@ class ucp_resend global $db, $user, $auth, $template; $username = request_var('username', '', true); - $email = request_var('email', ''); + $email = strtolower(request_var('email', '')); $submit = (isset($_POST['submit'])) ? true : false; if ($submit) @@ -112,8 +112,9 @@ class ucp_resend $messenger->im($row['user_jabber'], $row['username']); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($user_row['username']), - 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}") + 'USERNAME' => htmlspecialchars_decode($user_row['username']), + 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}", + 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}") ); $messenger->send($row['user_notify_type']); diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 2548037b10..b65ba2fd29 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -202,7 +202,7 @@ class ucp_zebra WHERE z.user_id = ' . $user->data['user_id'] . " AND $sql_and AND u.user_id = z.zebra_id - ORDER BY u.username ASC"; + ORDER BY u.username_clean ASC"; $result = $db->sql_query($sql); $s_username_options = ''; diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php index 0d1d74539a..542c1aeeb8 100644 --- a/phpBB/includes/utf/utf_normalizer.php +++ b/phpBB/includes/utf/utf_normalizer.php @@ -67,10 +67,10 @@ class utf_normalizer * The ultimate convenience function! Clean up invalid UTF-8 sequences, * and convert to Normal Form C, canonical composition. * - * @param string $str The dirty string + * @param string &$str The dirty string * @return string The same string, all shiny and cleaned-up */ - function cleanup($str) + function cleanup(&$str) { // The string below is the list of all autorized characters, sorted by frequency in latin text $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D"); @@ -79,7 +79,7 @@ class utf_normalizer if ($pos == $len) { // ASCII strings with no special chars return immediately - return $str; + return; } // Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together @@ -91,23 +91,22 @@ class utf_normalizer // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t // We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char - return utf_normalizer::recompose( - strtr( - $str, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", - "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" - ), - $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp'] + $str = strtr( + $str, + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F", + "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" ); + + $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']); } /** * Validate and normalize a UTF string to NFC * - * @param string $str Unchecked UTF string + * @param string &$str Unchecked UTF string * @return string The string, validated and in normal form */ - function nfc($str) + function nfc(&$str) { $pos = strspn($str, UTF8_ASCII_RANGE); $len = strlen($str); @@ -115,7 +114,7 @@ class utf_normalizer if ($pos == $len) { // ASCII strings return immediately - return $str; + return; } if (!isset($GLOBALS['utf_nfc_qc'])) @@ -124,16 +123,16 @@ class utf_normalizer include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx); } - return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']); + $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']); } /** * Validate and normalize a UTF string to NFKC * - * @param string $str Unchecked UTF string + * @param string &$str Unchecked UTF string * @return string The string, validated and in normal form */ - function nfkc($str) + function nfkc(&$str) { $pos = strspn($str, UTF8_ASCII_RANGE); $len = strlen($str); @@ -141,7 +140,7 @@ class utf_normalizer if ($pos == $len) { // ASCII strings return immediately - return $str; + return; } if (!isset($GLOBALS['utf_nfkc_qc'])) @@ -156,16 +155,16 @@ class utf_normalizer include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx); } - return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']); + $str = utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']); } /** * Validate and normalize a UTF string to NFD * - * @param string $str Unchecked UTF string + * @param string &$str Unchecked UTF string * @return string The string, validated and in normal form */ - function nfd($str) + function nfd(&$str) { $pos = strspn($str, UTF8_ASCII_RANGE); $len = strlen($str); @@ -173,7 +172,7 @@ class utf_normalizer if ($pos == $len) { // ASCII strings return immediately - return $str; + return; } if (!isset($GLOBALS['utf_canonical_decomp'])) @@ -182,16 +181,16 @@ class utf_normalizer include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx); } - return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']); + $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']); } /** * Validate and normalize a UTF string to NFKD * - * @param string $str Unchecked UTF string + * @param string &$str Unchecked UTF string * @return string The string, validated and in normal form */ - function nfkd($str) + function nfkd(&$str) { $pos = strspn($str, UTF8_ASCII_RANGE); $len = strlen($str); @@ -199,7 +198,7 @@ class utf_normalizer if ($pos == $len) { // ASCII strings return immediately - return $str; + return; } if (!isset($GLOBALS['utf_compatibility_decomp'])) @@ -208,19 +207,19 @@ class utf_normalizer include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx); } - return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']); + $str = utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']); } /** * Recompose a UTF string * - * @param string $str Unchecked UTF string - * @param integer $pos Position of the first UTF char (in bytes) - * @param integer $len Length of the string (in bytes) - * @param array $qc Quick-check array, passed by reference but never modified - * @param array $decomp_map Decomposition mapping, passed by reference but never modified - * @return string The string, validated and recomposed + * @param string $str Unchecked UTF string + * @param integer $pos Position of the first UTF char (in bytes) + * @param integer $len Length of the string (in bytes) + * @param array &$qc Quick-check array, passed by reference but never modified + * @param array &$decomp_map Decomposition mapping, passed by reference but never modified + * @return string The string, validated and recomposed * * @access private */ @@ -239,14 +238,7 @@ class utf_normalizer $tmp = ''; $i = $tmp_pos = $last_cc = 0; - if ($pos) - { - $buffer = array(++$i => $str[$pos - 1]); - } - else - { - $buffer = array(); - } + $buffer = ($pos) ? array(++$i => $str[$pos - 1]) : array(); // UTF char length array // This array is used to determine the length of a UTF character. @@ -327,16 +319,11 @@ class utf_normalizer // has been encoded in a five- or six- byte sequence if ($utf_char[0] >= "\xF8") { - if ($utf_char[0] < "\xF8") - { - $trailing_bytes = 3; - } - else if ($utf_char[0] < "\xFC") + if ($utf_char[0] < "\xFC") { $trailing_bytes = 4; } - - if ($utf_char[0] > "\xFD") + else if ($utf_char[0] > "\xFD") { $trailing_bytes = 0; } @@ -923,17 +910,17 @@ class utf_normalizer /** * Decompose a UTF string * - * @param string $str UTF string - * @param integer $pos Position of the first UTF char (in bytes) - * @param integer $len Length of the string (in bytes) - * @param array $decomp_map Decomposition mapping, passed by reference but never modified - * @return string The string, decomposed and sorted canonically + * @param string $str UTF string + * @param integer $pos Position of the first UTF char (in bytes) + * @param integer $len Length of the string (in bytes) + * @param array &$decomp_map Decomposition mapping, passed by reference but never modified + * @return string The string, decomposed and sorted canonically * * @access private */ function decompose($str, $pos, $len, &$decomp_map) { - global $utf_combining_class, $utf_canonical_decomp, $phpbb_root_path; + global $utf_combining_class, $phpbb_root_path; // Load some commonly-used tables if (!isset($utf_combining_class)) @@ -1011,7 +998,7 @@ class utf_normalizer ksort($utf_sort); } - foreach($utf_sort as $utf_chars) + foreach ($utf_sort as $utf_chars) { $tmp .= implode('', $utf_chars); } @@ -1365,17 +1352,17 @@ class utf_normalizer // LIndex can only range from 0 to 18, therefore it cannot influence the first two bytes of the L Jamo, which allows us to hardcode them (based on LBase). // // The same goes for VIndex, but for TIndex there's a catch: the value of the third byte could exceed 0xBF and we would have to increment the second byte - if ($tIndex = $idx % UNICODE_HANGUL_TCOUNT) + if ($t_index = $idx % UNICODE_HANGUL_TCOUNT) { - if ($tIndex < 25) + if ($t_index < 25) { $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x86\x00"; - $utf_char[8] = chr(0xA7 + $tIndex); + $utf_char[8] = chr(0xA7 + $t_index); } else { $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x87\x00"; - $utf_char[8] = chr(0x67 + $tIndex); + $utf_char[8] = chr(0x67 + $t_index); } } else @@ -1478,7 +1465,6 @@ class utf_normalizer } return $tmp; - } else if ($tmp_pos) { diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index b91fd51c20..4c6c26909a 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -7,9 +7,8 @@ * @license http://opensource.org/licenses/gpl-license.php GNU Public License * * @todo make sure the replacements are called correctly -* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr -* remaining: clean_username, htmlentities (no longer needed for internal data?), htmlspecialchars (using charset) -* strspn, chr, ord +* already done: strtolower, strtoupper, ucfirst, str_split, strrpos, strlen (hopefully!), strpos, substr, htmlspecialchars +* remaining: strspn, chr, ord */ /** @@ -63,7 +62,7 @@ if (!extension_loaded('xml')) /** * Implementation of PHP's native utf8_decode for people without XML support * - * @param string $string UTF-8 encoded data + * @param string $str UTF-8 encoded data * @return string ISO-8859-1 encoded data */ function utf8_decode($str) @@ -126,7 +125,14 @@ if (extension_loaded('mbstring')) return false; } - return mb_strrpos($str, $search); + if (is_null($offset)) + { + return mb_strrpos($str, $needle); + } + else + { + return mb_strrpos($str, $needle, $offset); + } } } else @@ -138,7 +144,7 @@ if (extension_loaded('mbstring')) function utf8_strrpos($str, $needle, $offset = null) { // offset for mb_strrpos was added in 5.2.0 - if ($offset === false) + if (is_null($offset)) { // Emulate behaviour of strrpos rather than raising warning if (empty($str)) @@ -146,7 +152,7 @@ if (extension_loaded('mbstring')) return false; } - return mb_strrpos($str, $search); + return mb_strrpos($str, $needle); } else { @@ -158,7 +164,7 @@ if (extension_loaded('mbstring')) $str = mb_substr($str, $offset); - if (false !== ($pos = mb_strrpos($str, $search))) + if (false !== ($pos = mb_strrpos($str, $needle))) { return $pos + $offset; } @@ -174,7 +180,7 @@ if (extension_loaded('mbstring')) */ function utf8_strpos($str, $needle, $offset = null) { - if ($offset === false) + if (is_null($offset)) { return mb_strpos($str, $needle); } @@ -206,9 +212,9 @@ if (extension_loaded('mbstring')) * UTF-8 aware alternative to substr * @ignore */ - function utf8_substr($str, $offset, $length = null) + function utf8_substr($str, $offset, $length = null) { - if ($length === false) + if (is_null($length)) { return mb_substr($str, $offset); } @@ -234,9 +240,9 @@ else * Find position of last occurrence of a char in a string * * @author Harry Fuecks - * @param string haystack - * @param string needle - * @param integer (optional) offset (from left) + * @param string $str haystack + * @param string $needle needle + * @param integer $offset (optional) offset (from left) * @return mixed integer position or FALSE on failure */ function utf8_strrpos($str, $needle, $offset = null) @@ -279,9 +285,9 @@ else * Find position of first occurrence of a string * * @author Harry Fuecks - * @param string haystack - * @param string needle - * @param integer offset in characters (from left) + * @param string $str haystack + * @param string $needle needle + * @param integer $offset offset in characters (from left) * @return mixed integer position or FALSE on failure */ function utf8_strpos($str, $needle, $offset = null) @@ -482,9 +488,9 @@ else * necessary. It isn't necessary for +ve offsets and no specified length * * @author Chris Smith<chris@jalakai.co.uk> - * @param string - * @param integer number of UTF-8 characters offset (from left) - * @param integer (optional) length in UTF-8 characters from offset + * @param string $str + * @param integer $offset number of UTF-8 characters offset (from left) + * @param integer $length (optional) length in UTF-8 characters from offset * @return mixed string or FALSE if failure */ function utf8_substr($str, $offset, $length = NULL) @@ -624,8 +630,8 @@ else * Convert a string to an array * * @author Harry Fuecks -* @param string UTF-8 encoded -* @param int number to characters to split string by +* @param string $str UTF-8 encoded +* @param int $split_len number to characters to split string by * @return string characters in string reverses */ function utf8_str_split($str, $split_len = 1) @@ -650,8 +656,6 @@ function utf8_str_split($str, $split_len = 1) * Find length of initial segment not matching mask * * @author Harry Fuecks -* @param string -* @return int */ function utf8_strspn($str, $mask, $start = null, $length = null) { @@ -831,8 +835,8 @@ function utf8_ord($chr) /** * Converts an NCR to a UTF-8 char * -* @param integer $cp UNICODE code point -* @return string UTF-8 char +* @param int $cp UNICODE code point +* @return string UTF-8 char */ function utf8_chr($cp) { @@ -858,9 +862,8 @@ function utf8_chr($cp) * Convert Numeric Character References to UTF-8 chars * * Notes: -* - we do not convert NCRs recursively, if you pass &#38; it will return & -* - we DO NOT check for the existence of the Unicode characters, therefore an entity -* may be converted to an inexistent codepoint +* - we do not convert NCRs recursively, if you pass &#38; it will return & +* - we DO NOT check for the existence of the Unicode characters, therefore an entity may be converted to an inexistent codepoint * * @param string $text String to convert, encoded in UTF-8 (no normal form required) * @return string UTF-8 string where NCRs have been replaced with the actual chars @@ -890,9 +893,9 @@ function utf8_decode_ncr_callback($m) * Takes an array of ints representing the Unicode characters and returns * a UTF-8 string. * -* @param string $text text to be case folded -* @param string $option determines how we will fold the cases -* @return string case folded text +* @param string $text text to be case folded +* @param string $option determines how we will fold the cases +* @return string case folded text */ function utf8_case_fold($text, $option = 'full') { @@ -933,30 +936,35 @@ function utf8_case_fold($text, $option = 'full') * A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings * to be in NFC (Normalization Form Composition). * -* @param mixed $strings Either an array of references to strings, a reference to an array of strings or a reference to a single string +* @param mixed $strings a string or an array of strings to normalize +* @return mixed the normalized content, preserving array keys if array given. */ function utf8_normalize_nfc($strings) { - if (!is_array($strings) || (sizeof($strings) > 0)) - { - if (!class_exists('utf_normalizer')) - { - global $phpbb_root_path, $phpEx; - include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); - } + if (empty($strings)) + { + return $strings; + } - if (is_array($strings)) - { - foreach ($strings as $key => $string) - { - $strings[$key] = utf_normalizer::nfc($strings[$key]); - } - } - else + if (!class_exists('utf_normalizer')) + { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); + } + + if (!is_array($strings)) + { + utf_normalizer::nfc($strings); + } + else if (is_array($strings)) + { + foreach ($strings as $key => $string) { - $strings = utf_normalizer::nfc($strings); + utf_normalizer::nfc($strings[$key]); } } + + return $strings; } /** @@ -969,8 +977,8 @@ function utf8_normalize_nfc($strings) * functions used here you need to rebuild/update the username_clean column in the users table. And all other * columns that store a clean string otherwise you will break this functionality. * -* @param $text An unclean string, mabye user input (has to be valid UTF-8!) -* @return Cleaned up version of the input string +* @param string $text An unclean string, mabye user input (has to be valid UTF-8!) +* @return string Cleaned up version of the input string */ function utf8_clean_string($text) { @@ -982,7 +990,7 @@ function utf8_clean_string($text) include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); } - $text = utf_normalizer::nfc($text); + utf_normalizer::nfc($text); static $homographs = array( // cyrllic diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ee6da65633..461b5807c2 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.B2'; +$updates_to_version = '3.0.B4'; if (defined('IN_PHPBB') && defined('IN_INSTALL')) { @@ -58,6 +58,7 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); +require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); $cache = new cache(); $db = new $sql_db(); @@ -284,23 +285,30 @@ $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP'); $database_update_info = array( // Changes within this version '3.0.b3' => array( -/* // Change the following columns... 'change_columns' => array( - {table} => array( - {column_name} => array('USINT', 0), -> column type + BBCODES_TABLE => array( + 'bbcode_helpline' => array('VCHAR_UNI', ''), + ), + USERS_TABLE => array( + 'user_occ' => array('TEXT_UNI', ''), + ), + CONFIG_TABLE => array( + 'config_value' => array('VCHAR_UNI', ''), ), ), // Add the following columns 'add_columns' => array( - {table} => array( - {column_name} => array('USINT', 0), -> column type + GROUPS_TABLE => array( + 'group_founder_manage' => array('BOOL', 0), + ), + USERS_TABLE => array( + 'user_pass_convert' => array('BOOL', 0), ), ), -*/ ), // Latest version - '3.0.0' => array(), + '3.0.b4' => array(), ); // Determine mapping database type @@ -450,19 +458,29 @@ $errored = $no_updates = false; flush(); -switch ($current_version) +$no_updates = true; + +// some code magic +if (version_compare($current_version, '3.0.b3', '<')) { - case '3.0.b3': -/* - some code magic -*/ - // No need to change here, before no break should appear - break; + // Set group_founder_manage for administrators group + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . " + WHERE group_name = 'ADMINISTRATORS' + AND group_type = " . GROUP_SPECIAL; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id'); + $db->sql_freeresult($result); - case '3.0.0': - default: - $no_updates = true; - break; + if ($group_id) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; + _sql($sql, $errored, $error_ary); + } + + add_bots(); + + $no_updates = false; } _write_result($no_updates, $errored, $error_ary); @@ -481,15 +499,14 @@ $errored = $no_updates = false; flush(); - -/* update the version - +// update the version $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$updates_to_version' WHERE config_name = 'version'"; _sql($sql, $errored, $error_ary); -// Optimize/vacuum analyze the tables where appropriate + +/* Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update switch ($db->sql_layer) @@ -534,7 +551,7 @@ $cache->purge(); </div> <div id="page-footer"> - Powered by phpBB © 2006 <a href="http://www.phpbb.com/">phpBB Group</a> + Powered by phpBB © <?php echo date('Y'); ?> <a href="http://www.phpbb.com/">phpBB Group</a> </div> </div> @@ -550,6 +567,11 @@ function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; + if (defined('DEBUG_EXTRA')) + { + echo "<br />\n{$sql}\n<br />"; + } + $db->sql_return_on_error(true); $result = $db->sql_query($sql); @@ -625,7 +647,7 @@ function column_exists($dbms, $table, $column_name) } /** -* Function to prepare some column informations for better usage +* Function to prepare some column information for better usage */ function prepare_column_data($dbms, $column_data) { @@ -732,7 +754,7 @@ function prepare_column_data($dbms, $column_data) $sql .= " {$column_type} "; // For hexadecimal values do not use single quotes - if (!is_null($column_data[1])) + if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text') { $sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' "; } @@ -800,7 +822,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) break; case 'oracle': - $sql = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' ' . $coumn_data['column_type_sql']; + $sql = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' ' . $column_data['column_type_sql']; _sql($sql, $errored, $error_ary); break; @@ -863,7 +885,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) } else { - $sql = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' [' . $colum_data['column_type_sql'] . ']'; + $sql = 'ALTER TABLE ' . $table_name . ' ADD ' . $column_name . ' [' . $column_data['column_type_sql'] . ']'; _sql($sql, $errored, $error_ary); } break; @@ -876,6 +898,7 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) function sql_column_change($dbms, $table_name, $column_name, $column_data) { global $dbms_type_map, $db; + global $errored, $error_ary; $column_data = prepare_column_data($dbms, $column_data); @@ -961,4 +984,171 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) } } +/** +* Add search robots to the database +*/ +function add_bots() +{ + global $db, $config, $phpbb_root_path, $phpEx; + + $sql = 'SELECT * + FROM ' . CONFIG_TABLE; + $result = $db->sql_query($sql); + + $config = array(); + while ($row = $db->sql_fetchrow($result)) + { + $config[$row['config_name']] = $row['config_value']; + } + $db->sql_freeresult($result); + + // Obtain any submitted data + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . " + WHERE group_name = 'BOTS'"; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id'); + $db->sql_freeresult($result); + + if (!$group_id) + { + return; + } + + // First of all, remove the old bots... + $sql = 'SELECT bot_id + FROM ' . BOTS_TABLE . " + WHERE bot_name IN ('Alexa', 'Fastcrawler', 'Googlebot', 'Inktomi')"; + $result = $db->sql_query($sql); + + $bot_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $bot_ids[] = $row['bot_id']; + } + $db->sql_freeresult($result); + + if (sizeof($bot_ids)) + { + // We need to delete the relevant user, usergroup and bot entries ... + $sql_id = ' IN (' . implode(', ', $bot_ids) . ')'; + + $sql = 'SELECT bot_name, user_id + FROM ' . BOTS_TABLE . " + WHERE bot_id $sql_id"; + $result = $db->sql_query($sql); + + $user_id_ary = array(); + while ($row = $db->sql_fetchrow($result)) + { + $user_id_ary[] = (int) $row['user_id']; + } + $db->sql_freeresult($result); + + $sql = 'DELETE FROM ' . BOTS_TABLE . " + WHERE bot_id $sql_id"; + $db->sql_query($sql); + + $_tables = array(USERS_TABLE, USER_GROUP_TABLE); + foreach ($_tables as $table) + { + $sql = "DELETE FROM $table + WHERE " . $db->sql_in_set('user_id', $user_id_ary); + $db->sql_query($sql); + } + } + + if (!function_exists('user_add')) + { + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + } + + global $errored, $error_ary; + + $bot_list = 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/', ''), + ); + + foreach ($bot_list 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_dateformat' => $config['default_dateformat'], + ); + + $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], + )); + + _sql($sql, $errored, $error_ary); + } + } +} + ?>
\ No newline at end of file diff --git a/phpBB/install/index.php b/phpBB/install/index.php index eaa0ff12d4..bd8ae095a3 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -291,7 +291,7 @@ class module $module = $this->filename; if (!class_exists($module)) { - $this->error('Module not accessible', __LINE__, __FILE__); + $this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__); } $this->module = new $module($this); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index c282f867a0..0b4f94a5c2 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -10,8 +10,7 @@ /** */ - -if ( !defined('IN_INSTALL') ) +if (!defined('IN_INSTALL')) { // Someone has tried to access the file direct. This is not a good idea, so exit exit; @@ -130,7 +129,7 @@ class install_install extends module 'BODY' => $lang['REQUIREMENTS_EXPLAIN'], )); - $passed = array('php' => false, 'db' => false, 'files' => false); + $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false); // Test for basic PHP settings $template->assign_block_vars('checks', array( @@ -187,6 +186,26 @@ class install_install extends module 'S_LEGEND' => false, )); + // Check for PCRE UTF-8 support + if (@preg_match('//u', '')) + { + $passed['pcre'] = true; + $result = '<b style="color:green">' . $lang['YES'] . '</b>'; + } + else + { + $result = '<b style="color:red">' . $lang['NO'] . '</b>'; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PCRE_UTF_SUPPORT'], + 'TITLE_EXPLAIN' => $lang['PCRE_UTF_SUPPORT_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); + // Test for available database modules $template->assign_block_vars('checks', array( 'S_LEGEND' => true, @@ -314,18 +333,33 @@ class install_install extends module $passed['files'] = true; foreach ($directories as $dir) { - $write = $exists = true; + $exists = $write = false; + + // Try to create the directory if it does not exist + if (!file_exists($phpbb_root_path . $dir)) + { + @mkdir($phpbb_root_path . $dir, 0777); + @chmod($phpbb_root_path . $dir, 0777); + } + + // Now really check if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir)) { if (!is_writeable($phpbb_root_path . $dir)) { - $write = (@chmod($phpbb_root_path . $dir, 0777)) ? true : false; + @chmod($phpbb_root_path . $dir, 0777); } + $exists = true; } - else + + // Now check if it is writeable by storing a simple file + $fp = @fopen($phpbb_root_path . $dir . 'test_lock', 'wb'); + if ($fp !== false) { - $write = $exists = (@mkdir($phpbb_root_path . $dir, 0777)) ? true : false; + @unlink($phpbb_root_path . $dir . 'test_lock'); + $write = true; } + @fclose($fp); $passed['files'] = ($exists && $write && $passed['files']) ? true : false; @@ -381,8 +415,8 @@ class install_install extends module // And finally where do we want to go next (well today is taken isn't it :P) $s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : ''; - $url = ($passed['php'] && $passed['db'] && $passed['files']) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language "; - $submit = ($passed['php'] && $passed['db'] && $passed['files']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST']; + $url = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre']) ? $this->p_master->module_url . "?mode=$mode&sub=database&language=$language" : $this->p_master->module_url . "?mode=$mode&sub=requirements&language=$language "; + $submit = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST']; $template->assign_vars(array( @@ -561,12 +595,15 @@ class install_install extends module $default_lang = ($default_lang !== '') ? $default_lang : $language; + $board_email1 = strtolower($board_email1); + $board_email2 = strtolower($board_email2); + if (isset($_POST['check'])) { $error = array(); // Check the entered email address and password - if ($admin_name == '' || $admin_pass1 == '' || $admin_pass2 == '' || $board_email1 == '' || $board_email2 =='') + if ($admin_name == '' || $admin_pass1 == '' || $admin_pass2 == '' || $board_email1 == '' || $board_email2 == '') { $error[] = $lang['INST_ERR_MISSING_DATA']; } @@ -775,7 +812,7 @@ class install_install extends module $config_data .= "\$load_extensions = '$load_extensions';\n\n"; $config_data .= "@define('PHPBB_INSTALLED', true);\n"; $config_data .= "@define('DEBUG', true);\n"; // @todo Comment out when final - $config_data .= "@define('DEBUG_EXTRA', true);\n"; // @todo Comment out when final + $config_data .= "// @define('DEBUG_EXTRA', true);\n"; $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... @@ -1471,12 +1508,13 @@ class install_install extends module if (is_dir($path) && !is_link($path) && file_exists($path . '/iso.txt')) { $lang_pack = file("{$phpbb_root_path}language/$path/iso.txt"); + $sql_ary = array( 'lang_iso' => basename($path), 'lang_dir' => basename($path), 'lang_english_name' => trim(htmlspecialchars($lang_pack[0])), - 'lang_local_name' => trim(htmlspecialchars($lang_pack[1])), - 'lang_author' => trim(htmlspecialchars($lang_pack[2])), + 'lang_local_name' => trim(htmlspecialchars($lang_pack[1], ENT_COMPAT, 'UTF-8')), + 'lang_author' => trim(htmlspecialchars($lang_pack[2], ENT_COMPAT, 'UTF-8')), ); $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); @@ -1803,7 +1841,7 @@ class install_install extends module } break; - case 'mysqli': + case 'sqlite': if (version_compare(sqlite_libversion(), '2.8.2', '<')) { $error[] = $lang['INST_ERR_DB_NO_SQLITE']; @@ -2047,12 +2085,92 @@ class install_install extends module /** * A list of the web-crawlers/bots we recognise by default + * + * Candidates but not included: + * 'Accoona [Bot]' 'Accoona-AI-Agent/' + * 'ASPseek [Crawler]' 'ASPseek/' + * 'Boitho [Crawler]' 'boitho.com-dc/' + * 'Bunnybot [Bot]' 'powered by www.buncat.de' + * 'Cosmix [Bot]' 'cfetch/' + * 'Crawler Search [Crawler]' '.Crawler-Search.de' + * 'Findexa [Crawler]' 'Findexa Crawler (' + * 'GBSpider [Spider]' 'GBSpider v' + * 'genie [Bot]' 'genieBot (' + * 'Hogsearch [Bot]' 'oegp v. 1.3.0' + * 'Insuranco [Bot]' 'InsurancoBot' + * 'IRLbot [Bot]' 'http://irl.cs.tamu.edu/crawler' + * 'ISC Systems [Bot]' 'ISC Systems iRc Search' + * 'Jyxobot [Bot]' 'Jyxobot/' + * 'Kraehe [Metasuche]' '-DIE-KRAEHE- META-SEARCH-ENGINE/' + * 'LinkWalker' 'LinkWalker' + * 'MMSBot [Bot]' 'http://www.mmsweb.at/bot.html' + * 'Naver [Bot]' 'nhnbot@naver.com)' + * 'NetResearchServer' 'NetResearchServer/' + * 'Nimble [Crawler]' 'NimbleCrawler' + * 'Ocelli [Bot]' 'Ocelli/' + * 'Onsearch [Bot]' 'onCHECK-Robot' + * 'Orange [Spider]' 'OrangeSpider' + * 'Sproose [Bot]' 'http://www.sproose.com/bot' + * 'Susie [Sync]' '!Susie (http://www.sync2it.com/susie)' + * 'Tbot [Bot]' 'Tbot/' + * 'Thumbshots [Capture]' 'thumbshots-de-Bot' + * 'Vagabondo [Crawler]' 'http://webagent.wise-guys.nl/' + * 'Walhello [Bot]' 'appie 1.1 (www.walhello.com)' + * 'WissenOnline [Bot]' 'WissenOnline-Bot' + * 'WWWeasel [Bot]' 'WWWeasel Robot v' + * 'Xaldon [Spider]' 'Xaldon WebSpider' */ var $bot_list = array( - 'Alexa' => array('ia_archiver', '66.28.250.,209.237.238.'), - 'Fastcrawler' => array('FAST MetaWeb Crawler', '66.151.181.'), - 'Googlebot' => array('Googlebot/', ''), - 'Inktomi' => array('Slurp/', '216.35.116.,66.196.'), + '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/', ''), ); /** diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index ae5ae11223..069022f0e5 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -58,6 +58,9 @@ class install_update extends module var $latest_version; var $current_version; + // Set to false + var $test_update = false; + function install_update(&$p_master) { $this->p_master = &$p_master; @@ -93,7 +96,9 @@ class install_update extends module include_once($phpbb_root_path . 'includes/diff/diff.' . $phpEx); - // Check for user session + /** + * Check for user session + * - commented out for beta3 with "broken" install check routine if (!$user->data['is_registered']) { login_box('', $user->lang['LOGIN_UPDATE_EXPLAIN']); @@ -103,6 +108,7 @@ class install_update extends module { trigger_error($user->lang['NO_AUTH_UPDATE']); } + */ // If we are within the intro page we need to make sure we get up-to-date version info if ($sub == 'intro') @@ -164,6 +170,20 @@ class install_update extends module return; } + // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present + if (in_array('adm/style/install_update.html', $this->update_info['files'])) + { + $this->tpl_name = '../../install/update/new/adm/style/install_update'; + } + + // What about the language file? Got it updated? + if (in_array('language/en/install.php', $this->update_info['files'])) + { + $lang = array(); + include('./update/new/language/en/install.php'); + $user->lang = array_merge($user->lang, $lang); + } + // Make sure we stay at the file check if checking the files again if (!empty($_POST['check_again'])) { @@ -670,7 +690,7 @@ class install_update extends module $status = request_var('status', ''); $file = request_var('file', ''); - $diff_mode = request_var('diff_mode', 'side_by_side'); + $diff_mode = request_var('diff_mode', 'inline'); // First of all make sure the file is within our file update list with the correct status $found_entry = array(); @@ -684,7 +704,7 @@ class install_update extends module if (empty($found_entry)) { - trigger_error('File not allowed to be diffed', E_USER_ERROR); + trigger_error($user->lang['FILE_DIFF_NOT_ALLOWED'], E_USER_ERROR); } // If the status is 'up_to_date' then we do not need to show a diff @@ -802,7 +822,7 @@ class install_update extends module return $update_list; } - // Now diff the remaining files to get informations about their status (not modified/modified/up-to-date) + // Now diff the remaining files to get information about their status (not modified/modified/up-to-date) // not modified? foreach ($this->update_info['files'] as $index => $file) @@ -871,6 +891,16 @@ class install_update extends module // If the file is not modified we are finished here... if ($diff->is_empty()) { + // Further check if it is already up to date - it could happen that non-modified files + // slip through + $diff = &new diff(file($this->new_location . $original_file), file($phpbb_root_path . $file)); + + if ($diff->is_empty()) + { + $update_list['up_to_date'][] = $update_ary; + return; + } + $update_list['not_modified'][] = $update_ary; return; } @@ -947,6 +977,11 @@ class install_update extends module $info = explode("\n", $info); $info = trim($info[0]); } + + if ($this->test_update !== false) + { + $info = $this->test_update; + } break; case 'update_info': @@ -960,10 +995,10 @@ class install_update extends module if ($info !== false) { - // Adjust the update info file to hold some specific style-related informations + // Adjust the update info file to hold some specific style-related information $info['custom'] = array(); - // Get custom installed styles... + /* Get custom installed styles... $sql = 'SELECT template_name, template_path FROM ' . STYLES_TEMPLATE_TABLE . " WHERE template_name NOT IN ('subSilver', 'BLABLA')"; @@ -990,6 +1025,7 @@ class install_update extends module } } } + */ } break; diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 811c009d7c..f06c98b657 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -161,7 +161,7 @@ END;; CREATE TABLE phpbb_bbcodes ( bbcode_id INTEGER DEFAULT 0 NOT NULL, bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_helpline VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, display_on_posting INTEGER DEFAULT 0 NOT NULL, bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, @@ -213,7 +213,7 @@ END;; # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - config_value VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, is_dynamic INTEGER DEFAULT 0 NOT NULL );; @@ -422,6 +422,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status) CREATE TABLE phpbb_groups ( group_id INTEGER NOT NULL, group_type INTEGER DEFAULT 1 NOT NULL, + group_founder_manage INTEGER DEFAULT 0 NOT NULL, group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, @@ -1366,6 +1367,7 @@ CREATE TABLE phpbb_users ( username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_passchg INTEGER DEFAULT 0 NOT NULL, + user_pass_convert INTEGER DEFAULT 0 NOT NULL, user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL, user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, @@ -1422,7 +1424,7 @@ CREATE TABLE phpbb_users ( user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_occ VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, user_newpasswd VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index b058a7c86d..804d5eafc8 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -518,6 +518,7 @@ GO CREATE TABLE [phpbb_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , [group_type] [int] DEFAULT (1) NOT NULL , + [group_founder_manage] [int] DEFAULT (0) NOT NULL , [group_name] [varchar] (255) DEFAULT ('') NOT NULL , [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL , [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , @@ -1608,6 +1609,7 @@ CREATE TABLE [phpbb_users] ( [username_clean] [varchar] (255) DEFAULT ('') NOT NULL , [user_password] [varchar] (40) DEFAULT ('') NOT NULL , [user_passchg] [int] DEFAULT (0) NOT NULL , + [user_pass_convert] [int] DEFAULT (0) NOT NULL , [user_email] [varchar] (100) DEFAULT ('') NOT NULL , [user_email_hash] [float] DEFAULT (0) NOT NULL , [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL , @@ -1664,7 +1666,7 @@ CREATE TABLE [phpbb_users] ( [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , [user_website] [varchar] (200) DEFAULT ('') NOT NULL , - [user_occ] [varchar] (255) DEFAULT ('') NOT NULL , + [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL , [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 5442fa2254..cf4d43b768 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -111,7 +111,7 @@ CREATE TABLE phpbb_banlist ( CREATE TABLE phpbb_bbcodes ( bbcode_id tinyint(3) DEFAULT '0' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL, - bbcode_helpline varchar(255) DEFAULT '' NOT NULL, + bbcode_helpline text NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_match text NOT NULL, bbcode_tpl mediumtext NOT NULL, @@ -150,7 +150,7 @@ CREATE TABLE phpbb_bots ( # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name varchar(255) DEFAULT '' NOT NULL, - config_value varchar(255) DEFAULT '' NOT NULL, + config_value text NOT NULL, is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (config_name), KEY is_dynamic (is_dynamic) @@ -295,6 +295,7 @@ CREATE TABLE phpbb_forums_watch ( CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, + group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name text NOT NULL, group_desc text NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, @@ -968,6 +969,7 @@ CREATE TABLE phpbb_users ( username_clean text NOT NULL, user_password varchar(120) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_email text NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 1b0288359d..aaf00d077e 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -295,6 +295,7 @@ CREATE TABLE phpbb_forums_watch ( CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, + group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name varchar(255) DEFAULT '' NOT NULL, group_desc text NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, @@ -968,6 +969,7 @@ CREATE TABLE phpbb_users ( username_clean varchar(255) DEFAULT '' NOT NULL, user_password varchar(40) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_email varchar(100) DEFAULT '' NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, @@ -1024,7 +1026,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, - user_occ varchar(255) DEFAULT '' NOT NULL, + user_occ text NOT NULL, user_interests text NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 890be4b783..816d584b97 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -252,7 +252,7 @@ END; CREATE TABLE phpbb_bbcodes ( bbcode_id number(3) DEFAULT '0' NOT NULL, bbcode_tag varchar2(16) DEFAULT '' , - bbcode_helpline varchar2(255) DEFAULT '' , + bbcode_helpline varchar2(765) DEFAULT '' , display_on_posting number(1) DEFAULT '0' NOT NULL, bbcode_match clob DEFAULT '' , bbcode_tpl clob DEFAULT '' , @@ -320,7 +320,7 @@ END; */ CREATE TABLE phpbb_config ( config_name varchar2(255) DEFAULT '' , - config_value varchar2(255) DEFAULT '' , + config_value varchar2(765) DEFAULT '' , is_dynamic number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name) ) @@ -583,6 +583,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status CREATE TABLE phpbb_groups ( group_id number(8) NOT NULL, group_type number(4) DEFAULT '1' NOT NULL, + group_founder_manage number(1) DEFAULT '0' NOT NULL, group_name varchar2(255) DEFAULT '' , group_desc clob DEFAULT '' , group_desc_bitfield varchar2(255) DEFAULT '' , @@ -1777,6 +1778,7 @@ CREATE TABLE phpbb_users ( username_clean varchar2(255) DEFAULT '' , user_password varchar2(120) DEFAULT '' , user_passchg number(11) DEFAULT '0' NOT NULL, + user_pass_convert number(1) DEFAULT '0' NOT NULL, user_email varchar2(300) DEFAULT '' , user_email_hash number(20) DEFAULT '0' NOT NULL, user_birthday varchar2(10) DEFAULT '' , @@ -1833,7 +1835,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , user_website varchar2(600) DEFAULT '' , - user_occ varchar2(765) DEFAULT '' , + user_occ clob DEFAULT '' , user_interests clob DEFAULT '' , user_actkey varchar2(32) DEFAULT '' , user_newpasswd varchar2(96) DEFAULT '' , diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 11a0a7a958..aa22d5b0fa 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -437,6 +437,7 @@ CREATE SEQUENCE phpbb_groups_seq; CREATE TABLE phpbb_groups ( group_id INT4 DEFAULT nextval('phpbb_groups_seq'), group_type INT2 DEFAULT '1' NOT NULL, + group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0), group_name varchar_ci DEFAULT '' NOT NULL, group_desc varchar(4000) DEFAULT '' NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, @@ -1228,6 +1229,7 @@ CREATE TABLE phpbb_users ( username_clean varchar_ci DEFAULT '' NOT NULL, user_password varchar(40) DEFAULT '' NOT NULL, user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0), + user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0), user_email varchar(100) DEFAULT '' NOT NULL, user_email_hash INT8 DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, @@ -1284,7 +1286,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, - user_occ varchar(255) DEFAULT '' NOT NULL, + user_occ varchar(4000) DEFAULT '' NOT NULL, user_interests varchar(4000) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 50bfe9db3a..c3a438e0de 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -199,7 +199,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.B3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B4'); 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'); @@ -397,12 +397,12 @@ INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_reg INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); # -- Groups -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 3, '00AA00', 1, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 3, 'AA0000', 1, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 3, '9E8DA7', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', ''); # -- User -> Group INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 916c9bb5e6..ee42bfec4b 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -287,6 +287,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status CREATE TABLE phpbb_groups ( group_id INTEGER PRIMARY KEY NOT NULL , group_type tinyint(4) NOT NULL DEFAULT '1', + group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0', group_name varchar(255) NOT NULL DEFAULT '', group_desc text(65535) NOT NULL DEFAULT '', group_desc_bitfield varchar(255) NOT NULL DEFAULT '', @@ -939,6 +940,7 @@ CREATE TABLE phpbb_users ( username_clean varchar(255) NOT NULL DEFAULT '', user_password varchar(40) NOT NULL DEFAULT '', user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0', + user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0', user_email varchar(100) NOT NULL DEFAULT '', user_email_hash bigint(20) NOT NULL DEFAULT '0', user_birthday varchar(10) NOT NULL DEFAULT '', @@ -995,7 +997,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', user_website varchar(200) NOT NULL DEFAULT '', - user_occ varchar(255) NOT NULL DEFAULT '', + user_occ text(65535) NOT NULL DEFAULT '', user_interests text(65535) NOT NULL DEFAULT '', user_actkey varchar(32) NOT NULL DEFAULT '', user_newpasswd varchar(32) NOT NULL DEFAULT '' diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index e2d2f30e6b..481a77d576 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -262,7 +262,7 @@ $lang = array_merge($lang, array( 'YES_ONLINE' => 'Enable online user listings', 'YES_ONLINE_EXPLAIN' => 'Display online user information on index, forum and topic pages.', 'YES_ONLINE_GUESTS' => 'Enable online guest listings in viewonline', - 'YES_ONLINE_GUESTS_EXPLAIN' => 'Allow display of guest user informations in viewonline.', + 'YES_ONLINE_GUESTS_EXPLAIN' => 'Allow display of guest user information in viewonline.', 'YES_ONLINE_TRACK' => 'Enable display of user online img', 'YES_ONLINE_TRACK_EXPLAIN' => 'Display online information for user in profiles and viewtopic.', 'YES_POST_MARKING' => 'Enable dotted topics', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 77b9a5d5a1..76db47b1eb 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -250,6 +250,7 @@ $lang = array_merge($lang, array( 'PARSE_URLS' => 'Parse links', 'PERMISSIONS_TRANSFERED' => 'Permissions transfered', 'PERMISSIONS_TRANSFERED_EXPLAIN' => 'You are currently having the permissions from %1$s. You are able to browse the forum with the users permissions but not access the administration control panel since admin permissions were not transfered. You are able to <a href="%2$s"><strong>revert to your permission set</strong></a> at any time.', + 'PIXEL' => 'px', 'PROCEED_TO_ACP' => '%sProceed to the ACP%s', 'REMIND' => 'Remind', @@ -354,6 +355,8 @@ $lang = array_merge($lang, array( 'SORT_LAST_VISIT' => 'Last visit', 'SORT_REASON' => 'Reason', 'SORT_REG_DATE' => 'Registration date', + + 'USER_IS_INACTIVE' => 'User is inactive', )); // Log Entries diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 21ddc34558..ef67df40ed 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -45,6 +45,7 @@ $lang = array_merge($lang, array( 'CREATE_FORUM' => 'Create new forum', 'DECIDE_MOVE_DELETE_CONTENT' => 'Delete content or move to forum', + 'DECIDE_MOVE_DELETE_SUBFORUMS' => 'Delete subforums or move to forum', 'DEFAULT_STYLE' => 'Default Style', 'DELETE_ALL_POSTS' => 'Delete posts', 'DELETE_SUBFORUMS' => 'Delete subforums and posts', @@ -67,7 +68,7 @@ $lang = array_merge($lang, array( 'FORUM_CREATED' => 'Forum created successfully.', 'FORUM_DATA_NEGATIVE' => 'Pruning parameters cannot be negative.', 'FORUM_DELETE' => 'Delete forum', - 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum and decide where you want to put all topics (or forums) it contained.', + 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum. If the forum is postable you are able to decide where you want to put all topics (or forums) it contained.', 'FORUM_DELETED' => 'Forum successfully deleted.', 'FORUM_DESC' => 'Description', 'FORUM_DESC_EXPLAIN' => 'Any markup entered here will displayed as is.', @@ -97,7 +98,7 @@ $lang = array_merge($lang, array( 'FORUM_TOPICS_PAGE' => 'Topics per page', 'FORUM_TOPICS_PAGE_EXPLAIN' => 'If non-zero this value will override the default topics per page setting.', 'FORUM_TYPE' => 'Forum type', - 'FORUM_UPDATED' => 'Forum informations updated successfully.', + 'FORUM_UPDATED' => 'Forum information updated successfully.', 'GENERAL_FORUM_SETTINGS' => 'General forum settings', @@ -106,8 +107,8 @@ $lang = array_merge($lang, array( 'LIST_INDEX_EXPLAIN' => 'Displays a link to this forum under the parent forums subforum listing if one exist.', 'LOCKED' => 'Locked', - 'MOVE_POSTS_TO' => 'Move posts', - 'MOVE_SUBFORUMS_TO' => 'Move subforums', + 'MOVE_POSTS_TO' => 'Move posts to', + 'MOVE_SUBFORUMS_TO' => 'Move subforums to', 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to', 'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content', diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index 582dbb3465..4d4f08c9b3 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -59,6 +59,8 @@ $lang = array_merge($lang, array( 'GROUP_DST' => 'Group daylight savings', 'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.', 'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group', + 'GROUP_FOUNDER_MANAGE' => 'Founder manage only', + 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict group management for this group for founders only for the administration control panel.', 'GROUP_HIDDEN' => 'Hidden', 'GROUP_LANG' => 'Group language', 'GROUP_LEAD' => 'Group leaders', @@ -95,6 +97,7 @@ $lang = array_merge($lang, array( 'MEMBERS' => 'Members', 'NO_GROUP' => 'No group specified.', + 'NO_GROUPS_CREATED' => 'No groups created yet.', 'NO_PERMISSIONS' => 'Do not copy permissions', 'NO_USERS' => 'You haven’t entered any users.', diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index a1feb2acac..13dae541ac 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -38,11 +38,12 @@ $lang = array_merge($lang, array( 'BBCODE_ADDED' => 'BBCode added successfully.', 'BBCODE_EDITED' => 'BBCode edited successfully.', - 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', 'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.', 'BBCODE_HELPLINE' => 'Helpline', 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouseover text of the BBCode', 'BBCODE_HELPLINE_TEXT' => 'Helpline text', + 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', + 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.', 'BBCODE_TAG' => 'Tag', 'BBCODE_TAG_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.', 'BBCODE_USAGE' => 'BBCode usage', @@ -95,7 +96,7 @@ $lang = array_merge($lang, array( 'EXPORT_ICONS' => 'Export and download icons.pak', 'EXPORT_ICONS_EXPLAIN' => '%sOn clicking this link, the configuration for your installed icons will be packaged into <samp>icons.pak</samp> which once downloaded can be used to create a <samp>.zip</samp> or <samp>.tgz</samp> file containing all of your icons plus this <samp>icons.pak</samp> configuration file%s.', 'EXPORT_SMILIES' => 'Export and download smilies.pak', - 'EXPORT_SMILIES_EXPLAIN' => '%sOn clicking this link, the configuration for your installed smilies will be packaged into <samp>smilies.pak</samp> which once downloaded can be used to create a <samp>.zip</samp> or <samp>.tgz</samp> file containing all of your smilies plus this <samp>icons.pak</samp> configuration file%s.', + 'EXPORT_SMILIES_EXPLAIN' => '%sOn clicking this link, the configuration for your installed smilies will be packaged into <samp>smilies.pak</samp> which once downloaded can be used to create a <samp>.zip</samp> or <samp>.tgz</samp> file containing all of your smilies plus this <samp>smilies.pak</samp> configuration file%s.', 'FIRST' => 'First', @@ -126,7 +127,7 @@ $lang = array_merge($lang, array( 'NO_SMILIES_EXPORT' => 'You have no smilies with which to create a package.', 'NO_SMILIES_PAK' => 'No smiley packages found.', - 'PAK_FILE_NOT_READABLE' => 'Could not read pak file.', + 'PAK_FILE_NOT_READABLE' => 'Could not read <samp>.pak</samp> file.', 'REPLACE_MATCHES' => 'Replace matches', @@ -215,8 +216,8 @@ $lang = array_merge($lang, array( 'ADD_NEW_REASON' => 'Add new reason', 'AVAILABLE_TITLES' => 'Available localized reason titles', - 'IS_NOT_TRANSLATED' => 'Reason has <samp>not</samp> been localised.', - 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has <samp>not</samp> been localised. If you want to provide the localized form, specify the correct key from the language files report reasons section.', + 'IS_NOT_TRANSLATED' => 'Reason has <strong>not</strong> been localised.', + 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has <strong>not</strong> been localised. If you want to provide the localized form, specify the correct key from the language files report reasons section.', 'IS_TRANSLATED' => 'Reason has been localised.', 'IS_TRANSLATED_EXPLAIN' => 'Reason has been localised. If the title you enter here is specified within the language files report reasons section, the localized form of the title and description will be used.', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 6e86da03a7..1866d59490 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -125,7 +125,7 @@ $lang = array_merge($lang, array( 'SAVE' => 'Save', 'SECOND_OPTION' => 'Second option', - 'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. These informations are needed for the second step where you are able to set remaining options and where you are able to preview and tweak your profile field further.', + 'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. These information are needed for the second step where you are able to set remaining options and where you are able to preview and tweak your profile field further.', 'STEP_1_EXPLAIN_EDIT' => 'Here you can change the basic parameters of your profile field. The relevant options are re-calculated within the second step, where you are able to preview and test the changed settings.', 'STEP_1_TITLE_CREATE' => 'Add profile field', 'STEP_1_TITLE_EDIT' => 'Edit profile field', diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php index 4452deafc9..9c23848623 100644 --- a/phpBB/language/en/acp/prune.php +++ b/phpBB/language/en/acp/prune.php @@ -32,7 +32,7 @@ if (empty($lang) || !is_array($lang)) // User pruning $lang = array_merge($lang, array( - 'ACP_PRUNE_USERS_EXPLAIN' => 'Here you can delete (or deactivate) users from you board. This can be done in a variety of ways; by post count, last activity, etc. Each of these criteria can be combined, i.e. you can prune users last active before 2002-01-01 with fewer than 10 posts. Alternatively you can enter a list of users directly into the text box, any criteria entered will be ignored. Take care with this facility! Once a user is deleted there is no way back.', + 'ACP_PRUNE_USERS_EXPLAIN' => 'Here you can delete (or deactivate) users from your board. This can be done in a variety of ways; by post count, last activity, etc. Each of these criteria can be combined, i.e. you can prune users last active before 2002-01-01 with fewer than 10 posts. Alternatively you can enter a list of users directly into the text box, any criteria entered will be ignored. Take care with this facility! Once a user is deleted there is no way back.', 'DEACTIVATE_DELETE' => 'Deactivate or delete', 'DEACTIVATE_DELETE_EXPLAIN' => 'Choose whether to deactivate users or delete them entirely, note there is no undo!', diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php index afa1697534..08bebf2d66 100644 --- a/phpBB/language/en/acp/users.php +++ b/phpBB/language/en/acp/users.php @@ -109,7 +109,6 @@ $lang = array_merge($lang, array( 'USER_GROUP_NORMAL' => 'Normal groups user is a member of', 'USER_GROUP_PENDING' => 'Groups user is in pending mode', 'USER_GROUP_SPECIAL' => 'Special groups user is a member of', - 'USER_IS_INACTIVE' => 'User is inactive', 'USER_OVERVIEW_UPDATED' => 'User details updated.', 'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.', 'USER_POSTS_MOVED' => 'Successfully moved users posts to target forum.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index d7e4cbd50e..5bba8f92e6 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -311,6 +311,7 @@ $lang = array_merge($lang, array( 'NEXT' => 'Next', 'NEVER' => 'Never', 'NO' => 'No', + 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group from the administration control panel.', 'NOT_AUTHORIZED' => 'You are not authorised to access this area.', 'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.', 'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.', diff --git a/phpBB/language/en/email/admin_activate.txt b/phpBB/language/en/email/admin_activate.txt index a168ff533c..0689c1a068 100644 --- a/phpBB/language/en/email/admin_activate.txt +++ b/phpBB/language/en/email/admin_activate.txt @@ -2,8 +2,13 @@ Subject: Activate user account Hello, -The account owned by "{USERNAME}" has been deactivated or newly created, you should check the details of this user (if required) and activate it using the following link: +The account owned by “{USERNAME}” has been deactivated or newly created, you should check the details of this user (if required) and handle it appropiatly. +Use this link to view the users profile: +{U_USER_DETAILS} + +Use this link to activate the account: {U_ACTIVATE} + {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt index b778496258..6353312fa9 100644 --- a/phpBB/language/en/email/admin_send_email.txt +++ b/phpBB/language/en/email/admin_send_email.txt @@ -1,5 +1,5 @@ -The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an email sent to you by an administrator of “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {CONTACT_EMAIL} diff --git a/phpBB/language/en/email/admin_welcome_activated.txt b/phpBB/language/en/email/admin_welcome_activated.txt index 0e4658b969..ef3122d13d 100644 --- a/phpBB/language/en/email/admin_welcome_activated.txt +++ b/phpBB/language/en/email/admin_welcome_activated.txt @@ -2,6 +2,6 @@ Subject: Account activated Hello {USERNAME}, -Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous email. +Your account on “{SITENAME}” has now been activated, you may login using the username and password you received in a previous email. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt index 8a06683586..cb502ad334 100644 --- a/phpBB/language/en/email/admin_welcome_inactive.txt +++ b/phpBB/language/en/email/admin_welcome_inactive.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt index b3d745ffbb..fb3326e96a 100644 --- a/phpBB/language/en/email/coppa_resend_inactive.txt +++ b/phpBB/language/en/email/coppa_resend_inactive.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} @@ -13,14 +13,14 @@ OR mail it to: {MAIL_INFO} ------------------------------ CUT HERE ------------------------------ -Permission to participate at {SITENAME} +Permission to participate at “{SITENAME}” Username: {USERNAME} Email: {EMAIL_ADDRESS} -I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO {SITENAME} TO STORE THIS INFORMATION. +I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO “{SITENAME}” TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. -I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM {SITENAME} AT ANY TIME. +I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM “{SITENAME}” AT ANY TIME. Parent or guardian diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt index 3acc7e2007..a325c29927 100644 --- a/phpBB/language/en/email/coppa_welcome_inactive.txt +++ b/phpBB/language/en/email/coppa_welcome_inactive.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} @@ -13,15 +13,15 @@ OR mail it to: {MAIL_INFO} ------------------------------ CUT HERE ------------------------------ -Permission to participate at {SITENAME} +Permission to participate at “{SITENAME}” Username: {USERNAME} Password: {PASSWORD} Email: {EMAIL_ADDRESS} -I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO {SITENAME} TO STORE THIS INFORMATION. +I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO “{SITENAME}” TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. -I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM {SITENAME} AT ANY TIME. +I UNDERSTAND THAT I MAY REQUEST FOR THIS INFORMATION TO BE REMOVED FROM “{SITENAME}” AT ANY TIME. Parent or guardian diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt index 4f65f17566..e8d4e3ae1d 100644 --- a/phpBB/language/en/email/email_notify.txt +++ b/phpBB/language/en/email/email_notify.txt @@ -1,8 +1,8 @@ -Subject: {SITENAME} - Email a friend +Subject: “{SITENAME}” — Email a friend Hello {TO_USERNAME}, -This email was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic: +This email was sent from “{SITENAME}” by {FROM_USERNAME} who thought you may be interested in the following topic: {TOPIC_NAME} diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt index 3252e3ae32..578b70b3cf 100644 --- a/phpBB/language/en/email/forum_notify.txt +++ b/phpBB/language/en/email/forum_notify.txt @@ -1,12 +1,12 @@ -Subject: Forum post notification - {FORUM_NAME} +Subject: Forum post notification — “{FORUM_NAME}” Hello {USERNAME}, -You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at {SITENAME}. This forum has received a new reply to the topic "{TOPIC_TITLE}" since your last visit. You can use the following link to view this topic, no more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the forum, “{FORUM_NAME}” at “{SITENAME}”. This forum has received a new reply to the topic “{TOPIC_TITLE}” since your last visit. You can use the following link to view this topic, no more notifications will be sent until you visit the topic. {U_NEWEST_POST} -If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link: +If you no longer wish to watch this forum you can either click the “Unsubscribe forum” link found in the forum above, or by clicking the following link: {U_STOP_WATCHING_FORUM} diff --git a/phpBB/language/en/email/group_added.txt b/phpBB/language/en/email/group_added.txt index e2a6d22ec0..eb0c96e58d 100644 --- a/phpBB/language/en/email/group_added.txt +++ b/phpBB/language/en/email/group_added.txt @@ -2,7 +2,7 @@ Subject: You have been added to this usergroup Congratulations, -You have been added to the "{GROUP_NAME}" group on {SITENAME}. +You have been added to the “{GROUP_NAME}” group on “{SITENAME}”. This action was done by a group moderator or the site administrator, contact them for more information. You can view your groups information here: diff --git a/phpBB/language/en/email/group_approved.txt b/phpBB/language/en/email/group_approved.txt index bc31d88b3e..d0b0745d36 100644 --- a/phpBB/language/en/email/group_approved.txt +++ b/phpBB/language/en/email/group_approved.txt @@ -2,7 +2,7 @@ Subject: Your request has been approved Congratulations, -Your request to join the "{GROUP_NAME}" group on {SITENAME} has been approved. +Your request to join the “{GROUP_NAME}” group on “{SITENAME}” has been approved. Click on the following link to see your group membership. {U_GROUP} diff --git a/phpBB/language/en/email/group_request.txt b/phpBB/language/en/email/group_request.txt index 5b6bbcb33f..5ae80c7495 100644 --- a/phpBB/language/en/email/group_request.txt +++ b/phpBB/language/en/email/group_request.txt @@ -2,7 +2,7 @@ Subject: A request to join your group has been made Dear {USERNAME}, -A user has requested to join the group "{GROUP_NAME}" you moderate on {SITENAME}. +A user has requested to join the group “{GROUP_NAME}” you moderate on “{SITENAME}”. To approve or deny this request for group membership please visit the following link: {U_PENDING} diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt index 61cd345774..55e4127098 100644 --- a/phpBB/language/en/email/installed.txt +++ b/phpBB/language/en/email/installed.txt @@ -13,8 +13,8 @@ Password: {PASSWORD} Board URL: {U_BOARD} ---------------------------- -Useful information on your phpBB installation can be found in the docs folder of your installation and on phpBB.com's support page - http://www.phpbb.com/support/ +Useful information on your phpBB installation can be found in the docs folder of your installation and on phpBB.com’s support page — http://www.phpbb.com/support/ -In order to keep the board safe and secure, it is highly recommended that you keep current with software releases which can be easily done by subscribing to phpBB.com's mailing list, located at the above URL. +In order to keep the board safe and secure, it is highly recommended that you keep current with software releases which can be easily done by subscribing to phpBB.com’s mailing list, located at the above URL. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt index 0c64b7a40e..ebd0f20c09 100644 --- a/phpBB/language/en/email/newtopic_notify.txt +++ b/phpBB/language/en/email/newtopic_notify.txt @@ -1,12 +1,12 @@ -Subject: New topic notification - {FORUM_NAME} +Subject: New topic notification — “{FORUM_NAME}” Hello {USERNAME}, -You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at {SITENAME}. This forum has received a new topic since your last visit, "{TOPIC_TITLE}". You can use the following link to view forum, no more notifications will be sent until you visit the forum. +You are receiving this notification because you are watching the forum, “{FORUM_NAME}” at “{SITENAME}”. This forum has received a new topic since your last visit, “{TOPIC_TITLE}”. You can use the following link to view forum, no more notifications will be sent until you visit the forum. {U_FORUM} -If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link: +If you no longer wish to watch this forum you can either click the “Unsubscribe forum” link found in the forum above, or by clicking the following link: {U_STOP_WATCHING_FORUM} diff --git a/phpBB/language/en/email/post_approved.txt b/phpBB/language/en/email/post_approved.txt index 3c8ef03a3e..5325376e04 100644 --- a/phpBB/language/en/email/post_approved.txt +++ b/phpBB/language/en/email/post_approved.txt @@ -1,8 +1,8 @@ -Subject: Post approved - {POST_SUBJECT} +Subject: Post approved — “{POST_SUBJECT}” Hello {USERNAME}, -You are receiving this notification because your post "{POST_SUBJECT}" at {SITENAME} was approved by a moderator or administrator. +You are receiving this notification because your post “{POST_SUBJECT}” at “{SITENAME}” was approved by a moderator or administrator. If you want to view the post, click the following link: {U_VIEW_POST} diff --git a/phpBB/language/en/email/post_disapproved.txt b/phpBB/language/en/email/post_disapproved.txt index f9adc3e546..d384d93784 100644 --- a/phpBB/language/en/email/post_disapproved.txt +++ b/phpBB/language/en/email/post_disapproved.txt @@ -1,8 +1,8 @@ -Subject: Post disapproved - {POST_SUBJECT} +Subject: Post disapproved — “{POST_SUBJECT}” Hello {USERNAME}, -You are receiving this notification because your post "{POST_SUBJECT}" at {SITENAME} was disapproved by a moderator or administrator. +You are receiving this notification because your post “{POST_SUBJECT}” at “{SITENAME}” was disapproved by a moderator or administrator. The following reason was given for the disapproval: diff --git a/phpBB/language/en/email/privmsg_notify.txt b/phpBB/language/en/email/privmsg_notify.txt index d363df7973..f93944dae6 100644 --- a/phpBB/language/en/email/privmsg_notify.txt +++ b/phpBB/language/en/email/privmsg_notify.txt @@ -2,7 +2,7 @@ Subject: New private message has arrived Hello {USERNAME}, -You have received a new private message from "{AUTHOR_NAME}" to your account on "{SITENAME}" with the following subject: +You have received a new private message from “{AUTHOR_NAME}” to your account on “{SITENAME}” with the following subject: {SUBJECT} diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt index 5dd8fd0e9c..b9e03734e4 100644 --- a/phpBB/language/en/email/profile_send_email.txt +++ b/phpBB/language/en/email/profile_send_email.txt @@ -1,7 +1,7 @@ Hello {TO_USERNAME}, -The following is an email sent to you by {FROM_USERNAME} via your account on {SITENAME}. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an email sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {BOARD_EMAIL} diff --git a/phpBB/language/en/email/profile_send_im.txt b/phpBB/language/en/email/profile_send_im.txt index d2fea692a0..59e06d4fd0 100644 --- a/phpBB/language/en/email/profile_send_im.txt +++ b/phpBB/language/en/email/profile_send_im.txt @@ -1,7 +1,7 @@ Hello {TO_USERNAME}, -The following is a message sent to you by {FROM_USERNAME} via your account on {SITENAME}. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is a message sent to you by {FROM_USERNAME} via your account on “{SITENAME}”. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {BOARD_EMAIL} diff --git a/phpBB/language/en/email/report_closed.txt b/phpBB/language/en/email/report_closed.txt index f7c63527da..77b7742eb4 100644 --- a/phpBB/language/en/email/report_closed.txt +++ b/phpBB/language/en/email/report_closed.txt @@ -1,8 +1,8 @@ -Subject: Report closed - {POST_SUBJECT} +Subject: Report closed — “{POST_SUBJECT}” Hello {USERNAME}, -You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at {SITENAME} was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message. +You are receiving this notification because the report you filed on the post “{POST_SUBJECT}” in “{TOPIC_TITLE}” at “{SITENAME}” was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/report_deleted.txt b/phpBB/language/en/email/report_deleted.txt index f8e32c88ab..661886a7cd 100644 --- a/phpBB/language/en/email/report_deleted.txt +++ b/phpBB/language/en/email/report_deleted.txt @@ -1,8 +1,8 @@ -Subject: Report deleted - {POST_SUBJECT} +Subject: Report deleted — “{POST_SUBJECT}” Hello {USERNAME}, -You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at {SITENAME} was deleted by a moderator or by an administrator. +You are receiving this notification because the report you filed on the post “{POST_SUBJECT}” in “{TOPIC_TITLE}” at “{SITENAME}” was deleted by a moderator or by an administrator. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/topic_approved.txt b/phpBB/language/en/email/topic_approved.txt index 3b9bd34b0e..af47d0ba66 100644 --- a/phpBB/language/en/email/topic_approved.txt +++ b/phpBB/language/en/email/topic_approved.txt @@ -1,8 +1,8 @@ -Subject: Topic approved - {TOPIC_TITLE} +Subject: Topic approved — “{TOPIC_TITLE}” Hello {USERNAME}, -You are receiving this notification because your topic "{TOPIC_TITLE}" at {SITENAME} was approved by a moderator or administrator. +You are receiving this notification because your topic “{TOPIC_TITLE}” at “{SITENAME}” was approved by a moderator or administrator. If you want to view the topic, click the following link: {U_VIEW_TOPIC} diff --git a/phpBB/language/en/email/topic_disapproved.txt b/phpBB/language/en/email/topic_disapproved.txt index fe417a0a1b..58cda4fbf4 100644 --- a/phpBB/language/en/email/topic_disapproved.txt +++ b/phpBB/language/en/email/topic_disapproved.txt @@ -1,8 +1,8 @@ -Subject: Topic disapproved - {TOPIC_TITLE} +Subject: Topic disapproved — “{TOPIC_TITLE}” Hello {USERNAME}, -You are receiving this notification because your topic "{TOPIC_TITLE}" at {SITENAME} was disapproved by a moderator or administrator. +You are receiving this notification because your topic “{TOPIC_TITLE}” at “{SITENAME}” was disapproved by a moderator or administrator. The following reason was given for the disapproval: diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt index fcfb9c63af..6e6f52d03f 100644 --- a/phpBB/language/en/email/topic_notify.txt +++ b/phpBB/language/en/email/topic_notify.txt @@ -1,8 +1,8 @@ -Subject: Topic reply notification - {TOPIC_TITLE} +Subject: Topic reply notification — “{TOPIC_TITLE}” Hello {USERNAME}, -You are receiving this notification because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the topic, “{TOPIC_TITLE}” at “{SITENAME}”. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. If you want to view the newest post made since your last visit, click the following link: {U_NEWEST_POST} @@ -10,7 +10,7 @@ If you want to view the newest post made since your last visit, click the follow If you want to view the topic, click the following link: {U_TOPIC} -If you no longer wish to watch this topic you can either click the "Stop watching this topic" link found at the bottom of the topic above, or by clicking the following link: +If you no longer wish to watch this topic you can either click the “Stop watching this topic” link found at the bottom of the topic above, or by clicking the following link: {U_STOP_WATCHING_TOPIC} diff --git a/phpBB/language/en/email/user_activate.txt b/phpBB/language/en/email/user_activate.txt index 7d7960c4c5..fb9f3033b7 100644 --- a/phpBB/language/en/email/user_activate.txt +++ b/phpBB/language/en/email/user_activate.txt @@ -2,7 +2,7 @@ Subject: Reactivate your account Hello {USERNAME}, -Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below: +Your account on “{SITENAME}” has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below: {U_ACTIVATE} diff --git a/phpBB/language/en/email/user_activate_inactive.txt b/phpBB/language/en/email/user_activate_inactive.txt index cbef5c780c..4c1b5a6727 100644 --- a/phpBB/language/en/email/user_activate_inactive.txt +++ b/phpBB/language/en/email/user_activate_inactive.txt @@ -2,6 +2,6 @@ Subject: Your account has been deactivated Hello {USERNAME}, -Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. The administrator of the board will need to activate it before you can log in. You will receive another email when this has occured. +Your account on “{SITENAME}” has been deactivated, most likely due to changes made to your profile. The administrator of the board will need to activate it before you can log in. You will receive another notification when this has occured. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/user_activate_passwd.txt b/phpBB/language/en/email/user_activate_passwd.txt index 76a7f88930..f90fc1a586 100644 --- a/phpBB/language/en/email/user_activate_passwd.txt +++ b/phpBB/language/en/email/user_activate_passwd.txt @@ -2,7 +2,7 @@ Subject: New password activation Hello {USERNAME} -You are receiving this notification because you have (or someone pretending to be you has) requested a new password be sent for your account on {SITENAME}. If you did not request this email then please ignore it, if you keep receiving it please contact the board administrator. +You are receiving this notification because you have (or someone pretending to be you has) requested a new password be sent for your account on “{SITENAME}”. If you did not request this notification then please ignore it, if you keep receiving it please contact the board administrator. To use the new password you need to activate it. To do this click the link provided below. diff --git a/phpBB/language/en/email/user_remind_inactive.txt b/phpBB/language/en/email/user_remind_inactive.txt index 806f9f3a63..f0969dfc9f 100644 --- a/phpBB/language/en/email/user_remind_inactive.txt +++ b/phpBB/language/en/email/user_remind_inactive.txt @@ -2,10 +2,10 @@ Subject: Inactive account reminder Hello {USERNAME}, -On {REGISTER_DATE} you registered a new account at "{SITENAME}". So far you have not activated this account, you must do this before you can login. For your convenience the activation link is repeated below. +On {REGISTER_DATE} you registered a new account at “{SITENAME}”. So far you have not activated this account, you must do this before you can login. For your convenience the activation link is repeated below. {U_ACTIVATE} -Thank you for registering at "{SITENAME}", we look forward to your participation. +Thank you for registering at “{SITENAME}”, we look forward to your participation. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt index 3a35c53dd4..8338cef0e6 100644 --- a/phpBB/language/en/email/user_resend_inactive.txt +++ b/phpBB/language/en/email/user_resend_inactive.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt index 6a911d90a2..fa781a324e 100644 --- a/phpBB/language/en/email/user_welcome.txt +++ b/phpBB/language/en/email/user_welcome.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt index 4575c7e7bb..7949087155 100644 --- a/phpBB/language/en/email/user_welcome_inactive.txt +++ b/phpBB/language/en/email/user_welcome_inactive.txt @@ -1,4 +1,4 @@ -Subject: Welcome to {SITENAME} ({U_BOARD}) +Subject: Welcome to “{SITENAME}” — {U_BOARD} {WELCOME_MSG} diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index a9dba1a1d6..9e68ebf393 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -135,11 +135,11 @@ $help = array( 1 => 'Only registered users can vote in polls (so as to prevent spoofing of results). If you have registered and still cannot vote then you probably do not have appropriate access rights.' ), array( - 0 => 'Why can’t I add attachements?', + 0 => 'Why can’t I add attachments?', 1 => 'The ability to add attachments can be done on a per forum, per group, or per user basis. The board administrator may not have allowed attachments to be added for the specific forum you are posting in, or perhaps only the administrator group can post attachments. Contact the board administrator if you are unsure about why you are unable to add attachments.' ), array( - 0 => 'Why did I receieve a warning?', + 0 => 'Why did I receive a warning?', 1 => 'Each board administrator has their own set of rules for their site. If they feel you have broken one of your rules, they may issue you a warning. Please note that this is the board administrator’s decision, and the phpBB Group does not have anything to do with the warning on the given site.' ), array( diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 86a1761bfe..f6c1105d20 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -46,6 +46,7 @@ $lang = array_merge($lang, array( 'BEGIN_CONVERT' => 'Begin conversion', 'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.', + 'CATEGORY' => 'Category', 'CACHE_STORE' => 'Cache type', 'CACHE_STORE_EXPLAIN' => 'The physical location where data is cached, filesystem is prefered.', 'CAT_CONVERT' => 'Convert', @@ -68,6 +69,33 @@ $lang = array_merge($lang, array( 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.', 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist', 'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion progress, push the button below to begin', + + 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP Upload for Attachments is enabled at the old board. Please copy all Attachment files to a directory accessible, disable ftp uploading and make sure a valid upload dir is specified. If you have done this, restart the convertor.', + 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.', + 'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.', + 'CONV_ERROR_GET_CATEGORIES' => 'Unable to get categories.', + 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your forum configuration.', + 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read "%s".', + 'CONV_ERROR_GROUP_ACCESS' => 'Unable to get group authentication information.', + 'CONV_ERROR_INCONSISTENT_GROUPS' => 'Inconsistency in groups table detected in add_bots() - you need to add all special groups if you do it manually.', + 'CONV_ERROR_INSERT_BOT' => 'Unable to insert bot into users table.', + 'CONV_ERROR_INSERT_BOTGROUP' => 'Unable to insert bot into bots table.', + 'CONV_ERROR_INSERT_USER_GROUP' => 'Unable to insert user into user_group table.', + 'CONV_ERROR_MESSAGE_PARSER' => 'Message parser error', + 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.', + 'CONV_ERROR_NO_FORUM_PATH' => 'The relative path to the source forum has not been specified.', + 'CONV_ERROR_NO_GALLERY_PATH' => 'Note to developer: you must specify $convertor[\'avatar_gallery_path\'] to use %s.', + 'CONV_ERROR_NO_GROUP' => 'Group "%1$s" could not be found in %2$s.', + 'CONV_ERROR_NO_RANKS_PATH' => 'Note to developer: you must specify $convertor[\'ranks_path\'] to use %s.', + 'CONV_ERROR_NO_SMILIES_PATH' => 'Note to developer: you must specify $convertor[\'smilies_path\'] to use %s.', + 'CONV_ERROR_NO_UPLOAD_DIR' => 'Note to developer: you must specify $convertor[\'upload_dir\'] to use %s.', + 'CONV_ERROR_PERM_SETTING' => 'Unable to insert/update permission setting.', + 'CONV_ERROR_PM_COUNT' => 'Unable to select folder pm count.', + 'CONV_ERROR_REPLACE_CATEGORY' => 'Unable to insert new forum replacing old category.', + 'CONV_ERROR_REPLACE_FORUM' => 'Unable to insert new forum replacing old forum.', + 'CONV_ERROR_USER_ACCESS' => 'Unable to get user authentication information.', + 'CONV_ERROR_WRONG_GROUP' => 'Wrong group "%1$s" defined in %2$s.', + 'COULD_NOT_COPY' => 'Could not copy file <strong>%1$s</strong> to <strong>%2$s</strong><br /><br />Please check that the target directory exists and is writable by the webserver', 'COULD_NOT_FIND_PATH' => 'Could not find path to your former forum. Please check your settings and try again.<br />» Specified source path was %s', @@ -157,8 +185,7 @@ $lang = array_merge($lang, array( 'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below', 'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your forum directory tree. You should put this file in a non web-accessible location', 'INST_ERR_DB_NO_ERROR' => 'No error message given', - 'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the “MySQL 4.x/5.x” option you have selected. Please try the “MySQL 3.23.x/4.x” option instead.', - 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL 4.1.x/5.x with MySQLi Extension” option you have selected. Please try the “MySQL 3.23.x/4.x” option instead.', + 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension” option you have selected. Please try the “MySQL” option instead.', 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.', 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.', 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.0, please upgrade to a newer version.', @@ -172,9 +199,9 @@ $lang = array_merge($lang, array( 'INST_ERR_FTP_LOGIN' => 'Could not login to FTP server, check your username and password', 'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block', 'INST_ERR_NO_DB' => 'Cannot load the PHP module for the selected database type', - 'INST_ERR_PASSWORD_MISMATCH' => 'The passwords you entered did not match.', - 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.', - 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.', + 'INST_ERR_PASSWORD_MISMATCH' => 'The passwords you entered did not match.', + 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.', + 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.', 'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.', 'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen', 'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.', @@ -195,6 +222,8 @@ $lang = array_merge($lang, array( 'NO_TABLES_FOUND' => 'No tables found.', // TODO: Write some explanatory introduction text 'OVERVIEW_BODY' => 'Welcome to our public beta of the next-generation of phpBB after 2.0.x, phpBB 3.0! This beta release is intended for advanced users to try out on dedicated development enviroments to help us finish creating the best Opensource Bulletin Board solution available.</p><p><strong style="text-transform: uppercase;">Note:</strong> This release is <strong style="text-transform: uppercase;">not final</strong> and made available for testing purposes <strong style="text-transform: uppercase;">only</strong>.</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.', + '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', 'PHP_OPTIONAL_MODULE' => 'Optional Modules', 'PHP_OPTIONAL_MODULE_EXPLAIN' => '<strong>Optional</strong> - These modules or applications are optional, you do not need these to use phpBB 3.0. However if you do have them they will will enable greater functionality.', 'PHP_SUPPORTED_DB' => 'Supported Databases', @@ -205,6 +234,7 @@ $lang = array_merge($lang, array( 'PHP_SETTINGS' => 'PHP Version and Settings', 'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 4.3.3 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.', 'PHP_VERSION_REQD' => 'PHP version >= 4.3.3', + 'POST_ID' => 'Post id', 'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using <strong>%s</strong> as table prefix.', 'PREPROCESS_STEP' => 'Executing pre-processing functions/queries', 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process.', @@ -227,7 +257,7 @@ $lang = array_merge($lang, array( 'STAGE_ADVANCED_EXPLAIN' => 'The settings on this page are only necessary to set if you know that you require something different from the default. If unsure, just proceed to the next page, this can be altered from the Administration Panel later.', 'STAGE_CONFIG_FILE' => 'Configuration File', 'STAGE_CREATE_TABLE' => 'Create Database Tables', - 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.', + 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.', 'STAGE_DATABASE' => 'Database Settings', 'STAGE_FINAL' => 'Final Stage', 'STAGE_INTRO' => 'Introduction', @@ -273,8 +303,8 @@ $lang = array_merge($lang, array( 'CHECK_FILES_AGAIN' => 'Check files again', 'CHECK_FILES_EXPLAIN' => 'Within the next step all files will be checked against the update files - this can take a while if this is the first file check.', 'CHECK_FILES_UP_TO_DATE' => 'According to your database your version is up to date. You may want to proceed with the file check to make sure all files are really up to date with the latest phpBB version.', - 'COLLECTED_INFORMATIONS' => 'Collected file informations', - 'COLLECTED_INFORMATIONS_EXPLAIN'=> 'The list below shows informations about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.', + 'COLLECTED_INFORMATION' => 'Information on collected files', + 'COLLECTED_INFORMATION_EXPLAIN' => 'The list below shows information about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.', '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. Don’t forget to delete, rename or move your install directory!', 'CURRENT_FILE' => 'Current original file', 'CURRENT_VERSION' => 'Current version', @@ -297,7 +327,8 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date', - 'FILE_USED' => 'Informations used from', + 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed', + 'FILE_USED' => 'Information used from', // Single file 'FILES_CONFLICT' => 'Conflict files', 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified the them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.', 'FILES_MODIFIED' => 'Modified files', @@ -337,13 +368,13 @@ $lang = array_merge($lang, array( 'NO_UPDATE_FILES_EXPLAIN' => 'The following files are new or modified but the directory they normally reside in could not be found on your installation. If this list contains files to other directories than language/ or styles/ than you may have modified your directory structure and the update may be incomplete.', 'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files.<br /><br />Your installation does <strong>not</strong> seem to be up to date. Updates are available for your version of phpBB %1$s, please visit <a href="http://www.phpbb.com/downloads.php" rel="external">http://www.phpbb.com/downloads.php</a> to obtain the correct package to update from Version %2$s to Version %3$s.', 'NO_UPDATE_FILES_UP_TO_DATE' => 'Your version is up to date. There is no need to run the update tool. If you want to make an integrity check on your files make sure you uploaded the correct update files.', - 'NO_UPDATE_INFO' => 'Update file informations could not be found.', + 'NO_UPDATE_INFO' => 'Update file information could not be found.', 'NO_UPDATES_REQUIRED' => 'No updates required', 'NO_VISIBLE_CHANGES' => 'No visible changes', 'NOTICE' => 'Notice', 'NUM_CONFLICTS' => 'Number of conflicts', - 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating to phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.', + 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.', 'PERFORM_DATABASE_UPDATE' => 'Perform database update', 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a link to the database update script. This script needs to be run seperatly because updating the database might result in unexpected behaviour if you are logged in. The database update can take a while, so please do not stop the execution if it only seems to hang. After you clicked the link and the update finished you can close this window too.', @@ -381,7 +412,7 @@ $lang = array_merge($lang, array( 'UPDATE_FILES' => 'Update files', 'UPDATE_FILES_NOTICE' => 'Please make sure you have updated your board files too, this file is only updating your database.', 'UPDATE_INSTALLATION' => 'Update phpBB Installation', - 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not loose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location. If everything is correctly updated you will be forwarded to the database updater.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly. If so, you will be forwarded to the database updater.', + 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location. If everything is correctly updated you will be forwarded to the database updater.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly. If so, you will be forwarded to the database updater.', 'UPDATE_INSTRUCTIONS' => ' <h1>Release announcement</h1> diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index e0008603bc..95217c3ac8 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -40,7 +40,6 @@ $lang = array_merge($lang, array( 'ATTACH_QUOTA_REACHED' => 'Sorry, the board attachment quota has been reached.', 'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)', - 'BBCODE_A_HELP' => 'Close all open BBCode tags', 'BBCODE_B_HELP' => 'Bold text: [b]text[/b] (alt+b)', 'BBCODE_C_HELP' => 'Code display: [code]code[/code] (alt+c)', 'BBCODE_E_HELP' => 'List: Add list element', @@ -107,8 +106,11 @@ $lang = array_merge($lang, array( 'LOAD' => 'Load', 'LOAD_DRAFT' => 'Load draft', 'LOAD_DRAFT_EXPLAIN' => 'Here you are able to select the draft you want to continue writing. Your current post will be canceled, all current post contents will be deleted. View, edit and delete drafts within your User Control Panel.', - 'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum', - 'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum', + 'LOGIN_EXPLAIN_BUMP' => 'You need to login in order to bump topics within this forum.', + 'LOGIN_EXPLAIN_DELETE' => 'You need to login in order to delete posts within this forum.', + 'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum.', + 'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.', + 'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.', 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.', 'MAX_FLASH_HEIGHT_EXCEEDED' => 'Your flash files may only be up to %1$d pixels high.', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 9d51c0d7bb..4761fcdd48 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -124,10 +124,11 @@ $lang = array_merge($lang, array( 'CHANGE_PASSWORD' => 'Change password', 'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s', 'CONFIRMATION' => 'Confirmation of registration', + 'CONFIRM_CHANGES' => 'Confirm changes', 'CONFIRM_EMAIL' => 'Confirm email address', 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your email address.', 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board administrator requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', - 'CONFIRM_PASSWORD' => 'Confirm password', + 'CONFIRM_PASSWORD' => 'Confirm new password', 'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above', 'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.', 'COPPA_COMPLIANCE' => 'COPPA compliance', @@ -170,7 +171,7 @@ $lang = array_merge($lang, array( 'DRAFTS_EXPLAIN' => 'Here you can view, edit and delete your saved drafts.', 'DRAFT_UPDATED' => 'Draft successfully updated.', - 'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll informations.', + 'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll information.', 'EMAIL_BANNED_EMAIL' => 'The email address you entered is not allowed to be used.', 'EMAIL_INVALID_EMAIL' => 'The email address you entered is invalid.', 'EMAIL_REMIND' => 'This must be the email address you supplied when registering.', @@ -263,7 +264,7 @@ $lang = array_merge($lang, array( 'NEW_EMAIL_ERROR' => 'The email addresses you entered do not match.', 'NEW_FOLDER_NAME' => 'New folder name', - 'NEW_PASSWORD' => 'Password', + 'NEW_PASSWORD' => 'New password', 'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.', 'NOTIFY_METHOD' => 'Notification method', 'NOTIFY_METHOD_BOTH' => 'Both', @@ -367,6 +368,8 @@ $lang = array_merge($lang, array( 'RULE_ALREADY_DEFINED' => 'This rule was defined previously', 'RULE_DELETED' => 'Rule successfully removed', 'RULE_NOT_DEFINED' => 'Rule not correctly specified', + 'RULE_REMOVED_MESSAGE' => 'One private message had been removed due to private message filters.', + 'RULE_REMOVED_MESSAGES' => '%d private messages were removed due to private message filters.', 'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password', 'SEARCH_YOUR_POSTS' => 'Show your posts', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index f995aa4d78..f18dc37c77 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -33,7 +33,9 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'ACTIVE_TOPICS' => 'Active topics', 'ANNOUNCEMENTS' => 'Announcements', - + + 'FORUM_PERMISSIONS' => 'Forum permissions', + 'ICON_ANNOUNCEMENT' => 'Announcement', 'ICON_STICKY' => 'Sticky', @@ -46,6 +48,7 @@ $lang = array_merge($lang, array( 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]', 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]', + 'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.', 'POST_FORUM_LOCKED' => 'Forum is locked', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index fe64058418..98a59a73ed 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -557,21 +557,21 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, case 'posts': $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 't' => 'p.post_time', 's' => 'p.post_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject'); $limit_time_sql = ($min_time) ? "AND p.post_time >= $min_time" : ''; break; case 'reports': $limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject'); break; case 'logs': $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'l.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $limit_time_sql = ($min_time) ? "AND l.log_time >= $min_time" : ''; break; } @@ -606,74 +606,74 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, /** * Validate ids +* +* @param array &$ids The relevant ids to check +* @param string $table The table to find the ids in +* @param string $sql_id The ids relevant column name +* @param array $acl_list A list of permissions the user need to have +* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true) +* +* @return mixed False if no ids were able to be retrieved, true if at least one id left. +* Additionally, this value can be the forum_id assigned if $single_forum was set. +* Therefore checking the result for with !== false is the best method. */ -function check_ids(&$ids, $table, $sql_id, $acl_list = false) +function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false) { global $db, $auth; - if (!is_array($ids) || !$ids) + if (!is_array($ids) || empty($ids)) { - return 0; + return false; } - // a small logical error, since global announcement are assigned to forum_id == 0 - // If the first topic id is a global announcement, we can force the forum. Though only global announcements can be - // tricked... i really do not know how to prevent this atm. - - // With those two queries we make sure all ids are within one forum... - $sql = "SELECT forum_id FROM $table - WHERE $sql_id = {$ids[0]}"; + $sql = "SELECT $sql_id, forum_id FROM $table + WHERE " . $db->sql_in_set($sql_id, $ids); $result = $db->sql_query($sql); - $forum_id = (int) $db->sql_fetchfield('forum_id'); - $db->sql_freeresult($result); - if (!$forum_id) - { - // Global Announcement? - $forum_id = request_var('f', 0); - } - - if ($forum_id === 0) + $ids = array(); + $forum_id = false; + while ($row = $db->sql_fetchrow($result)) { - // Determine first forum the user is able to read - for global announcements - $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true))); + if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id'])) + { + continue; + } - $sql = 'SELECT forum_id - FROM ' . FORUMS_TABLE . ' - WHERE forum_type = ' . FORUM_POST; - if (sizeof($forum_ary)) + if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list)) { - $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true); + continue; } - $result = $db->sql_query_limit($sql, 1); - $forum_id = (int) $db->sql_fetchfield('forum_id'); - $db->sql_freeresult($result); - } + // Limit forum? If not, just assign the id. + if ($single_forum === false) + { + $ids[] = $row[$sql_id]; + continue; + } - if ($acl_list && !$auth->acl_gets($acl_list, $forum_id)) - { - trigger_error('NOT_AUTHORIZED'); - } + // Limit forum to a specific forum id? + if ($single_forum !== true && $row['forum_id'] == (int) $single_forum) + { + $forum_id = (int) $single_forum; + } + else if ($forum_id === false) + { + $forum_id = $row['forum_id']; + } - if (!$forum_id) - { - trigger_error('Missing forum_id, has to be in url if global announcement...', E_USER_ERROR); + if ($row['forum_id'] == $forum_id) + { + $ids[] = $row[$sql_id]; + } } + $db->sql_freeresult($result); - $sql = "SELECT $sql_id FROM $table - WHERE " . $db->sql_in_set($sql_id, $ids) . " - AND (forum_id = $forum_id OR forum_id = 0)"; - $result = $db->sql_query($sql); - - $ids = array(); - while ($row = $db->sql_fetchrow($result)) + if (!sizeof($ids)) { - $ids[] = $row[$sql_id]; + return false; } - $db->sql_freeresult($result); - return $forum_id; + return ($single_forum === false) ? true : (int) $forum_id; } ?>
\ No newline at end of file diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 50fa8e4954..834a938049 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -122,7 +122,7 @@ switch ($mode) $db->sql_freeresult($result); $sql = $db->sql_build_query('SELECT', array( - 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.user_colour, u.user_rank, u.user_posts, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id', + 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id', 'FROM' => array( USERS_TABLE => 'u', @@ -139,7 +139,7 @@ switch ($mode) 'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . ' AND u.group_id = g.group_id', - 'ORDER_BY' => 'g.group_name ASC, u.username ASC' + 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC' )); $result = $db->sql_query($sql); @@ -195,7 +195,7 @@ switch ($mode) // instead of saying they are moderating all forums if (!$s_forum_select && $undisclosed_forum) { - $s_forum_select = $user->lang['FORUM_UNDISCLOSED']; + $s_forum_select = '<option value="">' . $user->lang['FORUM_UNDISCLOSED'] . '</option>'; } if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id']) @@ -215,8 +215,6 @@ switch ($mode) $template->assign_block_vars($which_row, array( 'USER_ID' => $row['user_id'], 'FORUMS' => $s_forum_select, - 'USERNAME' => $row['username'], - 'USER_COLOR' => $row['user_colour'], 'RANK_TITLE' => $rank_title, 'GROUP_NAME' => $group_name, 'GROUP_COLOR' => $row['group_colour'], @@ -224,10 +222,14 @@ switch ($mode) 'RANK_IMG' => $rank_img, 'RANK_IMG_SRC' => $rank_img_src, - 'U_GROUP' => $u_group, - 'U_VIEWPROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '') - ); + 'U_GROUP' => $u_group, + 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '', + + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), + 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), + 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), + )); } $db->sql_freeresult($result); @@ -346,15 +348,20 @@ switch ($mode) { $sql = 'SELECT * FROM ' . USERS_TABLE . " - WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "' - AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; } else { $sql = 'SELECT * FROM ' . USERS_TABLE . " - WHERE user_id = $user_id - AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + WHERE user_id = $user_id"; + } + + // a_user admins and founder are able to view inactive users and bots to be able to + // manage them more easily + if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER) + { + $sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; } $result = $db->sql_query($sql); @@ -530,6 +537,38 @@ switch ($mode) } } + // Inactive reason/account? + if ($member['user_type'] == USER_INACTIVE) + { + $user->add_lang('acp/common'); + + $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN']; + + switch ($member['user_inactive_reason']) + { + case INACTIVE_REGISTER: + $inactive_reason = $user->lang['INACTIVE_REASON_REGISTER']; + break; + + case INACTIVE_PROFILE: + $inactive_reason = $user->lang['INACTIVE_REASON_PROFILE']; + break; + + case INACTIVE_MANUAL: + $inactive_reason = $user->lang['INACTIVE_REASON_MANUAL']; + break; + + case INACTIVE_REMIND: + $inactive_reason = $user->lang['INACTIVE_REASON_REMIND']; + break; + } + + $template->assign_vars(array( + 'S_USER_INACTIVE' => true, + 'USER_INACTIVE_REASON' => $inactive_reason) + ); + } + // Now generate page tilte $page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']); $template_html = 'memberlist_view.html'; @@ -799,8 +838,21 @@ switch ($mode) $template_html = 'memberlist_body.html'; // Sorting - $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'e' => $user->lang['SORT_EMAIL'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER'], 'l' => $user->lang['SORT_LAST_ACTIVE'], 'm' => $user->lang['SORT_RANK'] ); - $sort_key_sql = array('a' => 'u.username', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber', 'l' => 'u.user_lastvisit', 'm' => 'u.user_rank DESC, u.user_posts'); + $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'e' => $user->lang['SORT_EMAIL'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']); + + if ($auth->acl_get('u_viewonline')) + { + $sort_key_text['l'] = $user->lang['SORT_LAST_ACTIVE']; + } + $sort_key_text['m'] = $user->lang['SORT_RANK']; + + $sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + + if ($auth->acl_get('u_viewonline')) + { + $sort_key_sql['l'] = 'u.user_lastvisit'; + } + $sort_key_sql['m'] = 'u.user_rank DESC, u.user_posts'; $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); @@ -828,7 +880,7 @@ switch ($mode) if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_'))) { $username = request_var('username', '', true); - $email = request_var('email', ''); + $email = strtolower(request_var('email', '')); $icq = request_var('icq', ''); $aim = request_var('aim', ''); $yahoo = request_var('yahoo', ''); @@ -1006,6 +1058,7 @@ switch ($mode) } $avatar_img = ''; + if ($group_row['group_avatar']) { switch ($group_row['group_avatar_type']) @@ -1018,8 +1071,8 @@ switch ($mode) $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } @@ -1218,7 +1271,7 @@ switch ($mode) 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, 'S_GROUP_LEADER' => (isset($row['group_leader']) && $row['group_leader']) ? true : false, - 'U_VIEWPROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id)) + 'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id)) ); if (isset($cp_row['row']) && sizeof($cp_row['row'])) @@ -1345,8 +1398,6 @@ function show_profile($data) $email = ''; } - $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit']; - if ($config['load_onlinetrack']) { $update_time = $config['load_online_time'] * 60; @@ -1357,6 +1408,15 @@ function show_profile($data) $online = false; } + if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline')) + { + $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit']; + } + else + { + $last_visit = ''; + } + $age = ''; if ($data['user_birthday']) @@ -1390,7 +1450,7 @@ function show_profile($data) 'JOINED' => $user->format_date($data['user_regdate']), 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit), 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0, - 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0, + 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0, 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, @@ -1403,7 +1463,7 @@ function show_profile($data) 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&sr=posts") : '', 'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $user_id, true, $user->session_id) : '', 'U_WARN' => $auth->acl_getf_global('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', - 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', + 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', 'U_EMAIL' => $email, 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '', 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . $data['user_icq'] : '', diff --git a/phpBB/posting.php b/phpBB/posting.php index d2d9ef0e27..654db73a61 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -163,7 +163,7 @@ if ($post_data['forum_password']) // Is the user able to read within this forum? if (!$auth->acl_get('f_read', $forum_id)) { - if ($user->data['is_registered']) + if ($user->data['user_id'] != ANONYMOUS) { trigger_error('USER_CANNOT_READ'); } @@ -370,7 +370,7 @@ if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode WHERE post_msg_id = $post_id AND in_message = 0 AND is_orphan = 0 - ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC'); + ORDER BY filetime DESC"; $result = $db->sql_query($sql); $message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result)); $db->sql_freeresult($result); @@ -445,12 +445,10 @@ $quote_status = ($auth->acl_get('f_reply', $forum_id)) ? true : false; // Save Draft if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts')) { - $subject = request_var('subject', '', true); + $subject = utf8_normalize_nfc(request_var('subject', '', true)); $subject = (!$subject && $mode != 'post') ? $post_data['topic_title'] : $subject; - $message = request_var('message', '', true); + $message = utf8_normalize_nfc(request_var('message', '', true)); - utf8_normalize_nfc(array(&$subject, &$message)); - if ($subject && $message) { if (confirm_box(true)) @@ -528,15 +526,13 @@ $solved_captcha = false; if ($submit || $preview || $refresh) { - $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0); - $post_data['post_subject'] = request_var('subject', '', true); - $message_parser->message = request_var('message', '', true); + $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0); + $post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true)); + $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); - $post_data['username'] = request_var('username', $post_data['username'], true); - $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? request_var('edit_reason', '', true) : ''; + $post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true)); + $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : ''; - utf8_normalize_nfc(array(&$post_data['post_subject'], &$message_parser->message, &$post_data['username'], &$post_data['post_edit_reason'])); - $post_data['topic_type'] = request_var('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL)); $post_data['topic_time_limit'] = request_var('topic_time_limit', (($mode != 'post') ? (int) $post_data['topic_time_limit'] : 0)); $post_data['icon_id'] = request_var('icon', 0); @@ -603,13 +599,11 @@ if ($submit || $preview || $refresh) } else { - $post_data['poll_title'] = request_var('poll_title', '', true); + $post_data['poll_title'] = utf8_normalize_nfc(request_var('poll_title', '', true)); $post_data['poll_length'] = request_var('poll_length', 0); - $post_data['poll_option_text'] = request_var('poll_option_text', '', true); + $post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true)); $post_data['poll_max_options'] = request_var('poll_max_options', 1); $post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0; - - utf8_normalize_nfc(array(&$post_data['poll_title'], &$post_data['poll_option_text'])); } // If replying/quoting and last post id has changed @@ -1123,7 +1117,7 @@ generate_forum_nav($post_data); // Build Forum Rules generate_forum_rules($post_data); -if ($config['enable_post_confirm'] && !$user->data['is_registered'] && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) +if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_captcha === false && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) { // Show confirm image $sql = 'DELETE FROM ' . CONFIRM_TABLE . " @@ -1132,32 +1126,38 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && ($mode == $db->sql_query($sql); // Generate code - if ($solved_captcha === false) - { - $code = gen_rand_string(mt_rand(5, 8)); - $confirm_id = md5(unique_id($user->ip)); - - $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'confirm_id' => (string) $confirm_id, - 'session_id' => (string) $user->session_id, - 'confirm_type' => (int) CONFIRM_POST, - 'code' => (string) $code) - ); - $db->sql_query($sql); + $code = gen_rand_string(mt_rand(5, 8)); + $confirm_id = md5(unique_id($user->ip)); + + $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'confirm_id' => (string) $confirm_id, + 'session_id' => (string) $user->session_id, + 'confirm_type' => (int) CONFIRM_POST, + 'code' => (string) $code) + ); + $db->sql_query($sql); - $template->assign_vars(array( - 'S_CONFIRM_CODE' => true, - 'CONFIRM_ID' => $confirm_id, - 'CONFIRM_IMAGE' => '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_POST) . '" alt="" title="" />', - 'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'), - )); - } + $template->assign_vars(array( + 'S_CONFIRM_CODE' => true, + 'CONFIRM_ID' => $confirm_id, + 'CONFIRM_IMAGE' => '<img src="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_POST) . '" alt="" title="" />', + 'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'), + )); } $s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '<input type="hidden" name="topic_cur_post_id" value="' . $post_data['topic_last_post_id'] . '" />' : ''; $s_hidden_fields .= '<input type="hidden" name="lastclick" value="' . $current_time . '" />'; $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', $draft_id) . '" />' : ''; +// Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview +if ($solved_captcha !== false) +{ + $s_hidden_fields .= build_hidden_fields(array( + 'confirm_id' => request_var('confirm_id', ''), + 'confirm_code' => request_var('confirm_code', '')) + ); +} + $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || @ini_get('file_uploads') == '0' || !$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"'; // Start assigning vars for main posting page ... @@ -1184,7 +1184,7 @@ $template->assign_vars(array( 'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'], 'EDIT_REASON' => $post_data['post_edit_reason'], 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"), - 'U_VIEWTOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") : '', + 'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") : '', 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup"), 'UA_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup", false), diff --git a/phpBB/report.php b/phpBB/report.php index 348b2e91b6..a7bcf58cc9 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -25,9 +25,7 @@ $user->setup('mcp'); $forum_id = request_var('f', 0); $post_id = request_var('p', 0); $reason_id = request_var('reason_id', 0); -$report_text = request_var('report_text', '', true); - -utf8_normalize_nfc(&$report_text); +$report_text = utf8_normalize_nfc(request_var('report_text', '', true)); $user_notify = (isset($_POST['notify']) && $user->data['is_registered']) ? true : false; $submit = (isset($_POST['submit'])) ? true : false; diff --git a/phpBB/search.php b/phpBB/search.php index 44ef053014..1be3aa8b14 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -81,8 +81,68 @@ if ($keywords || $author || $author_id || $search_id || $submit) // clear arrays $id_ary = array(); - // Which forums should not be searched? - $ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true)))); + // egosearch is an author search + if ($search_id == 'egosearch') + { + $author = $user->data['username']; + } + + // If we are looking for authors get their ids + $author_id_ary = array(); + if ($author_id) + { + $author_id_ary[] = $author_id; + } + else if ($author) + { + if ((strpos($author, '*') !== false) && (str_replace(array('*', '%'), '', $author) < $config['min_search_author_chars'])) + { + trigger_error(sprintf($user->lang['TOO_FEW_AUTHOR_CHARS'], $config['min_search_author_chars'])); + } + + $sql_where = (strpos($author, '*') !== false) ? ' LIKE ' : ' = '; + $sql = 'SELECT user_id + FROM ' . USERS_TABLE . " + WHERE username $sql_where '" . $db->sql_escape(preg_replace('#\*+#', '%', $author)) . "' + AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + $result = $db->sql_query_limit($sql, 100); + + while ($row = $db->sql_fetchrow($result)) + { + $author_id_ary[] = (int) $row['user_id']; + } + $db->sql_freeresult($result); + + if (!sizeof($author_id_ary)) + { + trigger_error($user->lang['NO_SEARCH_RESULTS']); + } + } + + // if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode + // so we can keep the old keywords in their old mode, but add the new ones as required words + if ($add_keywords) + { + if ($search_terms == 'all') + { + $keywords .= ' ' . $add_keywords; + } + else + { + $search_terms = 'all'; + $keywords = implode(' |', explode(' ', preg_replace('#\s+#u', ' ', $keywords))) . ' ' .$add_keywords; + } + } + + // Which forums should not be searched? Author searches are also carried out in unindexed forums + if (empty($search->search_query) && sizeof($author_id_ary)) + { + $ex_fid_ary = array_keys($auth->acl_getf('!f_read', true)); + } + else + { + $ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true)))); + } $not_in_fid = (sizeof($ex_fid_ary)) ? 'WHERE ' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . " OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ')' : ""; @@ -149,59 +209,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) $search_forum = array(); } - // egosearch is an author search - if ($search_id == 'egosearch') - { - $author = $user->data['username']; - } - - // If we are looking for authors get their ids - $author_id_ary = array(); - if ($author_id) - { - $author_id_ary[] = $author_id; - } - else if ($author) - { - if ((strpos($author, '*') !== false) && (str_replace(array('*', '%'), '', $author) < $config['min_search_author_chars'])) - { - trigger_error(sprintf($user->lang['TOO_FEW_AUTHOR_CHARS'], $config['min_search_author_chars'])); - } - - $sql_where = (strpos($author, '*') !== false) ? ' LIKE ' : ' = '; - $sql = 'SELECT user_id - FROM ' . USERS_TABLE . " - WHERE username $sql_where '" . $db->sql_escape(preg_replace('#\*+#', '%', $author)) . "' - AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; - $result = $db->sql_query_limit($sql, 100); - - while ($row = $db->sql_fetchrow($result)) - { - $author_id_ary[] = (int) $row['user_id']; - } - $db->sql_freeresult($result); - - if (!sizeof($author_id_ary)) - { - trigger_error($user->lang['NO_SEARCH_RESULTS']); - } - } - - // if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode - // so we can keep the old keywords in their old mode, but add the new ones as required words - if ($add_keywords) - { - if ($search_terms == 'all') - { - $keywords .= ' ' . $add_keywords; - } - else - { - $search_terms = 'all'; - $keywords = implode(' |', explode(' ', preg_replace('#\s+#', ' ', $keywords))) . ' ' .$add_keywords; - } - } - // Select which method we'll use to obtain the post_id or topic_id information $search_type = basename($config['search_type']); @@ -224,10 +231,10 @@ if ($keywords || $author || $author_id || $search_id || $submit) // let the search module split up the keywords if ($keywords) { - $search->split_keywords($keywords, $search_terms); - if (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id) + $correct_query = $search->split_keywords($keywords, $search_terms); + if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id)) { - $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words))) . '<br />' : ''; + $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words), ENT_COMPAT, 'UTF-8')) . '<br />' : ''; trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max'])); } } @@ -240,7 +247,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // define some variables needed for retrieving post_id/topic_id information - $sort_by_sql = array('a' => 'u.username', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title')); + $sort_by_sql = array('a' => 'u.username_clean', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title')); // pre-made searches $sql = $field = ''; @@ -253,22 +260,18 @@ if ($keywords || $author || $author_id || $search_id || $submit) $show_results = 'topics'; $sort_key = 't'; $sort_dir = 'd'; + $sort_days = request_var('st', 7); $sort_by_sql['t'] = 't.topic_last_post_time'; - if (!$sort_days) - { - $sort_days = 3; - } gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); $s_sort_key = $s_sort_dir = ''; - $u_sort_param = 'st=' . $sort_days; - $last_post_time = (time() - ($sort_days * 24 * 3600)); + $last_post_time_sql = ($sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($sort_days * 24 * 3600)) : ''; $sql = 'SELECT t.topic_last_post_time, t.topic_id FROM ' . TOPICS_TABLE . " t - WHERE t.topic_last_post_time > $last_post_time - AND t.topic_moved_id = 0 + WHERE t.topic_moved_id = 0 + $last_post_time_sql " . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . ' ' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . ' ORDER BY t.topic_last_post_time DESC'; @@ -365,6 +368,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) // show_results should not change after this $per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page']; + $total_match_count = 0; if ($search_id) { @@ -402,14 +406,20 @@ if ($keywords || $author || $author_id || $search_id || $submit) $total_match_count = $search->author_search($show_results, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $id_ary, $start, $per_page); } - if (!sizeof($id_ary)) + // For some searches we need to print out the "no results" page directly to allow re-sorting/refining the search options. + if (!sizeof($id_ary) && !$search_id) { trigger_error($user->lang['NO_SEARCH_RESULTS']); } - $sql_where = $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary); - $sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : ''; - $sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql); + $sql_where = ''; + + if (sizeof($id_ary)) + { + $sql_where .= $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary); + $sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : ''; + $sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql); + } if ($show_results == 'posts') { @@ -436,7 +446,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // define some vars for urls - $hilit = preg_replace('#&(\#[0-9]+;)#', '&$1', htmlspecialchars(implode('|', explode(' ', preg_replace('#\s+#', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $keywords)))))); + // @todo preg_replace still needed? + $hilit = htmlspecialchars(implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $keywords))))); $u_hilit = urlencode($keywords); $u_show_results = ($show_results != 'posts') ? '&sr=' . $show_results : ''; $u_search_forum = implode('&fid%5B%5D=', $search_forum); @@ -564,7 +575,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } $db->sql_freeresult($result); - // If we have some shadow topics, update the rowset to reflect their topic informations + // If we have some shadow topics, update the rowset to reflect their topic information if (sizeof($shadow_topic_list)) { $sql = 'SELECT * @@ -656,7 +667,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . ' AND in_message = 0 - ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC'; + ORDER BY filetime DESC, post_msg_id ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -728,14 +739,16 @@ if ($keywords || $author || $author_id || $search_id || $submit) $u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : ''; $tpl_ary = array( - 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'], - 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '', + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'], 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'], - 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '', + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'TOPIC_TYPE' => $topic_type, @@ -759,8 +772,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'S_POSTS_UNAPPROVED' => $posts_unapproved, 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '', - 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '', + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread', 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&t=' . $result_topic_id, true, $user->session_id), 'U_MCP_QUEUE' => $u_mcp_queue, @@ -828,9 +841,11 @@ if ($keywords || $author || $author_id || $search_id || $submit) } $tpl_ary = array( - 'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'], - 'POSTER_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', - 'U_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['poster_id']) : '', + 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), + 'POST_SUBJECT' => $row['post_subject'], 'POST_DATE' => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '', 'MESSAGE' => $message @@ -997,7 +1012,7 @@ $result = $db->sql_query_limit($sql, 5); while ($row = $db->sql_fetchrow($result)) { - $keywords = htmlspecialchars($row['search_keywords']); + $keywords = htmlspecialchars($row['search_keywords'], ENT_COMPAT, 'UTF-8'); $template->assign_block_vars('recentsearch', array( 'KEYWORDS' => $keywords, diff --git a/phpBB/styles/subSilver/imageset/en/button_pm_new.gif b/phpBB/styles/subSilver/imageset/en/button_pm_new.gif Binary files differindex 6bc193c412..07df748d3a 100644 --- a/phpBB/styles/subSilver/imageset/en/button_pm_new.gif +++ b/phpBB/styles/subSilver/imageset/en/button_pm_new.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_locked.gif b/phpBB/styles/subSilver/imageset/en/button_topic_locked.gif Binary files differindex f4aaced107..124a2d4a7d 100644 --- a/phpBB/styles/subSilver/imageset/en/button_topic_locked.gif +++ b/phpBB/styles/subSilver/imageset/en/button_topic_locked.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_new.gif b/phpBB/styles/subSilver/imageset/en/button_topic_new.gif Binary files differindex 0c1e6b9f23..66e1007129 100644 --- a/phpBB/styles/subSilver/imageset/en/button_topic_new.gif +++ b/phpBB/styles/subSilver/imageset/en/button_topic_new.gif diff --git a/phpBB/styles/subSilver/imageset/en/button_topic_reply.gif b/phpBB/styles/subSilver/imageset/en/button_topic_reply.gif Binary files differindex 15cbc700ee..e8fe5115a0 100644 --- a/phpBB/styles/subSilver/imageset/en/button_topic_reply.gif +++ b/phpBB/styles/subSilver/imageset/en/button_topic_reply.gif diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js index 5ce917d1b2..54e7e61f3a 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subSilver/template/editor.js @@ -64,13 +64,30 @@ function arraypop(thearray) return retval; } + +/** +* bbstyle +*/ +function bbstyle(bbnumber) +{ + if (bbnumber != -1) + { + bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]); + } else { + insert_text('[*]'); + document.forms[form_name].elements[text_name].focus(); + } +} + /** * Apply bbcodes */ function bbfontstyle(bbopen, bbclose) { theSelection = false; - document.forms[form_name].elements[text_name].focus(); + + var textarea = document.forms[form_name].elements[text_name]; + textarea.focus(); if ((clientVer >= 4) && is_ie && is_win) { @@ -94,25 +111,29 @@ function bbfontstyle(bbopen, bbclose) return; } - // Close image tag before adding - if (imageTag) - { - insert_text(bbtags[15]); - - // Remove the close image tag from the list - lastValue = arraypop(bbcode) - 1; - - // Return button back to normal state - document.forms[form_name].addbbcode14.value = 'Img'; - imageTag = false; - } + //The new position for the cursor after adding the bbcode + var new_pos = getCaretPosition(textarea).start + bbopen.length; // Open tag insert_text(bbopen + bbclose); - document.forms[form_name].elements[text_name].focus(); + // Center the cursor when we don't have a selection + // Gecko and proper browsers + if (!isNaN(textarea.selectionStart)) + { + textarea.selectionStart = new_pos; + textarea.selectionEnd = new_pos; + } + // IE + else if (document.selection) + { + var range = textarea.createTextRange(); + range.move("character", new_pos); + range.select(); + storeCaret(document.forms[form_name].elements[text_name]); + } - storeCaret(document.forms[form_name].elements[text_name]); + document.forms[form_name].elements[text_name].focus(); return; } @@ -134,12 +155,8 @@ function insert_text(text, spaces, popup) { text = ' ' + text + ' '; } - if (textarea.createTextRange && !isNaN(textarea.caretPos)) - { - var caret_pos = textarea.caretPos; - caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; - } - else if (!isNaN(textarea.selectionStart)) + + if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; @@ -147,19 +164,28 @@ function insert_text(text, spaces, popup) mozWrap(textarea, text, '') textarea.selectionStart = sel_start + text.length; textarea.selectionEnd = sel_end + text.length; + } + + else if (textarea.createTextRange && textarea.caretPos) + { + var caret_pos = textarea.caretPos; + caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; + } + else { textarea.value = textarea.value + text; } + document.forms[form_name].elements[text_name].focus(); } /** * Add inline attachment at position */ -function attach_inline() +function attach_inline(index, filename) { - insert_text('[attachment=' + document.forms[form_name].elements['attachments'].value + ']' + document.forms[form_name].elements['attachments'].options[document.forms[form_name].elements['attachments'].selectedIndex].text + '[/attachment]'); + insert_text('[attachment=' + index + ']' + filename + '[/attachment]'); document.forms[form_name].elements[text_name].focus(); } @@ -228,185 +254,6 @@ function addquote(post_id, username) } /** -* bbstyle -*/ -function bbstyle(bbnumber) -{ - donotinsert = false; - theSelection = false; - bblast = 0; - document.forms[form_name].elements[text_name].focus(); - - // Close all open tags & default button names - if (bbnumber == -1) - { - while (bbcode[0]) - { - butnumber = arraypop(bbcode) - 1; - document.forms[form_name].elements[text_name].value += bbtags[butnumber + 1]; - buttext = document.forms[form_name]['addbbcode' + butnumber].value; - - if (buttext != '[*]') - { - document.forms[form_name]['addbbcode' + butnumber].value = buttext.substr(0,(buttext.length - 1)); - } - } - - document.forms[form_name].addbbcode10.value = 'List'; - bbtags[10] = '[list]'; - - document.forms[form_name].addbbcode12.value = 'List='; - bbtags[12] = '[list=]'; - - // All tags are closed including image tags :D - imageTag = false; - document.forms[form_name].elements[text_name].focus(); - - return; - } - - // [*] doesn't have an end tag - noEndTag = (bbtags[bbnumber] == '[*]') - - if ((clientVer >= 4) && is_ie && is_win) - { - // Get text selection - theSelection = document.selection.createRange().text; - - if (theSelection) - { - // Add tags around selection - document.selection.createRange().text = bbtags[bbnumber] + theSelection + ((!noEndTag) ? bbtags[bbnumber+1] : ''); - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - } - else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0)) - { - mozWrap(document.forms[form_name].elements[text_name], bbtags[bbnumber], ((!noEndTag) ? bbtags[bbnumber+1] : '')); - document.forms[form_name].elements[text_name].focus(); - theSelection = ''; - return; - } - - // Find last occurance of an open tag the same as the one just clicked - for (i = 0; i < bbcode.length; i++) - { - if (bbcode[i] == bbnumber+1) - { - bblast = i; - donotinsert = true; - } - } - - if (bbnumber == 10 && bbtags[10] != '[*]') - { - if (donotinsert) - { - document.forms[form_name].addbbcode12.value = 'List='; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = '[list=]'; - } - else - { - document.forms[form_name].addbbcode12.value = '[*]'; - tmp_help = o_help; - o_help = e_help; - e_help = tmp_help; - bbtags[12] = '[*]'; - } - } - - if (bbnumber == 12 && bbtags[12] != '[*]') - { - if (donotinsert) - { - document.forms[form_name].addbbcode10.value = 'List'; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = '[list]'; - } - else - { - document.forms[form_name].addbbcode10.value = '[*]'; - tmp_help = l_help; - l_help = e_help; - e_help = tmp_help; - bbtags[10] = '[*]'; - } - } - - // Close all open tags up to the one just clicked & default button names - if (donotinsert) - { - while (bbcode[bblast]) - { - butnumber = arraypop(bbcode) - 1; - - if (bbtags[butnumber] != '[*]') - { - insert_text(bbtags[butnumber + 1]); - } - else - { - insert_text(bbtags[butnumber]); - } - - buttext = document.forms[form_name]['addbbcode' + butnumber].value; - - if (bbtags[butnumber] != '[*]') - { - document.forms[form_name]['addbbcode' + butnumber].value = buttext.substr(0,(buttext.length - 1)); - } - imageTag = false; - } - document.forms[form_name].elements[text_name].focus(); - return; - } - else - { - // Open tags - - // Close image tag before adding another - if (imageTag && (bbnumber != 14)) - { - insert_text(bbtags[15]); - - // Remove the close image tag from the list - lastValue = arraypop(bbcode) - 1; - - // Return button back to normal state - document.forms[form_name].addbbcode14.value = 'Img'; - imageTag = false; - } - - // Open tag - insert_text(bbtags[bbnumber]); - - // Check to stop additional tags after an unclosed image tag - if (bbnumber == 14 && imageTag == false) - { - imageTag = 1; - } - - if (bbtags[bbnumber] != '[*]') - { - arraypush(bbcode, bbnumber + 1); - document.forms[form_name]['addbbcode' + bbnumber].value += "*"; - } - - document.forms[form_name].elements[text_name].focus(); - return; - } - - storeCaret(document.forms[form_name].elements[text_name]); -} - -/** * From http://www.massless.org/mozedit/ */ function mozWrap(txtarea, open, close) @@ -435,7 +282,7 @@ function mozWrap(txtarea, open, close) } /** -* Insert at Claret position. Code from +* Insert at Caret position. Code from * http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 */ function storeCaret(textEl) @@ -480,7 +327,7 @@ function colorPalette(dir, width, height) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); document.write('<td bgcolor="#' + color + '">'); - document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>'); + document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>'); document.writeln('</td>'); } @@ -496,4 +343,55 @@ function colorPalette(dir, width, height) } } document.writeln('</table>'); +} + + +/** +* Caret Position object +*/ +function caretPosition() +{ + var start = null; + var end = null; +} + + +/** +* Get the caret position in an textarea +*/ +function getCaretPosition(txtarea) +{ + var caretPos = new caretPosition(); + + // simple Gecko/Opera way + if(txtarea.selectionStart || txtarea.selectionStart == 0) + { + caretPos.start = txtarea.selectionStart; + caretPos.end = txtarea.selectionEnd; + } + // dirty and slow IE way + else if(document.selection) + { + // get current selection + var range = document.selection.createRange(); + + // a new selection of the whole textarea + var range_all = document.body.createTextRange(); + range_all.moveToElementText(txtarea); + + // calculate selection start point by moving beginning of range_all to beginning of range + var sel_start; + for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) + { + range_all.moveStart('character', 1); + } + + txtarea.sel_start = sel_start; + + // we ignore the end value for IE, this is already dirty enough and we don't need it + caretPos.start = txtarea.sel_start; + caretPos.end = txtarea.sel_start; + } + + return caretPos; }
\ No newline at end of file diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subSilver/template/forumlist_body.html index 5d0108d1f9..eeee5d914b 100644 --- a/phpBB/styles/subSilver/template/forumlist_body.html +++ b/phpBB/styles/subSilver/template/forumlist_body.html @@ -19,7 +19,7 @@ <td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td> <td class="row1"> <!-- IF forumrow.FORUM_IMAGE --> - <div style="float: left;">{forumrow.FORUM_IMAGE}</div><div style="float: left;"> + <div style="float: left; margin-right: 5px;">{forumrow.FORUM_IMAGE}</div><div style="float: left;"> <!-- ENDIF --> <a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a> <p class="forumdesc">{forumrow.FORUM_DESC}</p> @@ -28,7 +28,7 @@ <!-- IF forumrow.CLICKS --> <td class="row2" colspan="3" align="center"><span class="genmed">{L_REDIRECTS}: {forumrow.CLICKS}</span></td> <!-- ELSE --> - <td class="row2" colspan="3" align="center"> </td> + <td class="row2" colspan="3" align="center"> </td> <!-- ENDIF --> </tr> <!-- ELSE --> @@ -36,7 +36,7 @@ <td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td> <td class="row1" width="100%"> <!-- IF forumrow.FORUM_IMAGE --> - <div style="float: left;">{forumrow.FORUM_IMAGE}</div><div style="float: left;"> + <div style="float: left; margin-right: 5px;">{forumrow.FORUM_IMAGE}</div><div style="float: left;"> <!-- ENDIF --> <a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a> <p class="forumdesc">{forumrow.FORUM_DESC}</p> @@ -53,13 +53,8 @@ <td class="row2" align="center" nowrap="nowrap"> <!-- IF forumrow.LAST_POST_TIME --> <p class="topicdetails">{forumrow.LAST_POST_TIME}</p> - <p class="topicdetails"> - <!-- IF forumrow.U_LAST_POSTER --> - <a href="{forumrow.U_LAST_POSTER}"<!-- IF forumrow.LAST_POSTER_COLOUR --> style="font-weight: bold; color: {forumrow.LAST_POSTER_COLOUR}"<!-- ENDIF -->>{forumrow.LAST_POSTER}</a> - <!-- ELSE --> - {forumrow.LAST_POSTER} - <!-- ENDIF --> - <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> + <p class="topicdetails">{forumrow.LAST_POSTER_FULL} + <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> </p> <!-- ELSE --> <p class="topicdetails">{L_NO_POSTS}</p> diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subSilver/template/login_body.html index 0d72ee8f3b..70e147fca8 100644 --- a/phpBB/styles/subSilver/template/login_body.html +++ b/phpBB/styles/subSilver/template/login_body.html @@ -10,7 +10,7 @@ <th>{LOGIN_EXPLAIN}</th> <!-- ENDIF --> </tr> -<!-- IF LOGIN_EXPLAIN && not S_ADMIN_AUTH --> +<!-- IF LOGIN_EXPLAIN && not S_ADMIN_AUTH --> <tr> <td class="row3" colspan="2" align="center"><span class="gensmall">{LOGIN_EXPLAIN}</span></td> </tr> diff --git a/phpBB/styles/subSilver/template/mcp_forum.html b/phpBB/styles/subSilver/template/mcp_forum.html index 4aa6050a8d..536e7bc0b9 100644 --- a/phpBB/styles/subSilver/template/mcp_forum.html +++ b/phpBB/styles/subSilver/template/mcp_forum.html @@ -10,7 +10,7 @@ <table class="tablebg" width="100%" cellspacing="1"> <tr> - <td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td> + <td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td> </tr> <tr> <th width="4%" nowrap="nowrap"> </th> @@ -33,7 +33,7 @@ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --> <a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> - <!-- IF topicrow.S_TOPIC_REPORTED --> + <!-- IF topicrow.S_TOPIC_REPORTED and topicrow.U_MCP_REPORT --> <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a> <!-- ENDIF --> </p> @@ -50,7 +50,7 @@ <tr> <td class="cat" colspan="6" align="right"> <select name="action"> - <option value="" checked="checked">{L_SELECT_ACTION}</option> + <option value="" selected="selected">{L_SELECT_ACTION}</option> <!-- IF S_CAN_DELETE --><option value="delete_topic">{L_DELETE}</option><!-- ENDIF --> <!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF --> <!-- IF S_CAN_FORK --><option value="fork">{L_FORK}</option><!-- ENDIF --> diff --git a/phpBB/styles/subSilver/template/mcp_front.html b/phpBB/styles/subSilver/template/mcp_front.html index ed52a5dc00..41fbb19a3a 100644 --- a/phpBB/styles/subSilver/template/mcp_front.html +++ b/phpBB/styles/subSilver/template/mcp_front.html @@ -52,7 +52,7 @@ <td class="row1" width="15%" valign="top"><span class="gen"><!-- IF report.U_FORUM --><a href="{report.U_FORUM}">{report.FORUM_NAME}</a><!-- ELSE -->{report.FORUM_NAME}<!-- ENDIF --></span><!-- IF report.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{report.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td> <td class="row2" valign="top"><span class="gen"><a href="{report.U_TOPIC}">{report.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{report.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td> <td class="row1" valign="top"><span class="gen">{report.SUBJECT}</span><br /><span class="gensmall">[ <a href="{report.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td> - <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen"><!-- IF report.U_REPORTER --><a href="{report.U_REPORTER}">{report.REPORTER}</a><!-- ELSE -->{report.REPORTER}<!-- ENDIF --></span></td> + <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{report.REPORTER_FULL}</span></td> <td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{report.REPORT_TIME}</span></td> </tr> <!-- BEGINELSE --> @@ -87,7 +87,7 @@ <td class="row1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td> <td class="row1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td> <td class="row1"><span class="genmed">{log.ACTION}</span></td> - <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEWTOPIC --><a href="{log.U_VIEWTOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td> + <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td> <td class="row1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td> </tr> <!-- BEGINELSE --> diff --git a/phpBB/styles/subSilver/template/mcp_header.html b/phpBB/styles/subSilver/template/mcp_header.html index 6d8717a81e..817aeff3a1 100644 --- a/phpBB/styles/subSilver/template/mcp_header.html +++ b/phpBB/styles/subSilver/template/mcp_header.html @@ -2,7 +2,7 @@ <!-- IF TOPIC_TITLE or FORUM_NAME --> <div id="pageheader"> - <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2> + <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2> <!-- IF MODERATORS --> <p class="moderators">{L_MODERATORS}: {MODERATORS}</p> diff --git a/phpBB/styles/subSilver/template/mcp_notes_front.html b/phpBB/styles/subSilver/template/mcp_notes_front.html index 930d2130a6..c43fad9465 100755 --- a/phpBB/styles/subSilver/template/mcp_notes_front.html +++ b/phpBB/styles/subSilver/template/mcp_notes_front.html @@ -2,7 +2,7 @@ <form method="post" name="mcp" action="{U_POST_ACTION}"> -<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center"> +<table class="tablebg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> <th colspan="2"align="center">{L_SELECT_USER}</th> </tr> diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html index e4e8d38cab..a86aacf006 100644 --- a/phpBB/styles/subSilver/template/mcp_post.html +++ b/phpBB/styles/subSilver/template/mcp_post.html @@ -13,7 +13,7 @@ </tr> <tr> <td class="row1" width="20%"><b class="gen">{L_REPORTER}: </b></td> - <td class="row2" width="80%"><span class="gen">{REPORTER_NAME} [ <!-- IF U_VIEW_REPORTER_PROFILE --><a href="{U_VIEW_REPORTER_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_REPORTER_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_REPORTER_NOTES}">{L_VIEW_NOTES}</a> | <a href="{U_MCP_WARN_REPORTER}">{L_WARN_USER}</a><!-- ENDIF --> ]</span></td> + <td class="row2" width="80%"><span class="gen"<!-- IF REPORTER_COLOUR --> style="font-weight: bold; color: {REPORTER_COLOUR};"<!-- ENDIF -->>{REPORTER_NAME}</span> <span class="gen">[ <!-- IF U_VIEW_REPORTER_PROFILE --><a href="{U_VIEW_REPORTER_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_REPORTER_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_REPORTER_NOTES}">{L_VIEW_NOTES}</a> | <a href="{U_MCP_WARN_REPORTER}">{L_WARN_USER}</a><!-- ENDIF --> ]</span></td> </tr> <tr> <td class="row1"><b class="gen">{L_REPORTED}: </b></td> @@ -38,7 +38,7 @@ <br clear="all"/> <!-- ENDIF --> -<!-- IF S_MCP_QUEUE --><form method="post" name="mcp_approve" action="{U_APPROVE_ACTION}"><!-- ELSE --><form method="post" name="mcp_report" action="{U_CLOSE_ACTION}"><!-- ENDIF --> +<!-- IF S_MCP_QUEUE --><form method="post" name="mcp_approve" action="{U_APPROVE_ACTION}"><!-- ELSE --><form method="post" name="mcp_report_details" action="{U_CLOSE_ACTION}"><!-- ENDIF --> <table width="100%" cellpadding="3" cellspacing="1" border="0" class="tablebg"> <tr> @@ -53,7 +53,7 @@ </tr> <tr> <td class="row1" width="20%"><b class="gen">{L_POSTER}: </b></td> - <td class="row2" width="80%"><span class="gen">{POSTER_NAME} [ <!-- IF U_VIEW_PROFILE --><a href="{U_VIEW_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td> + <td class="row2" width="80%"><span class="gen"<!-- IF POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{POST_AUTHOR}</span><span class="gen"> [ <!-- IF U_POST_AUTHOR --><a href="{U_POST_AUTHOR}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_POST_AUTHOR --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td> </tr> <!-- IF S_CAN_VIEWIP --> <tr> diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subSilver/template/mcp_queue.html index c75c0403cd..d12928d50c 100644 --- a/phpBB/styles/subSilver/template/mcp_queue.html +++ b/phpBB/styles/subSilver/template/mcp_queue.html @@ -7,7 +7,7 @@ <th colspan="6" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th> </tr> <tr> - <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_ITEMS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" /> <b>{L_ONLY_TOPIC}</b> <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td> + <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_ITEMS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" /> <b>{L_ONLY_TOPIC}</b> <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td> </tr> <tr> <th> <!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --> </th> @@ -20,7 +20,7 @@ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p> <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td> - <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEWPROFILE --><a href="{postrow.U_VIEWPROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br /> + <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br /> <span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td> <td class="postdetails" style="padding: 4px;" align="left" valign="top" nowrap="nowrap">{postrow.POST_TIME}</td> <td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td> diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html index 40c57ab076..fa4a82602a 100644 --- a/phpBB/styles/subSilver/template/mcp_reports.html +++ b/phpBB/styles/subSilver/template/mcp_reports.html @@ -7,7 +7,7 @@ <th colspan="5" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th> </tr> <tr> - <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" /> <b>{L_ONLY_TOPIC}</b> <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td> + <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" /> <b>{L_ONLY_TOPIC}</b> <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td> </tr> <tr> <th> {L_POST} </th> @@ -21,9 +21,9 @@ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p> <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td> - <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEW_POSTER_PROFILE --><a href="{postrow.U_VIEW_POSTER_PROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br /> + <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br /> <span class="gensmall">{postrow.POST_TIME}</span></td> - <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEW_REPORTER_PROFILE --><a href="{postrow.U_VIEW_REPORTER_PROFILE}">{postrow.REPORTER}</a><!-- ELSE -->{postrow.REPORTER}<!-- ENDIF --></span></td> + <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORTER_FULL}</span></td> <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen">{postrow.REPORT_TIME}</span><br /> <span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td> <td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td> diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html index d0edb48470..cb398e48e6 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subSilver/template/mcp_topic.html @@ -12,7 +12,7 @@ </tr> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_SUBJECT}</span></td> - <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="100" name="subject" value="{SPLIT_SUBJECT}" /></span></td> + <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="100" name="subject" value="{SPLIT_SUBJECT}" /></td> </tr> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td> @@ -55,10 +55,10 @@ </tr> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_POSTS_PER_PAGE}</span><br /><span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span</td> - <td class="row2" colspan="2"><input class="post" type="text" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}"></td> + <td class="row2" colspan="2"><input class="post" type="text" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td> </tr> <tr> - <td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td> + <td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td> </tr> <tr> <th nowrap="nowrap">{L_AUTHOR}</th> @@ -72,7 +72,7 @@ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td align="center"><b class="postauthor">{postrow.POSTER_NAME}</b></td> + <td align="center"><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td> <td width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> @@ -103,8 +103,8 @@ <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr valign="middle"> <td width="100%"> - <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <span class="postapprove"><a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><!-- ENDIF --> - <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG}<span class="postreported"><a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --> + <!-- IF postrow.S_POST_UNAPPROVED and postrow.U_MCP_APPROVE -->{UNAPPROVED_IMG} <span class="postapprove"><a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><!-- ENDIF --> + <!-- IF postrow.S_POST_REPORTED and postrow.U_MCP_REPORT -->{REPORTED_IMG}<span class="postreported"><a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --> </td> <td width="10" nowrap="nowrap">{postrow.MINI_POST_IMG}</td> <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td> @@ -126,9 +126,10 @@ <!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF --> <!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF ACTION eq 'merge' --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF --> <!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF ACTION eq 'split' --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF --> - </select> <input class="btnmain" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}"></form></td> + </select> <input class="btnmain" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" /></td> </tr> </table> + </form> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> diff --git a/phpBB/styles/subSilver/template/mcp_viewlogs.html b/phpBB/styles/subSilver/template/mcp_viewlogs.html index 3c18865dd7..84684e6e77 100644 --- a/phpBB/styles/subSilver/template/mcp_viewlogs.html +++ b/phpBB/styles/subSilver/template/mcp_viewlogs.html @@ -20,7 +20,7 @@ </tr> <!-- IF S_TOPIC_ID --> <tr> - <td class="row3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEWTOPIC}"><b>{TOPIC_NAME}</b></a></span></td> + <td class="row3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><b>{TOPIC_NAME}</b></a></span></td> </tr> <!-- ENDIF --> <!-- BEGIN log --> @@ -30,7 +30,7 @@ <td class="row1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td> <td class="row1"><span class="gen">{log.ACTION}</span></td> <!-- IF not S_TOPIC_ID --> - <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEWTOPIC --><a href="{log.U_VIEWTOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td> + <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td> <!-- ENDIF --> </tr> <!-- BEGINELSE --> diff --git a/phpBB/styles/subSilver/template/mcp_warn_front.html b/phpBB/styles/subSilver/template/mcp_warn_front.html index 188acd321c..c77f1c8644 100755 --- a/phpBB/styles/subSilver/template/mcp_warn_front.html +++ b/phpBB/styles/subSilver/template/mcp_warn_front.html @@ -2,7 +2,7 @@ <form method="post" name="mcp" action="{U_POST_ACTION}"> -<table class="bg" width="75%" cellspacing="1" cellpadding="4" border="0" align="center"> +<table class="tablebg" width="100%" cellspacing="1" border="0" align="center"> <tr> <th colspan="2"align="center">{L_SELECT_USER}</th> </tr> @@ -31,7 +31,7 @@ </tr> <!-- BEGIN highest --> <tr> - <td class="row1" width="15%" valign="top"><span class="gen"><a href="{highest.U_USER}">{highest.USERNAME}</a></span></td> + <td class="row1" width="15%" valign="top"><span class="gen">{highest.USERNAME_FULL}</span></td> <td class="row2" width="15%" valign="top"><span class="gen">{highest.WARNINGS}</span></td> <td class="row1" width="15%" valign="top"><span class="gen">{highest.WARNING_TIME}</span></td> <td class="row2" width="15%" valign="top"><span class="gen"><a href="{highest.U_NOTES}">{L_VIEW_NOTES}</a></span></td> @@ -57,7 +57,7 @@ </tr> <!-- BEGIN latest --> <tr> - <td class="row1" width="15%" valign="top"><span class="gen"><a href="{latest.U_USER}">{latest.USERNAME}</a></span></td> + <td class="row1" width="15%" valign="top"><span class="gen">{latest.USERNAME_FULL}</span></td> <td class="row2" width="15%" valign="top"><span class="gen">{latest.WARNING_TIME}</span></td> <td class="row1" width="15%" valign="top"><span class="gen">{latest.WARNINGS}</span></td> <td class="row2" width="15%" valign="top"><span class="gen"><a href="{latest.U_NOTES}">{L_VIEW_NOTES}</a></span></td> diff --git a/phpBB/styles/subSilver/template/mcp_warn_list.html b/phpBB/styles/subSilver/template/mcp_warn_list.html index f3ff9d4490..5beb502b76 100755 --- a/phpBB/styles/subSilver/template/mcp_warn_list.html +++ b/phpBB/styles/subSilver/template/mcp_warn_list.html @@ -14,7 +14,7 @@ </tr> <!-- BEGIN user --> <tr> - <td class="row1" width="15%" valign="top"><span class="gen"><a href="{user.U_USER}">{user.USERNAME}</a></span></td> + <td class="row1" width="15%" valign="top"><span class="gen">{user.USERNAME_FULL}</span></td> <td class="row2" width="15%" valign="top"><span class="gen">{user.WARNINGS}</span></td> <td class="row1" width="15%" valign="top"><span class="gen">{user.WARNING_TIME}</span></td> <td class="row2" width="15%" valign="top"><span class="gen"><a href="{user.U_NOTES}">{L_VIEW_NOTES}</a></span></td> diff --git a/phpBB/styles/subSilver/template/memberlist_body.html b/phpBB/styles/subSilver/template/memberlist_body.html index 69701027b4..78b2896439 100644 --- a/phpBB/styles/subSilver/template/memberlist_body.html +++ b/phpBB/styles/subSilver/template/memberlist_body.html @@ -55,7 +55,7 @@ <!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF --> <td class="gen" align="center"> {memberrow.ROW_NUMBER} </td> - <td class="genmed" align="left"><strong><a<!-- IF memberrow.USER_COLOR --> style="color:#{memberrow.USER_COLOR}"<!-- ENDIF --> href="{memberrow.U_VIEWPROFILE}">{memberrow.USERNAME}</a></strong></td> + <td class="genmed" align="left"><strong><a<!-- IF memberrow.USER_COLOR --> style="color:#{memberrow.USER_COLOR}"<!-- ENDIF --> href="{memberrow.U_VIEW_PROFILE}">{memberrow.USERNAME}</a></strong></td> <td class="genmed" align="center" nowrap="nowrap"> {memberrow.JOINED} </td> <td class="gen" align="center">{memberrow.POSTS}</td> <td class="gen" align="center">{memberrow.RANK_IMG}</td> diff --git a/phpBB/styles/subSilver/template/memberlist_email.html b/phpBB/styles/subSilver/template/memberlist_email.html index 1e4d7e9930..4f514e6a7d 100644 --- a/phpBB/styles/subSilver/template/memberlist_email.html +++ b/phpBB/styles/subSilver/template/memberlist_email.html @@ -49,7 +49,7 @@ function checkForm(formObj) <td class="row1" width="35%"><b class="genmed">{L_SUBJECT}</b></td> <td class="row2"><input class="post" type="text" name="subject" size="50" maxlength="100" tabindex="2" value="{SUBJECT}" /></td> </tr> - <!-- ELSE ---> + <!-- ELSE --> <tr> <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}</b></td> <td class="row2"><input class="post" type="text" name="email" size="50" maxlength="100" value="{EMAIL}" /></td> diff --git a/phpBB/styles/subSilver/template/memberlist_leaders.html b/phpBB/styles/subSilver/template/memberlist_leaders.html index 82009e1365..731be4d2b1 100644 --- a/phpBB/styles/subSilver/template/memberlist_leaders.html +++ b/phpBB/styles/subSilver/template/memberlist_leaders.html @@ -16,7 +16,7 @@ <!-- BEGIN admin --> <!-- IF admin.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF --> - <td class="gen" align="center"><strong><a<!-- IF admin.USER_COLOR --> style="color:#{admin.USER_COLOR}"<!-- ENDIF --> href="{admin.U_VIEWPROFILE}">{admin.USERNAME}</a></strong></td> + <td class="gen" align="center"><strong>{admin.USERNAME_FULL}</strong></td> <td class="gensmall" align="center"> </td> <td class="gensmall" align="center" nowrap="nowrap"> <!-- IF admin.U_GROUP --> @@ -39,7 +39,7 @@ <!-- BEGIN mod --> <!-- IF mod.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF --> - <td class="gen" align="center"><strong><a<!-- IF mod.USER_COLOR --> style="color:#{mod.USER_COLOR}"<!-- ENDIF --> href="{mod.U_VIEWPROFILE}">{mod.USERNAME}</a></strong></td> + <td class="gen" align="center"><strong>{mod.USERNAME_FULL}</strong></td> <td align="center"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 200px;">{mod.FORUMS}</select><!-- ENDIF --> </td> <td class="gensmall" align="center" nowrap="nowrap"> <!-- IF mod.U_GROUP --> diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html index 5ed1c8818e..d8885370a0 100644 --- a/phpBB/styles/subSilver/template/memberlist_view.html +++ b/phpBB/styles/subSilver/template/memberlist_view.html @@ -3,19 +3,24 @@ <div id="pagecontent"> <form method="post" action="{S_PROFILE_ACTION}"> - + <table class="tablebg" width="100%" cellspacing="1"> - <tr> + <tr> <th colspan="2" nowrap="nowrap">{L_VIEWING_PROFILE}</th> </tr> - <tr> + <tr> <td class="cat" width="40%" align="center"><h4>{L_USER_PRESENCE}</h4></td> <td class="cat" width="60%" align="center"><h4>{L_USER_FORUM}</h4></td> </tr> - <tr> + <tr> <td class="row1" align="center"> - + <table cellspacing="1" cellpadding="2" border="0"> + <!-- IF S_USER_INACTIVE --> + <tr> + <td align="center" style="color: red;"><b class="gen">{L_USER_IS_INACTIVE}</b><br />{L_INACTIVE_REASON}: {USER_INACTIVE_REASON}<br /><br /></td> + </tr> + <!-- ENDIF --> <tr> <td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: #{USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td> </tr> @@ -53,23 +58,23 @@ </td> <td class="row1"> <table width="100%" cellspacing="1" cellpadding="2" border="0"> - <tr> + <tr> <td class="gen" align="right" nowrap="nowrap">{L_JOINED}: </td> <td width="100%"><b class="gen">{JOINED}</b></td> </tr> - <tr> + <tr> <td class="gen" align="right" nowrap="nowrap">{L_VISITED}: </td> <td width="100%"><b class="gen">{VISITED}</b></td> </tr> <!-- IF U_NOTES or U_WARN --> <tr> <td class="gen" align="right" valign="top" nowrap="nowrap">{L_WARNINGS}: </td> - <td width="100%"><b class="gen">{WARNINGS}</b><br /><span class="genmed">[ <a href="{U_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_WARN --> | <a href="{U_WARN}">{L_WARN_USER}</a> <!-- ENDIF -->]</td> + <td width="100%"><b class="gen">{WARNINGS}</b><br /><span class="genmed">[ <a href="{U_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_WARN --> | <a href="{U_WARN}">{L_WARN_USER}</a> <!-- ENDIF -->]</span></td> </tr> <!-- ENDIF --> - <tr> + <tr> <td class="gen" align="right" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td> - <td><b class="gen">{POSTS}</b><!-- IF POSTS_PCT neq 0 --><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<!-- ENDIF --><br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span></td> + <td><b class="gen">{POSTS}</b><span class="genmed"><!-- IF POSTS_PCT neq 0 --><br />[{POSTS_PCT} / {POSTS_DAY}]<!-- ENDIF --><br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></span></td> </tr> <!-- IF S_SHOW_ACTIVITY --> <tr> @@ -84,14 +89,14 @@ </table> </td> </tr> - <tr> + <tr> <td class="cat" align="center"><h4>{L_CONTACT_USER}</h4></td> <td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td> </tr> - <tr> + <tr> <td class="row1"> <table width="100%" cellspacing="1" cellpadding="2" border="0"> - <tr> + <tr> <td class="gen" align="right" nowrap="nowrap">{L_EMAIL_ADDRESS}: </td> <td width="100%"><!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF --></td> </tr> @@ -124,7 +129,7 @@ </table> </td> <td class="row1"> - <table cellspacing="1" cellpadding="2" border="0"> + <table cellspacing="1" cellpadding="2" border="0"> <tr> <td class="gen" align="right" nowrap="nowrap">{L_USERGROUPS}: </td> <td><select name="g">{S_GROUP_OPTIONS}</select> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /></td> @@ -174,7 +179,7 @@ </tr> <!-- ENDIF --> </table> - + </form> </div> diff --git a/phpBB/styles/subSilver/template/overall_footer.html b/phpBB/styles/subSilver/template/overall_footer.html index 2669864e11..70d359c61f 100644 --- a/phpBB/styles/subSilver/template/overall_footer.html +++ b/phpBB/styles/subSilver/template/overall_footer.html @@ -15,7 +15,7 @@ <div id="wrapfooter"> <!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF --> <span class="copyright">Powered by <a href="http://www.phpbb.com/" target="_blank">phpBB</a> © 2002, 2006 phpBB Group - <!-- IF L_TRANSLATION_INFO --><br />{L_TRANSLATION_INFO}<!-- ENDIF --> + <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF --> <!-- IF DEBUG_OUTPUT --><br />[ {DEBUG_OUTPUT} ]<!-- ENDIF --></span> </div> diff --git a/phpBB/styles/subSilver/template/overall_header.html b/phpBB/styles/subSilver/template/overall_header.html index 3035cb61b2..22833f0ab2 100644 --- a/phpBB/styles/subSilver/template/overall_header.html +++ b/phpBB/styles/subSilver/template/overall_header.html @@ -22,18 +22,18 @@ </style> <!-- ENDIF --> -<script language="Javascript" type="text/javascript"> +<script type="text/javascript"> <!-- <!-- IF S_USER_PM_POPUP --> if ({S_NEW_PM}) { - window.open('{UA_POPUP_PM}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400'); + window.open('{UA_POPUP_PM}', '_phpbbprivmsg', 'height=225,resizable=yes,width=400'); } <!-- ENDIF --> function popup(url, width, height) { - window.open(url, '_popup', 'HEIGHT=' + height + ',resizable=yes,scrollbars=yes, WIDTH=' + width); + window.open(url.replace(/&/g, '&'), '_popup', 'HEIGHT=' + height + ',resizable=yes,scrollbars=yes, WIDTH=' + width); return false; } @@ -49,6 +49,17 @@ function jumpto() } } +/** +* Find a member +*/ +function find_username() +{ + <!-- IF UA_FIND_USERNAME --> + window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); + <!-- ENDIF --> + return false; +} + // Mark/unmark checkboxes // id = ID of parent container, name = name prefix, state = state [true/false] function marklist(id, name, state) diff --git a/phpBB/styles/subSilver/template/posting_attach_body.html b/phpBB/styles/subSilver/template/posting_attach_body.html index a16758bf33..6510b8f706 100644 --- a/phpBB/styles/subSilver/template/posting_attach_body.html +++ b/phpBB/styles/subSilver/template/posting_attach_body.html @@ -1,26 +1,28 @@ -<script type="text/javascript"> -<!-- - /** - * Show upload progress bar - */ - function popup_progress_bar() - { - close_waitscreen = 0; - window.open('{UA_PROGRESS_BAR}', '_upload', 'HEIGHT=200,resizable=yes,scrollbars=no,WIDTH=400'); - } -//--> -</script> +<tr> + <th colspan="2"> + <script type="text/javascript"> + <!-- + /** + * Show upload progress bar + */ + function popup_progress_bar() + { + close_waitscreen = 0; + window.open('{UA_PROGRESS_BAR}', '_upload', 'HEIGHT=200,resizable=yes,scrollbars=no,WIDTH=400'); + } + //--> + </script> -<!-- IF S_CLOSE_PROGRESS_WINDOW --> - <script language="javascript" type="text/javascript"> - <!-- - close_waitscreen = 1; - //--> - </script> -<!-- ENDIF --> + <!-- IF S_CLOSE_PROGRESS_WINDOW --> + <script type="text/javascript"> + <!-- + close_waitscreen = 1; + //--> + </script> + <!-- ENDIF --> -<tr> - <th colspan="2">{L_ADD_ATTACHMENT}</th> + {L_ADD_ATTACHMENT} + </th> </tr> <tr> <td class="row3" colspan="2"><span class="gensmall">{L_ADD_ATTACHMENT_EXPLAIN}</span></td> @@ -35,7 +37,7 @@ <td class="row2"> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><textarea class="post" name="filecomment" rows="3" cols="35" size="40">{FILE_COMMENT}</textarea> </td> + <td><textarea class="post" name="filecomment" rows="3" cols="35">{FILE_COMMENT}</textarea> </td> <td valign="top"> <table border="0" cellspacing="4" cellpadding="0"> <tr> @@ -63,7 +65,7 @@ <td class="row2">{attach_row.S_HIDDEN} <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual" size="40">{attach_row.FILE_COMMENT}</textarea> </td> + <td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual">{attach_row.FILE_COMMENT}</textarea> </td> <td valign="top"> <table border="0" cellspacing="4" cellpadding="0"> <tr> diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 7cc66d92fe..f0ebd9f3b1 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -4,56 +4,6 @@ <!-- INCLUDE overall_header.html --> <!-- ENDIF --> -<script language="javascript" type="text/javascript"> -<!-- - -var form_name = 'post'; -var text_name = 'message'; - -// Define the bbCode tags -bbcode = new Array(); -bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->); -imageTag = false; - -// Helpline messages -var help_line = { - b: '{LA_BBCODE_B_HELP}', - i: '{LA_BBCODE_I_HELP}', - u: '{LA_BBCODE_U_HELP}', - q: '{LA_BBCODE_Q_HELP}', - c: '{LA_BBCODE_C_HELP}', - l: '{LA_BBCODE_L_HELP}', - o: '{LA_BBCODE_O_HELP}', - p: '{LA_BBCODE_P_HELP}', - w: '{LA_BBCODE_W_HELP}', - a: '{LA_BBCODE_A_HELP}', - s: '{LA_BBCODE_S_HELP}', - f: '{LA_BBCODE_F_HELP}', - e: '{LA_BBCODE_E_HELP}', - d: '{LA_BBCODE_D_HELP}' - <!-- BEGIN custom_tags --> - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' - <!-- END custom_tags --> -} - -function checkForm() -{ - if (document.post.message.value.length < 2) - { - alert('{LA_EMPTY_MESSAGE}'); - return false; - } - else - { -// document.post.post.disabled = true; - return true; - } -} - -//--> -</script> -<script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script> - <!-- IF S_FORUM_RULES --> <div class="forumrules"> <!-- IF U_FORUM_RULES --> @@ -70,7 +20,7 @@ function checkForm() <!-- IF not S_PRIVMSGS --> <div id="pageheader"> - <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEWTOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2> + <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2> <!-- IF MODERATORS --> <p class="moderators">{L_MODERATORS}: {MODERATORS}</p> @@ -145,7 +95,7 @@ function checkForm() <tr> <td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td> </tr> - <tr> + <tr> <td class="row2" align="center"><span class="gen">{L_UNGLOBALISE_EXPLAIN}<br /><br />{L_SELECT_DESTINATION_FORUM} </span><select name="to_forum_id">{S_FORUM_SELECT}</select><br /><br /><input class="btnmain" type="submit" name="post" value="{L_CONFIRM}" /> <input class="btnlite" type="submit" name="cancel_unglobalise" value="{L_CANCEL}" /></td> </tr> </table> @@ -195,9 +145,10 @@ function checkForm() <tr> <td class="row1"><b class="genmed">{L_TO}:</b></td> <td class="row2"> + {S_HIDDEN_ADDRESS_FIELD} <!-- BEGIN to_recipient --> - <span class="genmed"> - <a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{to_recipient.NAME}</b></a> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- ENDIF --> + <span class="genmed"><strong> + <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><span class="blue">{to_recipient.NAME}</span></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF --></strong> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- ENDIF --> <!-- BEGINELSE --> <span class="genmed">{L_NO_TO_RECIPIENT}</span> <!-- END to_recipient --> @@ -207,14 +158,13 @@ function checkForm() <td class="row1"><b class="genmed">{L_BCC}:</b></td> <td class="row2"> <!-- BEGIN bcc_recipient --> - <span class="genmed"> - <a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{bcc_recipient.NAME}</b></a> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- ENDIF --> + <span class="genmed"><strong> + <!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><span class="blue">{bcc_recipient.NAME}</span></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF --></strong> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- ENDIF --> <!-- BEGINELSE --> <span class="genmed">{L_NO_BCC_RECIPIENT}</span> <!-- END bcc_recipient --> </td> </tr> - {S_HIDDEN_ADDRESS_FIELD} <!-- ENDIF --> <tr> @@ -238,7 +188,7 @@ function checkForm() <!-- IF S_SHOW_SMILEY_LINK --> <tr> - <td align="center"><a class="nav" href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=350,resizable=yes,scrollbars=yes,WIDTH=300');return false;" target="_phpbbsmilies">{L_MORE_SMILIES}</a></td> + <td align="center"><a class="nav" href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=350,resizable=yes,scrollbars=yes,WIDTH=300');return false;">{L_MORE_SMILIES}</a></td> </tr> <!-- ENDIF --> @@ -246,50 +196,16 @@ function checkForm() <!-- ENDIF --> </td> <td class="row2" valign="top"> + <script language="javascript" type="text/javascript"> + <!-- + var form_name = 'post'; + var text_name = 'message'; + //--> + </script> + <table width="100%" cellspacing="0" cellpadding="0" border="0"> - <tr valign="middle" align="left"> - <td colspan="2"> - <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" /> - <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" /> - <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" /> - <!-- IF S_BBCODE_QUOTE --> - <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /> - <!-- ENDIF --> - <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" /> - <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" /> - <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" /> - <!-- IF S_BBCODE_IMG --> - <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /> - <!-- ENDIF --> - <!-- IF S_LINKS_ALLOWED --> - <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" /> - <!-- ENDIF --> - <!-- IF S_BBCODE_FLASH --> - <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" /> - <!-- ENDIF --> - <span class="genmed" style="white-space: nowrap;">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')"> - <option value="7">{L_FONT_TINY}</option> - <option value="9">{L_FONT_SMALL}</option> - <option value="12" selected="selected">{L_FONT_NORMAL}</option> - <option value="18">{L_FONT_LARGE}</option> - <option value="24">{L_FONT_HUGE}</option> - </select> | <a href="#" onclick="bbstyle(-1); return false;" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a></span> - </td> - </tr> - <!-- IF .custom_tags --> - <tr valign="middle" align="left"> - <td colspan="2"> - <!-- BEGIN custom_tags --> - <input type="button" class="btnbbcode" 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 --> /> - <!-- END custom_tags --> - </td> - </tr> - <!-- ENDIF --> - <tr> - <td><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td> - <td class="genmed" align="center">{L_FONT_COLOR}</td> - </tr> + <!-- INCLUDE posting_buttons.html --> <tr> <td valign="top" style="width: 100%;"><textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 98%;">{MESSAGE}</textarea></td> <td width="80" align="center" valign="top"> @@ -307,7 +223,7 @@ function checkForm() <!-- IF S_INLINE_ATTACHMENT_OPTIONS --> <tr> <td class="row1"><b class="genmed">{L_ATTACHMENTS}:</b></td> - <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select> <input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_inline();" /> + <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select> <input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" /> </td> </tr> <!-- ENDIF --> @@ -376,7 +292,7 @@ function checkForm() <td class="gen">{L_LOCK_TOPIC}</td> </tr> <!-- ENDIF --> - + <!-- IF S_LOCK_POST_ALLOWED --> <tr> <td><input type="checkbox" class="radio" name="lock_post"{S_LOCK_POST_CHECKED} /></td> @@ -397,7 +313,7 @@ function checkForm() <!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY --> <tr> - <td class="row1"><b class="genmed">{L_STICK_TOPIC_FOR}:</b><br /><span class="gensmall">{L_STICKY_ANNOUNCE_TIME_LIMIT}</span></td> + <td class="row1"><b class="genmed">{L_STICK_TOPIC_FOR}:</b><br /><span class="gensmall">{L_STICKY_ANNOUNCE_TIME_LIMIT}</span></td> <td class="row2"><input class="post" type="text" name="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" /> <b class="gen">{L_DAYS}</b> <span class="gensmall">{L_STICK_TOPIC_FOR_EXPLAIN}</span></td> </tr> <!-- ENDIF --> @@ -410,10 +326,10 @@ function checkForm() <!-- ENDIF --> <!-- IF S_CONFIRM_CODE --> - <tr> + <tr> <th colspan="2" valign="middle">{L_POST_CONFIRMATION}</th> </tr> - <tr> + <tr> <td class="row3" colspan="2"><span class="gensmall">{L_POST_CONFIRM_EXPLAIN}</span></td> </tr> <tr> @@ -422,7 +338,7 @@ function checkForm() {CONFIRM_IMAGE} </td> </tr> - <tr> + <tr> <td class="row1"><b class="genmed">{L_CONFIRM_CODE}: </b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td> <td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" /></td> </tr> @@ -438,7 +354,7 @@ function checkForm() <input class="btnlite" type="submit" accesskey="c" tabindex="7" name="cancel" value="{L_CANCEL}" /> </td> </tr> - + <!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF --> <!-- IF S_SHOW_POLL_BOX --> @@ -469,10 +385,6 @@ function checkForm() <!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF --> <!-- IF S_PRIVMSGS --> - </form> - - <br clear="all" /> - <!-- INCLUDE ucp_footer.html --> <!-- ELSE --> diff --git a/phpBB/styles/subSilver/template/posting_buttons.html b/phpBB/styles/subSilver/template/posting_buttons.html new file mode 100644 index 0000000000..a6540e3634 --- /dev/null +++ b/phpBB/styles/subSilver/template/posting_buttons.html @@ -0,0 +1,94 @@ + <tr valign="middle" align="left"> + <td colspan="2"> + <script language="javascript" type="text/javascript"> + <!-- + + // Define the bbCode tags + bbcode = new Array(); + bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->); + imageTag = false; + + // Helpline messages + var help_line = { + b: '{LA_BBCODE_B_HELP}', + i: '{LA_BBCODE_I_HELP}', + u: '{LA_BBCODE_U_HELP}', + q: '{LA_BBCODE_Q_HELP}', + c: '{LA_BBCODE_C_HELP}', + l: '{LA_BBCODE_L_HELP}', + o: '{LA_BBCODE_O_HELP}', + p: '{LA_BBCODE_P_HELP}', + w: '{LA_BBCODE_W_HELP}', + s: '{LA_BBCODE_S_HELP}', + f: '{LA_BBCODE_F_HELP}', + e: '{LA_BBCODE_E_HELP}', + d: '{LA_BBCODE_D_HELP}', + t: '{LA_BBCODE_T_HELP}', + tip: '{L_STYLES_TIP}' + <!-- BEGIN custom_tags --> + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' + <!-- END custom_tags --> + } + + function checkForm() + { + if (document.post.message.value.length < 2) + { + alert('{LA_EMPTY_MESSAGE}'); + return false; + } + else + { + // document.post.post.disabled = true; + return true; + } + } + + //--> + </script> + <script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script> + + + <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" /> + <!-- IF S_BBCODE_QUOTE --> + <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" /> + <!-- ENDIF --> + <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" /> + <input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" /> + <!-- IF S_BBCODE_IMG --> + <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" /> + <!-- ENDIF --> + <!-- IF S_LINKS_ALLOWED --> + <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" /> + <!-- ENDIF --> + <!-- IF S_BBCODE_FLASH --> + <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" /> + <!-- ENDIF --> + <span class="genmed" style="white-space: nowrap;">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')"> + <option value="7">{L_FONT_TINY}</option> + <option value="9">{L_FONT_SMALL}</option> + <option value="12" selected="selected">{L_FONT_NORMAL}</option> + <option value="18">{L_FONT_LARGE}</option> + <option value="24">{L_FONT_HUGE}</option> + </select></span> + </td> + </tr> + <!-- IF .custom_tags --> + <tr valign="middle" align="left"> + <td colspan="2"> + <!-- BEGIN custom_tags --> + <input type="button" class="btnbbcode" 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 --> + </td> + </tr> + <!-- ENDIF --> + <tr> + <td><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td> + <!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT --> + <td class="genmed" align="center">{L_FONT_COLOR}</td> + <!-- ENDIF --> + </tr> diff --git a/phpBB/styles/subSilver/template/posting_preview.html b/phpBB/styles/subSilver/template/posting_preview.html index 4bb98fbd7d..b990428f36 100644 --- a/phpBB/styles/subSilver/template/posting_preview.html +++ b/phpBB/styles/subSilver/template/posting_preview.html @@ -43,9 +43,9 @@ <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div class="postbody">{PREVIEW_MESSAGE}</div> - <!-- IF S_HAS_ATTACHMENTS --> + <!-- IF .attachment --> <br clear="all" /><br /> - + <table class="tablebg" width="100%" cellspacing="1"> <tr> <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td> diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subSilver/template/posting_review.html index 4964cacd05..0d4d5cd71d 100644 --- a/phpBB/styles/subSilver/template/posting_review.html +++ b/phpBB/styles/subSilver/template/posting_review.html @@ -20,10 +20,10 @@ <!-- IF post_review_row.S_ROW_COUNT is even --> <tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td rowspan="2" align="left" valign="top"><a name="{post_review_row.U_POST_ID}"></a> + <td rowspan="2" align="left" valign="top"><a id="pr{post_review_row.U_POST_ID}"></a> <table width="150" cellspacing="0" cellpadding="4" border="0"> <tr> - <td align="center"><b class="postauthor">{post_review_row.POSTER_NAME}</b></td> + <td align="center"><b class="postauthor">{post_review_row.POST_AUTHOR_FULL}</b></td> </tr> </table> </td> diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index 44aa8a5b1b..1b5e192856 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -15,10 +15,10 @@ <!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td rowspan="2" align="left" valign="top"><a name="{topic_review_row.U_POST_ID}"></a> + <td rowspan="2" align="left" valign="top"><a id="pr{topic_review_row.U_POST_ID}"></a> <table width="150" cellspacing="0"> <tr> - <td align="center"><b class="postauthor">{topic_review_row.POSTER_NAME}</b></td> + <td align="center"><b class="postauthor"<!-- IF topic_review_row.POST_AUTHOR_COLOUR --> style="color: {topic_review_row.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topic_review_row.POST_AUTHOR}</b></td> </tr> </table> </td> diff --git a/phpBB/styles/subSilver/template/search_body.html b/phpBB/styles/subSilver/template/search_body.html index ea8198565b..70952041e0 100644 --- a/phpBB/styles/subSilver/template/search_body.html +++ b/phpBB/styles/subSilver/template/search_body.html @@ -33,7 +33,7 @@ <td class="row1"><b class="genmed">{L_RESULT_SORT}: </b></td> <td class="row2" nowrap="nowrap">{S_SELECT_SORT_KEY}<br /><input type="radio" class="radio" name="sd" value="a" /> <span class="genmed">{L_SORT_ASCENDING}</span><br /><input type="radio" class="radio" name="sd" value="d" checked="checked" /> <span class="genmed">{L_SORT_DESCENDING}</span></td> <td class="row1" nowrap="nowrap"><b class="genmed">{L_DISPLAY_RESULTS}: </b></td> - <td class="row2" nowrap="nowrap"><input type="radio" class="radio" name="sr" value="posts" checked="checked" /> <span class="genmed">{L_POSTS}</span> <input type="radio" class="radio" name="sr" value="topics" /> <span class="genmed">{L_TOPICS}</td> + <td class="row2" nowrap="nowrap"><input type="radio" class="radio" name="sr" value="posts" checked="checked" /> <span class="genmed">{L_POSTS}</span> <input type="radio" class="radio" name="sr" value="topics" /> <span class="genmed">{L_TOPICS}</span></td> </tr> <tr> <td class="row1" width="25%"><b class="genmed">{L_RESULT_DAYS}: </b></td> diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html index 0579b3131d..ab0764254c 100644 --- a/phpBB/styles/subSilver/template/search_results.html +++ b/phpBB/styles/subSilver/template/search_results.html @@ -51,12 +51,12 @@ <p class="gensmall">{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p> <!-- ENDIF --> </td> - <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF searchresults.U_TOPIC_AUTHOR --><a href="{searchresults.U_TOPIC_AUTHOR}"<!-- IF searchresults.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {searchresults.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{searchresults.TOPIC_AUTHOR}</a><!-- ELSE -->{searchresults.TOPIC_AUTHOR}</a><!-- ENDIF --></p></td> + <td class="row2" width="100" align="center"><p class="topicauthor">{searchresults.TOPIC_AUTHOR_FULL}</p></td> <td class="row1" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_REPLIES}</p></td> <td class="row2" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_VIEWS}</p></td> <td class="row1" width="120" align="center"> <p class="topicdetails">{searchresults.LAST_POST_TIME}</p> - <p class="topicdetails"><!-- IF searchresults.U_LAST_POST_AUTHOR --><a href="{searchresults.U_LAST_POST_AUTHOR}"<!-- IF searchresults.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {searchresults.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{searchresults.LAST_POST_AUTHOR}</a><!-- ELSE -->{searchresults.LAST_POST_AUTHOR}<!-- ENDIF --> + <p class="topicdetails">{searchresults.LAST_POST_AUTHOR_FULL} <a href="{searchresults.U_LAST_POST}">{searchresults.LAST_POST_IMG}</a> </p> </td> @@ -84,10 +84,10 @@ <!-- IF searchresults.S_IGNORE_POST --> <td class="gensmall" colspan="2" height="25" align="center">{searchresults.L_IGNORE_POST}</td> <!-- ELSE --> - <td colspan="2" height="25"><p class="topictitle"><a name="{searchresults.POST_ID}"></a> <!-- IF searchresults.FORUM_TITLE -->{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE -->{L_GLOBAL}<!-- ENDIF --> {L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></p></td> + <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}"></a> <!-- IF searchresults.FORUM_TITLE -->{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE -->{L_GLOBAL}<!-- ENDIF --> {L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></p></td> </tr> <tr class="row1"> - <td width="150" align="center" valign="middle"><b class="postauthor"<!-- IF searchresults.POSTER_COLOUR --> style="color: {searchresults.POSTER_COLOUR}"<!-- ENDIF -->>{searchresults.POSTER_NAME}</b></td> + <td width="150" align="center" valign="middle"><b class="postauthor">{searchresults.POST_AUTHOR_FULL}</b></td> <td height="25"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> diff --git a/phpBB/styles/subSilver/template/ucp_footer.html b/phpBB/styles/subSilver/template/ucp_footer.html index a9dc458a72..2160717aba 100644 --- a/phpBB/styles/subSilver/template/ucp_footer.html +++ b/phpBB/styles/subSilver/template/ucp_footer.html @@ -2,6 +2,7 @@ <!-- IF not S_PRIVMSGS or S_SHOW_DRAFTS --></form><!-- ENDIF --></td> </tr> </table> +<!-- IF S_SHOW_PM_BOX and S_POST_ACTION --></form><!-- ENDIF --> <br clear="all" /> diff --git a/phpBB/styles/subSilver/template/ucp_groups_manage.html b/phpBB/styles/subSilver/template/ucp_groups_manage.html index 51bd5a1567..80113b08ad 100644 --- a/phpBB/styles/subSilver/template/ucp_groups_manage.html +++ b/phpBB/styles/subSilver/template/ucp_groups_manage.html @@ -39,8 +39,8 @@ </tr> <tr> <td class="row1" width="35%"><label for="group_desc">{L_GROUP_DESC}:</label></td> - <td class="row2"><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea></dd> - <br /><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} <input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} <input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</dd> + <td class="row2"><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea> + <br /><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} <input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} <input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS} </td> </tr> <!-- IF not S_SPECIAL_GROUP --> @@ -54,7 +54,7 @@ </td> </tr> <!-- ELSE --> - <input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" /> + <tr style="display:none;"><td><input name="group_type" type="hidden" value="{GROUP_TYPE_SPECIAL}" /></td></tr> <!-- ENDIF --> <tr> @@ -70,7 +70,7 @@ </tr> <tr> <th colspan="2">{L_GROUP_AVATAR}</th> - <tr> + </tr> <tr> <td class="row1" width="35%"><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></td> <td class="row2">{AVATAR_IMAGE}<br /><br /><input type="checkbox" class="radio" name="delete" /> <span>{L_DELETE_AVATAR}</span></td> @@ -95,7 +95,7 @@ <td class="row2"><input name="width" type="text" id="width" size="3" value="{GROUP_AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{GROUP_AVATAR_HEIGHT}" /> <span>px</span></td> </tr> <!-- IF S_DISPLAY_GALLERY --> - <tr> + <tr> <td class="row1" width="35%"><label>{L_AVATAR_GALLERY}:</label></td> <td class="row2"><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></td> </tr> @@ -113,7 +113,7 @@ <td class="row1" width="35%"> <table cellspacing="1"> <!-- BEGIN avatar_row --> - <tr> + <tr> <!-- BEGIN avatar_column --> <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td> <!-- END avatar_column --> @@ -128,7 +128,7 @@ </td> <td class="row2"><input class="button2" type="submit" name="cancel" value="{L_CANCEL}" /></td> </tr> - + <!-- ENDIF --> <tr> @@ -216,7 +216,7 @@ </tr> <tr> <td class="row1"><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></td> - <td class="row2"><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea><br />[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</td> + <td class="row2"><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</td> </tr> <tr> <td class="cat" colspan="2" align="center"><input class="button2" type="submit" name="addusers" value="{L_SUBMIT}" /></td> diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html index dc89b8a3be..c1eee778ee 100644 --- a/phpBB/styles/subSilver/template/ucp_header.html +++ b/phpBB/styles/subSilver/template/ucp_header.html @@ -1,12 +1,14 @@ <!-- INCLUDE overall_header.html --> + +<!-- IF S_SHOW_PM_BOX and S_POST_ACTION --> + <form action="{S_POST_ACTION}" method="post" name="post"{S_FORM_ENCTYPE}> +<!-- ENDIF --> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="20%" valign="top"> <!-- IF S_SHOW_PM_BOX and S_POST_ACTION --> - <form action="{S_POST_ACTION}" method="post" name="post"{S_FORM_ENCTYPE}> - <table class="tablebg" width="100%" cellspacing="1"> <tr> <th>{L_PM_TO}</th> @@ -125,7 +127,7 @@ <ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;"> <!-- BEGIN friends_online --> - <li><a href="{friends_online.U_PROFILE}"<!-- IF friends_online.USER_COLOUR --> style="color: {friends_online.USER_COLOUR}"<!-- ENDIF -->>{friends_online.USERNAME}</a> + <li>{friends_online.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --> [ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_online.USER_ID}]" value="{L_ADD}" /> ] <!-- ENDIF --> @@ -141,10 +143,11 @@ <ul class="nav" style="margin: 0px; padding: 0px; list-style-type: none; line-height: 175%;"> <!-- BEGIN friends_offline --> - <li><a href="{friends_offline.U_PROFILE}"<!-- IF friends_offline.USER_COLOUR --> style="color: {friends_offline.USER_COLOUR}"<!-- ENDIF -->>{friends_offline.USERNAME}</a> + <li>{friends_offline.USERNAME_FULL} <!-- IF S_SHOW_PM_BOX --> [ <input class="post" style="font-size: 90%;" type="submit" name="add_to[{friends_offline.USER_ID}]" value="{L_ADD}" /> ] <!-- ENDIF --> + </li> <!-- BEGINELSE --> <li>{L_NO_FRIENDS_OFFLINE}</li> <!-- END friends_offline --> diff --git a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html index 8f4d100b2d..b8ab6fa30c 100644 --- a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html @@ -34,7 +34,7 @@ </td> <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"> <p class="topicdetails">{topicrow.LAST_POST_TIME}</p> - <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF --> + <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a> </p> </td> diff --git a/phpBB/styles/subSilver/template/ucp_main_drafts.html b/phpBB/styles/subSilver/template/ucp_main_drafts.html index 6d7f380b7f..4e820acd0d 100644 --- a/phpBB/styles/subSilver/template/ucp_main_drafts.html +++ b/phpBB/styles/subSilver/template/ucp_main_drafts.html @@ -37,7 +37,7 @@ <!-- ELSEIF draftrow.S_LINK_PM --><span class="gensmall">{L_PRIVATE_MESSAGE}</span> <!-- ELSE --><span class="gensmall">{L_NO_TOPIC_FORUM}</span><!-- ENDIF --> </td> - <td style="padding: 4px;" align="center" nowrap="nowrap"><span class="genmed"><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a><br /><!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></td> + <td style="padding: 4px;" align="center" nowrap="nowrap"><span class="genmed"><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a><br /><!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></span></td> <td style="padding: 4px;" align="center"><input type="checkbox" class="radio" name="d[{draftrow.DRAFT_ID}]" /></td> </tr> <!-- BEGINELSE --> @@ -60,40 +60,33 @@ <tr> <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}: </b><br /><span class="gensmall">{L_EDIT_DRAFT_EXPLAIN}</span></td> <td class="row2"> + <script language="javascript" type="text/javascript"> + <!-- + + var form_name = 'ucp'; + var text_name = 'message'; + //--> + </script> <table cellspacing="0" cellpadding="2" border="0"> - <tr align="center" valign="middle"> - <td><input class="btnbbcode" type="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" onmouseover="helpline('b')" /></td> - <td><input class="btnbbcode" type="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" onmouseover="helpline('i')" /></td> - <td><input class="btnbbcode" type="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" onmouseover="helpline('u')" /></td> - <td><input class="btnbbcode" type="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /></td> - <td><input class="btnbbcode" type="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" /></td> - <td><input class="btnbbcode" type="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" /></td> - <td><input class="btnbbcode" type="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" /></td> - <td><input class="btnbbcode" type="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /></td> - <td><input class="btnbbcode" type="button" accesskey="w" name="addbbcode18" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(18)" onmouseover="helpline('w')" /></td> + <!-- INCLUDE posting_buttons.html --> + <tr> + <td colspan="9"><textarea class="post" name="message" rows="10" cols="70" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{DRAFT_MESSAGE}</textarea></td> </tr> <tr> <td colspan="9"> - <table width="100%" cellspacing="0" cellpadding="0" border="0"> + <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> - <td><span class="genmed"> {L_FONT_SIZE}:</span> <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')"> - <option value="7">{L_FONT_TINY}</option> - <option value="9">{L_FONT_SMALL}</option> - <option value="12" selected="selected">{L_FONT_NORMAL}</option> - <option value="18">{L_FONT_LARGE}</option> - <option value="24">{L_FONT_HUGE}</option> - </select></td> - <td class="gensmall" nowrap="nowrap" align="right"><a href="#" onclick="bbstyle(-1); return false;" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a></td> + <td align="left"> + <script type="text/javascript"> + <!-- + colorPalette('h', 6, 5) + //--> + </script> + </td> </tr> </table> </td> - </tr> - <tr> - <td colspan="9"><input class="helpline" type="text" name="helpbox" size="45" maxlength="100" value="{L_STYLES_TIP}" /></td> - </tr> - <tr> - <td colspan="9"><textarea class="post" name="message" rows="10" cols="76" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{DRAFT_MESSAGE}</textarea></td> - </tr> + </tr> </table> </td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_main_front.html b/phpBB/styles/subSilver/template/ucp_main_front.html index 75eb8f242a..54257d72ea 100644 --- a/phpBB/styles/subSilver/template/ucp_main_front.html +++ b/phpBB/styles/subSilver/template/ucp_main_front.html @@ -20,13 +20,8 @@ </td> <td class="row1" width="120" align="center" nowrap="nowrap"> <p class="topicdetails">{topicrow.LAST_POST_TIME}</p> - <p class="topicdetails"> - <!-- IF topicrow.U_LAST_POST_AUTHOR --> - <a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a> - <!-- ELSE --> - {topicrow.LAST_POST_AUTHOR} - <!-- ENDIF --> - <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a> + <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL} + <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a> </p> </td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_main_subscribed.html b/phpBB/styles/subSilver/template/ucp_main_subscribed.html index 9bcab695ed..ee05923c36 100644 --- a/phpBB/styles/subSilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/subSilver/template/ucp_main_subscribed.html @@ -16,7 +16,7 @@ <!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td> <td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td> - <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br /><!-- IF forumrow.U_LAST_POST_AUTHOR --><a href="{forumrow.U_LAST_POST_AUTHOR}" <!-- IF forumrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {forumrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{forumrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{forumrow.LAST_POST_AUTHOR}<!-- ENDIF --> <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td> + <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{forumrow.LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td> <td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td> </tr> <!-- BEGINELSE --> @@ -55,7 +55,7 @@ </td> <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"> <p class="topicdetails">{topicrow.LAST_POST_TIME}</p> - <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF --> + <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{topicrow.LAST_POST_IMG}</a> </p> </td> diff --git a/phpBB/styles/subSilver/template/ucp_pm_history.html b/phpBB/styles/subSilver/template/ucp_pm_history.html index cbfc951f4a..42e223bb35 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_history.html +++ b/phpBB/styles/subSilver/template/ucp_pm_history.html @@ -16,7 +16,7 @@ <td rowspan="2" align="left" valign="top"><a name="{history_row.U_POST_ID}"></a> <table width="150" cellspacing="0"> <tr> - <td align="center" colspan="2"><b class="postauthor">{history_row.AUTHOR_NAME}</b></td> + <td align="center" colspan="2"><span class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</span></td> </tr> </table> </td> diff --git a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html index a87662e09e..0dbd6a0f33 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html +++ b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html @@ -1,5 +1,7 @@ -</form> +<!-- IF not S_VIEW_MESSAGE --> + </form> +<!-- ENDIF --> <table class="tablebg" width="100%" cellspacing="1" cellpadding="0"> <tr> diff --git a/phpBB/styles/subSilver/template/ucp_pm_options.html b/phpBB/styles/subSilver/template/ucp_pm_options.html index 4fbc908b5a..05040e529a 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_options.html +++ b/phpBB/styles/subSilver/template/ucp_pm_options.html @@ -42,7 +42,7 @@ <!-- IF S_TEXT_CONDITION --> <input type="text" name="rule_string" value="{CURRENT_STRING}" size="30" maxlength="250" class="post" /> <!-- ELSEIF S_USER_CONDITION --> - <input type="text" class="post" name="rule_string" value="{CURRENT_STRING}" maxlength="50" size="20" /> <span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]</span> + <input type="text" class="post" name="rule_string" value="{CURRENT_STRING}" maxlength="50" size="20" /> <span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(); return false;">{L_FIND_USERNAME}</a> ]</span> <!-- ELSEIF S_GROUP_CONDITION --> <input type="hidden" name="rule_string" value="{CURRENT_STRING}" /><!-- IF S_GROUP_OPTIONS --><select name="rule_group_id">{S_GROUP_OPTIONS}</select><!-- ELSE -->{L_NO_GROUPS}<!-- ENDIF --> <!-- ENDIF --> @@ -166,7 +166,7 @@ <th colspan="2">{L_FOLDER_OPTIONS}</th> </tr> <tr> - <td class="row1" width="200"><b class="genmed">{L_IF_FOLDER_FULL}: </b></span></td> + <td class="row1" width="200"><span><b class="genmed">{L_IF_FOLDER_FULL}: </b></span></td> <td class="row1"><input type="radio" class="radio" name="full_action" value="1"{S_DELETE_CHECKED} /> <span class="genmed">{L_DELETE_OLDEST_MESSAGES}</span></td> </tr> <tr> @@ -185,5 +185,5 @@ <td class="row1" colspan="2" align="right"><input class="btnlite" style="width:150px" type="submit" name="fullfolder" value="{L_CHANGE}" /></td> </tr> </table> - +</form> <!-- INCLUDE ucp_footer.html --> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html index 62e2a84260..f07420a454 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html @@ -38,9 +38,17 @@ <!-- ELSE --> <table class="tablebg" width="100%" cellspacing="1" cellpadding="0" border="0"> - <!-- IF NUM_NOT_MOVED --> + <!-- IF NUM_NOT_MOVED or NUM_REMOVED --> <tr> - <td class="row3" colspan="{$COLSPAN}" align="center"><span class="gen">{NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO}</span></td> + <td class="row3" colspan="{$COLSPAN}" align="center"><span class="gen"> + <!-- IF NUM_REMOVED --> + {RULE_REMOVED_MESSAGES} + <!-- IF NUM_NOT_MOVED --><br /><!-- ENDIF --> + <!-- ENDIF --> + <!-- IF NUM_NOT_MOVED --> + {NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO} + <!-- ENDIF --> + </span></td> </tr> <!-- ENDIF --> <tr> @@ -77,7 +85,7 @@ <!-- ENDIF --> </span></td> - <td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR}<!-- ENDIF --></p></td> + <td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR_FULL}<!-- ENDIF --></p></td> <td class="row1" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td> <td class="row1" width="20" align="center"><p class="topicdetails"><input type="checkbox" class="radio" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html index 0d29d32283..5d8be4000a 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html @@ -14,7 +14,7 @@ <tr class="row1"> <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td> - <td class="gen"><!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{AUTHOR_NAME}</a><!-- ELSE -->{AUTHOR_NAME}<!-- ENDIF --></td> + <td class="gen">{MESSAGE_AUTHOR_FULL}</td> </tr> <tr class="row1"> @@ -27,11 +27,7 @@ <td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td> <td class="gen"> <!-- BEGIN to_recipient --> - <!-- IF not to_recipient.U_VIEW --> - <span<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->{to_recipient.NAME}</span> - <!-- ELSE --> - <a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{to_recipient.NAME}</a> - <!-- ENDIF --> + <!-- IF to_recipient.IS_GROUP --><span class="blue"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL} <!-- ENDIF --> <!-- END to_recipient --> </td> </tr> @@ -42,11 +38,7 @@ <td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td> <td class="gen"> <!-- BEGIN bcc_recipient --> - <!-- IF not bcc_recipient.U_VIEW --> - <span<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->{bcc_recipient.NAME}</span> - <!-- ELSE --> - <a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{bcc_recipient.NAME}</a> - <!-- ENDIF --> + <!-- IF bcc_recipient.IS_GROUP --><span class="blue"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL} <!-- ENDIF --> <!-- END bcc_recipient --> </td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html index 44edd2653b..c330e9df2e 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage_print.html @@ -77,7 +77,7 @@ hr.sep { <table width="85%" cellspacing="3" cellpadding="0" border="0" align="center"> <tr> <td width="10%" nowrap="nowrap">{L_PM_FROM}: </td> - <td><b>{AUTHOR_NAME}</b> [ {SENT_DATE} ]</td> + <td><b>{MESSAGE_AUTHOR}</b> [ {SENT_DATE} ]</td> </tr> <!-- IF S_TO_RECIPIENT --> @@ -85,7 +85,7 @@ hr.sep { <td width="10%" nowrap="nowrap">{L_TO}:</td> <td> <!-- BEGIN to_recipient --> - <!-- IF to_recipient.COLOUR --><span style="color:#{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span> + <!-- IF to_recipient.COLOUR --><span style="color:{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span> <!-- END to_recipient --> </td> </tr> @@ -96,7 +96,7 @@ hr.sep { <td width="10%" nowrap="nowrap">{L_BCC}:</td> <td> <!-- BEGIN bcc_recipient --> - <!-- IF bcc_recipient.COLOUR --><span style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span> + <!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span> <!-- END bcc_recipient --> </td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_prefs_personal.html b/phpBB/styles/subSilver/template/ucp_prefs_personal.html index 24efae86cf..ccab661587 100644 --- a/phpBB/styles/subSilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/subSilver/template/ucp_prefs_personal.html @@ -71,7 +71,9 @@ <!-- ENDIF --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td> - <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td> + <td class="row2"> + <select id="tz" name="tz">{S_TZ_OPTIONS}</select> + </td> </tr> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td> diff --git a/phpBB/styles/subSilver/template/ucp_profile_reg_details.html b/phpBB/styles/subSilver/template/ucp_profile_reg_details.html index ba70350308..6ade4c8cba 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_reg_details.html +++ b/phpBB/styles/subSilver/template/ucp_profile_reg_details.html @@ -14,31 +14,34 @@ <td class="row3" colspan="2" align="center"><span class="gensmall" style="color:red">{ERROR}</span></td> </tr> <!-- ENDIF --> -<tr> +<tr> <td class="row1" width="35%"><b class="genmed">{L_USERNAME}: </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td> <td class="row2"><!-- IF S_CHANGE_USERNAME --><input type="text" class="post" name="username" size="30" maxlength="30" value="{USERNAME}" /><!-- ELSE --><b class="gen">{USERNAME}</b><!-- ENDIF --></td> </tr> -<tr> +<tr> <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td> <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" name="email" size="30" maxlength="60" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td> </tr> <!-- IF S_CHANGE_EMAIL --> - <tr> + <tr> <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_EMAIL}: </b><br /><span class="gensmall">{L_CONFIRM_EMAIL_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" name="email_confirm" size="30" maxlength="60" value="{CONFIRM_EMAIL}" /></td> </tr> <!-- ENDIF --> <!-- IF S_CHANGE_PASSWORD --> - <tr> - <td class="row1" width="35%"><b class="genmed">{L_CHANGE_PASSWORD}: </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td> + <tr> + <td class="row1" width="35%"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td> <td class="row2"><input type="password" class="post" name="new_password" size="30" maxlength="255" value="{NEW_PASSWORD}" /></td> </tr> - <tr> + <tr> <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_PASSWORD}: </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td> <td class="row2"><input type="password" class="post" name="password_confirm" size="30" maxlength="255" value="{PASSWORD_CONFIRM}" /></td> </tr> <!-- ENDIF --> -<tr> +<tr> + <th colspan="2">{L_CONFIRM_CHANGES}</th> +</tr> +<tr> <td class="row1" width="35%"><b class="genmed">{L_CURRENT_PASSWORD}: </b><br /><span class="gensmall">{L_CURRENT_PASSWORD_EXPLAIN}</span></td> <td class="row2"><input type="password" class="post" name="cur_password" size="30" maxlength="255" value="{CUR_PASSWORD}" /></td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html index 735f80efd4..be01f098e9 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_signature.html +++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html @@ -1,45 +1,13 @@ <!-- INCLUDE ucp_header.html --> -<script language="javascript" type="text/javascript"> -<!-- - -var form_name = 'ucp'; -var text_name = 'signature'; - -// Define the bbCode tags -bbcode = new Array(); -bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->); -imageTag = false; - -// Helpline messages -var help_line = { - b: '{LA_BBCODE_B_HELP}', - i: '{LA_BBCODE_I_HELP}', - u: '{LA_BBCODE_U_HELP}', - q: '{LA_BBCODE_Q_HELP}', - c: '{LA_BBCODE_C_HELP}', - l: '{LA_BBCODE_L_HELP}', - o: '{LA_BBCODE_O_HELP}', - p: '{LA_BBCODE_P_HELP}', - w: '{LA_BBCODE_W_HELP}', - a: '{LA_BBCODE_A_HELP}', - s: '{LA_BBCODE_S_HELP}', - f: '{LA_BBCODE_F_HELP}', - e: '{LA_BBCODE_E_HELP}', - d: '{LA_BBCODE_D_HELP}' - <!-- BEGIN custom_tags --> - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' - <!-- END custom_tags --> -} - -//--> -</script> -<script language="javascript" type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script> - +<!-- DEFINE $S_SIGNATURE = 1 --> <table class="tablebg" width="100%" cellspacing="1"> <tr> <th colspan="2">{L_TITLE}</th> </tr> +<tr> + <td colspan="2">{L_SIGNATURE_EXPLAIN}</td> +</tr> <!-- IF ERROR --> <tr> @@ -48,63 +16,28 @@ var help_line = { <!-- ENDIF --> <tr> - <td class="row1" width="20%"><b class="genmed">{L_SIGNATURE}: </b><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}</span></td> - <td class="row2"> + <td colspan="2" class="row2"> + <script language="javascript" type="text/javascript"> + <!-- + var form_name = 'ucp'; + var text_name = 'signature'; + --> + </script> + <table cellspacing="0" cellpadding="2" border="0"> - <tr valign="middle" align="left"> - <td colspan="2"> - <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" /> - <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" /> - <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" /> - <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" /> - <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" /> - <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" /> - <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" /> - <!-- IF S_BBCODE_IMG --> - <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" /> - <!-- ENDIF --> - <!-- IF S_LINKS_ALLOWED --> - <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" /> - <!-- ENDIF --> - <!-- IF S_BBCODE_FLASH --> - <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" /> - <!-- ENDIF --> - </td> - </tr> - <tr> - <td valign="middle" align="left"> - <span class="genmed" style="white-space: nowrap;">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')"> - <option value="7">{L_FONT_TINY}</option> - <option value="9">{L_FONT_SMALL}</option> - <option value="12" selected="selected">{L_FONT_NORMAL}</option> - <option value="18">{L_FONT_LARGE}</option> - <option value="24">{L_FONT_HUGE}</option> - </select> | <a href="#" onclick="bbstyle(-1); return false;" onmouseover="helpline('a')">{L_CLOSE_TAGS}</a></span> - </td> - </tr> - <!-- IF .custom_tags --> - <tr valign="middle" align="left"> - <td colspan="2"> - <!-- BEGIN custom_tags --> - <input type="button" class="btnbbcode" 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 --> /> - <!-- END custom_tags --> - </td> - </tr> - <!-- ENDIF --> - <tr> - <td colspan="9"><input type="text" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td> - </tr> + <!-- INCLUDE posting_buttons.html --> <tr> - <td colspan="9"><textarea class="post" name="signature" rows="10" cols="80" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td> + <td><textarea class="post" name="signature" rows="10" cols="76" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td> + <td></td> </tr> <tr> <td colspan="9"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> - <td bgcolor="black" align="center"> + <td align="left"> <script type="text/javascript"> <!-- - colorPalette('h', 18, 5) + colorPalette('h', 6, 5) //--> </script> </td> diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html index 6d483ecac9..d357f45279 100644 --- a/phpBB/styles/subSilver/template/viewforum_body.html +++ b/phpBB/styles/subSilver/template/viewforum_body.html @@ -52,17 +52,12 @@ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p> <!-- ENDIF --> </td> - <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF topicrow.U_TOPIC_AUTHOR --><a href="{topicrow.U_TOPIC_AUTHOR}"<!-- IF topicrow.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.TOPIC_AUTHOR}</a><!-- ELSE -->{topicrow.TOPIC_AUTHOR}<!-- ENDIF --></p></td> + <td class="row2" width="100" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td> <td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td> <td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td> <td class="row1" width="140" align="center"> <p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p> - <p class="topicdetails"> - <!-- IF topicrow.U_LAST_POST_AUTHOR --> - <a href="{topicrow.U_LAST_POST_AUTHOR}" <!-- IF topicrow.LAST_POST_AUTHOR_COLOUR -->style="color: {topicrow.LAST_POST_AUTHOR_COLOUR}; font-weight: bold;"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a> - <!-- ELSE --> - {topicrow.LAST_POST_AUTHOR} - <!-- ENDIF --> + <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> </p> </td> @@ -92,7 +87,7 @@ <br clear="all" /> <!-- ENDIF --> -<!-- IF S_IS_POSTABLE --> +<!-- IF S_IS_POSTABLE or S_NO_READ_ACCESS --> <div id="pageheader"> <h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2> @@ -109,6 +104,35 @@ <div id="pagecontent"> +<!-- IF S_NO_READ_ACCESS --> + <table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="row1" height="30" align="center" valign="middle"><span class="gen">{L_NO_READ_ACCESS}</span></td> + </tr> + </table> + + <!-- IF not S_USER_LOGGED_IN --> + + <br /><br /> + + <form method="post" action="{S_LOGIN_ACTION}"> + + <table class="tablebg" width="100%" cellspacing="1"> + <tr> + <td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td> + </tr> + <tr> + <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" /> <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" /> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /> <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td> + </tr> + </table> + + </form> + + <!-- ENDIF --> + + <br clear="all" /> +<!-- ENDIF --> + <!-- IF S_IS_POSTABLE or TOTAL_TOPICS --> <table width="100%" cellspacing="1"> <tr> @@ -179,12 +203,12 @@ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p> <!-- ENDIF --> </td> - <td class="row2" width="100" align="center"><p class="topicauthor"><!-- IF topicrow.U_TOPIC_AUTHOR --><a href="{topicrow.U_TOPIC_AUTHOR}"<!-- IF topicrow.TOPIC_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.TOPIC_AUTHOR}</a><!-- ELSE -->{topicrow.TOPIC_AUTHOR}<!-- ENDIF --></p></td> + <td class="row2" width="100" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td> <td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td> <td class="row2" width="50" align="center"><p class="topicdetails">{topicrow.VIEWS}</p></td> <td class="row1" width="140" align="center"> <p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p> - <p class="topicdetails"><!-- IF topicrow.U_LAST_POST_AUTHOR --><a href="{topicrow.U_LAST_POST_AUTHOR}"<!-- IF topicrow.LAST_POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{topicrow.LAST_POST_AUTHOR}</a><!-- ELSE -->{topicrow.LAST_POST_AUTHOR}<!-- ENDIF --> + <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL} <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> </p> </td> diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html index b1bfe3ccca..bee02f94ee 100644 --- a/phpBB/styles/subSilver/template/viewtopic_body.html +++ b/phpBB/styles/subSilver/template/viewtopic_body.html @@ -130,10 +130,13 @@ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <!-- IF postrow.S_IGNORE_POST --> - <td class="gensmall" colspan="2" height="25" align="center">{postrow.L_IGNORE_POST}</td> + <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td> <!-- ELSE --> - <td align="center" valign="middle"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a><b class="postauthor">{postrow.POSTER_NAME}</b></td> + <td align="center" valign="middle"> + <!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a> + <b class="postauthor"<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b> + </td> <td width="100%" height="25"> <table width="100%" cellspacing="0"> <tr> diff --git a/phpBB/styles/subSilver/template/viewtopic_print.html b/phpBB/styles/subSilver/template/viewtopic_print.html index 3a5fe6433c..000dbe0d85 100644 --- a/phpBB/styles/subSilver/template/viewtopic_print.html +++ b/phpBB/styles/subSilver/template/viewtopic_print.html @@ -83,7 +83,7 @@ hr.sep { <table width="85%" cellspacing="3" cellpadding="0" border="0" align="center"> <tr> <td width="10%" nowrap="nowrap">{L_AUTHOR}: </td> - <td><b>{postrow.POSTER_NAME}</b> [ {postrow.POST_DATE} ]</td> + <td><b<!-- IF postrow.POST_AUTHOR_COLOUR --> style="color: {postrow.POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{postrow.POST_AUTHOR}</b> [ {postrow.POST_DATE} ]</td> </tr> <tr> <td width="10%" nowrap="nowrap">{L_POST_SUBJECT}: </td> diff --git a/phpBB/styles/subSilver/theme/stylesheet.css b/phpBB/styles/subSilver/theme/stylesheet.css index 11455ce5bb..066b051cc5 100644 --- a/phpBB/styles/subSilver/theme/stylesheet.css +++ b/phpBB/styles/subSilver/theme/stylesheet.css @@ -36,6 +36,8 @@ body { } #wrapheader { + min-height: 120px; + height: auto !important; height: 120px; background-image: url('./images/background.gif'); background-repeat: repeat-x; diff --git a/phpBB/ucp.php b/phpBB/ucp.php index f0758e752e..d1461c1764 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -264,7 +264,7 @@ $sql = $db->sql_build_query('SELECT_DISTINCT', array( 'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour', - 'ORDER_BY' => 'u.username ASC', + 'ORDER_BY' => 'u.username_clean ASC', )); $result = $db->sql_query($sql); @@ -274,11 +274,12 @@ while ($row = $db->sql_fetchrow($result)) $which = (time() - $update_time < $row['online_time'] && $row['viewonline'] && $row['user_allow_viewonline']) ? 'online' : 'offline'; $template->assign_block_vars("friends_{$which}", array( - 'U_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USER_ID' => $row['user_id'], - 'USER_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', - 'USERNAME' => $row['username']) + + 'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), + 'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'])) ); } $db->sql_freeresult($result); diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 21a2ebce73..9d6da5c31c 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -147,9 +147,16 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & page_footer(); } -// Ok, if someone has only list-access, we only display the forum list +// Ok, if someone has only list-access, we only display the forum list. +// We also make this circumstance available to the template in case we want to display a notice. ;) if (!$auth->acl_get('f_read', $forum_id)) { + $template->assign_vars(array( + 'S_NO_READ_ACCESS' => true, + 'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false, + 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . urlencode(build_url(array('_f_')))) + )); + page_footer(); } @@ -173,7 +180,7 @@ if ($forum_data['forum_topics_per_page']) // Do the forum Prune thang - cron type job ... if ($forum_data['prune_next'] < time() && $forum_data['enable_prune']) { - $template->assign_var('RUN_CRON_TASK', '<img src="' . $phpbb_root_path . 'cron.' . $phpEx . '?cron_type=prune_forum&f=' . $forum_id . '" width="1" height="1" />'); + $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=prune_forum&f=' . $forum_id) . '" alt="cron" width="1" height="1" />'); } // Forum rules and subscription info @@ -422,7 +429,7 @@ if ($num_rows < $sql_limit) $db->sql_freeresult($result); } -// If we have some shadow topics, update the rowset to reflect their topic informations +// If we have some shadow topics, update the rowset to reflect their topic information if (sizeof($shadow_topic_list)) { $sql = 'SELECT * @@ -462,7 +469,7 @@ if (sizeof($topic_list)) $topic_forum_list = array(); foreach ($rowset as $t_id => $row) { - $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered']) ? $row['forum_mark_time'] : 0; + $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0; $topic_forum_list[$row['forum_id']]['topics'][] = $t_id; } @@ -524,7 +531,7 @@ if (sizeof($topic_list)) $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; } - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); @@ -539,14 +546,16 @@ if (sizeof($topic_list)) $template->assign_block_vars('topicrow', array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, - 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'], - 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '', + 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $user->format_date($row['topic_time']), 'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']), - 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name']) ? $row['topic_last_poster_name'] : $user->lang['GUEST'], - 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '', + 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'REPLIES' => $replies, @@ -577,8 +586,8 @@ if (sizeof($topic_list)) 'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread', 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'], - 'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '', - 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '', + 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), + 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'U_VIEW_TOPIC' => $view_topic_url, 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $forum_id . '&t=' . $topic_id, true, $user->session_id), 'U_MCP_QUEUE' => $u_mcp_queue, diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index f38073a80b..8d5f73f0ef 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -30,7 +30,7 @@ $sort_dir = request_var('sd', 'd'); $show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0; $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED']); -$sort_key_sql = array('a' => 'u.username', 'b' => 's.session_time', 'c' => 's.session_page'); +$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page'); // Sorting and order if (!isset($sort_key_text[$sort_key])) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 2898a1c20a..d7ef0697c1 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -365,7 +365,7 @@ if (!isset($topic_tracking_info)) $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); -$sort_by_sql = array('a' => 'u.username', 't' => 'p.post_time', 's' => 'p.post_subject'); +$sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject'); $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); @@ -893,22 +893,6 @@ while ($row = $db->sql_fetchrow($result)) } $poster_id = $row['poster_id']; - $poster = ($poster_id == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username']; - - if ($view != 'show' || $post_id != $row['post_id']) - { - if ($row['foe']) - { - $rowset[$row['post_id']] = array( - 'foe' => true, - 'user_id' => $row['user_id'], - 'post_id' => $row['post_id'], - 'poster' => $poster, - ); - - continue; - } - } // Does post have an attachment? If so, add it to the list if ($row['post_attachment'] && $config['allow_attachments']) @@ -922,10 +906,13 @@ while ($row = $db->sql_fetchrow($result)) } $rowset[$row['post_id']] = array( + 'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false, + 'post_id' => $row['post_id'], 'post_time' => $row['post_time'], - 'poster' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster, 'user_id' => $row['user_id'], + 'username' => $row['username'], + 'user_colour' => $row['user_colour'], 'topic_id' => $row['topic_id'], 'forum_id' => $row['forum_id'], 'post_subject' => $row['post_subject'], @@ -939,12 +926,14 @@ while ($row = $db->sql_fetchrow($result)) 'post_attachment' => $row['post_attachment'], 'post_approved' => $row['post_approved'], 'post_reported' => $row['post_reported'], + 'post_username' => $row['post_username'], 'post_text' => $row['post_text'], 'bbcode_uid' => $row['bbcode_uid'], 'bbcode_bitfield' => $row['bbcode_bitfield'], 'enable_smilies' => $row['enable_smilies'], 'enable_sig' => $row['enable_sig'], 'friend' => $row['friend'], + 'foe' => $row['foe'], ); // Define the global bbcode bitfield, will be used to load bbcodes @@ -989,10 +978,13 @@ while ($row = $db->sql_fetchrow($result)) 'yim' => '', 'jabber' => '', 'search' => '', - 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster, 'age' => '', + 'username' => $row['username'], + 'user_colour' => $row['user_colour'], + 'warnings' => 0, + 'allow_pm' => 0, ); } else @@ -1017,6 +1009,7 @@ while ($row = $db->sql_fetchrow($result)) 'sig_bbcode_bitfield' => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '', 'viewonline' => $row['user_allow_viewonline'], + 'allow_pm' => $row['user_allow_pm'], 'avatar' => '', 'age' => '', @@ -1025,6 +1018,9 @@ while ($row = $db->sql_fetchrow($result)) 'rank_image' => '', 'rank_image_src' => '', + 'username' => $row['username'], + 'user_colour' => $row['user_colour'], + 'online' => false, 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"), 'www' => $row['user_website'], @@ -1033,12 +1029,12 @@ while ($row = $db->sql_fetchrow($result)) 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg' : '', 'jabber' => ($row['user_jabber']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '', - 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster ); if ($row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -1049,8 +1045,8 @@ while ($row = $db->sql_fetchrow($result)) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $row['user_avatar']; + $avatar_img .= $row['user_avatar']; $user_cache[$poster_id]['avatar'] = '<img src="' . $avatar_img . '" width="' . $row['user_avatar_width'] . '" height="' . $row['user_avatar_height'] . '" alt="" />'; } @@ -1159,7 +1155,7 @@ if (sizeof($attach_list)) FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . ' AND in_message = 0 - ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC'; + ORDER BY filetime DESC, post_msg_id ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1242,19 +1238,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $row =& $rowset[$post_list[$i]]; $poster_id = $row['user_id']; - // Two situations can prevent a post being display: - // i) The poster is on the users ignore list - // ii) The post was made in a codepage different from the users - if (!empty($row['foe'])) - { - $template->assign_block_vars('postrow', array( - 'S_IGNORE_POST' => true, - 'L_IGNORE_POST' => sprintf($user->lang['POST_BY_FOE'], $row['poster'], '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>')) - ); - - continue; - } - // End signature parsing, only if needed if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { @@ -1321,7 +1304,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $result2 = $db->sql_query($sql); while ($user_edit_row = $db->sql_fetchrow($result2)) { - $user_edit_row['username'] = ($user_edit_row['user_colour']) ? '<span style="color:#' . $user_edit_row['user_colour'] . '">' . $user_edit_row['username'] . '</span>' : $user_edit_row['username']; $post_edit_list[$user_edit_row['user_id']] = $user_edit_row; } $db->sql_freeresult($result2); @@ -1333,9 +1315,17 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) if ($row['post_edit_reason']) { - $user_edit_row = $post_edit_list[$row['post_edit_user']]; + // User having edited the post also being the post author? + if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id) + { + $display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']); + } + else + { + $display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']); + } - $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : $user_edit_row['username'], $user->format_date($row['post_edit_time']), $row['post_edit_count']); + $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']); } else { @@ -1344,7 +1334,17 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $user_cache[$row['post_edit_user']] = $post_edit_list[$row['post_edit_user']]; } - $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : $user_cache[$row['post_edit_user']]['username'], $user->format_date($row['post_edit_time']), $row['post_edit_count']); + // User having edited the post also being the post author? + if (!$row['post_edit_user'] || $row['post_edit_user'] == $poster_id) + { + $display_username = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']); + } + else + { + $display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']); + } + + $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']); } } else @@ -1383,7 +1383,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // $postrow = array( - 'POSTER_NAME' => $row['poster'], + 'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), + 'POSTER_RANK' => $user_cache[$poster_id]['rank_title'], 'RANK_IMAGE' => $user_cache[$poster_id]['rank_image'], 'RANK_IMAGE_SRC' => $user_cache[$poster_id]['rank_image_src'], @@ -1410,14 +1414,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false), - 'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '', + 'U_EDIT' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''), 'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '', 'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '', - 'U_DELETE' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '', + 'U_DELETE' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : ''), 'U_PROFILE' => $user_cache[$poster_id]['profile'], 'U_SEARCH' => $user_cache[$poster_id]['search'], - 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', + 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', 'U_EMAIL' => $user_cache[$poster_id]['email'], 'U_WWW' => $user_cache[$poster_id]['www'], 'U_ICQ' => $user_cache[$poster_id]['icq'], @@ -1433,7 +1437,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '', 'U_PREV_POST_ID' => $prev_post_id, 'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $poster_id, true, $user->session_id) : '', - 'U_WARN' => ($auth->acl_getf_global('m_warn') && $poster_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', + 'U_WARN' => ($auth->acl_getf_global('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', 'POST_ID' => $row['post_id'], @@ -1444,7 +1448,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_FRIEND' => ($row['friend']) ? true : false, 'S_UNREAD_POST' => $post_unread, 'S_FIRST_UNREAD' => $s_first_unread, - 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false + 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, + + 'S_IGNORE_POST' => ($row['hide_post']) ? true : false, + 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&p={$row['post_id']}&view=show#p{$row['post_id']}" . '">', '</a>') : '', ); if (isset($cp_row['row']) && sizeof($cp_row['row'])) |
