From 96d6f2aee088acb83d5596f290ef4b16ef5f2186 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 12 Nov 2006 20:45:49 +0000 Subject: [PATCH 001/101] after tagging we increase the version number to b4-dev to be able to properly go to b4 or rc1. git-svn-id: file:///svn/phpbb/trunk@6580 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/schemas/schema_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 50bfe9db3a..49d7564656 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-dev'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); From f6500e6730199e16bfe6ce928cae633913c6a40c Mon Sep 17 00:00:00 2001 From: David M Date: Mon, 13 Nov 2006 22:44:54 +0000 Subject: [PATCH 002/101] @#$%&! git-svn-id: file:///svn/phpbb/trunk@6581 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index c282f867a0..38905b3342 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1803,7 +1803,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']; From 503832cccecb94b685e3bc266d9711bc13d931c9 Mon Sep 17 00:00:00 2001 From: Jonathan Stanley Date: Tue, 14 Nov 2006 17:48:52 +0000 Subject: [PATCH 003/101] #5298 - Semantics schemantics... :P git-svn-id: file:///svn/phpbb/trunk@6582 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/en/acp/posting.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index a1feb2acac..415c2682ae 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -126,7 +126,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 .pak file.', 'REPLACE_MATCHES' => 'Replace matches', @@ -215,8 +215,8 @@ $lang = array_merge($lang, array( 'ADD_NEW_REASON' => 'Add new reason', 'AVAILABLE_TITLES' => 'Available localized reason titles', - 'IS_NOT_TRANSLATED' => 'Reason has not been localised.', - 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has not 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 not been localised.', + 'IS_NOT_TRANSLATED_EXPLAIN' => 'Reason has not 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.', From 979e36077fa6ae9bbee81bacaaef029aa13c6df0 Mon Sep 17 00:00:00 2001 From: Jonathan Stanley Date: Tue, 14 Nov 2006 17:53:00 +0000 Subject: [PATCH 004/101] #5294 - Typographic heaven... curly quotes, em dashes and proper apostrophes. :) git-svn-id: file:///svn/phpbb/trunk@6583 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/en/email/admin_activate.txt | 2 +- phpBB/language/en/email/admin_send_email.txt | 2 +- phpBB/language/en/email/admin_welcome_activated.txt | 2 +- phpBB/language/en/email/admin_welcome_inactive.txt | 2 +- phpBB/language/en/email/coppa_resend_inactive.txt | 8 ++++---- phpBB/language/en/email/coppa_welcome_inactive.txt | 8 ++++---- phpBB/language/en/email/email_notify.txt | 4 ++-- phpBB/language/en/email/forum_notify.txt | 6 +++--- phpBB/language/en/email/group_added.txt | 2 +- phpBB/language/en/email/group_approved.txt | 2 +- phpBB/language/en/email/group_request.txt | 2 +- phpBB/language/en/email/installed.txt | 4 ++-- phpBB/language/en/email/newtopic_notify.txt | 6 +++--- phpBB/language/en/email/post_approved.txt | 4 ++-- phpBB/language/en/email/post_disapproved.txt | 4 ++-- phpBB/language/en/email/privmsg_notify.txt | 2 +- phpBB/language/en/email/profile_send_email.txt | 2 +- phpBB/language/en/email/profile_send_im.txt | 2 +- phpBB/language/en/email/report_closed.txt | 4 ++-- phpBB/language/en/email/report_deleted.txt | 4 ++-- phpBB/language/en/email/topic_approved.txt | 4 ++-- phpBB/language/en/email/topic_disapproved.txt | 4 ++-- phpBB/language/en/email/topic_notify.txt | 6 +++--- phpBB/language/en/email/user_activate.txt | 2 +- phpBB/language/en/email/user_activate_inactive.txt | 2 +- phpBB/language/en/email/user_activate_passwd.txt | 2 +- phpBB/language/en/email/user_remind_inactive.txt | 4 ++-- phpBB/language/en/email/user_resend_inactive.txt | 2 +- phpBB/language/en/email/user_welcome.txt | 2 +- phpBB/language/en/email/user_welcome_inactive.txt | 2 +- 30 files changed, 51 insertions(+), 51 deletions(-) diff --git a/phpBB/language/en/email/admin_activate.txt b/phpBB/language/en/email/admin_activate.txt index a168ff533c..db2fd531d0 100644 --- a/phpBB/language/en/email/admin_activate.txt +++ b/phpBB/language/en/email/admin_activate.txt @@ -2,7 +2,7 @@ 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 activate it using the following link: {U_ACTIVATE} 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..e225d2089c 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 email 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..4fd5f5e5d6 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 email 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} From 548cc2c10b56cc9e5c71c2f87356947939abe888 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 15 Nov 2006 15:35:50 +0000 Subject: [PATCH 005/101] - fixes for the following bugs: #5326 #5318 #5304 #5290 #5288 #5278 #5276 #5272 #5266 - also fixed the "Call-time pass-by-reference" bug #5252 - within this step changed the normalize calls to require references. - added captcha size variables to the class scope (suggestion was posted at area51) git-svn-id: file:///svn/phpbb/trunk@6584 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/index.php | 1 + phpBB/adm/style/overall_footer.html | 2 +- phpBB/adm/style/simple_footer.html | 2 +- phpBB/develop/create_schema_files.php | 2 +- phpBB/includes/acp/acp_bbcodes.php | 2 +- phpBB/includes/acp/acp_board.php | 6 +- phpBB/includes/acp/acp_forums.php | 3 +- phpBB/includes/acp/acp_language.php | 6 +- phpBB/includes/acp/acp_users.php | 14 ++-- phpBB/includes/acp/acp_words.php | 8 +- phpBB/includes/captcha/captcha_gd.php | 43 ++++------- phpBB/includes/captcha/captcha_non_gd.php | 20 ++--- phpBB/includes/functions.php | 39 ++++++++-- phpBB/includes/functions_admin.php | 26 ++++++- phpBB/includes/functions_display.php | 2 +- phpBB/includes/functions_profile_fields.php | 5 +- phpBB/includes/mcp/mcp_topic.php | 4 +- phpBB/includes/message_parser.php | 29 ++++--- phpBB/includes/search/fulltext_native.php | 8 +- phpBB/includes/session.php | 9 ++- phpBB/includes/ucp/ucp_main.php | 6 +- phpBB/includes/ucp/ucp_pm_compose.php | 12 +-- phpBB/includes/ucp/ucp_pm_options.php | 16 +--- phpBB/includes/ucp/ucp_profile.php | 12 +-- phpBB/includes/utf/utf_normalizer.php | 77 +++++++++---------- phpBB/includes/utf/utf_tools.php | 41 +++++----- phpBB/install/database_update.php | 29 +++---- phpBB/install/install_install.php | 5 +- phpBB/install/schemas/firebird_schema.sql | 2 +- phpBB/install/schemas/mysql_40_schema.sql | 2 +- phpBB/install/schemas/oracle_schema.sql | 2 +- phpBB/language/en/acp/forums.php | 2 +- phpBB/language/en/acp/posting.php | 2 +- phpBB/language/en/install.php | 3 +- phpBB/posting.php | 24 +++--- phpBB/report.php | 4 +- .../subSilver/template/overall_footer.html | 2 +- phpBB/viewforum.php | 2 +- 38 files changed, 240 insertions(+), 234 deletions(-) diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 6c142fde3f..727cf435c9 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -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/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 @@ @@ -550,6 +548,11 @@ function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; + if (defined('DEBUG_EXTRA')) + { + echo "\n{$sql}\n"; + } + $db->sql_return_on_error(true); $result = $db->sql_query($sql); @@ -732,7 +735,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]}' "; } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 38905b3342..4acea0aae3 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1471,12 +1471,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)); diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 811c009d7c..a79b33ee45 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, diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 5442fa2254..0b646af48f 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, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 890be4b783..c73b82b45b 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 '' , diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 21ddc34558..ebfe3b2710 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -67,7 +67,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.', diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 415c2682ae..5e396fc83c 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -95,7 +95,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 icons.pak which once downloaded can be used to create a .zip or .tgz file containing all of your icons plus this icons.pak 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 smilies.pak which once downloaded can be used to create a .zip or .tgz file containing all of your smilies plus this icons.pak configuration file%s.', + 'EXPORT_SMILIES_EXPLAIN' => '%sOn clicking this link, the configuration for your installed smilies will be packaged into smilies.pak which once downloaded can be used to create a .zip or .tgz file containing all of your smilies plus this smilies.pak configuration file%s.', 'FIRST' => 'First', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 86a1761bfe..e11f068518 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -157,8 +157,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 NLS_CHARACTERSET parameter to UTF8. 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.', diff --git a/phpBB/posting.php b/phpBB/posting.php index d2d9ef0e27..64f99c6a7c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -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 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/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 @@
[ {L_ACP} ]

Powered by phpBB © 2002, 2006 phpBB Group -
{L_TRANSLATION_INFO} +
{TRANSLATION_INFO}
[ {DEBUG_OUTPUT} ]
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 21a2ebce73..f94dd77e12 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -173,7 +173,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', ''); + $template->assign_var('RUN_CRON_TASK', 'cron'); } // Forum rules and subscription info From 9622428fcde8ab1ecf3ad5bc7c742c264725aa26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Wed, 15 Nov 2006 16:52:44 +0000 Subject: [PATCH 006/101] #5296 git-svn-id: file:///svn/phpbb/trunk@6585 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/styles/subSilver/template/posting_attach_body.html | 4 ++-- phpBB/styles/subSilver/template/posting_body.html | 4 ---- phpBB/styles/subSilver/template/posting_review.html | 2 +- phpBB/styles/subSilver/template/posting_topic_review.html | 2 +- phpBB/styles/subSilver/template/ucp_footer.html | 1 + phpBB/styles/subSilver/template/ucp_header.html | 7 +++++-- phpBB/styles/subSilver/template/ucp_main_drafts.html | 2 +- phpBB/styles/subSilver/template/ucp_pm_message_footer.html | 4 +++- phpBB/styles/subSilver/template/ucp_pm_options.html | 4 ++-- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/phpBB/styles/subSilver/template/posting_attach_body.html b/phpBB/styles/subSilver/template/posting_attach_body.html index a16758bf33..2053c662e7 100644 --- a/phpBB/styles/subSilver/template/posting_attach_body.html +++ b/phpBB/styles/subSilver/template/posting_attach_body.html @@ -35,7 +35,7 @@ - +
   @@ -63,7 +63,7 @@
{attach_row.S_HIDDEN} - +
   diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 7cc66d92fe..3d24e2c3b7 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -469,10 +469,6 @@ function checkForm() - - -
- diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subSilver/template/posting_review.html index 4964cacd05..0f9335a557 100644 --- a/phpBB/styles/subSilver/template/posting_review.html +++ b/phpBB/styles/subSilver/template/posting_review.html @@ -20,7 +20,7 @@ -
+ diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index 44aa8a5b1b..1c693ad3b4 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -15,7 +15,7 @@ -
+ 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 @@
+
diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html index dc89b8a3be..705d767e94 100644 --- a/phpBB/styles/subSilver/template/ucp_header.html +++ b/phpBB/styles/subSilver/template/ucp_header.html @@ -1,12 +1,14 @@ + + +
+ - + From c904ba56918b37d2b94aff6cff331e6afd598f9e Mon Sep 17 00:00:00 2001 From: David M Date: Wed, 15 Nov 2006 20:48:38 +0000 Subject: [PATCH 008/101] this is hopeless, we just insert and hope for the best. thats all we can really do... git-svn-id: file:///svn/phpbb/trunk@6587 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/mssql.php | 3 --- phpBB/includes/db/mssql_odbc.php | 3 --- 2 files changed, 6 deletions(-) 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); From 683c8a10dd678b9579ed38cfb5fbfb9285a5d5e8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 16 Nov 2006 12:41:07 +0000 Subject: [PATCH 009/101] add missing language variables git-svn-id: file:///svn/phpbb/trunk@6588 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/en/install.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index e11f068518..edbb8b20b0 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 informations.', + '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 informations.', + '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 informations.', + 'CONV_ERROR_WRONG_GROUP' => 'Wrong group "%1$s" defined in %2$s.', + 'COULD_NOT_COPY' => 'Could not copy file %1$s to %2$s

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.
» Specified source path was %s', @@ -204,6 +232,7 @@ $lang = array_merge($lang, array( 'PHP_SETTINGS' => 'PHP Version and Settings', 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 4.3.3 of PHP in order to install phpBB. If safe mode 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 %s 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.', From c9cd0e1d914b779dfc6cb491b240d48fe2d4c9b0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 16 Nov 2006 16:51:19 +0000 Subject: [PATCH 010/101] ok, change from doing the same logic all over again we call a function to do it for us. Also allow template designers to choose which method to use by just adding a fully compiled username string (profile link + user colour). This commit may introduce problems. git-svn-id: file:///svn/phpbb/trunk@6589 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 59 ++++++++++++++++++ phpBB/includes/functions_display.php | 14 ++--- phpBB/includes/functions_posting.php | 23 +++---- phpBB/includes/mcp/mcp_post.php | 8 ++- phpBB/includes/mcp/mcp_queue.php | 31 +++------- phpBB/includes/mcp/mcp_reports.php | 23 +++---- phpBB/includes/mcp/mcp_topic.php | 8 ++- phpBB/includes/ucp/ucp_main.php | 62 ++++++++++--------- phpBB/memberlist.php | 10 +-- phpBB/search.php | 22 ++++--- .../subSilver/template/forumlist_body.html | 9 +-- phpBB/styles/subSilver/template/mcp_post.html | 2 +- .../styles/subSilver/template/mcp_queue.html | 2 +- .../subSilver/template/mcp_reports.html | 2 +- .../styles/subSilver/template/mcp_topic.html | 2 +- .../subSilver/template/memberlist_body.html | 2 +- .../template/memberlist_leaders.html | 4 +- .../subSilver/template/posting_review.html | 2 +- .../template/posting_topic_review.html | 2 +- .../subSilver/template/search_results.html | 6 +- .../styles/subSilver/template/ucp_header.html | 4 +- .../template/ucp_main_bookmarks.html | 2 +- .../subSilver/template/ucp_main_front.html | 9 +-- .../template/ucp_main_subscribed.html | 4 +- .../subSilver/template/viewforum_body.html | 13 ++-- .../subSilver/template/viewtopic_body.html | 4 +- .../subSilver/template/viewtopic_print.html | 2 +- phpBB/ucp.php | 9 +-- phpBB/viewforum.php | 14 +++-- phpBB/viewtopic.php | 56 ++++++----------- 30 files changed, 213 insertions(+), 197 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8119dc35f4..8021e0c6c2 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2766,6 +2766,65 @@ function truncate_string($string, $max_length = 60, $allow_reply = true) 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 field to specify the guest username. It will be used in favor of the GUEST language variable then. +* +* @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) +{ + 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 = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id); + $full_string = '' . $username . ''; + } + else + { + $profile_url = ''; + $full_string = ($username_colour) ? '' . $username . '' : $username; + } + + switch ($mode) + { + case 'profile': + return $profile_url; + break; + + case 'username': + return $username; + break; + + case 'colour': + return $username_colour; + break; + + case 'full': + default: + return $full_string; + break; + } +} /** * Wrapper for php's checkdnsrr function. diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index a4b893468a..5521829dda 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) ); } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index b15466b487..407351a78d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -890,20 +890,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", '
', $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", '
', $message); $decoded_message = false; if ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) @@ -925,7 +916,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']), diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 201137a9a4..21ca7c11c3 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']) ? '' . $post_info['username'] . '' : $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'], '", ''), @@ -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']), diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 0f6fae18ee..a9301d2b64 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']) ? '' . $post_info['username'] . '' : $post_info['username']; - // Process message, leave it uncensored $message = $post_info['post_text']; $message = str_replace("\n", '
', $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'], '", ''), @@ -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']), @@ -322,15 +317,6 @@ 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) { @@ -341,12 +327,15 @@ class mcp_queue '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'])) ); } diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index ebd1295090..8fdc3ba7db 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -144,7 +144,6 @@ 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']), @@ -159,7 +158,11 @@ class mcp_reports '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']), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), @@ -293,15 +296,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,11 +306,14 @@ 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']), + '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']), diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 8be1af41ff..6bfbf6fdb2 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -105,8 +105,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']) ? '' . $poster . '' : $poster; $message = $row['post_text']; $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title']; @@ -125,7 +123,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, diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 1ef2eee30e..65da327b9c 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'])) ); @@ -430,14 +428,16 @@ 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'] : '', + '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")), 'REPLIES' => $replies, @@ -460,8 +460,8 @@ 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_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) ); } @@ -594,14 +594,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 +614,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']) : '', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 50fa8e4954..fe0ddc8c27 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -224,9 +224,9 @@ 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_VIEW_PROFILE' => 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']) : '') ); } $db->sql_freeresult($result); @@ -1218,7 +1218,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'])) @@ -1390,7 +1390,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, diff --git a/phpBB/search.php b/phpBB/search.php index 44ef053014..5cb2d5dc6e 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -728,14 +728,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 +761,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 +830,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 diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subSilver/template/forumlist_body.html index 5d0108d1f9..f6ebc53cee 100644 --- a/phpBB/styles/subSilver/template/forumlist_body.html +++ b/phpBB/styles/subSilver/template/forumlist_body.html @@ -53,13 +53,8 @@
- + diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subSilver/template/mcp_queue.html index c75c0403cd..4389daba63 100644 --- a/phpBB/styles/subSilver/template/mcp_queue.html +++ b/phpBB/styles/subSilver/template/mcp_queue.html @@ -20,7 +20,7 @@ - diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html index 40c57ab076..bbf50ed371 100644 --- a/phpBB/styles/subSilver/template/mcp_reports.html +++ b/phpBB/styles/subSilver/template/mcp_reports.html @@ -21,7 +21,7 @@ - - +
- - @@ -145,6 +147,7 @@  [ ] +
  • {L_NO_FRIENDS_OFFLINE}
  • diff --git a/phpBB/styles/subSilver/template/ucp_main_drafts.html b/phpBB/styles/subSilver/template/ucp_main_drafts.html index 6d7f380b7f..f8b25dc8b5 100644 --- a/phpBB/styles/subSilver/template/ucp_main_drafts.html +++ b/phpBB/styles/subSilver/template/ucp_main_drafts.html @@ -37,7 +37,7 @@ {L_PRIVATE_MESSAGE}{L_NO_TOPIC_FORUM} - + 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 @@ - + + +
    {L_PM_TO} {L_LOAD_DRAFT}
    {L_VIEW_EDIT}
    {L_LOAD_DRAFT}
    {L_VIEW_EDIT}
    diff --git a/phpBB/styles/subSilver/template/ucp_pm_options.html b/phpBB/styles/subSilver/template/ucp_pm_options.html index 4fbc908b5a..491fd79591 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_options.html +++ b/phpBB/styles/subSilver/template/ucp_pm_options.html @@ -166,7 +166,7 @@ - + @@ -185,5 +185,5 @@
    {L_FOLDER_OPTIONS}
    {L_IF_FOLDER_FULL}: {L_IF_FOLDER_FULL}:  {L_DELETE_OLDEST_MESSAGES}
    - + From 93bd37451c1aa9d5d2ed3536b9e59c1ce4339506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Wed, 15 Nov 2006 17:17:50 +0000 Subject: [PATCH 007/101] #5286 git-svn-id: file:///svn/phpbb/trunk@6586 89ea8834-ac86-4346-8a33-228a782c2dd0 --- .../template/posting_attach_body.html | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/phpBB/styles/subSilver/template/posting_attach_body.html b/phpBB/styles/subSilver/template/posting_attach_body.html index 2053c662e7..d5c745abea 100644 --- a/phpBB/styles/subSilver/template/posting_attach_body.html +++ b/phpBB/styles/subSilver/template/posting_attach_body.html @@ -1,26 +1,28 @@ - - - - - -
    {L_ADD_ATTACHMENT} + + + + + + + {L_ADD_ATTACHMENT} +
    {L_ADD_ATTACHMENT_EXPLAIN}

    {forumrow.LAST_POST_TIME}

    -

    - - style="font-weight: bold; color: {forumrow.LAST_POSTER_COLOUR}">{forumrow.LAST_POSTER} - - {forumrow.LAST_POSTER} - - {LAST_POST_IMG} +

    {forumrow.LAST_POSTER_FULL} + {LAST_POST_IMG}

    {L_NO_POSTS}

    diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html index e4e8d38cab..d1d696de75 100644 --- a/phpBB/styles/subSilver/template/mcp_post.html +++ b/phpBB/styles/subSilver/template/mcp_post.html @@ -53,7 +53,7 @@
    {L_POSTER}: {POSTER_NAME}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ] style="color: {POST_AUTHOR_COLOUR}">{POST_AUTHOR}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ]

    {postrow.POST_SUBJECT}

    {L_FORUM}: {postrow.FORUM_NAME}{postrow.FORUM_NAME}
    {postrow.POSTER}{postrow.POSTER}
    +
    {postrow.POST_AUTHOR_FULL}
    [ {L_VIEW_DETAILS} ]
    {postrow.POST_TIME}

    {postrow.POST_SUBJECT}

    {L_FORUM}: {postrow.FORUM_NAME}{postrow.FORUM_NAME}
    {postrow.POSTER}{postrow.POSTER}
    +
    {postrow.POST_AUTHOR_FULL}
    {postrow.POST_TIME}
    {postrow.REPORTER}{postrow.REPORTER} {postrow.REPORT_TIME}
    diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html index d0edb48470..027b92467b 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subSilver/template/mcp_topic.html @@ -72,7 +72,7 @@
    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 @@ - + diff --git a/phpBB/styles/subSilver/template/memberlist_leaders.html b/phpBB/styles/subSilver/template/memberlist_leaders.html index 82009e1365..c3833beb2e 100644 --- a/phpBB/styles/subSilver/template/memberlist_leaders.html +++ b/phpBB/styles/subSilver/template/memberlist_leaders.html @@ -16,7 +16,7 @@ - + - + diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index 1c693ad3b4..d5ed8044d1 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -18,7 +18,7 @@ diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html index 0579b3131d..e9c55027e4 100644 --- a/phpBB/styles/subSilver/template/search_results.html +++ b/phpBB/styles/subSilver/template/search_results.html @@ -51,12 +51,12 @@

    {L_IN} {searchresults.FORUM_TITLE}

    - + @@ -87,7 +87,7 @@ - +
     {memberrow.ROW_NUMBER}  style="color:#{memberrow.USER_COLOR}" href="{memberrow.U_VIEWPROFILE}">{memberrow.USERNAME} style="color:#{memberrow.USER_COLOR}" href="{memberrow.U_VIEW_PROFILE}">{memberrow.USERNAME}  {memberrow.JOINED}  {memberrow.POSTS} {memberrow.RANK_IMG}
    style="color:#{admin.USER_COLOR}" href="{admin.U_VIEWPROFILE}">{admin.USERNAME} style="color:#{admin.USER_COLOR}" href="{admin.U_VIEW_PROFILE}">{admin.USERNAME}     @@ -39,7 +39,7 @@
    style="color:#{mod.USER_COLOR}" href="{mod.U_VIEWPROFILE}">{mod.USERNAME} style="color:#{mod.USER_COLOR}" href="{mod.U_VIEW_PROFILE}">{mod.USERNAME} {L_ALL_FORUMS}    diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subSilver/template/posting_review.html index 0f9335a557..3c964041a2 100644 --- a/phpBB/styles/subSilver/template/posting_review.html +++ b/phpBB/styles/subSilver/template/posting_review.html @@ -23,7 +23,7 @@ - +
    - +

    style="font-weight: bold; color: {searchresults.TOPIC_AUTHOR_COLOUR}">{searchresults.TOPIC_AUTHOR}{searchresults.TOPIC_AUTHOR}

    {searchresults.TOPIC_AUTHOR_FULL}

    {searchresults.TOPIC_REPLIES}

    {searchresults.TOPIC_VIEWS}

    {searchresults.LAST_POST_TIME}

    -

    style="font-weight: bold; color: {searchresults.LAST_POST_AUTHOR_COLOUR}">{searchresults.LAST_POST_AUTHOR}{searchresults.LAST_POST_AUTHOR} +

    {searchresults.LAST_POST_AUTHOR_FULL} {searchresults.LAST_POST_IMG}

     {L_FORUM}: {searchresults.FORUM_TITLE}{L_GLOBAL}   {L_TOPIC}: {searchresults.TOPIC_TITLE}

    diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html index 705d767e94..c1eee778ee 100644 --- a/phpBB/styles/subSilver/template/ucp_header.html +++ b/phpBB/styles/subSilver/template/ucp_header.html @@ -127,7 +127,7 @@ 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 @@ 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 @@ - + @@ -55,7 +55,7 @@ diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html index 6d483ecac9..fcc7aae70a 100644 --- a/phpBB/styles/subSilver/template/viewforum_body.html +++ b/phpBB/styles/subSilver/template/viewforum_body.html @@ -52,17 +52,12 @@

    [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

    - + @@ -179,12 +174,12 @@

    [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]

    - + diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html index b1bfe3ccca..8cb8e0b041 100644 --- a/phpBB/styles/subSilver/template/viewtopic_body.html +++ b/phpBB/styles/subSilver/template/viewtopic_body.html @@ -130,10 +130,10 @@ - + - +

    {topicrow.LAST_POST_TIME}

    -

    style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR}{topicrow.LAST_POST_AUTHOR} +

    {topicrow.LAST_POST_AUTHOR_FULL} {topicrow.LAST_POST_IMG}

    {topicrow.LAST_POST_TIME}

    -

    - - style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR} - - {topicrow.LAST_POST_AUTHOR} - - {topicrow.LAST_POST_IMG} +

    {topicrow.LAST_POST_AUTHOR_FULL} + {topicrow.LAST_POST_IMG}

    {forumrow.FORUM_FOLDER_IMG}

    {forumrow.FORUM_NAME}

    {forumrow.LAST_POST_TIME}
    style="font-weight: bold; color: {forumrow.LAST_POST_AUTHOR_COLOUR}">{forumrow.LAST_POST_AUTHOR}{forumrow.LAST_POST_AUTHOR} {forumrow.LAST_POST_IMG}{L_NO_POSTS}
    {forumrow.LAST_POST_TIME}
    {forumrow.LAST_POST_AUTHOR_FULL} {forumrow.LAST_POST_IMG}{L_NO_POSTS}

    {topicrow.LAST_POST_TIME}

    -

    style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR}{topicrow.LAST_POST_AUTHOR} +

    {topicrow.LAST_POST_AUTHOR_FULL} {topicrow.LAST_POST_IMG}

    style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR}{topicrow.TOPIC_AUTHOR}

    {topicrow.TOPIC_AUTHOR_FULL}

    {topicrow.REPLIES}

    {topicrow.VIEWS}

    {topicrow.LAST_POST_TIME}

    -

    - - style="color: {topicrow.LAST_POST_AUTHOR_COLOUR}; font-weight: bold;">{topicrow.LAST_POST_AUTHOR} - - {topicrow.LAST_POST_AUTHOR} - +

    {topicrow.LAST_POST_AUTHOR_FULL} {LAST_POST_IMG}

    style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR}{topicrow.TOPIC_AUTHOR}

    {topicrow.TOPIC_AUTHOR_FULL}

    {topicrow.REPLIES}

    {topicrow.VIEWS}

    {topicrow.LAST_POST_TIME}

    -

    style="font-weight: bold; color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR}{topicrow.LAST_POST_AUTHOR} +

    {topicrow.LAST_POST_AUTHOR_FULL} {LAST_POST_IMG}

    {postrow.L_IGNORE_POST}{postrow.L_IGNORE_POST} 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 {
    - + diff --git a/phpBB/ucp.php b/phpBB/ucp.php index f0758e752e..397ab50847 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -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 f94dd77e12..f421e42c9f 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -539,14 +539,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 +579,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/viewtopic.php b/phpBB/viewtopic.php index 2898a1c20a..017992bbc9 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -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']) ? '' . $poster . '' : $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,7 +978,6 @@ while ($row = $db->sql_fetchrow($result)) 'yim' => '', 'jabber' => '', 'search' => '', - 'username' => ($row['user_colour']) ? '' . $poster . '' : $poster, 'age' => '', 'warnings' => 0, @@ -1033,7 +1021,6 @@ 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']) ? '' . $poster . '' : $poster ); if ($row['user_avatar'] && $user->optionget('viewavatars')) @@ -1242,19 +1229,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'], '', '')) - ); - - continue; - } - // End signature parsing, only if needed if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { @@ -1321,7 +1295,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']) ? '' . $user_edit_row['username'] . '' : $user_edit_row['username']; $post_edit_list[$user_edit_row['user_id']] = $user_edit_row; } $db->sql_freeresult($result2); @@ -1334,8 +1307,9 @@ 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']]; + $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']) : get_username_string('full', $row['post_edit_user'], $user_edit_row['username'], $user_edit_row['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 +1318,8 @@ 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']); + $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_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 +1358,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'], @@ -1444,7 +1423,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']), '', '') : '', ); if (isset($cp_row['row']) && sizeof($cp_row['row'])) From db8e586893ddf94d5368789dfc56271f3efcd0e6 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 16 Nov 2006 18:29:29 +0000 Subject: [PATCH 011/101] forgot to commit this fix git-svn-id: file:///svn/phpbb/trunk@6590 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_disallow.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); From d08d844325a7bced5bada96960453745bde9345f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 16 Nov 2006 19:08:59 +0000 Subject: [PATCH 012/101] Do not rely on javascript being enabled here (for setting permissions js is a requirement) git-svn-id: file:///svn/phpbb/trunk@6591 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_forums.html | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 63ed7cb883..07fc28e414 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -7,6 +7,9 @@ @@ -68,7 +98,7 @@
    -
    style="display: none;"> +
    {L_DELETE_ALL_POSTS}
    @@ -114,7 +144,7 @@
    -
    style="display: none;"> +
    {L_GENERAL_FORUM_SETTINGS}
    @@ -124,7 +154,7 @@
    -
    style="display: none;"> +
    {L_GENERAL_FORUM_SETTINGS}
    @@ -192,7 +222,7 @@
    -
    - + diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 3d24e2c3b7..6ce895595d 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -195,6 +195,7 @@ function checkForm() - {S_HIDDEN_ADDRESS_FIELD} diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index d5ed8044d1..d54d581003 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -15,10 +15,10 @@ - diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html index 8cb8e0b041..bee02f94ee 100644 --- a/phpBB/styles/subSilver/template/viewtopic_body.html +++ b/phpBB/styles/subSilver/template/viewtopic_body.html @@ -133,7 +133,10 @@ - +
    {L_AUTHOR}: {postrow.POSTER_NAME} [ {postrow.POST_DATE} ] style="color: {postrow.POST_AUTHOR_COLOUR}">{postrow.POST_AUTHOR} [ {postrow.POST_DATE} ]
    {L_POST_SUBJECT}: 
    {L_WARNINGS}: {WARNINGS}
    [ {L_VIEW_NOTES} | {L_WARN_USER} ]
    {WARNINGS}
    [ {L_VIEW_NOTES} | {L_WARN_USER} ]
    {L_TO}: + {S_HIDDEN_ADDRESS_FIELD} style="color:#{to_recipient.COLOUR}" class="blue">{to_recipient.NAME}   @@ -214,7 +215,6 @@ function checkForm()
    + - +
    {postrow.L_IGNORE_POST} + + + From 5f788b4d08838dec5e8168f2efd515859224a3a4 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 18 Nov 2006 10:37:10 +0000 Subject: [PATCH 021/101] get editing user correctly git-svn-id: file:///svn/phpbb/trunk@6600 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 017992bbc9..0a9fe777be 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -980,6 +980,9 @@ while ($row = $db->sql_fetchrow($result)) 'search' => '', 'age' => '', + 'username' => $row['username'], + 'user_colour' => $row['user_colour'], + 'warnings' => 0, ); } @@ -1013,6 +1016,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'], @@ -1306,8 +1312,15 @@ 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']]; - $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']) : get_username_string('full', $row['post_edit_user'], $user_edit_row['username'], $user_edit_row['user_colour']); + // 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, $display_username, $user->format_date($row['post_edit_time']), $row['post_edit_count']); } @@ -1318,7 +1331,16 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $user_cache[$row['post_edit_user']] = $post_edit_list[$row['post_edit_user']]; } - $display_username = (!$row['post_edit_user']) ? get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']) : get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']); + // 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']); } } From e264a62b731d29389ba0a4a3548070e259e373c0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 18 Nov 2006 16:27:35 +0000 Subject: [PATCH 022/101] - a handful of mcp fixed, the most important one is the change for check_ids() - it is now supporting ids from more than one forum too, making it possible to use some mcp features as designed initially. We really need to get our moderator team testing the mcp extensively. - fixed some other tiny glitches - if a forum category with subforums get changed to a link type forum give options of what to do with the subforums (#5334) - other bugfixes git-svn-id: file:///svn/phpbb/trunk@6601 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_forums.html | 29 ++++ phpBB/adm/style/acp_permissions.html | 17 -- phpBB/includes/acp/acp_forums.php | 156 +++++++++++++++++- phpBB/includes/acp/acp_groups.php | 3 +- phpBB/includes/acp/acp_users.php | 4 +- phpBB/includes/auth.php | 52 +++--- phpBB/includes/functions.php | 4 +- phpBB/includes/functions_posting.php | 8 +- phpBB/includes/mcp/mcp_forum.php | 11 +- phpBB/includes/mcp/mcp_front.php | 2 +- phpBB/includes/mcp/mcp_main.php | 47 +++--- phpBB/includes/mcp/mcp_queue.php | 138 ++++++++++------ phpBB/includes/mcp/mcp_reports.php | 30 ++-- phpBB/includes/mcp/mcp_topic.php | 10 +- phpBB/includes/ucp/ucp_groups.php | 3 +- phpBB/language/en/acp/forums.php | 5 +- phpBB/mcp.php | 106 ++++++------ phpBB/posting.php | 46 +++--- .../styles/subSilver/template/mcp_forum.html | 4 +- .../styles/subSilver/template/mcp_front.html | 2 +- .../styles/subSilver/template/mcp_header.html | 2 +- .../subSilver/template/mcp_notes_front.html | 2 +- phpBB/styles/subSilver/template/mcp_post.html | 2 +- .../styles/subSilver/template/mcp_queue.html | 2 +- .../subSilver/template/mcp_reports.html | 4 +- .../styles/subSilver/template/mcp_topic.html | 9 +- .../subSilver/template/mcp_viewlogs.html | 4 +- .../subSilver/template/mcp_warn_front.html | 2 +- .../subSilver/template/posting_body.html | 2 +- phpBB/viewtopic.php | 2 +- 30 files changed, 466 insertions(+), 242 deletions(-) diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index d46753c2a0..6025629ce1 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -23,6 +23,17 @@ } + + if (value == {FORUM_LINK}) + { + dE('cat_to_link_actions', 1); + } + else + { + dE('cat_to_link_actions', -1); + } + + if (value == {FORUM_POST}) { dE('forum_post_options', 1); @@ -58,6 +69,12 @@ + + + dE('cat_to_link_actions', -1); + + + dE('forum_post_options', -1); @@ -108,6 +125,18 @@ + + +
    diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index e04ae5a717..5c7b9d6e7f 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -61,23 +61,6 @@ -
    - -
    - {L_LOOK_UP_FORUM} -
    -
    -
    -
    -
    - -
    - {S_HIDDEN_FIELDS} - -
    - - - diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index c505a3c4a2..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, @@ -802,7 +837,7 @@ class acp_forums */ function update_forum_data(&$forum_data) { - global $db, $user; + global $db, $user, $cache; $errors = array(); @@ -943,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)) { @@ -1534,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..fb58c33897 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -214,9 +214,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); } diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index cb0da02317..c7f0a81e62 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1921,7 +1921,7 @@ class acp_users if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') { - $sql .= " ESCAPE '\\'"; + $sql .= " ESCAPE '\\' "; } $sql .= 'AND is_global = 1 @@ -1941,7 +1941,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/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/functions.php b/phpBB/includes/functions.php index f76f918451..a9c5c5263d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2512,7 +2512,7 @@ function _build_hidden_fields($key, $value, $specialchar, $stripslashes) { foreach ($value as $_key => $_value) { - $_key = ($stripslashes) ? stripslashes($_key) : $key; + $_key = ($stripslashes) ? stripslashes($_key) : $_key; $_key = ($specialchar) ? htmlspecialchars($_key, ENT_COMPAT, 'UTF-8') : $_key; $hidden_fields .= _build_hidden_fields($key . '[' . $_key . ']', $_value, $specialchar, $stripslashes); @@ -3085,7 +3085,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 '\\' "; } } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 78900e2bf4..6d3fcd47dd 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -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 diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index b20bd63a08..b8b1ffd302 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -79,7 +79,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), @@ -159,14 +159,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_'))) - { - return; - } - if (!sizeof($topic_ids)) { trigger_error($user->lang['NO_TOPIC_SELECTED']); + } + + if (check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_'))) + { return; } diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 8b798fc1b2..2d5aff70b6 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -222,7 +222,7 @@ function mcp_front_view($id, $mode, $action) '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_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_queue.php b/phpBB/includes/mcp/mcp_queue.php index a9301d2b64..32aaa3e533 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -248,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 @@ -279,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 @@ -323,6 +323,11 @@ class mcp_queue $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'] : ''), @@ -372,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) ); @@ -398,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; @@ -407,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']; @@ -422,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; @@ -472,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) @@ -499,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(); @@ -528,8 +553,8 @@ 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']); @@ -547,19 +572,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 { @@ -598,12 +623,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 = ''; @@ -612,7 +637,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) ); @@ -649,42 +673,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)) @@ -711,8 +745,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(); @@ -749,9 +787,9 @@ function disapprove_post($post_id_list, $mode) } unset($post_info, $disapprove_reason); - if ($forum_topics_real) + 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 8fdc3ba7db..66452ad8e0 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -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']) ? '' . $post_info['username'] . '' : $post_info['username']; - // Process message, leave it uncensored $message = $post_info['post_text']; $message = str_replace("\n", '
    ', $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'], @@ -150,7 +142,7 @@ class mcp_reports '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'], '', ''), + 'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '', ''), 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']), 'REPORT_REASON_TITLE' => $reason['title'], 'REPORT_REASON_DESCRIPTION' => $reason['description'], @@ -284,7 +276,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 @@ -306,18 +298,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_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'], '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']) ); @@ -332,7 +327,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, @@ -356,18 +351,18 @@ 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 { - $redirect = request_var('redirect', $user->data['session_page']); + $redirect = request_var('redirect', build_url(array('_f_'))); } $success_msg = ''; @@ -375,7 +370,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) ); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 6bfbf6fdb2..de9f7ac91b 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -179,7 +179,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, '' . $to_topic_info['topic_title'] . '') : '', @@ -223,6 +223,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 +232,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 +431,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 +446,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 +465,7 @@ function merge_posts($topic_id, $to_topic_id) if (sizeof($topic_data)) { - $return_link .= sprintf($user->lang['RETURN_TOPIC'], '', ''); + $return_link .= sprintf($user->lang['RETURN_TOPIC'], '', ''); } // Link to the new topic diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index ad6bde9be7..49e73d2ac5 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -877,11 +877,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/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index ebfe3b2710..b0e6405690 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', @@ -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/mcp.php b/phpBB/mcp.php index fe64058418..47a2b603fe 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -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]}"; - $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) - { - // Determine first forum the user is able to read - for global announcements - $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true))); - - $sql = 'SELECT forum_id - FROM ' . FORUMS_TABLE . ' - WHERE forum_type = ' . FORUM_POST; - if (sizeof($forum_ary)) - { - $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true); - } - - $result = $db->sql_query_limit($sql, 1); - $forum_id = (int) $db->sql_fetchfield('forum_id'); - $db->sql_freeresult($result); - } - - if ($acl_list && !$auth->acl_gets($acl_list, $forum_id)) - { - trigger_error('NOT_AUTHORIZED'); - } - - if (!$forum_id) - { - trigger_error('Missing forum_id, has to be in url if global announcement...', E_USER_ERROR); - } - - $sql = "SELECT $sql_id FROM $table - WHERE " . $db->sql_in_set($sql_id, $ids) . " - AND (forum_id = $forum_id OR forum_id = 0)"; + $sql = "SELECT $sql_id, forum_id FROM $table + WHERE " . $db->sql_in_set($sql_id, $ids); $result = $db->sql_query($sql); $ids = array(); + $forum_id = false; while ($row = $db->sql_fetchrow($result)) { - $ids[] = $row[$sql_id]; + if ($acl_list && $row['forum_id'] && !$auth->acl_gets($acl_list, $row['forum_id'])) + { + continue; + } + + if ($acl_list && !$row['forum_id'] && !$auth->acl_getf_global($acl_list)) + { + continue; + } + + // Limit forum? If not, just assign the id. + if ($single_forum === false) + { + $ids[] = $row[$sql_id]; + continue; + } + + // 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 ($row['forum_id'] == $forum_id) + { + $ids[] = $row[$sql_id]; + } } $db->sql_freeresult($result); - return $forum_id; + if (!sizeof($ids)) + { + return false; + } + + return ($single_forum === false) ? true : (int) $forum_id; } ?> \ No newline at end of file diff --git a/phpBB/posting.php b/phpBB/posting.php index 64f99c6a7c..72151470d4 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1117,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 . " @@ -1126,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)); + $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); + $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' => '', - 'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '', ''), - )); - } + $template->assign_vars(array( + 'S_CONFIRM_CODE' => true, + 'CONFIRM_ID' => $confirm_id, + 'CONFIRM_IMAGE' => '', + 'L_POST_CONFIRM_EXPLAIN' => sprintf($user->lang['POST_CONFIRM_EXPLAIN'], '', ''), + )); } $s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '' : ''; $s_hidden_fields .= ''; $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '' : ''; +// 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 ... @@ -1178,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/styles/subSilver/template/mcp_forum.html b/phpBB/styles/subSilver/template/mcp_forum.html index 4aa6050a8d..05fad4b7f5 100644 --- a/phpBB/styles/subSilver/template/mcp_forum.html +++ b/phpBB/styles/subSilver/template/mcp_forum.html @@ -10,7 +10,7 @@
    - + @@ -50,7 +50,7 @@ - + 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 @@
    {L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} 
     
    {log.USERNAME} {log.IP} {log.ACTION}{L_VIEW_TOPIC} | {L_VIEW_TOPIC_LOGS}{L_VIEW_TOPIC} | {L_VIEW_TOPIC_LOGS} {log.TIME}
    +
    diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html index d1d696de75..fbb80100f2 100644 --- a/phpBB/styles/subSilver/template/mcp_post.html +++ b/phpBB/styles/subSilver/template/mcp_post.html @@ -38,7 +38,7 @@
    - +
    {L_SELECT_USER}
    diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subSilver/template/mcp_queue.html index 4389daba63..d12928d50c 100644 --- a/phpBB/styles/subSilver/template/mcp_queue.html +++ b/phpBB/styles/subSilver/template/mcp_queue.html @@ -7,7 +7,7 @@ - + diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html index bbf50ed371..fa4a82602a 100644 --- a/phpBB/styles/subSilver/template/mcp_reports.html +++ b/phpBB/styles/subSilver/template/mcp_reports.html @@ -7,7 +7,7 @@ - + @@ -23,7 +23,7 @@ {L_FORUM}: {postrow.FORUM_NAME}{postrow.FORUM_NAME} - + diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html index 027b92467b..a8f5c21b03 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subSilver/template/mcp_topic.html @@ -12,7 +12,7 @@ - + @@ -55,10 +55,10 @@ + - + @@ -126,9 +126,10 @@ -   +  
    {L_DISPLAY_OPTIONS}
    {L_DISPLAY_ITEMS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}     {L_ONLY_TOPIC}   {L_DISPLAY_ITEMS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}     {L_ONLY_TOPIC}  
     {L_TOPIC}{L_POST} {L_DISPLAY_OPTIONS}
    {L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}     {L_ONLY_TOPIC}   {L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}     {L_ONLY_TOPIC}  
     {L_POST}  {postrow.POST_AUTHOR_FULL}
    {postrow.POST_TIME}
    {postrow.REPORTER}{postrow.REPORTER}{postrow.REPORTER_FULL} {postrow.REPORT_TIME}
    [ {L_VIEW_DETAILS} ]
    {L_SPLIT_SUBJECT}
    {L_SPLIT_FORUM}
    {L_POSTS_PER_PAGE}
    {L_POSTS_PER_PAGE_EXPLAIN} -
    {L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} 
    {L_AUTHOR}
    + 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 @@ - + @@ -30,7 +30,7 @@ - + diff --git a/phpBB/styles/subSilver/template/mcp_warn_front.html b/phpBB/styles/subSilver/template/mcp_warn_front.html index 188acd321c..d372a26fed 100755 --- a/phpBB/styles/subSilver/template/mcp_warn_front.html +++ b/phpBB/styles/subSilver/template/mcp_warn_front.html @@ -2,7 +2,7 @@ -
    {L_LOGS_CURRENT_TOPIC} {TOPIC_NAME}{L_LOGS_CURRENT_TOPIC} {TOPIC_NAME}
    {log.TIME} {log.ACTION} {L_VIEW_TOPIC} | {L_VIEW_TOPIC_LOGS}{L_VIEW_TOPIC} | {L_VIEW_TOPIC_LOGS}
    +
    diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 6ce895595d..b289aa1768 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -70,7 +70,7 @@ function checkForm()
    {L_SELECT_USER}
    - - - - - - -
    {L_SELECT_IMAGE}: -   -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {L_EDIT_IMAGESET}
    {L_IMAGESET_UPDATED}
    {L_NO_IMAGE}
    - - - - - - - - - -
    {L_CURRENT_IMAGE}{L_SELECTED_IMAGE}
    -
    {L_IMAGE_PARAMETER}{L_IMAGE_VALUE}
    {L_IMAGE}: -
    {L_INCLUDE_DIMENSIONS}:
    {L_DIMENSIONS_EXPLAIN}
    checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
      
    -
    - +   + + +
    + {L_EDIT_IMAGESET} +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    {L_DIMENSIONS_EXPLAIN}
    +
    checked="checked" /> {L_YES}   checked="checked" /> {L_NO}
    +
    +
    + +
    +    +
    + - 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) } } - - /** - * Color swatch - */ - function swatch() - { - window.open('{UA_SWATCH}', '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); - return false; - } - +/** +* Find a member +*/ +function find_username() +{ + + window.open('{UA_FIND_USERNAME}', '_usersearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); + + return false; +} + +/** +* Color swatch +*/ +function swatch(field) +{ + + window.open('{UA_SWATCH}' + field, '_swatch', 'height=150, resizable=yes, scrollbars=no, width=636'); + + return false; +} //--> 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/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 ' - +

    {L_NOTICE}

    {ERROR_MSG}

    @@ -110,9 +120,6 @@

    {files.EXPLAIN}

    -
    {files.L_STATUS} @@ -129,7 +136,7 @@
    {L_NUM_CONFLICTS}: {files.NUM_CONFLICTS} -
    [ {files.L_SHOW_DIFF} ]
    +
    [ {files.L_SHOW_DIFF} ]
      {L_DO_NOT_UPDATE}
    @@ -185,6 +192,25 @@

    {L_DOWNLOAD_UPDATE_METHOD_EXPLAIN}

    +
    + +
    + {L_DOWNLOAD_AS} +
    +
    +
    {RADIO_BUTTONS}
    +
    +
    + +
    + {S_HIDDEN_FIELDS} +     +
    + +
    + +

    +

    {L_MAPPING_FILE_STRUCTURE}

    @@ -207,23 +233,6 @@
    -
    - -
    - {L_DOWNLOAD_AS} -
    -
    -
    {RADIO_BUTTONS}
    -
    -
    - -
    - {S_HIDDEN_FIELDS} -     -
    - -
    -

    {L_SELECT_FTP_SETTINGS}

    diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 25ed12b824..5ffef1c2da 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -301,6 +301,9 @@ $database_update_info = array( GROUPS_TABLE => array( 'group_founder_manage' => array('BOOL', 0), ), + USERS_TABLE => array( + 'user_pass_convert' => array('BOOL', 0), + ), ), ), // Latest version diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 82ee374e52..aea6043f50 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 @@ -947,6 +967,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': @@ -963,7 +988,7 @@ class install_update extends module // 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 +1015,7 @@ class install_update extends module } } } + */ } break; diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 36fe45d5c8..7dbf0106e6 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -199,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.', @@ -255,7 +255,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', @@ -301,8 +301,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_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.', + '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 login to your board 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', @@ -325,6 +325,7 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date', + '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.', From dd5f0c320d133dab3291753a6173f60b2e394b56 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 13:07:43 +0000 Subject: [PATCH 078/101] use needle git-svn-id: file:///svn/phpbb/trunk@6657 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/utf/utf_tools.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index 77b05e702f..4c6c26909a 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -127,11 +127,11 @@ if (extension_loaded('mbstring')) if (is_null($offset)) { - return mb_strrpos($str, $search); + return mb_strrpos($str, $needle); } else { - return mb_strrpos($str, $search, $offset); + return mb_strrpos($str, $needle, $offset); } } } @@ -152,7 +152,7 @@ if (extension_loaded('mbstring')) return false; } - return mb_strrpos($str, $search); + return mb_strrpos($str, $needle); } else { @@ -164,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; } From e3889a72e802c4dfea6812f9ff29f5acdd302a76 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 13:47:12 +0000 Subject: [PATCH 079/101] hard to spot... git-svn-id: file:///svn/phpbb/trunk@6658 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_profile.php | 4 ++-- phpBB/install/database_update.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 7198cfaaf3..92612bfa28 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -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,7 +172,7 @@ class ucp_profile $messenger->im($row['user_jabber'], $row['username']); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($username), + '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") ); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 5ffef1c2da..539a180846 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -825,7 +825,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; @@ -888,7 +888,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; @@ -901,6 +901,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); From 5c5330c29d3e19eab804d9dbfd0261e6459e00b8 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 26 Nov 2006 14:41:59 +0000 Subject: [PATCH 080/101] Message for my last commit (no I didn't intent it to be "message"): - include forums without search indexing in author searches and egosearch [Bug #5530, #4782] - allow changing search options when there are no results if a pre-defined search is used - added user_pass_convert flag for unconverted phpBB2 passwords and password conversion on first login and for this commit: - truncating dropdown in acp_styles and showing tooltip with complete string [Bug #5258] - UTF-8 compatible font for OS X users in ACP - destroy search cache on changing a post author [Bug #5538] git-svn-id: file:///svn/phpbb/trunk@6659 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_styles.html | 7 +++++++ phpBB/adm/style/admin.css | 28 ++++++++++++++-------------- phpBB/includes/acp/acp_styles.php | 2 +- phpBB/includes/mcp/mcp_post.php | 17 +++++++++++++++++ 4 files changed, 39 insertions(+), 15 deletions(-) diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index d592dbaa25..3207c14d05 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -254,6 +254,13 @@

    {L_SHOW_CSS_NOTE}

    {L_SHOW_CSS_EXPLAIN}

    + + +
    diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 16901cd500..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; @@ -99,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; @@ -281,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; @@ -311,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; } @@ -384,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; @@ -402,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; @@ -417,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; @@ -443,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; @@ -525,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 { @@ -738,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; @@ -1038,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%; @@ -1047,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/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 4377dd7e20..e5e5f1a2b8 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 .= ''; + $s_classes .= ''; } $template->assign_vars(array( diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index b2b0ceb419..a1cc7f4331 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -385,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']; From 6583f90b8d082096ebd9cfc0588730dd36efb077 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 14:55:18 +0000 Subject: [PATCH 081/101] - bug fixes for #5618, #5588 and #5584 - remove messenger->reset() calls (they are already performed on sending) git-svn-id: file:///svn/phpbb/trunk@6660 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_groups.php | 4 +++- phpBB/includes/functions.php | 6 +++--- phpBB/includes/functions_posting.php | 1 - phpBB/includes/functions_privmsgs.php | 1 - phpBB/includes/functions_user.php | 1 - phpBB/includes/mcp/mcp_notes.php | 3 ++- phpBB/includes/mcp/mcp_queue.php | 10 ++++------ phpBB/includes/mcp/mcp_reports.php | 5 ++--- phpBB/includes/mcp/mcp_warn.php | 6 ++++-- phpBB/includes/ucp/ucp_groups.php | 5 +++-- phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 ++- phpBB/includes/ucp/ucp_profile.php | 6 ++---- phpBB/memberlist.php | 3 ++- phpBB/viewforum.php | 2 +- phpBB/viewtopic.php | 3 ++- 15 files changed, 30 insertions(+), 29 deletions(-) diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index a418f279e8..e81dc9883f 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -450,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: @@ -460,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 = ''; } else diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 001702a39e..bf1883e96f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2433,8 +2433,8 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_ include("{$phpbb_root_path}includes/functions_display.$phpEx"); } - $attachment_tpl = display_attachments($forum_id, NULL, $attachments, $update_count, false, true); - $tpl_size = sizeof($attachment_tpl); + $attachments = display_attachments($forum_id, NULL, $attachments, $update_count, false, true); + $tpl_size = sizeof($attachments); $unset_tpl = array(); @@ -2447,7 +2447,7 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_ $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; $replace['from'][] = $matches[0][$num]; - $replace['to'][] = (isset($attachment_tpl[$index])) ? $attachment_tpl[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); + $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); $unset_tpl[] = $index; } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 23460c8dec..49ed4932a3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1124,7 +1124,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id )); $messenger->send($addr['method']); - $messenger->reset(); } } unset($msg_list_ary); diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 1107f824be..d67478b190 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1623,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_user.php b/phpBB/includes/functions_user.php index 19c2b21655..971a544d11 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2018,7 +2018,6 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $messenger->save_queue(); diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index e681ebab96..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,8 +155,8 @@ class mcp_notes $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = ''; } diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 32aaa3e533..df23bcd98f 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -558,12 +558,11 @@ function approve_post($post_id_list, $mode) ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } + $messenger->save_queue(); + // Send out normal user notifications $email_sig = str_replace('
    ', "\n", "-- \n" . $config['board_email_sig']); @@ -780,13 +779,12 @@ function disapprove_post($post_id_list, $mode) ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } unset($post_info, $disapprove_reason); + $messenger->save_queue(); + if (sizeof($forum_topics_real)) { $success_msg = ($num_disapproved == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS'; diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 709d685e88..7a84c872a5 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -494,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_warn.php b/phpBB/includes/mcp/mcp_warn.php index 4206582d01..ef8d0132fc 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -275,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']) @@ -287,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 = ''; } @@ -359,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']) @@ -371,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 = ''; } diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index e4a38f2b04..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); @@ -575,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: @@ -585,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 = ''; } else diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index cc23fc0fce..9a19baa257 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -426,6 +426,7 @@ function get_user_information($user_id, $user_row) if ($user_row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($user_row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -436,8 +437,8 @@ function get_user_information($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'] = '' . $user->lang['USER_AVATAR'] . ''; } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 92612bfa28..29055f0d89 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -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']); @@ -182,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( @@ -605,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 = ''; } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index cfea2f9eab..b066bf05a9 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1058,6 +1058,7 @@ switch ($mode) } $avatar_img = ''; + if ($group_row['group_avatar']) { switch ($group_row['group_avatar_type']) @@ -1070,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 = ''; } diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index cd938313cf..9d6da5c31c 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -469,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; } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 33fa839df4..fa28b568b8 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1032,6 +1032,7 @@ while ($row = $db->sql_fetchrow($result)) if ($row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -1042,8 +1043,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'] = ''; } From 9fa4f1f012a70ee2a225b048e6e57bdfeb5734b8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 15:01:13 +0000 Subject: [PATCH 082/101] - bug fixes for #5618, #5588 and #5584 - remove messenger->reset() calls (they are already performed on sending) git-svn-id: file:///svn/phpbb/trunk@6661 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 539a180846..c741c7ddb6 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -572,7 +572,7 @@ function _sql($sql, &$errored, &$error_ary, $echo_dot = true) if (defined('DEBUG_EXTRA')) { - echo "\n{$sql}\n"; + echo "
    \n{$sql}\n
    "; } $db->sql_return_on_error(true); From 4d6f84c3208c0d941d3b786a1c60682e9c20193f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 15:31:12 +0000 Subject: [PATCH 083/101] fix for bug #5586 git-svn-id: file:///svn/phpbb/trunk@6662 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_pm_compose.php | 54 ++++++++++++--------------- phpBB/memberlist.php | 6 +-- phpBB/viewtopic.php | 4 +- 3 files changed, 30 insertions(+), 34 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index f16b4b0841..c150831f0d 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -943,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); - - while ($row = $db->sql_fetchrow($result)) - { - if ($row['user_id'] == ANONYMOUS) - { - continue; - } - - $address_list['u'][$row['user_id']] = $type; - } - $db->sql_freeresult($result); + continue; } - else + + $address_list['u'][$user_id] = $type; + } + } + + // Check for disallowed recipients + if (sizeof($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); + + while ($row = $db->sql_fetchrow($result)) { - foreach ($user_id_ary as $user_id) - { - if ($user_id == ANONYMOUS) - { - continue; - } - - $address_list['u'][$user_id] = $type; - } + unset($address_list['u'][$row['user_id']]); } + $db->sql_freeresult($result); } } } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b066bf05a9..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', @@ -223,7 +223,7 @@ switch ($mode) 'RANK_IMG_SRC' => $rank_img_src, 'U_GROUP' => $u_group, - '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_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']), @@ -1463,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/viewtopic.php b/phpBB/viewtopic.php index fa28b568b8..d7ef0697c1 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -984,6 +984,7 @@ while ($row = $db->sql_fetchrow($result)) 'user_colour' => $row['user_colour'], 'warnings' => 0, + 'allow_pm' => 0, ); } else @@ -1008,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' => '', @@ -1419,7 +1421,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) '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'], From 12fb5f6aa2286eb3e1be384ba61c66131088d4a1 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 17:22:32 +0000 Subject: [PATCH 084/101] - fixed bug within the user_add function - fixed some updater bugs git-svn-id: file:///svn/phpbb/trunk@6663 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 1 + phpBB/install/database_update.php | 177 +++++++++++++++++++++++++++++- phpBB/install/install_update.php | 10 ++ phpBB/language/en/install.php | 2 +- 4 files changed, 185 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 971a544d11..d22add63ea 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -171,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, diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index c741c7ddb6..ea736bf4c4 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.B4-dev'; +$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(); @@ -476,6 +477,8 @@ switch ($current_version) _sql($sql, $errored, $error_ary); } + add_bots(); + // No need to change here. Before this line, no break should appear break; @@ -501,13 +504,12 @@ $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 // this should be done for each version in future along with @@ -987,4 +989,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/install_update.php b/phpBB/install/install_update.php index aea6043f50..069022f0e5 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -891,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; } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 7dbf0106e6..2cd932b54f 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -372,7 +372,7 @@ $lang = array_merge($lang, array( '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.', From d5593b154e06684f0c43563311ab8825bcbed8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Sun, 26 Nov 2006 21:26:15 +0000 Subject: [PATCH 085/101] #5606 and some beautification git-svn-id: file:///svn/phpbb/trunk@6664 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/styles/subSilver/template/editor.js | 33 ++++++++++--------- .../template/ucp_profile_signature.html | 33 ++++++++++--------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js index 3bdb8922c0..54e7e61f3a 100644 --- a/phpBB/styles/subSilver/template/editor.js +++ b/phpBB/styles/subSilver/template/editor.js @@ -118,20 +118,20 @@ function bbfontstyle(bbopen, bbclose) insert_text(bbopen + bbclose); // Center the cursor when we don't have a selection - // IE & Opera - if (document.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]); } - //Gecko - else if (!isNaN(textarea.selectionStart)) - { - textarea.selectionStart = new_pos; - textarea.selectionEnd = new_pos; - } document.forms[form_name].elements[text_name].focus(); return; @@ -155,13 +155,8 @@ function insert_text(text, spaces, popup) { text = ' ' + text + ' '; } - 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 if (!isNaN(textarea.selectionStart)) + + if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; @@ -169,7 +164,15 @@ 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; diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html index 81a435ac3f..2bc94de14d 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_signature.html +++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html @@ -25,7 +25,9 @@ var help_line = { 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}' ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' @@ -52,27 +54,26 @@ var help_line = { - - - - + From 07f860826f05d4aa2e7fcc5933282914f35599f7 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 12:56:17 +0000 Subject: [PATCH 089/101] #5624 git-svn-id: file:///svn/phpbb/trunk@6668 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_pm_compose.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index c150831f0d..3cfb2f37a9 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -955,7 +955,7 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ } // Check for disallowed recipients - if (sizeof($address_list['u'])) + 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 From 883bfbf981a58c357a8dd1d0c6754488971f7cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Mon, 27 Nov 2006 12:56:35 +0000 Subject: [PATCH 090/101] blah .. git-svn-id: file:///svn/phpbb/trunk@6669 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_styles.php | 2 +- phpBB/includes/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index a8abfdba5f..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 .= ''; + $s_classes .= ''; } $template->assign_vars(array( diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 59c3d240ce..614b5bbc64 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -686,7 +686,7 @@ function tz_select($default = '', $truncate = false) { if ($truncate) { - $zone_trunc = truncate_string($zone, 50, false, "..."); + $zone_trunc = truncate_string($zone, 50, false, '...'); } else { From 22c729c41b275d443e1ec3ffc9c6afc723b339ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Mon, 27 Nov 2006 14:25:15 +0000 Subject: [PATCH 091/101] #5642 This should be a little easier to manage. git-svn-id: file:///svn/phpbb/trunk@6670 89ea8834-ac86-4346-8a33-228a782c2dd0 --- .../subSilver/template/posting_body.html | 102 ++---------------- .../subSilver/template/posting_buttons.html | 94 ++++++++++++++++ .../subSilver/template/ucp_main_drafts.html | 45 ++++---- .../template/ucp_profile_signature.html | 101 +++-------------- 4 files changed, 138 insertions(+), 204 deletions(-) create mode 100644 phpBB/styles/subSilver/template/posting_buttons.html diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 99085f530f..f0ebd9f3b1 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -4,57 +4,6 @@ - - -
    @@ -247,51 +196,16 @@ function checkForm()
    - - - - - - - + + + + + + + + + + - + - + - + -
    - {L_FONT_SIZE}: From 0bc076a0c3c2f24f3050014357a3bcb6d0069fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Mon, 27 Nov 2006 10:26:38 +0000 Subject: [PATCH 086/101] #5632 git-svn-id: file:///svn/phpbb/trunk@6665 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_users.html | 46 ++++++++++++++++------------------ phpBB/adm/style/editor.js | 35 ++++++++++++++------------ 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 75c8846935..7bc81434d0 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -548,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]', {custom_tags.BBCODE_NAME}); - 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]', {custom_tags.BBCODE_NAME}); +imageTag = false; // Helpline messages var help_line = { @@ -566,7 +566,9 @@ var help_line = { 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}' ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' @@ -589,24 +591,25 @@ var help_line = { {L_SIGNATURE}

    {L_SIGNATURE_EXPLAIN}

    - - - - - - - + + + + + + + + - + - + - + - {L_FONT_SIZE}: @@ -622,14 +625,8 @@ var help_line = {

    -
    -
    -
    -
    -
    - +
    +
      {L_DISABLE_BBCODE}   @@ -639,8 +636,7 @@ var help_line = {   {L_DISABLE_MAGIC_URL}  

    {L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS} -
    -
    +
    diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index c2ea088fd3..54e7e61f3a 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -118,20 +118,20 @@ function bbfontstyle(bbopen, bbclose) insert_text(bbopen + bbclose); // Center the cursor when we don't have a selection - // IE & Opera - if (document.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]); } - //Gecko - else if (!isNaN(textarea.selectionStart)) - { - textarea.selectionStart = new_pos; - textarea.selectionEnd = new_pos; - } document.forms[form_name].elements[text_name].focus(); return; @@ -155,13 +155,8 @@ function insert_text(text, spaces, popup) { text = ' ' + text + ' '; } - 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 if (!isNaN(textarea.selectionStart)) + + if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; @@ -169,7 +164,15 @@ 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; @@ -372,7 +375,7 @@ function getCaretPosition(txtarea) // get current selection var range = document.selection.createRange(); - // create a selection of the whole textarea + // a new selection of the whole textarea var range_all = document.body.createTextRange(); range_all.moveToElementText(txtarea); From 85a5dc01fecf98e36c1f39d9f67e8d8f2ddb534d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Mon, 27 Nov 2006 11:37:42 +0000 Subject: [PATCH 087/101] #5630 git-svn-id: file:///svn/phpbb/trunk@6666 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_board.php | 22 +++++++++++----------- phpBB/language/en/acp/common.php | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 708a23230e..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), diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 5bc178117a..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 revert to your permission set at any time.', + 'PIXEL' => 'px', 'PROCEED_TO_ACP' => '%sProceed to the ACP%s', 'REMIND' => 'Remind', From 61e2a3f5c1d43fd64e283e0fe79beee92f605999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Mon, 27 Nov 2006 12:45:26 +0000 Subject: [PATCH 088/101] #4892 git-svn-id: file:///svn/phpbb/trunk@6667 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_styles.html | 8 -------- phpBB/includes/acp/acp_styles.php | 2 +- phpBB/includes/functions.php | 17 ++++++++++++++--- phpBB/includes/ucp/ucp_prefs.php | 10 +++++----- .../subSilver/template/ucp_prefs_personal.html | 4 +++- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 3207c14d05..6ee90b7d3d 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -254,14 +254,6 @@

    {L_SHOW_CSS_NOTE}

    {L_SHOW_CSS_EXPLAIN}

    - - - -
    diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index e5e5f1a2b8..a8abfdba5f 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 .= ''; + $s_classes .= ''; } $template->assign_vars(array( diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index bf1883e96f..59c3d240ce 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -686,13 +686,17 @@ function tz_select($default = '', $truncate = false) { 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 .= ''; + $tz_select .= ''; } } @@ -2737,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; @@ -2756,12 +2761,18 @@ 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; } diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index c085e54143..d9afd7e623 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -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; 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 @@
    {L_BOARD_TIMEZONE}: + +
    {L_BOARD_DST}: + - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/phpBB/styles/subSilver/template/ucp_main_drafts.html b/phpBB/styles/subSilver/template/ucp_main_drafts.html index f8b25dc8b5..4e820acd0d 100644 --- a/phpBB/styles/subSilver/template/ucp_main_drafts.html +++ b/phpBB/styles/subSilver/template/ucp_main_drafts.html @@ -60,40 +60,33 @@ diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html index 2bc94de14d..be01f098e9 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_signature.html +++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html @@ -1,46 +1,13 @@ - - - +
    - - - - - - - - - - - - - - - - - - - - {L_FONT_SIZE}: -
    - - onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> - -
    {L_FONT_COLOR}
    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 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + {L_FONT_SIZE}: +
    + + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> + +
    {L_FONT_COLOR}
    {L_MESSAGE}:
    {L_EDIT_DRAFT_EXPLAIN}
    + - - - - - - - - - - + + + - - - - - - - +
    - +
    - - +
     {L_FONT_SIZE}: {L_CLOSE_TAGS} + +
    + + + @@ -49,62 +16,28 @@ var help_line = { - -
    {L_TITLE}
    {L_SIGNATURE_EXPLAIN}
    {L_SIGNATURE}:
    {L_SIGNATURE_EXPLAIN}
    + + + - - - - - - - - + - - - - + +
    - - - - - - - - - - - - - - - - - - - - {L_FONT_SIZE}: -
    - - onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" /> - -
    - From 688ef7560a4c785ab5191ca2ff589c9361c459f6 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 16:05:23 +0000 Subject: [PATCH 092/101] Using a different approach for the data updates (same as the schema updates) git-svn-id: file:///svn/phpbb/trunk@6671 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- phpBB/includes/ucp/ucp_prefs.php | 2 +- phpBB/install/database_update.php | 43 ++++++++++++++----------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 614b5bbc64..5d12f9684c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -687,7 +687,7 @@ function tz_select($default = '', $truncate = false) if ($truncate) { $zone_trunc = truncate_string($zone, 50, false, '...'); - } + } else { $zone_trunc = $zone; diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index d9afd7e623..e72673c023 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -130,7 +130,7 @@ class ucp_prefs '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_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) ); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ea736bf4c4..461b5807c2 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -308,7 +308,7 @@ $database_update_info = array( ), ), // Latest version - '3.0.b4-dev' => array(), + '3.0.b4' => array(), ); // Determine mapping database type @@ -458,34 +458,29 @@ $errored = $no_updates = false; flush(); +$no_updates = true; + // some code magic -switch ($current_version) +if (version_compare($current_version, '3.0.b3', '<')) { - case '3.0.b3': - // 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); + // 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); - if ($group_id) - { - $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; - _sql($sql, $errored, $error_ary); - } + if ($group_id) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; + _sql($sql, $errored, $error_ary); + } - add_bots(); + add_bots(); - // No need to change here. Before this line, no break should appear - break; - - case '3.0.b4-dev': - default: - $no_updates = true; - break; + $no_updates = false; } _write_result($no_updates, $errored, $error_ary); From 82b8a1d96fa93d0ab2e14a24939f790259ccdea8 Mon Sep 17 00:00:00 2001 From: Jonathan Stanley Date: Mon, 27 Nov 2006 16:15:13 +0000 Subject: [PATCH 093/101] #5592 et #5590 git-svn-id: file:///svn/phpbb/trunk@6672 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/en/email/user_activate_inactive.txt | 2 +- phpBB/language/en/email/user_activate_passwd.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/language/en/email/user_activate_inactive.txt b/phpBB/language/en/email/user_activate_inactive.txt index e225d2089c..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 4fd5f5e5d6..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. From 8e297a038c6dfed7ca892d8799cfbdb010cc0911 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 18:00:41 +0000 Subject: [PATCH 094/101] hopefully fixed bug #5644 while also retaining the fix for bug #3572 testing this is appreciated. git-svn-id: file:///svn/phpbb/trunk@6673 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 39 +++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index f0982ca12b..c2c700e1c5 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -664,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; } } @@ -704,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 = ''; } } From 1f118ba2ae02dd1bf3ff1d3be06245b03a561180 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 19:32:18 +0000 Subject: [PATCH 095/101] #5610 git-svn-id: file:///svn/phpbb/trunk@6674 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 2 +- phpBB/includes/message_parser.php | 8 ++++---- phpBB/includes/search/fulltext_mysql.php | 2 +- phpBB/includes/search/fulltext_native.php | 4 ++-- phpBB/search.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 5d12f9684c..5c2b524fcf 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2101,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)) diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index c2c700e1c5..797c2f5cfd 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -89,7 +89,7 @@ class bbcode_firstpass extends bbcode $this->message = str_replace("\r\n", "\n", $this->message); // We strip newlines and spaces after and before quotes in quotes (trimming) - $this->message = preg_replace(array('#\[quote(=".*?")?\]([\s|\n]+)#is', '#([\s|\n]+)\[\/quote\]#is'), array("[quote\\1]", "[/quote]"), $this->message); + $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); @@ -445,7 +445,7 @@ class bbcode_firstpass extends bbcode } $code = preg_replace('#^(.*)#s', '$2', $code); - $code = preg_replace('#(?:[\n\r\s\t]| )*$#', '', $code); + $code = preg_replace('#(?:[\n\r\s\t]| )*$#u', '', $code); // remove newline at the end if (!empty($code) && $code{strlen($code)-1} == "\n") @@ -933,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']) { diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 09e9162d83..8a102a321d 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -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); diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 07ebfc6047..df000f5e04 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -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)) diff --git a/phpBB/search.php b/phpBB/search.php index f8fa502839..f504f2079a 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -130,7 +130,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) else { $search_terms = 'all'; - $keywords = implode(' |', explode(' ', preg_replace('#\s+#', ' ', $keywords))) . ' ' .$add_keywords; + $keywords = implode(' |', explode(' ', preg_replace('#\s+#u', ' ', $keywords))) . ' ' .$add_keywords; } } @@ -447,7 +447,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) // define some vars for urls // @todo preg_replace still needed? - $hilit = preg_replace('#&(\#[0-9]+;)#', '&$1', htmlspecialchars(implode('|', explode(' ', preg_replace('#\s+#', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $keywords)))))); + $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); From 49e8de0ca281cc2f73040157b5957f5d9ade18a7 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 27 Nov 2006 20:31:06 +0000 Subject: [PATCH 096/101] - Throw error on incorrect search queries [Bug #5648] git-svn-id: file:///svn/phpbb/trunk@6675 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index f504f2079a..1be3aa8b14 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -231,8 +231,8 @@ 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), ENT_COMPAT, 'UTF-8')) . '
    ' : ''; trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max'])); From f56c1a85d3582b7052bbbc7b8cca1425651b4933 Mon Sep 17 00:00:00 2001 From: David M Date: Mon, 27 Nov 2006 21:24:15 +0000 Subject: [PATCH 097/101] #5640 git-svn-id: file:///svn/phpbb/trunk@6676 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 26 +++++++++++++++++++++++--- phpBB/language/en/install.php | 2 ++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 8d06564e3c..1f2f10caec 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -129,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( @@ -186,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 = '' . $lang['YES'] . ''; + } + else + { + $result = '' . $lang['NO'] . ''; + } + + $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, @@ -395,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) ? '' : ''; - $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( diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 2cd932b54f..f6c1105d20 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -222,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.

    Note: This release is not final and made available for testing purposes only.

    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 not 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' => 'Optional - 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', From 1f8818d85d8b95d95cb62967f171c99c0735af9e Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 21:33:49 +0000 Subject: [PATCH 098/101] better layed out... git-svn-id: file:///svn/phpbb/trunk@6677 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 5c2b524fcf..9c8163bd14 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2810,12 +2810,10 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', { $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; - $full_string = '' . $username . ''; } else { $profile_url = ''; - $full_string = ($username_colour) ? '' . $username . '' : $username; } switch ($mode) @@ -2834,7 +2832,26 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', case 'full': default: - return $full_string; + + $tpl = ''; + if (!$profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if (!$profile_url && $username_colour) + { + $tpl = '{USERNAME}'; + } + else if ($profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if ($profile_url && $username_colour) + { + $tpl = '{USERNAME}'; + } + + return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl); break; } } From 3da0f4fe7f09fa18aa2256a929abe968007109b2 Mon Sep 17 00:00:00 2001 From: David M Date: Mon, 27 Nov 2006 21:34:59 +0000 Subject: [PATCH 099/101] don't mind me, I just forgot something :D git-svn-id: file:///svn/phpbb/trunk@6678 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 1f2f10caec..0b4f94a5c2 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -187,7 +187,7 @@ class install_install extends module )); // Check for PCRE UTF-8 support - if (preg_match('//u', '')) + if (@preg_match('//u', '')) { $passed['pcre'] = true; $result = '' . $lang['YES'] . ''; From 3041ca4ed70f7ad9f28a2eb597bac8e13a92166f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 27 Nov 2006 21:41:56 +0000 Subject: [PATCH 100/101] version update git-svn-id: file:///svn/phpbb/trunk@6679 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/schemas/schema_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 02bd26b506..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.B4-dev'); +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');

    +