diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index b0d41f94e4..96ee629a4d 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -1,10 +1,10 @@ acl_get('a_')) // We define the admin variables now, because the user is now able to use the admin related features... define('IN_ADMIN', true); -$phpbb_admin_path = './'; +$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './'; // Some oft used variables $safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; @@ -204,11 +204,7 @@ function adm_page_footer($copyright_html = true) $template->display('body'); garbage_collection(); - - if (!defined('PHPBB_EMBEDDED')) - { - exit; - } + exit_handler(); } /** @@ -280,7 +276,7 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars) $size = (int) $tpl_type[1]; $maxlength = (int) $tpl_type[2]; - $tpl = ' x '; + $tpl = ' x '; break; case 'textarea': diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 36d8f24f32..42ae610545 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -16,7 +16,7 @@

{WARNING_MSG}

- +

{L_NOTIFY}

@@ -110,15 +110,14 @@

{L_NO_IPS_DEFINED}

- + {S_FORM_TOKEN}
@@ -217,7 +216,7 @@

- + {S_FORM_TOKEN}
@@ -255,10 +254,11 @@

- {L_CREATE_GROUP}: + {L_CREATE_GROUP}:

+ {S_FORM_TOKEN} @@ -281,9 +281,9 @@

- + {S_FORM_TOKEN} - +
@@ -307,7 +307,7 @@   - + {extensions.EXTENSION} {extensions.GROUP_OPTIONS} @@ -321,7 +321,7 @@

- + {S_FORM_TOKEN}
@@ -369,7 +369,7 @@

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index e371d48bfc..8dd771f7fa 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -9,24 +9,24 @@

{L_EXPLAIN}

@@ -46,7 +46,7 @@
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index 8d9827b672..48b117cfc9 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -77,7 +77,7 @@ - + {S_FORM_TOKEN} @@ -111,7 +111,7 @@

- +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html index c7501ce088..2569b162ca 100644 --- a/phpBB/adm/style/acp_board.html +++ b/phpBB/adm/style/acp_board.html @@ -45,6 +45,7 @@ +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index 2f65a0fbec..92778472d8 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -51,7 +51,7 @@

- + {S_FORM_TOKEN} @@ -94,7 +94,7 @@

{L_MARK_ALL}{L_UNMARK_ALL}

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index b5c12f29b1..ecb60e4b59 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -64,7 +64,7 @@   - +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index d1ac03dc7b..dc24b55bb1 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -25,6 +25,7 @@ + {S_FORM_TOKEN} @@ -33,7 +34,7 @@

{L_ACP_BACKUP_EXPLAIN}

@@ -85,7 +86,7 @@

- + {S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html index 5d94787f04..020135e227 100644 --- a/phpBB/adm/style/acp_disallow.html +++ b/phpBB/adm/style/acp_disallow.html @@ -4,7 +4,7 @@

{L_ACP_DISALLOW_USERNAMES}

-

{L_ADD_DISALLOW_EXPLAIN}

+

{L_ACP_DISALLOW_EXPLAIN}

@@ -39,7 +39,7 @@

{L_NO_DISALLOWED}

- +{S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html index 5744136230..bb891de0b4 100644 --- a/phpBB/adm/style/acp_email.html +++ b/phpBB/adm/style/acp_email.html @@ -24,7 +24,7 @@

{L_SEND_TO_USERS_EXPLAIN}
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]
@@ -48,7 +48,7 @@

- +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 1aef98c36b..91c15999e5 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -5,8 +5,7 @@ « {L_BACK} @@ -161,20 +160,28 @@

{L_FORUM_PASSWORD_EXPLAIN}
-
+

{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}
-
+
+ +
+

{L_FORUM_PASSWORD_UNSET_EXPLAIN}
+
+
+
-
-

{L_COPY_PERMISSIONS_EXPLAIN}
-
-
+ +
+

{L_COPY_PERMISSIONS_EXPLAIN}
+
+
+
@@ -311,7 +318,7 @@   - + {S_FORM_TOKEN} @@ -360,18 +367,17 @@

- + {S_FORM_TOKEN}

{L_FORUM_ADMIN}

@@ -383,18 +389,17 @@

{L_FORUM_ADMIN}

@@ -410,9 +415,9 @@
@@ -471,7 +476,7 @@ - + {S_FORM_TOKEN}
@@ -482,7 +487,7 @@ - + {S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index a659207f9e..b615099b7c 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -76,7 +76,7 @@

{L_GROUP_COLOR_EXPLAIN}
-
  [ {L_COLOUR_SWATCH} ]
+
  [ {L_COLOUR_SWATCH} ]
@@ -155,7 +155,7 @@   - + {S_FORM_TOKEN} @@ -254,14 +254,14 @@

{L_USERNAMES_EXPLAIN}
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]

- + {S_FORM_TOKEN} @@ -310,7 +310,7 @@ - + {S_FORM_TOKEN}

{L_SPECIAL_GROUPS}

diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 5100de32d8..e02840f1c5 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -5,7 +5,7 @@ - « {L_BACK}

{L_TITLE}

@@ -112,7 +111,7 @@ - + @@ -161,7 +160,7 @@

- + {S_FORM_TOKEN} @@ -196,7 +195,7 @@

- + {S_FORM_TOKEN} @@ -258,7 +257,7 @@    

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html index dc447d00fc..b5a05ec799 100755 --- a/phpBB/adm/style/acp_inactive.html +++ b/phpBB/adm/style/acp_inactive.html @@ -65,7 +65,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html index 4d667d2966..b57ad59af5 100644 --- a/phpBB/adm/style/acp_jabber.html +++ b/phpBB/adm/style/acp_jabber.html @@ -17,6 +17,9 @@
{L_ACP_JABBER_SETTINGS} + +

{L_JAB_GTALK_NOTE}

+

{L_JAB_ENABLE_EXPLAIN}
@@ -56,7 +59,7 @@  
- +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index c016251d38..a6f99c2b56 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -55,7 +55,7 @@

- + {S_FORM_TOKEN}

@@ -92,7 +92,7 @@ - + {S_FORM_TOKEN}

@@ -161,7 +161,7 @@ - + {S_FORM_TOKEN} @@ -201,7 +201,7 @@ - + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index e18c4882c5..cc1765e2a4 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -79,7 +79,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 3fafd1288b..729ac56c5e 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -5,8 +5,7 @@ « {L_BACK} @@ -117,7 +116,7 @@

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index e16d7598ab..f6ca6081aa 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -5,7 +5,7 @@ @@ -125,7 +125,7 @@
- + {S_FORM_TOKEN} » {L_BACK_TO_TOP}
@@ -179,7 +179,7 @@
{L_CREATE_ROLE}:
- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index 5eb9c2eab3..a4797fcc4f 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -39,7 +39,7 @@

- + {S_FORM_TOKEN} @@ -60,7 +60,7 @@

- + {S_FORM_TOKEN} @@ -74,7 +74,7 @@
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]
@@ -83,7 +83,7 @@

- + {S_FORM_TOKEN} @@ -103,7 +103,7 @@

- + {S_FORM_TOKEN} @@ -128,7 +128,7 @@ {S_HIDDEN_FIELDS}   - + {S_FORM_TOKEN}
@@ -138,7 +138,7 @@

{L_USERNAMES_EXPLAIN}

-
+
@@ -146,7 +146,7 @@ {S_HIDDEN_FIELDS} - + {S_FORM_TOKEN}
@@ -173,7 +173,7 @@ {S_HIDDEN_FIELDS}   - + {S_FORM_TOKEN}
@@ -190,6 +190,7 @@ + {S_FORM_TOKEN}
@@ -216,6 +217,7 @@ + {S_FORM_TOKEN}
@@ -225,7 +227,7 @@
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]
@@ -234,7 +236,7 @@ {S_HIDDEN_FIELDS} - + {S_FORM_TOKEN}
@@ -257,6 +259,7 @@ + {S_FORM_TOKEN}
@@ -275,6 +278,7 @@ + {S_FORM_TOKEN}
@@ -318,7 +322,7 @@ - + {S_FORM_TOKEN} @@ -327,9 +331,9 @@
@@ -346,7 +350,8 @@

- + + {S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index bd9f0cc9a0..912e58b43c 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -156,7 +156,7 @@ - + {S_FORM_TOKEN} @@ -217,7 +217,7 @@ - + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index 8d8f913b53..14a367ce27 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -101,7 +101,7 @@

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html index 1300ddffb2..7d84146267 100644 --- a/phpBB/adm/style/acp_prune_users.html +++ b/phpBB/adm/style/acp_prune_users.html @@ -33,7 +33,7 @@

{L_SELECT_USERS_EXPLAIN}
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]

{L_DELETE_USER_POSTS_EXPLAIN}
@@ -53,7 +53,7 @@

- +{S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index bfb805f3d8..482fbcb02c 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -7,13 +7,13 @@ « {L_BACK}

{L_ACP_MANAGE_RANKS}

@@ -52,7 +52,7 @@

- + {S_FORM_TOKEN} @@ -90,7 +90,7 @@

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html index 3ad32e7d39..221a776a24 100644 --- a/phpBB/adm/style/acp_reasons.html +++ b/phpBB/adm/style/acp_reasons.html @@ -54,7 +54,7 @@

- + {S_FORM_TOKEN} @@ -118,7 +118,8 @@

- + + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index 8d0ad2f07c..d4937c6ecc 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -61,22 +61,23 @@ + {S_FORM_TOKEN}

{L_ACP_SEARCH_INDEX}

@@ -90,6 +91,7 @@   + {S_FORM_TOKEN} @@ -140,7 +142,7 @@

- + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index c555071fee..a067e1a16b 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -27,7 +27,7 @@

- + {S_FORM_TOKEN} @@ -51,15 +51,15 @@
@@ -148,38 +148,11 @@ {L_SUBMIT}    - + {S_FORM_TOKEN}
- - « {L_BACK}

{L_EDIT}

@@ -199,15 +172,23 @@
- + + {S_FORM_TOKEN}
@@ -262,24 +255,13 @@ {S_HIDDEN_FIELDS} - + + {S_FORM_TOKEN}
- - « {L_BACK}

{L_TEMPLATE_CACHE}

@@ -303,7 +285,7 @@ - {file.FILENAME} + {file.FILENAME} {file.FILESIZE} {file.CACHED} {file.MODIFIED} @@ -324,6 +306,7 @@

+ {S_FORM_TOKEN} @@ -381,6 +364,7 @@

+ {S_FORM_TOKEN} @@ -525,7 +509,8 @@ {L_SUBMIT} - + + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index a7ac71abed..593889e7d1 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -15,7 +15,7 @@
-
[ {L_FIND_USERNAME} ]
+
[ {L_FIND_USERNAME} ]
@@ -47,7 +47,7 @@
- + {S_FORM_TOKEN} @@ -70,7 +70,7 @@
{L_SELECT_FORM}:
- + {S_FORM_TOKEN} @@ -110,7 +110,7 @@
- + {S_FORM_TOKEN} @@ -145,7 +145,7 @@ {L_USER_GROUP_ADD}: - + {S_FORM_TOKEN} @@ -202,7 +202,7 @@

{L_MARK_ALL}{L_UNMARK_ALL}

- + {S_FORM_TOKEN} @@ -218,7 +218,7 @@ {L_SELECT_FORUM}: - + {S_FORM_TOKEN}
 
diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html index c2590ebca0..2b5745ebb6 100644 --- a/phpBB/adm/style/acp_users_avatar.html +++ b/phpBB/adm/style/acp_users_avatar.html @@ -71,5 +71,6 @@
- + + {S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html index e1d4076e4d..e11a8e6ec1 100644 --- a/phpBB/adm/style/acp_users_feedback.html +++ b/phpBB/adm/style/acp_users_feedback.html @@ -72,5 +72,5 @@
- + {S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index 9f8ed9648a..da699968c5 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -21,7 +21,7 @@
{REGISTERED_IP}
-
[ {L_WHOIS} ]
+
[ {L_WHOIS} ]
@@ -64,13 +64,13 @@

- +{S_FORM_TOKEN}
@@ -137,7 +137,8 @@

- + + {S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html index 99e82ea0db..b8b847bd14 100644 --- a/phpBB/adm/style/acp_users_prefs.html +++ b/phpBB/adm/style/acp_users_prefs.html @@ -1,3 +1,9 @@ + +
@@ -57,7 +63,7 @@

{L_BOARD_DATE_FORMAT_EXPLAIN}
-
+
style="display:none;">
@@ -148,4 +154,5 @@ + {S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html index 6a50887141..959494f5e3 100644 --- a/phpBB/adm/style/acp_users_profile.html +++ b/phpBB/adm/style/acp_users_profile.html @@ -63,4 +63,5 @@ + {S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index b45e61295e..e51b5ab68d 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -1,5 +1,5 @@ - - +// ]]> + + -
+
@@ -67,12 +67,12 @@ - {L_FONT_SIZE}: + + + + +

@@ -86,9 +86,12 @@

-
+
+
@@ -110,5 +113,5 @@  
- -
\ No newline at end of file +{S_FORM_TOKEN} + \ No newline at end of file diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index 055a616f70..3f99637418 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -29,7 +29,7 @@

- + {S_FORM_TOKEN} @@ -67,7 +67,7 @@ - + {S_FORM_TOKEN} diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 489b22a7d4..d8eaa81d6b 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -421,7 +421,6 @@ span.corners-bottom span { #menu li a:hover, #menu li a:hover span { text-decoration: none; background-color: #FFFFFF; - color: #BC2A4D; } @@ -703,7 +702,7 @@ input:hover, textarea:hover { border-top: 1px solid #AFAEAA; border-right: 1px solid #AFAEAA; border-bottom: 1px solid #AFAEAA; - background-color: #E9E9E2; + background-color: #E9E9E2; } input.langvalue, textarea.langvalue { diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html index f52f3217c5..f3c5a812dc 100644 --- a/phpBB/adm/style/colour_swatch.html +++ b/phpBB/adm/style/colour_swatch.html @@ -36,7 +36,7 @@ diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html index a5545aad26..b1e14ba8cf 100755 --- a/phpBB/adm/style/install_header.html +++ b/phpBB/adm/style/install_header.html @@ -11,6 +11,31 @@ + + diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index 34d00241cb..2dbc0c7c47 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -1,13 +1,13 @@ @@ -17,7 +17,14 @@ - + + +
+

{L_IN_PROGRESS}

+

{L_IN_PROGRESS_EXPLAIN}

+
+ +
@@ -178,13 +185,16 @@ - +

{files.TITLE}

+
» {L_TOGGLE_DISPLAY}

{files.EXPLAIN}

+
+
{files.L_STATUS} @@ -201,7 +211,7 @@
{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS} -
 [ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
+
 [ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
@@ -210,15 +220,15 @@
-
[ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
+
[ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
@@ -233,20 +243,20 @@
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
@@ -262,7 +272,7 @@ - +

@@ -287,14 +297,14 @@ -

{L_SELECT_DOWNLOAD_FORMAT}

+

{L_DOWNLOAD_UPDATE_METHOD}

{L_DOWNLOAD_UPDATE_METHOD_EXPLAIN}

- {L_DOWNLOAD_AS} + {L_SELECT_DOWNLOAD_FORMAT}
{RADIO_BUTTONS}
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index ce1a241abe..b9ac19ae5d 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -12,7 +12,7 @@ + - + - +
+ +
+ +
+
-

- - - - + \ No newline at end of file diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 6537adc1f9..ee92427530 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -1,173 +1,58 @@ - - + + -phpBB 3.0.x FAQ - - + + + + + - - - - - + + + + +phpBB3 • FAQ - + - + - +
+ +
- +
+ +
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index e87614b5b2..afd2655bd7 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -1,164 +1,44 @@ - - + + -phpBB 3.0.x Install - - + + + + + - - - - - + + + + +phpBB3 • Install - + - + - +
+ + + +
- +
+ +
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 3dc47ae63b..9161050511 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -1,210 +1,102 @@ - - + + -phpBB 3.0.x Readme - - + + + + + - - - - - + + + + +phpBB3 • Readme - + - + - +
+ + - +
+ +
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index f744466254..c83aaadc2d 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -1,191 +1,60 @@ - - + + -Auth API - - + + + + + - - - - - - + + + + +phpBB3 • Auth API - - - + - + - +
+ +

Where option is the option passed to the method and integer is either zero or a positive integer and the same acl_get(option, forum_id) would return.

-
- Top -

- - - 2.v. acl_getf_global -

-
+

2.v. acl_getf_global

This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether acl_getf(option, true) returned one or more forums but it's faster. It should be called in the following way:

-
+	
 $result = acl_getf_global(option)
-	
+

As with the previous methods option is a string specifying the permission which has to be checked.

This method returns either zero or a positive integer.

-
- Top -

- - - 2.vi. acl_cache -

-
+

2.vi. acl_cache

This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by acl.

+
+ + + + - Top -

-
+
-

3. Admin related functions

+

3. Admin related functions

+
+ +

A number of additional methods are available related to auth. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a separate class, auth_admin. This can be found in includes/acp/auth.php.

To use any methods this class contains it first needs to be instantiated separately from auth. This is achieved in the same way as auth:

-
+	
 $auth_admin = new auth_admin();
-	
+

This instance gives you access to both the methods of this specific class and that of auth.

+
+ + + +
- Top -


-

4. Copyright and disclaimer

+

4. Copyright and disclaimer

+
+ +

This application is opensource software released under the GPL. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 phpBB Group, All Rights Reserved.

-
-Top +
-
+ - + + + + + + + +
+
diff --git a/phpBB/docs/bg_header.gif b/phpBB/docs/bg_header.gif new file mode 100644 index 0000000000..351de9f46a Binary files /dev/null and b/phpBB/docs/bg_header.gif differ diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index a407be10ee..b5aeeccdc3 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1,194 +1,44 @@ - - + + -Coding Guidelines - - + + + + + - - - - - + + + + +phpBB3 • Coding Guidelines - + - + - +
+ + - Top -

- - 1.iii. File Locations -

-
+

1.iii. File Locations

Functions used by more than one page should be placed in functions.php, functions specific to one page should be placed on that page (at the bottom) or within the relevant sections functions file. Some files in /includes are holding functions responsible for special sections, for example uploading files, displaying "things", user related functions and so forth.

The following packages are defined, and related new features/functions should be placed within the mentioned files/locations, as well as specifying the correct package name. The package names are bold within this list:

-
+ + + +
- Top -

-
+
-

2. Code Layout/Guidelines

+

2. Code Layout/Guidelines

+ +
+
+ +

Please note that these Guidelines applies to all php, html, javascript and css files.

- 2.i. Variable/Function Naming -

-
+

2.i. Variable/Function Naming

We will not be using any form of hungarian notation in our naming conventions. Many of us believe that hungarian naming is one of the primary code obfuscation techniques currently in use.

-

Variable Names:

+

Variable Names:

Variable names should be in all lowercase, with words separated by an underscore, example:

@@ -385,10 +241,10 @@ class ...

Names should be descriptive, but concise. We don't want huge sentences as our variable names, but typing an extra couple of characters is always better than wondering what exactly a certain variable is for.

-

Loop Indices:

+

Loop Indices:

The only situation where a one-character variable name is allowed is when it's the index for some looping construct. In this case, the index of the outer loop should always be $i. If there's a loop inside that loop, its index should be $j, followed by $k, and so on. If the loop is being indexed by some already-existing variable with a meaningful name, this guideline does not apply, example:

-
+	
 for ($i = 0; $i < $outer_size; $i++)
 {
    for ($j = 0; $j < $inner_size; $j++)
@@ -396,35 +252,28 @@ for ($i = 0; $i < $outer_size; $i++)
       foo($i, $j);
    }
 }
-	
+
-

Function Names:

+

Function Names:

Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character. Function names should preferably have a verb in them somewhere. Good function names are print_login_status(), get_user_data(), etc.

-

Function Arguments:

+

Function Arguments:

Arguments are subject to the same guidelines as variable names. We don't want a bunch of functions like: do_stuff($a, $b, $c). In most cases, we'd like to be able to tell how to use a function by just looking at its declaration.

-

Summary:

+

Summary:

The basic philosophy here is to not hurt code clarity for the sake of laziness. This has to be balanced by a little bit of common sense, though; print_login_status_for_a_given_user() goes too far, for example -- that function would be better named print_user_login_status(), or just print_login_status().

-

Special Namings:

+

Special Namings:

For all emoticons use the term smiley in singular and smilies in plural.

-
- Top -

+

2.ii. Code Layout

- - 2.ii. Code Layout -

-
- -

Always include the braces:

+

Always include the braces:

This is another case of being too lazy to type 2 extra characters causing problems with code clarity. Even if the body of some construct is only one line long, do not drop the braces. Just don't, examples:

// These are all wrong.

-
+	
 if (condition) do_stuff();
 
 if (condition)
@@ -435,216 +284,216 @@ while (condition)
 
 for ($i = 0; $i < size; $i++)
 	do_stuff($i);
-	
- +
+

// These are all right.

-
+	
 if (condition)
 {
 	do_stuff();
 }
 
-while (condition) 
+while (condition)
 {
 	do_stuff();
 }
 
-for ($i = 0; $i < size; $i++) 
+for ($i = 0; $i < size; $i++)
 {
 	do_stuff();
 }
-	
+
-

Where to put the braces:

+

Where to put the braces:

This one is a bit of a holy war, but we're going to use a style that can be summed up in one sentence: Braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:

-
-if (condition) 
+	
+if (condition)
 {
 	while (condition2)
 	{
 		...
 	}
 }
-else 
+else
 {
 	...
 }
 
-for ($i = 0; $i < $size; $i++) 
+for ($i = 0; $i < $size; $i++)
 {
 	...
 }
-		
-while (condition) 
-{
-	...
-}
-		
-function do_stuff() 
-{
-	...
-}
-	
-

Use spaces between tokens:

+while (condition) +{ + ... +} + +function do_stuff() +{ + ... +} +
+ +

Use spaces between tokens:

This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave one space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:

// Each pair shows the wrong way followed by the right way.

-
+	
 $i=0;
 $i = 0;
-		
+
 if($i<7) ...
 if ($i < 7) ...
-		
+
 if ( ($i < 7)&&($j > 8) ) ...
 if ($i < 7 && $j > 8) ...
-		
+
 do_stuff( $i, 'foo', $b );
 do_stuff($i, 'foo', $b);
-		
+
 for($i=0; $i<$size; $i++) ...
-for ($i = 0; $i < $size; $i++) ... 
-		
+for ($i = 0; $i < $size; $i++) ...
+
 $i=($j < $size)?0:1;
 $i = ($j < $size) ? 0 : 1;
-	
+
-

Operator precedence:

+

Operator precedence:

Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:

// what's the result? who knows.

-
+	
 $bool = ($i < 7 && $j > 8 || $k == 4);
-	
+

// now you can be certain what I'm doing here.

-
+	
 $bool = (($i < 7) && (($j < 8) || ($k == 4)));
-	
+

// But this one is even better, because it is easier on the eye but the intention is preserved

-
+	
 $bool = ($i < 7 && ($j < 8 || $k == 4));
-	
+ -

Quoting strings:

+

Quoting strings:

There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should always use single quotes unless you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.

Also, if you are using a string variable as part of a function call, you do not need to enclose that variable in quotes. Again, this will just make unnecessary work for the parser. Note, however, that nearly all of the escape sequences that exist for double-quoted strings will not work with single-quoted strings. Be careful, and feel free to break this guideline if it's making your code easier to read, examples:

// wrong

-
+	
 $str = "This is a really long string with no variables for the parser to find.";
 
 do_stuff("$str");
-	
+

// right

-
+	
 $str = 'This is a really long string with no variables for the parser to find.';
 
 do_stuff($str);
-	
+

// Sometimes single quotes are just not right

-
+	
 $post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
-	
+

// Double quotes are sometimes needed to not overcroud the line with concentinations

-
+	
 $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
-	
+

In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.

-

Associative array keys:

+

Associative array keys:

In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:

// wrong

-
+	
 $foo = $assoc_array[blah];
-	
+

// right

-
+	
 $foo = $assoc_array['blah'];
-	
+

// wrong

-
+	
 $foo = $assoc_array["$var"];
-	
+

// right

-
+	
 $foo = $assoc_array[$var];
-	
+ -

Comments:

+

Comments:

Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.

Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.

Avoid using /* */ comment blocks for one-line comments, // should be used for one/two-liners.

-

Magic numbers:

+

Magic numbers:

Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants true and false should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).

-

Shortcut operators:

+

Shortcut operators:

The only shortcut operators that cause readability problems are the shortcut increment $i++ and decrement $j-- operators. These operators should not be used as part of an expression. They can, however, be used on their own line. Using them in expressions is just not worth the headaches when debugging, examples:

// wrong

-
+	
 $array[++$i] = $j;
 $array[$i++] = $k;
-	
+

// right

-
+	
 $i++;
 $array[$i] = $j;
 
 $array[$i] = $k;
 $i++;
-	
+ -

Inline conditionals:

+

Inline conditionals:

Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:

// Bad place to use them

-
+	
 ($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);
-	
+

// OK place to use them

-
+	
 $min = ($i < $j) ? $i : $j;
-	
+ -

Don't use uninitialized variables.

+

Don't use uninitialized variables.

For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:

// Wrong

-
+	
 if ($forum) ...
-	
+

// Right

-
+	
 if (isset($forum)) ...
-	
+

// Also possible

-
+	
 if (isset($forum) && $forum == 5)
-	
+

The empty() function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of isset($array) && sizeof($array) > 0 - this can be written in a shorter way as !empty($array).

-

Switch statements:

+

Switch statements:

Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:

// Wrong

-
+	
 switch ($mode)
 {
 	case 'mode1':
@@ -654,10 +503,10 @@ switch ($mode)
 		// I am doing something completely different here
 		break;
 }
-	
+

// Good

-
+	
 switch ($mode)
 {
 	case 'mode1':
@@ -672,10 +521,10 @@ switch ($mode)
 		// Always assume that the case got not catched
 	break;
 }
-	
+

// Also good, if you have more code between the case and the break

-
+	
 switch ($mode)
 {
 	case 'mode1':
@@ -683,9 +532,9 @@ switch ($mode)
 		// I am doing something here
 
 	break;
-	
+
 	case 'mode2':
-	
+
 		// I am doing something completely different here
 
 	break;
@@ -696,18 +545,18 @@ switch ($mode)
 
 	break;
 }
-	
+

Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.

If no break is intended, please add a comment instead. An example:

// Example with no break

-
+	
 switch ($mode)
 {
 	case 'mode1':
-	
+
 		// I am doing something here
 
 	// no break here
@@ -724,95 +573,87 @@ switch ($mode)
 
 	break;
 }
-	
+ +

2.iii. SQL/SQL Layout

- - Top -

- - - 2.iii. SQL/SQL Layout -

-
- -

Common SQL Guidelines:

+

Common SQL Guidelines:

All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).

All SQL commands should utilise the DataBase Abstraction Layer (DBAL)

-

SQL code layout:

+

SQL code layout:

SQL Statements are often unreadable without some formatting, since they tend to be big at times. Though the formatting of sql statements adds a lot to the readability of code. SQL statements should be formatted in the following way, basically writing keywords:

-
-$sql = 'SELECT * 
-<-one tab->FROM ' . SOME_TABLE . ' 
-<-one tab->WHERE a = 1 
-<-two tabs->AND (b = 2 
-<-three tabs->OR b = 3) 
+	
+$sql = 'SELECT *
+<-one tab->FROM ' . SOME_TABLE . '
+<-one tab->WHERE a = 1
+<-two tabs->AND (b = 2
+<-three tabs->OR b = 3)
 <-one tab->ORDER BY b';
-	
+

Here the example with the tabs applied:

-
-$sql = 'SELECT * 
-	FROM ' . SOME_TABLE . ' 
-	WHERE a = 1 
-		AND (b = 2 
-			OR b = 3) 
+	
+$sql = 'SELECT *
+	FROM ' . SOME_TABLE . '
+	WHERE a = 1
+		AND (b = 2
+			OR b = 3)
 	ORDER BY b';
-	
+ -

SQL Quotes:

+

SQL Quotes:

Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples:

// These are wrong.

-
-"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b"; 
+	
+"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
 
-'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something; 
-	
+'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something; +

// These are right.

-
-'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b"; 
+	
+'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
 
-'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something"; 
-	
+'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something"; +

In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.

-

Avoid DB specific SQL:

+

Avoid DB specific SQL:

The "not equals operator", as defined by the SQL:2003 standard, is "<>"

// This is wrong.

-
-$sql = 'SELECT * 
-	FROM ' . SOME_TABLE . ' 
+	
+$sql = 'SELECT *
+	FROM ' . SOME_TABLE . '
 	WHERE a != 2';
-	
+

// This is right.

-
-$sql = 'SELECT * 
-	FROM ' . SOME_TABLE . ' 
-	WHERE a <> 2';
-	
+
+$sql = 'SELECT *
+	FROM ' . SOME_TABLE . '
+	WHERE a <> 2';
+	
-

Common DBAL methods:

+

Common DBAL methods:

-

sql_escape():

+

sql_escape():

Always use $db->sql_escape() if you need to check for a string within an SQL statement (even if you are sure the variable cannot contain single quotes - never trust your input), for example:

-
+	
 $sql = 'SELECT *
 	FROM ' . SOME_TABLE . "
 	WHERE username = '" . $db->sql_escape($username) . "'";
-	
+ -

sql_query_limit():

+

sql_query_limit():

We do not add limit statements to the sql query, but instead use $db->sql_query_limit(). You basically pass the query, the total number of lines to retrieve and the offset.

@@ -820,11 +661,11 @@ $sql = 'SELECT *

Make sure when using something like "SELECT x.*, y.jars" that there is not a column named jars in x; make sure that there is no overlap between an implicit column and the explicit columns.

-

sql_build_array():

+

sql_build_array():

-

If you need to UPDATE or INSERT data, make use of the $db->sql_build_array() function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - $sql_ary - or directly within the statement if one one or two variables needs to be inserted/updated. An example of an insert statement would be:

+

If you need to UPDATE or INSERT data, make use of the $db->sql_build_array() function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - $sql_ary - or directly within the statement if one or two variables needs to be inserted/updated. An example of an insert statement would be:

-
+	
 $sql_ary = array(
 	'somedata'		=> $my_string,
 	'otherdata'		=> $an_int,
@@ -832,80 +673,80 @@ $sql_ary = array(
 );
 
 $db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
-	
+

To complete the example, this is how an update statement would look like:

-
+	
 $sql_ary = array(
 	'somedata'		=> $my_string,
 	'otherdata'		=> $an_int,
 	'moredata'		=> $another_int
 );
 
-$sql = 'UPDATE ' . SOME_TABLE . ' 
+$sql = 'UPDATE ' . SOME_TABLE . '
 	SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
 	WHERE user_id = ' . (int) $user_id;
 $db->sql_query($sql);
-	
+

The $db->sql_build_array() function supports the following modes: INSERT (example above), INSERT_SELECT (building query for INSERT INTO table (...) SELECT value, column ... statements), MULTI_INSERT (for returning extended inserts), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

-

sql_in_set():

+

sql_in_set():

The $db->sql_in_set() function should be used for building IN () and NOT IN () constructs. Since (specifically) MySQL tend to be faster if for one value to be compared the = and <> operator is used, we let the DBAL decide what to do. A typical example of doing a positive match against a number of values would be:

-
+	
 $sql = 'SELECT *
 	FROM ' . FORUMS_TABLE . '
 	WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
 $db->sql_query($sql);
-	
+

Based on the number of values in $forum_ids, the query can look differently.

// SQL Statement if $forum_ids = array(1, 2, 3);

-
+	
 SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
-	
+

// SQL Statement if $forum_ids = array(1) or $forum_ids = 1

-
+	
 SELECT FROM phpbb_forums WHERE forum_id = 1
-	
+

Of course the same is possible for doing a negative match against a number of values:

-
+	
 $sql = 'SELECT *
 	FROM ' . FORUMS_TABLE . '
 	WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true);
 $db->sql_query($sql);
-	
+

Based on the number of values in $forum_ids, the query can look differently here too.

// SQL Statement if $forum_ids = array(1, 2, 3);

-
+	
 SELECT FROM phpbb_forums WHERE forum_id NOT IN (1, 2, 3)
-	
+

// SQL Statement if $forum_ids = array(1) or $forum_ids = 1

-
+	
 SELECT FROM phpbb_forums WHERE forum_id <> 1
-	
+

If the given array is empty, an error will be produced.

-

sql_build_query():

+

sql_build_query():

The $db->sql_build_query() function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:

-
+	
 $sql_array = array(
 	'SELECT'	=> 'f.*, ft.mark_time',
 
@@ -921,18 +762,18 @@ $sql_array = array(
 		)
 	),
 
-	'WHERE'		=> 'fw.user_id = ' . $user->data['user_id'] . ' 
+	'WHERE'		=> 'fw.user_id = ' . $user->data['user_id'] . '
 		AND f.forum_id = fw.forum_id',
 
 	'ORDER_BY'	=> 'left_id'
 );
 
 $sql = $db->sql_build_query('SELECT', $sql_array);
-	
+

The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:

-
+	
 $sql_array = array(
 	'SELECT'	=> 'f.*',
 
@@ -941,7 +782,7 @@ $sql_array = array(
 		FORUMS_TABLE		=> 'f'
 	),
 
-	'WHERE'		=> 'fw.user_id = ' . $user->data['user_id'] . ' 
+	'WHERE'		=> 'fw.user_id = ' . $user->data['user_id'] . '
 		AND f.forum_id = fw.forum_id',
 
 	'ORDER_BY'	=> 'left_id'
@@ -964,131 +805,135 @@ else
 }
 
 $sql = $db->sql_build_query('SELECT', $sql_array);
-	
+ - - Top -

+

2.iv. Optimizations

- - 2.iv. Optimizations -

-
- -

Operations in loop definition:

+

Operations in loop definition:

Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:

// On every iteration the sizeof function is called

-
+	
 for ($i = 0; $i < sizeof($post_data); $i++)
 {
 	do_something();
 }
-	
+

// You are able to assign the (not changing) result within the loop itself

-
+	
 for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
 {
 	do_something();
 }
-	
+ -

Use of in_array():

+

Use of in_array():

Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to isset($array[$var]) is a lot faster than in_array($var, array_keys($array)) for example.

- - Top -

+

2.v. General Guidelines

- 2.v. General Guidelines -

-
- -

General things:

+

General things:

Never trust user input (this also applies to server variables as well as cookies).

Try to sanitize values returned from a function.

Try to sanitize given function variables within your function.

The auth class should be used for all authorisation checking.

No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).

-

Variables:

+

Variables:

Make use of the request_var() function for anything except for submit or single checking params.

The request_var function determines the type to set from the second parameter (which determines the default value too). If you need to get a scalar variable type, you need to tell this the request_var function explicitly. Examples:

// Old method, do not use it

-
+	
 $start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
 $submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
-	
+

// Use request var and define a default variable (use the correct type)

-
+	
 $start = request_var('start', 0);
 $submit = (isset($_POST['submit'])) ? true : false;
-	
+

// $start is an int, the following use of request_var therefore is not allowed

-
+	
 $start = request_var('start', '0');
-	
+

// Getting an array, keys are integers, value defaults to 0

-
+	
 $mark_array = request_var('mark', array(0));
-	
+

// Getting an array, keys are strings, value defaults to 0

-
+	
 $action_ary = request_var('action', array('' => 0));
-	
+ -

Login checks/redirection:

+

Login checks/redirection:

To show a forum login box use login_forum_box($forum_data), else use the login_box() function.

The login_box() function can have a redirect as the first parameter. As a thumb of rule, specify an empty string if you want to redirect to the users current location, else do not add the $SID to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).

-

Sensitive Operations:

+

Sensitive Operations:

For sensitive operations always let the user confirm the action. For the confirmation screens, make use of the confirm_box() function.

-

Sessions:

+

Altering Operations:

+

For operations altering the state of the database, for instance posting, always verify the form token, unless you are already using confirm_box(). To do so, make use of the add_form_key() and check_form_key() functions.

+
+	add_form_key('my_form');
+
+	if ($submit)
+	{
+		if (!check_form_key('my_form'))
+		{
+			trigger_error('FORM_INVALID');
+		}
+	}
+	
+ +

The string passed to add_form_key() needs to match the string passed to check_form_key(). Another requirement for this to work correctly is that all forms include the {S_FORM_TOKEN} template variable.

+ + +

Sessions:

Sessions should be initiated on each page, as near the top as possible using the following code:

-
+	
 $user->session_begin();
 $auth->acl($user->data);
 $user->setup();
-	
+

The $user->setup() call can be used to pass on additional language definition and a custom style (used in viewforum).

-

Errors and messages:

+

Errors and messages:

All messages/errors should be outputed by calling trigger_error() using the appropriate message type and language string. Example:

-
+	
 trigger_error('NO_FORUM');
-	
+ -
+	
 trigger_error($user->lang['NO_FORUM']);
-	
+ -
+	
 trigger_error('NO_MODE', E_USER_ERROR);
-	
+ -

Url formatting

+

Url formatting

All urls pointing to internal files need to be prepended by the $phpbb_root_path variable. Within the administration control panel all urls pointing to internal files need to be prepended by the $phpbb_admin_path variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).

The append_sid() function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:

-
+	
 append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])
-	
+ -

General function usage:

+

General function usage:

Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistant over the code.

@@ -1110,16 +955,22 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; + + + + + - Top -

-
+
-

3. Styling

-
+

3. Styling

+
+
-

General things

+
+ +

General things

Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.

The outer table class forumline has gone and is replaced with tablebg.

@@ -1127,14 +978,14 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;

Each block level element should be indented by one tab, same for tabular elements, e.g. <tr> <td> etc., whereby the intendiation of <table> and the following/ending <tr> should be on the same line. This applies not to div elements of course.

Don't use <span> more than is essential ... the CSS is such that text sizes are dependent on the parent class. So writing <span class="gensmall"><span class="gensmall">TEST</span></span> will result in very very small text. Similarly don't use span at all if another element can contain the class definition, e.g.

-
+
 <td><span class="gensmall">TEST</span></td>
-
+

can just as well become:

-
+
 <td class="gensmall">TEST</td>
-
+

Try to match text class types with existing useage, e.g. don't use the nav class where viewtopic uses gensmall for example.

@@ -1153,99 +1004,105 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;

Try to keep template conditional and other statements tabbed in line with the block to which they refer.

this is correct

-
+
 <!-- BEGIN test -->
 	<tr>
 		<td>{test.TEXT}</td>
 	</tr>
 <!-- END test -->
-
+

this is also correct:

-
+
 <!-- BEGIN test -->
 <tr>
 	<td>{test.TEXT}</td>
 </tr>
 <!-- END test -->
-
+

it gives immediate feedback on exactly what is looping - decide which way to use based on the readability.

- -Top -

+ -
+ -

4. Templating

-
+
+ -

File naming

+
+ +

4. Templating

+
+
+ +
+ +

File naming

Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.

-

Variables

+

Variables

All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.

L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example {L_USERNAME} maps to $user->lang['USERNAME']. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Modifications.

-

Blocks/Loops

+

Blocks/Loops

The basic block level loop remains and takes the form:

-
+
 <!-- BEGIN loopname -->
 	markup, {loopname.X_YYYYY}, etc.
 <!-- END loopname -->
-
+

A bit later loops will be explained further. To not irretate you we will explain conditionals as well as other statements first.

-

Including files

+

Including files

Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:

-
+
 <!-- INCLUDE filename -->
-
+

You will note in the 3.0 templates the major sources start with <!-- INCLUDE overall_header.html --> or <!-- INCLUDE simple_header.html -->, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.

-

PHP

+

PHP

A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:

-
+
 <!-- PHP -->
 	echo "hello!";
 <!-- ENDPHP -->
-
+

You may also include PHP from an external file using:

-
+
 <!-- INCLUDEPHP somefile.php -->
-
+

it will be included and executed inline.

A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence www.phpbb.com will not make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).

-

Conditionals/Control structures

+

Conditionals/Control structures

The most significant addition to 3.0.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:

-
+
 <!-- IF expr -->
 	markup
 <!-- ENDIF -->
-
+

expr can take many forms, for example:

-
+
 <!-- IF loop.S_ROW_COUNT is even -->
 	markup
 <!-- ENDIF -->
-
+

This will output the markup if the S_ROW_COUNT variable in the current iteration of loop is an even value (i.e. the expr is TRUE). You can use various comparison methods (standard as well as equivalent textual versions noted in square brackets) including (not, or, and, eq, neq, is should be used if possible for better readability):

-
+
 == [eq]
 != [neq, ne]
 <> (same as !=)
@@ -1271,19 +1128,19 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
 & (bitwise and)
 ~ (bitwise not)
 is (can be used to join comparison operations)
-
+

Basic parenthesis can also be used to enforce good old BODMAS rules. Additionally some basic comparison types are defined:

-
+
 even
 odd
 div
-
+

Beyond the simple use of IF you can also do a sequence of comparisons using the following:

-
+
 <!-- IF expr1 -->
 	markup
 <!-- ELSEIF expr2 -->
@@ -1296,11 +1153,11 @@ div
 <!-- ELSE -->
 	markup
 <!-- ENDIF -->
-
+

Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match "everything else".

So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:

-
+
 <table>
 	<!-- IF loop.S_ROW_COUNT is even -->
 		<tr class="row1">
@@ -1310,11 +1167,11 @@ div
 	<td>HELLO!</td>
 </tr>
 </table>
-
+

This will cause the row cell to be output using class row1 when the row count is even, and class row2 otherwise. The S_ROW_COUNT parameter gets assigned to loops by default. Another example would be the following:

-
+
 <table>
 	<!-- IF loop.S_ROW_COUNT > 10 -->
 		<tr bgcolor="#FF0000">
@@ -1328,27 +1185,27 @@ div
 	<td>hello!</td>
 </tr>
 </table>
-
+

This will output the row cell in purple for the first two rows, blue for rows 2 to 5, green for rows 5 to 10 and red for remainder. So, you could produce a "nice" gradient effect, for example.

What else can you do? Well, you could use IF to do common checks on for example the login state of a user:

-
+
 <!-- IF S_USER_LOGGED_IN -->
 	markup
 <!-- ENDIF -->
-
+

This replaces the existing (fudged) method in 2.0.x using a zero length array and BEGIN/END.

-

Extended syntax for Blocks/Loops

+

Extended syntax for Blocks/Loops

Back to our loops - they had been extended with the following additions. Firstly you can set the start and end points of the loop. For example:

-
+
 <!-- BEGIN loopname(2) -->
 	markup
 <!-- END loopname -->
-
+

Will start the loop on the third entry (note that indexes start at zero). Extensions of this are:

@@ -1360,19 +1217,19 @@ div

A further extension to begin is BEGINELSE:

-
+
 <!-- BEGIN loop -->
 	markup
 <!-- BEGINELSE -->
 	markup
 <!-- END loop -->
-
+

This will cause the markup between BEGINELSE and END to be output if the loop contains no values. This is useful for forums with no topics (for example) ... in some ways it replaces "bits of" the existing "switch_" type control (the rest being replaced by conditionals).

Another way of checking if a loop contains values is by prefixing the loops name with a dot:

-
+
 <!-- IF .loop -->
 	<!-- BEGIN loop -->
 		markup
@@ -1380,11 +1237,11 @@ div
 <!-- ELSE -->
 	markup
 <!-- ENDIF -->
-
+

You are even able to check the number of items within a loop by comparing it with values within the IF condition:

-
+
 <!-- IF .loop > 2 -->
 	<!-- BEGIN loop -->
 		markup
@@ -1392,11 +1249,11 @@ div
 <!-- ELSE -->
 	markup
 <!-- ENDIF -->
-
+

Nesting loops cause the conditionals needing prefixed with all loops from the outer one to the inner most. An illustration of this:

-
+
 <!-- BEGIN firstloop -->
 	{firstloop.MY_VARIABLE_FROM_FIRSTLOOP}
 
@@ -1404,11 +1261,11 @@ div
 		{firstloop.secondloop.MY_VARIABLE_FROM_SECONDLOOP}
 	<!-- END secondloop -->
 <!-- END firstloop -->
-
+

Sometimes it is necessary to break out of nested loops to be able to call another loop within the current iteration. This sounds a little bit confusing and it is not used very often. The following (rather complex) example shows this quite good - it also shows how you test for the first and last row in a loop (i will explain the example in detail further down):

-
+
 <!-- BEGIN l_block1 -->
 	<!-- IF l_block1.S_SELECTED -->
 		<strong>{l_block1.L_TITLE}</strong>
@@ -1444,11 +1301,11 @@ div
 		<a class="nav" href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a>
 	<!-- ENDIF -->
 <!-- END l_block1 -->
-
+

Let us first concentrate on this part of the example:

-
+
 <!-- BEGIN l_block1 -->
 	<!-- IF l_block1.S_SELECTED -->
 		markup
@@ -1456,13 +1313,13 @@ div
 		<a class="nav" href="{l_block1.U_TITLE}">{l_block1.L_TITLE}</a>
 	<!-- ENDIF -->
 <!-- END l_block1 -->
-
+

Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see {l_block1.L_TITLE} referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.

Let's have a closer look to the markup:

-
+
 <!-- BEGIN l_block1 -->
 .
 .
@@ -1484,11 +1341,11 @@ div
 .
 .
 <!-- END l_block1 -->
-
+

The <!-- IF S_PRIVMSGS --> statement clearly checks a global variable and not one within the loop, since the loop is not given here. So, if S_PRIVMSGS is true we execute the shown markup. Now, you see the <!-- BEGIN !folder --> statement. The exclamation mark is responsible for instructing the template engine to iterate through the main loop folder. So, we are now within the loop folder - with <!-- BEGIN folder --> we would have been within the loop l_block1.folder automatically as is the case with l_block2:

-
+
 <!-- BEGIN l_block1 -->
 .
 .
@@ -1506,13 +1363,13 @@ div
 .
 .
 <!-- END l_block1 -->
-
+

You see the difference? The loop l_block2 is a member of the loop l_block1 but the loop folder is a main loop.

Now back to our folder loop:

-
+
 <!-- IF folder.S_FIRST_ROW -->
 	<ul class="nav">
 <!-- ENDIF -->
@@ -1522,21 +1379,21 @@ div
 <!-- IF folder.S_LAST_ROW -->
 	</ul>
 <!-- ENDIF -->
-
+

You may have wondered what the comparison to S_FIRST_ROW and S_LAST_ROW is about. If you haven't guessed already - it is checking for the first iteration of the loop with S_FIRST_ROW and the last iteration with S_LAST_ROW. This can come in handy quite often if you want to open or close design elements, like the above list. Let us imagine a folder loop build with three iterations, it would go this way:

-
+
 <ul class="nav"> <!-- written on first iteration -->
 	<li>first element</li> <!-- written on first iteration -->
 	<li>second element</li> <!-- written on second iteration -->
 	<li>third element</li> <!-- written on third iteration -->
 </ul> <!-- written on third iteration -->
-
+

As you can see, all three elements are written down as well as the markup for the first iteration and the last one. Sometimes you want to omit writing the general markup - for example:

-
+
 <!-- IF folder.S_FIRST_ROW -->
 	<ul class="nav">
 <!-- ELSEIF folder.S_LAST_ROW -->
@@ -1544,39 +1401,61 @@ div
 <!-- ELSE -->
 	<li><a href="{folder.U_FOLDER}">{folder.FOLDER_NAME}</a></li>
 <!-- ENDIF -->
-
+

would result in the following markup:

-
+
 <ul class="nav"> <!-- written on first iteration -->
 	<li>second element</li> <!-- written on second iteration -->
 </ul> <!-- written on third iteration -->
-
+

Just always remember that processing is taking place from up to down.

- -Top -

+

Forms

+

If a form is used for a non-trivial operation (i.e. more than a jumpbox), then it should include the {S_FORM_TOKEN} template variable.

+
+<form method="post" id="mcp" action="{U_POST_ACTION}">
 
-
+ <fieldset class="submit-buttons"> + <input type="reset" value="{L_RESET}" name="reset" class="button2" />  + <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> + </fieldset> + {S_FORM_TOKEN} +</form> +

+ -

5. Character Sets and Encodings

+ -
+
+ -

What are Unicode, UCS and UTF-8?

+
+ + + +

5. Character Sets and Encodings

+ +
+
+ +
+ + + +

What are Unicode, UCS and UTF-8?

The Universal Character Set (UCS) described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. Unicode - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the Unicode Consortium's website. One of the Unicode encodings is the 8-bit Unicode Transformation Format (UTF-8). It encodes characters with up to four bytes aiming for maximum compatability with the American Standard Code for Information Interchange which is a 7-bit encoding of a relatively small subset of the UCS.

-

phpBB's use of Unicode

+

phpBB's use of Unicode

Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in /includes/utf/utf_tools.php. They are also covered in the phpBB3 Sourcecode Documentation. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example explode still works as long as the first and the last character of the delimiter string are ASCII characters.

phpBB only uses the ASCII and the UTF-8 character encodings. Still all Strings are UTF-8 encoded because ASCII is a subset of UTF-8. The only exceptions to this rule are code sections which deal with external systems which use other encodings and character sets. Such external data should be converted to UTF-8 using the utf8_recode() function supplied with phpBB. It supports a variety of other character sets and encodings, a full list can be found below.

With request_var() you can either allow all UCS characters in user input or restrict user input to ASCII characters. This feature is controlled by the function's third parameter called $multibyte. You should allow multibyte characters in posts, PMs, topic titles, forum names, etc. but it's not necessary for internal uses like a $mode variable which should only hold a predefined list of ASCII strings anyway.

-
+
 // an input string containing a multibyte character
 $_REQUEST['multibyte_string'] = 'Käse';
 
@@ -1584,77 +1463,83 @@ $_REQUEST['multibyte_string'] = 'Käse';
 echo request_var('multibyte_string', '', true);
 // print request variable as ASCII string
 echo request_var('multibyte_string', '');
-
+

This code snippet will generate the following output:

-
+
 Käse
 K??se
-
+
-

Unicode Normalization

+

Unicode Normalization

If you retrieve user input with multibyte characters you should additionally normalize the string using utf8_normalize_nfc() before you work with it. This is necessary to make sure that equal characters can only occur in one particular binary representation. For example the character Å can be represented either as U+00C5 (LATIN CAPITAL LETTER A WITH RING ABOVE) or as U+212B (ANGSTROM SIGN). phpBB uses Normalization Form Canonical Composition (NFC) for all text. So the correct version of the above example would look like this:

-
+
 $_REQUEST['multibyte_string'] = 'Käse';
 
 // normalize multibyte strings
 echo utf8_normalize_nfc(request_var('multibyte_string', '', true));
 // ASCII strings do not need to be normalized
 echo request_var('multibyte_string', '');
-
+
-

Case Folding

+

Case Folding

Case insensitive comparison of strings is no longer possible with strtolower or strtoupper as some characters have multiple lower case or multiple upper case forms depending on their position in a word. The utf8_strtolower and the utf8_strtoupper functions suffer from the same problem so they can only be used to display upper/lower case versions of a string but they cannot be used for case insensitive comparisons either. So instead you should use case folding which gives you a case insensitive version of the string which can be used for case insensitive comparisons. An NFC normalized string can be case folded using utf8_case_fold_nfc().

// Bad - The strings might be the same even if strtolower differs

-
+
 if (strtolower($string1) == strtolower($string2))
 {
 	echo '$string1 and $string2 are equal or differ in case';
 }
-
+

// Good - Case folding is really case insensitive

-
+
 if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
 {
 	echo '$string1 and $string2 are equal or differ in case';
 }
-
+ -

Confusables Detection

+

Confusables Detection

phpBB offers a special method utf8_clean_string which can be used to make sure string identifiers are unique. This method uses Normalization Form Compatibility Composition (NFKC) instead of NFC and replaces similarly looking characters with a particular representative of the equivalence class. This method is currently used for usernames and group names to avoid confusion with similarly looking names.

- -Top -

+ -
+ -

6. Translation (i18n/L10n) Guidelines

+ + + +
+ +

6. Translation (i18n/L10n) Guidelines

- 6.i. Standardisation -

- -

Reason:

- +
+ +
+ +

6.i. Standardisation

+ +

Reason:

+

phpBB is one of the most translated open-source projects, with the current stable version being available in over 60 localisations. Whilst the ad hoc approach to the naming of language packs has worked, for phpBB3 and beyond we hope to make this process saner which will allow for better interoperation with current and future web browsers.

- -

Encoding:

- + +

Encoding:

+

With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), this removes the need to convert between encodings and improves the accessibility of multilingual forums.

The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must not contain a BOM for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.

-

Language Tag:

+

Language Tag:

The IETF recently published RFC 4646 for tags used to identify languages, which in combination with RFC 4647 obseletes the older RFC 3006 and older-still RFC 1766. RFC 4646 uses ISO 639-1/ISO 639-2, ISO 3166-1 alpha-2, ISO 15924 and UN M.49 to define a language tag. Each complete tag is composed of subtags which are not case sensitive and can also be empty.

@@ -1888,7 +1773,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) -

Macro-languages & Topolects:

+

Macro-languages & Topolects:

RFC 4646 anticipates features which shall be available in (currently draft) ISO 639-3 which aims to provide as complete enumeration of languages as possible, including living, extinct, ancient and constructed languages, whether majour, minor or unwritten. A new feature of ISO 639-3 compared to the previous two revisions is the concept of macrolanguages where Arabic and Chinese are two such examples. In such cases, their respective codes of ar and zh is very vague as to which dialect/topolect is used or perhaps some terse classical variant which may be difficult for all but very educated users. For such macrolanguages, it is recommended that the sub-language tag is used as a suffix to the macrolanguage tag, eg:

@@ -1930,17 +1815,11 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) -
- Top -

+

6.ii. Other considerations

- 6.ii. Other considerations -

-
+

Normalisation of language tags for phpBB:

-

Normalisation of language tags for phpBB:

- -

For phpBB, the language tags are not used in their raw form and instead converted to all lower-case and have the hyphen - replaced with an underscore _ where appropiate, with some examples below:

+

For phpBB, the language tags are not used in their raw form and instead converted to all lower-case and have the hyphen - replaced with an underscore _ where appropriate, with some examples below:

@@ -1980,16 +1859,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
Language tag normalisation examples
-

How to use iso.txt:

+

How to use iso.txt:

The iso.txt file is a small UTF-8 encoded plain-text file which consists of three lines:

-
+

… a clearer way to show explicit replacement ordering is to do:

- -
+
+	
 	...
 'PAGE_OF'	=>	'Page %1$s of %2$s',
 		/* Explicit ordering of the replacements,
 		even if they are the same order as English */
 	...
-	
- +
+

Why bother at all? Because some languages, the string transliterated back to English might read something like:

- -
+
+	
 	...
 'PAGE_OF'	=>	'Total of %2$s pages, currently on page %1$s',
 		/* Explicit ordering of the replacements,
 		reversed compared to English as the total comes first */
 	...
-	
- -
- Top -

+ + +

6.iii. Writing Style

+ +

Miscellaneous tips & hints:

- 6.iii. Writing Style -

-
- -

Miscellaneous tips & hints:

-

As the language files are PHP files, where the various strings for phpBB are stored within an array which in turn are used for display within an HTML page, rules of syntax for both must be considered. Potentially problematic characters are: ' (straight quote/apostrophe), " (straight double quote), < (less-than sign), > (greater-than sign) and & (ampersand).

- +

// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error

- -
+
+	
 	...
 'CONV_ERROR_NO_AVATAR_PATH'
 	=>	'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
 	...
-	
- +
+

// Good - Literal straight quotes should be escaped with a backslash, ie: \

- -
+
+	
 	...
 'CONV_ERROR_NO_AVATAR_PATH'
 	=>	'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
 	...
-	
- + +

However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:

- +

// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error

- -
+
+	
 	...
 'USE_PERMISSIONS'	=>	'Test out user's permissions',
 	...
-	
- + +

// Okay - However, non-programmers wouldn't type "user\'s" automatically

- -
+
+	
 	...
 'USE_PERMISSIONS'	=>	'Test out user\'s permissions',
 	...
-	
- + +

// Best - Use the Unicode Right-Single-Quotation-Mark character

- -
+
+	
 	...
 'USE_PERMISSIONS'	=>	'Test out user’s permissions',
 	...
-	
- + +

The " (straight double quote), < (less-than sign) and > (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:

- +

// Bad - Invalid HTML, as segments not part of elements are not entitised

- -
+
+	
 	...
 'FOO_BAR'	=>	'PHP version < 4.3.3.<br />
 	Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
 	...
-	
- + +

// Okay - No more invalid HTML, but "&quot;" is rather clumsy

- -
+
+	
 	...
 'FOO_BAR'	=>	'PHP version &lt; 4.3.3.<br />
 	Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.',
 	...
-	
- + +

// Best - No more invalid HTML, and usage of correct typographical quotation marks

- -
+
+	
 	...
 'FOO_BAR'	=>	'PHP version &lt; 4.3.3.<br />
 	Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
 	...
-	
- + +

Lastly, the & (ampersand) must always be entitised regardless of where it is used:

- +

// Bad - Invalid HTML, none of the ampersands are entitised

- -
+
+	
 	...
 'FOO_BAR'	=>	'<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
 	...
-	
- + +

// Good - Valid HTML, amperands are correctly entitised in all cases

- -
+
+	
 	...
 'FOO_BAR'	=>	'<a href="http://somedomain.tld/?foo=1&amp;bar=2">Foo &amp; Bar</a>.',
 	...
-	
- + +

As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see http://en.wikipedia.org/wiki/Unicode#Input_methods for more information.

-

Spelling, punctuation, grammar, et cetera:

+

Spelling, punctuation, grammar, et cetera:

The default language pack bundled with phpBB is British English using Cambridge University Press spelling and is assigned the language code en. The style and tone of writing tends towards formal and translations should emulate this style, at least for the variant using the most compact language code. Less formal translations or those with colloquialisms must be denoted as such via either an extension or privateuse tag within its language code.

+ + + + + -Top -

-
+
-

7. Guidelines Changelog

-
+

7. Guidelines Changelog

+
+
-

Revision 1.24

+
-
-Top -

+
-
+ -

8. Copyright and disclaimer

+
+
+ +
+ +

8. Copyright and disclaimer

+
+ +

This application is opensource software released under the GPL. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 phpBB Group, All Rights Reserved.

-
-Top +
+ + + +
+ - + + - '; - exit; - break; + + exit_handler(); + + break; case 'stop': $endtime = explode(' ', microtime()); @@ -774,13 +784,6 @@ class dbal } } -/** -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * This variable holds the class name to use later */ diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index 771592a02a..d23d1866c1 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -1,10 +1,10 @@ sql_query($query, $cache_ttl); + return $this->sql_query($query, $cache_ttl); } /** diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index f07d1adfe9..b222588cf2 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -1,10 +1,10 @@ query_result = false; @@ -234,7 +234,7 @@ class dbal_mssql extends dbal { foreach ($row as $key => $value) { - $row[$key] = ($value === ' ') ? '' : $value; + $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value; } } @@ -345,7 +345,7 @@ class dbal_mssql extends dbal } // Get full error message if possible - $sql = 'SELECT CAST(description as varchar(255)) as message + $sql = 'SELECT CAST(description as varchar(255)) as message FROM master.dbo.sysmessages WHERE error = ' . $error['code']; $result_id = @mssql_query($sql); diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index 72a424f46d..7722f79952 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -1,10 +1,10 @@ query_result = false; diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index b3be4f9bd9..2d689f86f9 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -1,10 +1,10 @@ query_result = false; diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php index 320171e852..32765d15f7 100644 --- a/phpBB/includes/db/mysqli.php +++ b/phpBB/includes/db/mysqli.php @@ -1,10 +1,10 @@ query_result = false; diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 18af5cbab0..a63c06e5c0 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -361,13 +361,13 @@ class dbal_oracle extends dbal /** * Build LIMIT query */ - function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0) + function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0) { - $this->query_result = false; + $this->query_result = false; $query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset; - return $this->sql_query($query, $cache_ttl); + return $this->sql_query($query, $cache_ttl); } /** diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index 340c32b37a..bb689a7394 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -1,10 +1,10 @@ query_result = false; + function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0) + { + $this->query_result = false; // if $total is set to 0 we do not want to limit the number of rows if ($total == 0) @@ -229,7 +229,7 @@ class dbal_postgres extends dbal $query .= "\n LIMIT $total OFFSET $offset"; - return $this->sql_query($query, $cache_ttl); + return $this->sql_query($query, $cache_ttl); } /** diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 3248b439c6..5ae36df4f5 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -1,10 +1,10 @@ query_result = false; + $this->query_result = false; // if $total is set to 0 we do not want to limit the number of rows if ($total == 0) @@ -153,7 +153,7 @@ class dbal_sqlite extends dbal $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total); - return $this->sql_query($query, $cache_ttl); + return $this->sql_query($query, $cache_ttl); } /** diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php index 0308297c4e..0b3d14dbda 100644 --- a/phpBB/includes/diff/diff.php +++ b/phpBB/includes/diff/diff.php @@ -1,14 +1,15 @@ * * @return diff A Diff object representing the inverse of the original diff. - * Note that we purposely don't return a reference here, since + * Note that we purposely don't return a reference here, since * this essentially is a clone() method. */ function reverse() diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php index c4802c2257..576839ea60 100644 --- a/phpBB/includes/diff/engine.php +++ b/phpBB/includes/diff/engine.php @@ -1,14 +1,15 @@ in 2004-2006 and placed in +* the public domain. +* +* There's absolutely no warranty. +* +* The homepage URL for this framework is: +* +* http://www.openwall.com/phpass/ +* +* Please be sure to update the Version line if you edit this file in any way. +* It is suggested that you leave the main version number intact, but indicate +* your project name (after the slash) and add your own revision information. +* +* Please do not change the "private" password hashing method implemented in +* here, thereby making your hashes incompatible. However, if you must, please +* change the hash type identifier (the "$P$") to something different. +* +* Obviously, since this code is in the public domain, the above are not +* requirements (there can be none), but merely suggestions. +* +* +* Hash the password */ -function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param) +function phpbb_hash($password) { - global $user; + $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - $sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); + $random_state = unique_id(); + $random = ''; + $count = 6; - // Check if the key is selectable. If not, we reset to the first key found. - // This ensures the values are always valid. - if (!isset($limit_days[$sort_days])) + if (($fh = @fopen('/dev/urandom', 'rb'))) { - @reset($limit_days); - $sort_days = key($limit_days); + $random = fread($fh, $count); + fclose($fh); } - if (!isset($sort_by_text[$sort_key])) + if (strlen($random) < $count) { - @reset($sort_by_text); - $sort_key = key($sort_by_text); + $random = ''; + + for ($i = 0; $i < $count; $i += 16) + { + $random_state = md5(unique_id() . $random_state); + $random .= pack('H*', md5($random_state)); + } + $random = substr($random, 0, $count); } - if (!isset($sort_dir_text[$sort_dir])) + $hash = _hash_crypt_private($password, _hash_gensalt_private($random, $itoa64), $itoa64); + + if (strlen($hash) == 34) { - @reset($sort_dir_text); - $sort_dir = key($sort_dir_text); + return $hash; } - $s_limit_days = ''; - - $s_sort_key = ''; - - $s_sort_dir = ''; - - $u_sort_param = "st=$sort_days&sk=$sort_key&sd=$sort_dir"; - - return; + return md5($password); } /** -* Generate Jumpbox +* Check for correct password */ -function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false) +function phpbb_check_hash($password, $hash) { - global $config, $auth, $template, $user, $db; - - if (!$config['load_jumpbox']) + $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + if (strlen($hash) == 34) { - return; + return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false; } - $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id - FROM ' . FORUMS_TABLE . ' - ORDER BY left_id ASC'; - $result = $db->sql_query($sql, 600); - - $right = $padding = 0; - $padding_store = array('0' => 0); - $display_jumpbox = false; - $iteration = 0; - - // Sometimes it could happen that forums will be displayed here not be displayed within the index page - // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions. - // If this happens, the padding could be "broken" - - while ($row = $db->sql_fetchrow($result)) - { - if ($row['left_id'] < $right) - { - $padding++; - $padding_store[$row['parent_id']] = $padding; - } - else if ($row['left_id'] > $right + 1) - { - // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. - // @todo digging deep to find out "how" this can happen. - $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; - } - - $right = $row['right_id']; - - if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id'])) - { - // Non-postable forum with no subforums, don't display - continue; - } - - if (!$auth->acl_get('f_list', $row['forum_id'])) - { - // if the user does not have permissions to list this forum skip - continue; - } - - if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id'])) - { - continue; - } - - if (!$display_jumpbox) - { - $template->assign_block_vars('jumpbox_forums', array( - 'FORUM_ID' => ($select_all) ? 0 : -1, - 'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'], - 'S_FORUM_COUNT' => $iteration) - ); - - $iteration++; - $display_jumpbox = true; - } - - $template->assign_block_vars('jumpbox_forums', array( - 'FORUM_ID' => $row['forum_id'], - 'FORUM_NAME' => $row['forum_name'], - 'SELECTED' => ($row['forum_id'] == $forum_id) ? ' selected="selected"' : '', - 'S_FORUM_COUNT' => $iteration, - 'S_IS_CAT' => ($row['forum_type'] == FORUM_CAT) ? true : false, - 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false, - 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false) - ); - - for ($i = 0; $i < $padding; $i++) - { - $template->assign_block_vars('jumpbox_forums.level', array()); - } - $iteration++; - } - $db->sql_freeresult($result); - unset($padding_store); - - $template->assign_vars(array( - 'S_DISPLAY_JUMPBOX' => $display_jumpbox, - 'S_JUMPBOX_ACTION' => $action) - ); - - return; + return (md5($password) === $hash) ? true : false; } +/** +* Generate salt for hash generation +*/ +function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6) +{ + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + { + $iteration_count_log2 = 8; + } + + $output = '$H$'; + $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)]; + $output .= _hash_encode64($input, 6, $itoa64); + + return $output; +} + +/** +* Encode hash +*/ +function _hash_encode64($input, $count, &$itoa64) +{ + $output = ''; + $i = 0; + + do + { + $value = ord($input[$i++]); + $output .= $itoa64[$value & 0x3f]; + + if ($i < $count) + { + $value |= ord($input[$i]) << 8; + } + + $output .= $itoa64[($value >> 6) & 0x3f]; + + if ($i++ >= $count) + { + break; + } + + if ($i < $count) + { + $value |= ord($input[$i]) << 16; + } + + $output .= $itoa64[($value >> 12) & 0x3f]; + + if ($i++ >= $count) + { + break; + } + + $output .= $itoa64[($value >> 18) & 0x3f]; + } + while ($i < $count); + + return $output; +} + +/** +* The crypt function/replacement +*/ +function _hash_crypt_private($password, $setting, &$itoa64) +{ + $output = '*'; + + // Check for correct hash + if (substr($setting, 0, 3) != '$H$') + { + return $output; + } + + $count_log2 = strpos($itoa64, $setting[3]); + + if ($count_log2 < 7 || $count_log2 > 30) + { + return $output; + } + + $count = 1 << $count_log2; + $salt = substr($setting, 4, 8); + + if (strlen($salt) != 8) + { + return $output; + } + + /** + * We're kind of forced to use MD5 here since it's the only + * cryptographic primitive available in all versions of PHP + * currently in use. To implement our own low-level crypto + * in PHP would result in much worse performance and + * consequently in lower iteration counts and hashes that are + * quicker to crack (by non-PHP code). + */ + if (PHP_VERSION >= 5) + { + $hash = md5($salt . $password, true); + do + { + $hash = md5($hash . $password, true); + } + while (--$count); + } + else + { + $hash = pack('H*', md5($salt . $password)); + do + { + $hash = pack('H*', md5($hash . $password)); + } + while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= _hash_encode64($hash, 16, $itoa64); + + return $output; +} // Compatibility functions @@ -426,7 +478,7 @@ if (!function_exists('str_split')) * the returned array will be broken down into chunks with each being split_length in length, * otherwise each chunk will be one character in length. FALSE is returned if split_length is * less than 1. If the split_length length exceeds the length of string, the entire string is - * returned as the first (and only) array element. + * returned as the first (and only) array element. */ function str_split($string, $split_length = 1) { @@ -457,7 +509,7 @@ if (!function_exists('stripos')) * * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive. * Note that the needle may be a string of one or more characters. - * If needle is not found, stripos() will return boolean FALSE. + * If needle is not found, stripos() will return boolean FALSE. */ function stripos($haystack, $needle) { @@ -472,184 +524,166 @@ if (!function_exists('stripos')) if (!function_exists('realpath')) { - if (DIRECTORY_SEPARATOR != '\\' && !(bool) ini_get('safe_mode') && function_exists('shell_exec') && trim(`realpath .`)) + /** + * Checks if a path ($path) is absolute or relative + * + * @param string $path Path to check absoluteness of + * @return boolean + */ + function is_absolute($path) { - /** - * @author Chris Smith - * @copyright 2006 Project Minerva Team - * @param string $path The path which we should attempt to resolve. - * @return mixed - * @ignore - */ - function phpbb_realpath($path) - { - $arg = escapeshellarg($path); - return trim(`realpath '$arg'`); - } + return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:/#i', $path))) ? true : false; } - else + + /** + * @author Chris Smith + * @copyright 2006 Project Minerva Team + * @param string $path The path which we should attempt to resolve. + * @return mixed + */ + function phpbb_realpath($path) { - /** - * Checks if a path ($path) is absolute or relative - * - * @param string $path Path to check absoluteness of - * @return boolean - */ - function is_absolute($path) + // Now to perform funky shizzle + + // Switch to use UNIX slashes + $path = str_replace(DIRECTORY_SEPARATOR, '/', $path); + $path_prefix = ''; + + // Determine what sort of path we have + if (is_absolute($path)) { - return ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\' && preg_match('#^[a-z]:/#i', $path))) ? true : false; - } + $absolute = true; - /** - * @author Chris Smith - * @copyright 2006 Project Minerva Team - * @param string $path The path which we should attempt to resolve. - * @return mixed - */ - function phpbb_realpath($path) - { - // Now to perform funky shizzle - - // Switch to use UNIX slashes - $path = str_replace(DIRECTORY_SEPARATOR, '/', $path); - $path_prefix = ''; - - // Determine what sort of path we have - if (is_absolute($path)) + if ($path[0] == '/') { + // Absolute path, *NIX style + $path_prefix = ''; + } + else + { + // Absolute path, Windows style + // Remove the drive letter and colon + $path_prefix = $path[0] . ':'; + $path = substr($path, 2); + } + } + else + { + // Relative Path + // Prepend the current working directory + if (function_exists('getcwd')) + { + // This is the best method, hopefully it is enabled! + $path = str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . '/' . $path; $absolute = true; - - if ($path[0] == '/') + if (preg_match('#^[a-z]:#i', $path)) { - // Absolute path, *NIX style - $path_prefix = ''; + $path_prefix = $path[0] . ':'; + $path = substr($path, 2); } else { - // Absolute path, Windows style - // Remove the drive letter and colon - $path_prefix = $path[0] . ':'; - $path = substr($path, 2); + $path_prefix = ''; + } + } + else if (isset($_SERVER['SCRIPT_FILENAME']) && !empty($_SERVER['SCRIPT_FILENAME'])) + { + // Warning: If chdir() has been used this will lie! + // Warning: This has some problems sometime (CLI can create them easily) + $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/' . $path; + $absolute = true; + $path_prefix = ''; + } + else + { + // We have no way of getting the absolute path, just run on using relative ones. + $absolute = false; + $path_prefix = '.'; + } + } + + // Remove any repeated slashes + $path = preg_replace('#/{2,}#', '/', $path); + + // Remove the slashes from the start and end of the path + $path = trim($path, '/'); + + // Break the string into little bits for us to nibble on + $bits = explode('/', $path); + + // Remove any . in the path, renumber array for the loop below + $bits = array_values(array_diff($bits, array('.'))); + + // Lets get looping, run over and resolve any .. (up directory) + for ($i = 0, $max = sizeof($bits); $i < $max; $i++) + { + // @todo Optimise + if ($bits[$i] == '..' ) + { + if (isset($bits[$i - 1])) + { + if ($bits[$i - 1] != '..') + { + // We found a .. and we are able to traverse upwards, lets do it! + unset($bits[$i]); + unset($bits[$i - 1]); + $i -= 2; + $max -= 2; + $bits = array_values($bits); + } + } + else if ($absolute) // ie. !isset($bits[$i - 1]) && $absolute + { + // We have an absolute path trying to descend above the root of the filesystem + // ... Error! + return false; + } + } + } + + // Prepend the path prefix + array_unshift($bits, $path_prefix); + + $resolved = ''; + + $max = sizeof($bits) - 1; + + // Check if we are able to resolve symlinks, Windows cannot. + $symlink_resolve = (function_exists('readlink')) ? true : false; + + foreach ($bits as $i => $bit) + { + if (@is_dir("$resolved/$bit") || ($i == $max && @is_file("$resolved/$bit"))) + { + // Path Exists + if ($symlink_resolve && is_link("$resolved/$bit") && ($link = readlink("$resolved/$bit"))) + { + // Resolved a symlink. + $resolved = $link . (($i == $max) ? '' : '/'); + continue; } } else { - // Relative Path - // Prepend the current working directory - if (function_exists('getcwd')) - { - // This is the best method, hopefully it is enabled! - $path = str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . '/' . $path; - $absolute = true; - if (preg_match('#^[a-z]:#i', $path)) - { - $path_prefix = $path[0] . ':'; - $path = substr($path, 2); - } - else - { - $path_prefix = ''; - } - } - else if (isset($_SERVER['SCRIPT_FILENAME']) && !empty($_SERVER['SCRIPT_FILENAME'])) - { - // Warning: If chdir() has been used this will lie! - // Warning: This has some problems sometime (CLI can create them easily) - $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/' . $path; - $absolute = true; - $path_prefix = ''; - } - else - { - // We have no way of getting the absolute path, just run on using relative ones. - $absolute = false; - $path_prefix = '.'; - } + // Something doesn't exist here! + // This is correct realpath() behaviour but sadly open_basedir and safe_mode make this problematic + // return false; } - - // Remove any repeated slashes - $path = preg_replace('#/{2,}#', '/', $path); - - // Remove the slashes from the start and end of the path - $path = trim($path, '/'); - - // Break the string into little bits for us to nibble on - $bits = explode('/', $path); - - // Remove any . in the path, renumber array for the loop below - $bits = array_values(array_diff($bits, array('.'))); - - // Lets get looping, run over and resolve any .. (up directory) - for ($i = 0, $max = sizeof($bits); $i < $max; $i++) - { - // @todo Optimise - if ($bits[$i] == '..' ) - { - if (isset($bits[$i - 1])) - { - if ($bits[$i - 1] != '..') - { - // We found a .. and we are able to traverse upwards, lets do it! - unset($bits[$i]); - unset($bits[$i - 1]); - $i -= 2; - $max -= 2; - $bits = array_values($bits); - } - } - else if ($absolute) // ie. !isset($bits[$i - 1]) && $absolute - { - // We have an absolute path trying to descend above the root of the filesystem - // ... Error! - return false; - } - } - } - - // Prepend the path prefix - array_unshift($bits, $path_prefix); - - $resolved = ''; - - $max = sizeof($bits) - 1; - - // Check if we are able to resolve symlinks, Windows cannot. - $symlink_resolve = (function_exists('readlink')) ? true : false; - - foreach ($bits as $i => $bit) - { - if (@is_dir("$resolved/$bit") || ($i == $max && @is_file("$resolved/$bit"))) - { - // Path Exists - if ($symlink_resolve && is_link("$resolved/$bit") && ($link = readlink("$resolved/$bit"))) - { - // Resolved a symlink. - $resolved = $link . (($i == $max) ? '' : '/'); - continue; - } - } - else - { - // Something doesn't exist here! - // This is correct realpath() behaviour but sadly open_basedir and safe_mode make this problematic - // return false; - } - $resolved .= $bit . (($i == $max) ? '' : '/'); - } - - // @todo If the file exists fine and open_basedir only has one path we should be able to prepend it - // because we must be inside that basedir, the question is where... - // @internal The slash in is_dir() gets around an open_basedir restriction - if (!@file_exists($resolved) || (!is_dir($resolved . '/') && !is_file($resolved))) - { - return false; - } - - // Put the slashes back to the native operating systems slashes - $resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved); - - return $resolved; // We got here, in the end! + $resolved .= $bit . (($i == $max) ? '' : '/'); } + + // @todo If the file exists fine and open_basedir only has one path we should be able to prepend it + // because we must be inside that basedir, the question is where... + // @internal The slash in is_dir() gets around an open_basedir restriction + if (!@file_exists($resolved) || (!is_dir($resolved . '/') && !is_file($resolved))) + { + return false; + } + + // Put the slashes back to the native operating systems slashes + $resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved); + + return $resolved; // We got here, in the end! } } else @@ -701,7 +735,7 @@ function language_select($default = '') return $lang_options; } -/** +/** * Pick a template/theme combo, */ function style_select($default = '', $all = false) @@ -815,7 +849,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ if ($config['load_db_lastread'] && $user->data['is_registered']) { - $sql = 'DELETE FROM ' . TOPICS_TRACK_TABLE . " + $sql = 'DELETE FROM ' . TOPICS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']} AND " . $db->sql_in_set('forum_id', $forum_id); $db->sql_query($sql); @@ -1133,10 +1167,10 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis if (sizeof($topic_ids)) { - $sql = 'SELECT forum_id, mark_time + $sql = 'SELECT forum_id, mark_time FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']} - AND forum_id " . + AND forum_id " . (($global_announce_list && sizeof($global_announce_list)) ? "IN (0, $forum_id)" : "= $forum_id"); $result = $db->sql_query($sql); @@ -1518,7 +1552,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add if ($add_prevnext_text) { - if ($on_page != 1) + if ($on_page != 1) { $page_string = '' . $user->lang['PREVIOUS'] . '  ' . $page_string; } @@ -1530,13 +1564,14 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add } $template->assign_vars(array( - $tpl_prefix . 'BASE_URL' => $base_url, - $tpl_prefix . 'PER_PAGE' => $per_page, + $tpl_prefix . 'BASE_URL' => $base_url, + 'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url), + $tpl_prefix . 'PER_PAGE' => $per_page, $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page), $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page), - $tpl_prefix . 'TOTAL_PAGES' => $total_pages) - ); + $tpl_prefix . 'TOTAL_PAGES' => $total_pages, + )); return $page_string; } @@ -1563,7 +1598,8 @@ function on_page($num_items, $per_page, $start) // Server functions (building urls, redirecting...) /** -* Append session id to url +* Append session id to url. +* This function supports hooks. * * @param string $url The url the session id needs to be appended to (can have params) * @param mixed $params String or array of additional url parameters @@ -1577,16 +1613,20 @@ function on_page($num_items, $per_page, $start) * append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false); * append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2)); * +* */ function append_sid($url, $params = false, $is_amp = true, $session_id = false) { - global $_SID, $_EXTRA_URL; + global $_SID, $_EXTRA_URL, $phpbb_hook; // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly. // They could mimick most of what is within this function - if (function_exists('append_sid_phpbb_hook')) + if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id)) { - return append_sid_phpbb_hook($url, $params, $is_amp, $session_id); + if ($phpbb_hook->hook_return(__FUNCTION__)) + { + return $phpbb_hook->hook_return_result(__FUNCTION__); + } } // Assign sid if session id is not specified @@ -1657,8 +1697,8 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false) } /** -* Generate board url (example: http://www.foo.bar/phpBB) -* @param bool $without_script_path if set to true the script path gets not appended (example: http://www.foo.bar) +* Generate board url (example: http://www.example.com/phpBB) +* @param bool $without_script_path if set to true the script path gets not appended (example: http://www.example.com) */ function generate_board_url($without_script_path = false) { @@ -1810,6 +1850,15 @@ function redirect($url, $return = false) trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR); } + // Now, also check the protocol and for a valid url the last time... + $allowed_protocols = array('http', 'https', 'ftp', 'ftps'); + $url_parts = parse_url($url); + + if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols)) + { + trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR); + } + if ($return) { return $url; @@ -1881,8 +1930,7 @@ function build_url($strip_vars = false) global $user, $phpbb_root_path; // Append SID - $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? "?{$user->page['query_string']}" : ''); - $redirect = append_sid($redirect, false, false); + $redirect = append_sid($user->page['page'], false, false); // Add delimiter if not there... if (strpos($redirect, '?') === false) @@ -1950,13 +1998,81 @@ function meta_refresh($time, $url) ); } +//Form validation + +/** +* Add a secret token to the form (requires the S_FORM_TOKEN template variable) +* @param string $form_name The name of the form; has to match the name used in check_form_key, otherwise no restrictions apply +*/ +function add_form_key($form_name) +{ + global $config, $template, $user; + $now = time(); + $token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : ''; + $token = sha1($now . $user->data['user_form_salt'] . $form_name . $token_sid); + + $s_fields = build_hidden_fields(array( + 'creation_time' => $now, + 'form_token' => $token, + )); + $template->assign_vars(array( + 'S_FORM_TOKEN' => $s_fields, + )); +} + +/** +* Check the form key. Required for all altering actions not secured by confirm_box +* @param string $form_name The name of the form; has to match the name used in add_form_key, otherwise no restrictions apply +* @param int $timespan The maximum acceptable age for a submitted form in seconds. Defaults to the config setting. +* @param string $return_page The address for the return link +* @param bool $trigger If true, the function will triger an error when encountering an invalid form +* @param int $minimum_time The minimum acceptable age for a submitted form in seconds +*/ +function check_form_key($form_name, $timespan = false, $return_page = '', $trigger = false, $minimum_time = false) +{ + global $config, $user; + + if ($timespan === false) + { + $timespan = $config['form_token_lifetime']; + } + if ($minimum_time === false) + { + $minimum_time = $config['form_token_mintime']; + } + + if (isset($_POST['creation_time']) && isset($_POST['form_token'])) + { + $creation_time = abs(request_var('creation_time', 0)); + $token = request_var('form_token', ''); + + $diff = (time() - $creation_time); + + if (($diff >= $minimum_time) && (($diff <= $timespan) || $timespan == -1)) + { + $token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : ''; + + $key = sha1($creation_time . $user->data['user_form_salt'] . $form_name . $token_sid); + if ($key === $token) + { + return true; + } + } + } + if ($trigger) + { + trigger_error($user->lang['FORM_INVALID'] . $return_page); + } + return false; +} + // Message/Login boxes /** * Build Confirm box * @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box * @param string $title Title/Message used for confirm box. -* message text is _CONFIRM appended to title. +* message text is _CONFIRM appended to title. * If title cannot be found in user->lang a default one is displayed * If title_CONFIRM cannot be found in user->lang the text given is used. * @param string $hidden Hidden variables @@ -2092,8 +2208,28 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa if (isset($_POST['login'])) { + // Get credential + if ($admin) + { + $credential = request_var('credential', ''); + + if (strspn($credential, 'abcdef0123456789') !== strlen($credential) || strlen($credential) != 32) + { + if ($user->data['is_registered']) + { + add_log('admin', 'LOG_ADMIN_AUTH_FAIL'); + } + trigger_error('NO_AUTH_ADMIN'); + } + + $password = request_var('password_' . $credential, '', true); + } + else + { + $password = request_var('password', '', true); + } + $username = request_var('username', '', true); - $password = request_var('password', '', true); $autologin = (!empty($_POST['autologin'])) ? true : false; $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1; $admin = ($admin) ? 1 : 0; @@ -2107,17 +2243,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa trigger_error('NO_AUTH_ADMIN_USER_DIFFER'); } - // do not allow empty password - if (!$password) - { - trigger_error('NO_PASSWORD_SUPPLIED'); - } - // If authentication is successful we redirect user to previous page $result = $auth->login($username, $password, $autologin, $viewonline, $admin); // If admin authentication and login, we will log if it was a success or not... - // We also break the operation on the first non-success login - it could be argued that the user already knows + // We also break the operation on the first non-success login - it could be argued that the user already knows if ($admin) { if ($result['status'] == LOGIN_SUCCESS) @@ -2238,7 +2368,20 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $redirect .= $user->page['page_name'] . (($user->page['query_string']) ? '?' . htmlspecialchars($user->page['query_string']) : ''); } - $s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id)); + // Assign credential for username/password pair + $credential = ($admin) ? md5(unique_id()) : false; + + $s_hidden_fields = array( + 'redirect' => $redirect, + 'sid' => $user->session_id, + ); + + if ($admin) + { + $s_hidden_fields['credential'] = $credential; + } + + $s_hidden_fields = build_hidden_fields($s_hidden_fields); $template->assign_vars(array( 'LOGIN_ERROR' => $err, @@ -2254,8 +2397,11 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, - 'USERNAME' => ($admin) ? $user->data['username'] : '') - ); + 'USERNAME' => ($admin) ? $user->data['username'] : '', + + 'USERNAME_CREDENTIAL' => 'username', + 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', + )); page_header($user->lang['LOGIN']); @@ -2315,7 +2461,7 @@ function login_forum_box($forum_data) } $db->sql_freeresult($result); - if ($password == $forum_data['forum_password']) + if (phpbb_check_hash($password, $forum_data['forum_password'])) { $sql_ary = array( 'forum_id' => (int) $forum_data['forum_id'], @@ -2344,856 +2490,6 @@ function login_forum_box($forum_data) page_footer(); } -// Content related functions - -/** -* Bump Topic Check - used by posting and viewtopic -*/ -function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster) -{ - global $config, $auth, $user; - - // Check permission and make sure the last post was not already bumped - if (!$auth->acl_get('f_bump', $forum_id) || $topic_bumped) - { - return false; - } - - // Check bump time range, is the user really allowed to bump the topic at this time? - $bump_time = ($config['bump_type'] == 'm') ? $config['bump_interval'] * 60 : (($config['bump_type'] == 'h') ? $config['bump_interval'] * 3600 : $config['bump_interval'] * 86400); - - // Check bump time - if ($last_post_time + $bump_time > time()) - { - return false; - } - - // Check bumper, only topic poster and last poster are allowed to bump - if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id']) - { - return false; - } - - // A bump time of 0 will completely disable the bump feature... not intended but might be useful. - return $bump_time; -} - -/** -* Generates a text with approx. the specified length which contains the specified words and their context -* -* @param string $text The full text from which context shall be extracted -* @param string $words An array of words which should be contained in the result, has to be a valid part of a PCRE pattern (escape with preg_quote!) -* @param int $length The desired length of the resulting text, however the result might be shorter or longer than this value -* -* @return string Context of the specified words separated by "..." -*/ -function get_context($text, $words, $length = 400) -{ - // first replace all whitespaces with single spaces - $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text); - - $word_indizes = array(); - if (sizeof($words)) - { - $match = ''; - // find the starting indizes of all words - foreach ($words as $word) - { - if ($word) - { - if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) - { - $pos = utf8_strpos($text, $match[1]); - if ($pos !== false) - { - $word_indizes[] = $pos; - } - } - } - } - unset($match); - - if (sizeof($word_indizes)) - { - $word_indizes = array_unique($word_indizes); - sort($word_indizes); - - $wordnum = sizeof($word_indizes); - // number of characters on the right and left side of each word - $sequence_length = (int) ($length / (2 * $wordnum)) - 2; - $final_text = ''; - $word = $j = 0; - $final_text_index = -1; - - // cycle through every character in the original text - for ($i = $word_indizes[$word], $n = utf8_strlen($text); $i < $n; $i++) - { - // if the current position is the start of one of the words then append $sequence_length characters to the final text - if (isset($word_indizes[$word]) && ($i == $word_indizes[$word])) - { - if ($final_text_index < $i - $sequence_length - 1) - { - $final_text .= '... ' . preg_replace('#^([^ ]*)#', '', utf8_substr($text, $i - $sequence_length, $sequence_length)); - } - else - { - // if the final text is already nearer to the current word than $sequence_length we only append the text - // from its current index on and distribute the unused length to all other sequenes - $sequence_length += (int) (($final_text_index - $i + $sequence_length + 1) / (2 * $wordnum)); - $final_text .= utf8_substr($text, $final_text_index + 1, $i - $final_text_index - 1); - } - $final_text_index = $i - 1; - - // add the following characters to the final text (see below) - $word++; - $j = 1; - } - - if ($j > 0) - { - // add the character to the final text and increment the sequence counter - $final_text .= utf8_substr($text, $i, 1); - $final_text_index++; - $j++; - - // if this is a whitespace then check whether we are done with this sequence - if (utf8_substr($text, $i, 1) == ' ') - { - // only check whether we have to exit the context generation completely if we haven't already reached the end anyway - if ($i + 4 < $n) - { - if (($j > $sequence_length && $word >= $wordnum) || utf8_strlen($final_text) > $length) - { - $final_text .= ' ...'; - break; - } - } - else - { - // make sure the text really reaches the end - $j -= 4; - } - - // stop context generation and wait for the next word - if ($j > $sequence_length) - { - $j = 0; - } - } - } - } - return $final_text; - } - } - - if (!sizeof($words) || !sizeof($word_indizes)) - { - return (utf8_strlen($text) >= $length + 3) ? utf8_substr($text, 0, $length) . '...' : $text; - } -} - -/** -* Decode text whereby text is coming from the db and expected to be pre-parsed content -* We are placing this outside of the message parser because we are often in need of it... -*/ -function decode_message(&$message, $bbcode_uid = '') -{ - global $config; - - if ($bbcode_uid) - { - $match = array('
', "[/*:m:$bbcode_uid]", ":u:$bbcode_uid", ":o:$bbcode_uid", ":$bbcode_uid"); - $replace = array("\n", '', '', '', ''); - } - else - { - $match = array('
'); - $replace = array("\n"); - } - - $message = str_replace($match, $replace, $message); - - $match = get_preg_expression('bbcode_htm'); - $replace = array('\1', '\1', '\2', '\1', '', ''); - - $message = preg_replace($match, $replace, $message); -} - -/** -* Strips all bbcode from a text and returns the plain content -*/ -function strip_bbcode(&$text, $uid = '') -{ - if (!$uid) - { - $uid = '[0-9a-z]{5,}'; - } - - $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:".*"|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text); - - $match = get_preg_expression('bbcode_htm'); - $replace = array('\1', '\1', '\2', '\1', '', ''); - - $text = preg_replace($match, $replace, $text); -} - -/** -* For display of custom parsed text on user-facing pages -* Expects $text to be the value directly from the database (stored value) -*/ -function generate_text_for_display($text, $uid, $bitfield, $flags) -{ - static $bbcode; - - if (!$text) - { - return ''; - } - - $text = censor_text($text); - - // Parse bbcode if bbcode uid stored and bbcode enabled - if ($uid && ($flags & OPTION_FLAG_BBCODE)) - { - if (!class_exists('bbcode')) - { - global $phpbb_root_path, $phpEx; - include($phpbb_root_path . 'includes/bbcode.' . $phpEx); - } - - if (empty($bbcode)) - { - $bbcode = new bbcode($bitfield); - } - else - { - $bbcode->bbcode($bitfield); - } - - $bbcode->bbcode_second_pass($text, $uid); - } - - $text = bbcode_nl2br($text); - $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES)); - - return $text; -} - -/** -* For parsing custom parsed text to be stored within the database. -* This function additionally returns the uid and bitfield that needs to be stored. -* Expects $text to be the value directly from request_var() and in it's non-parsed form -*/ -function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false) -{ - global $phpbb_root_path, $phpEx; - - $uid = $bitfield = ''; - - if (!$text) - { - return; - } - - if (!class_exists('parse_message')) - { - include($phpbb_root_path . 'includes/message_parser.' . $phpEx); - } - - $message_parser = new parse_message($text); - $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies); - - $text = $message_parser->message; - $uid = $message_parser->bbcode_uid; - - // If the bbcode_bitfield is empty, there is no need for the uid to be stored. - if (!$message_parser->bbcode_bitfield) - { - $uid = ''; - } - - $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0); - $bitfield = $message_parser->bbcode_bitfield; - - return; -} - -/** -* For decoding custom parsed text for edits as well as extracting the flags -* Expects $text to be the value directly from the database (pre-parsed content) -*/ -function generate_text_for_edit($text, $uid, $flags) -{ - global $phpbb_root_path, $phpEx; - - decode_message($text, $uid); - - return array( - 'allow_bbcode' => ($flags & OPTION_FLAG_BBCODE) ? 1 : 0, - 'allow_smilies' => ($flags & OPTION_FLAG_SMILIES) ? 1 : 0, - 'allow_urls' => ($flags & OPTION_FLAG_LINKS) ? 1 : 0, - 'text' => $text - ); -} - -/** -* A subroutine of make_clickable used with preg_replace -* It places correct HTML around an url, shortens the displayed text -* and makes sure no entities are inside URLs -*/ -function make_clickable_callback($type, $whitespace, $url, $relative_url, $class) -{ - $append = ''; - $url = htmlspecialchars_decode($url); - $relative_url = htmlspecialchars_decode($relative_url); - - // make sure no HTML entities were matched - $chars = array('<', '>', '"'); - $split = false; - - foreach ($chars as $char) - { - $next_split = strpos($url, $char); - if ($next_split !== false) - { - $split = ($split !== false) ? min($split, $next_split) : $next_split; - } - } - - if ($split !== false) - { - // an HTML entity was found, so the URL has to end before it - $append = substr($url, $split) . $relative_url; - $url = substr($url, 0, $split); - $relative_url = ''; - } - else if ($relative_url) - { - // same for $relative_url - $split = false; - foreach ($chars as $char) - { - $next_split = strpos($relative_url, $char); - if ($next_split !== false) - { - $split = ($split !== false) ? min($split, $next_split) : $next_split; - } - } - - if ($split !== false) - { - $append = substr($relative_url, $split); - $relative_url = substr($relative_url, 0, $split); - } - } - - // if the last character of the url is a punctuation mark, exclude it from the url - $last_char = ($relative_url) ? $relative_url[strlen($relative_url) - 1] : $url[strlen($url) - 1]; - - switch ($last_char) - { - case '.': - case '?': - case '!': - case ':': - case ',': - $append = $last_char; - if ($relative_url) - { - $relative_url = substr($relative_url, 0, -1); - } - else - { - $url = substr($url, 0, -1); - } - break; - } - - switch ($type) - { - case MAGIC_URL_LOCAL: - $tag = 'l'; - $relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url)); - $url = $url . '/' . $relative_url; - $text = ($relative_url) ? $relative_url : $url . '/'; - break; - - case MAGIC_URL_FULL: - $tag = 'm'; - $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; - break; - - case MAGIC_URL_WWW: - $tag = 'w'; - $url = 'http://' . $url; - $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; - break; - - case MAGIC_URL_EMAIL: - $tag = 'e'; - $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; - $url = 'mailto:' . $url; - break; - } - - $url = htmlspecialchars($url); - $text = htmlspecialchars($text); - $append = htmlspecialchars($append); - - $html = "$whitespace$text$append"; - - return $html; -} - -/** -* make_clickable function -* -* Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx. -* Cuts down displayed size of link if over 50 chars, turns absolute links -* into relative versions when the server/script path matches the link -*/ -function make_clickable($text, $server_url = false, $class = 'postlink') -{ - if ($server_url === false) - { - $server_url = generate_board_url(); - } - - static $magic_url_match; - static $magic_url_replace; - static $static_class; - - if (!is_array($magic_url_match) || $static_class != $class) - { - $static_class = $class; - $class = ($static_class) ? ' class="' . $static_class . '"' : ''; - $local_class = ($static_class) ? ' class="' . $static_class . '-local"' : ''; - - $magic_url_match = $magic_url_replace = array(); - // Be sure to not let the matches cross over. ;) - - // relative urls for this board - $magic_url_match[] = '#(^|[\n\t (>])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; - $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')"; - - // matches a xxxx://aaaaa.bbb.cccc. ... - $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('url_inline') . ')#ie'; - $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')"; - - // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing - $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie'; - $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')"; - - // matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode. - $magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie'; - $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')"; - } - - return preg_replace($magic_url_match, $magic_url_replace, $text); -} - -/** -* Censoring -*/ -function censor_text($text) -{ - static $censors; - global $cache; - - if (!isset($censors) || !is_array($censors)) - { - // obtain_word_list is taking care of the users censor option and the board-wide option - $censors = $cache->obtain_word_list(); - } - - if (sizeof($censors)) - { - return preg_replace($censors['match'], $censors['replace'], $text); - } - - return $text; -} - -/** -* custom version of nl2br which takes custom BBCodes into account -*/ -function bbcode_nl2br($text) -{ - // custom BBCodes might contain carriage returns so they - // are not converted into
so now revert that - $text = str_replace(array("\n", "\r"), array('
', "\n"), $text); - return $text; -} - -/** -* Smiley processing -*/ -function smiley_text($text, $force_option = false) -{ - global $config, $user, $phpbb_root_path; - - if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) - { - return preg_replace('##', ''; - } - } - - $filesize = $attachment['filesize']; - $size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] ); - $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); - - $comment = bbcode_nl2br(censor_text($attachment['attach_comment'])); - - $block_array += array( - 'UPLOAD_ICON' => $upload_icon, - 'FILESIZE' => $filesize, - 'SIZE_LANG' => $size_lang, - 'DOWNLOAD_NAME' => basename($attachment['real_filename']), - 'COMMENT' => $comment, - ); - - $denied = false; - - if (!extension_allowed($forum_id, $attachment['extension'], $extensions)) - { - $denied = true; - - $block_array += array( - 'S_DENIED' => true, - 'DENIED_MESSAGE' => sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']) - ); - } - - if (!$denied) - { - $l_downloaded_viewed = $download_link = ''; - $display_cat = $extensions[$attachment['extension']]['display_cat']; - - if ($display_cat == ATTACHMENT_CATEGORY_IMAGE) - { - if ($attachment['thumbnail']) - { - $display_cat = ATTACHMENT_CATEGORY_THUMB; - } - else - { - if ($config['img_display_inlined']) - { - if ($config['img_link_width'] || $config['img_link_height']) - { - $dimension = @getimagesize($filename); - - // If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes - if ($dimension === false || empty($dimension[0]) || empty($dimension[1])) - { - $display_cat = ATTACHMENT_CATEGORY_NONE; - } - else - { - $display_cat = ($dimension[0] <= $config['img_link_width'] && $dimension[1] <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE; - } - } - } - else - { - $display_cat = ATTACHMENT_CATEGORY_NONE; - } - } - } - - // Make some descisions based on user options being set. - if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg')) - { - $display_cat = ATTACHMENT_CATEGORY_NONE; - } - - if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash')) - { - $display_cat = ATTACHMENT_CATEGORY_NONE; - } - - $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); - - switch ($display_cat) - { - // Images - case ATTACHMENT_CATEGORY_IMAGE: - $l_downloaded_viewed = 'VIEWED_COUNT'; - $inline_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); - $download_link .= '&mode=view'; - - $block_array += array( - 'S_IMAGE' => true, - 'U_INLINE_LINK' => $inline_link, - ); - - $update_count[] = $attachment['attach_id']; - break; - - // Images, but display Thumbnail - case ATTACHMENT_CATEGORY_THUMB: - $l_downloaded_viewed = 'VIEWED_COUNT'; - $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); - $download_link .= '&mode=view'; - - $block_array += array( - 'S_THUMBNAIL' => true, - 'THUMB_IMAGE' => $thumbnail_link, - ); - break; - - // Windows Media Streams - case ATTACHMENT_CATEGORY_WM: - $l_downloaded_viewed = 'VIEWED_COUNT'; - - // Giving the filename directly because within the wm object all variables are in local context making it impossible - // to validate against a valid session (all params can differ) - // $download_link = $filename; - - $block_array += array( - 'U_FORUM' => generate_board_url(), - 'ATTACH_ID' => $attachment['attach_id'], - 'S_WM_FILE' => true, - ); - - // Viewed/Heared File ... update the download count - $update_count[] = $attachment['attach_id']; - break; - - // Real Media Streams - case ATTACHMENT_CATEGORY_RM: - case ATTACHMENT_CATEGORY_QUICKTIME: - $l_downloaded_viewed = 'VIEWED_COUNT'; - - $block_array += array( - 'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false, - 'S_QUICKTIME_FILE' => ($display_cat == ATTACHMENT_CATEGORY_QUICKTIME) ? true : false, - 'U_FORUM' => generate_board_url(), - 'ATTACH_ID' => $attachment['attach_id'], - ); - - // Viewed/Heared File ... update the download count - $update_count[] = $attachment['attach_id']; - break; - - // Macromedia Flash Files - case ATTACHMENT_CATEGORY_FLASH: - list($width, $height) = @getimagesize($filename); - - $l_downloaded_viewed = 'VIEWED_COUNT'; - - $block_array += array( - 'S_FLASH_FILE' => true, - 'WIDTH' => $width, - 'HEIGHT' => $height, - ); - - // Viewed/Heared File ... update the download count - $update_count[] = $attachment['attach_id']; - break; - - default: - $l_downloaded_viewed = 'DOWNLOAD_COUNT'; - - $block_array += array( - 'S_FILE' => true, - ); - break; - } - - $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count'])); - - $block_array += array( - 'U_DOWNLOAD_LINK' => $download_link, - 'L_DOWNLOAD_COUNT' => $l_download_count - ); - } - - $template->assign_block_vars('_file', $block_array); - - $compiled_attachments[] = $template->assign_display('attachment_tpl'); - } - - $attachments = $compiled_attachments; - unset($compiled_attachments); - - $tpl_size = sizeof($attachments); - - $unset_tpl = array(); - - preg_match_all('#(.*?)#', $message, $matches, PREG_PATTERN_ORDER); - - $replace = array(); - foreach ($matches[0] as $num => $capture) - { - // Flip index if we are displaying the reverse way - $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; - - $replace['from'][] = $matches[0][$num]; - $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); - - $unset_tpl[] = $index; - } - - if (isset($replace['from'])) - { - $message = str_replace($replace['from'], $replace['to'], $message); - } - - $unset_tpl = array_unique($unset_tpl); - - // Needed to let not display the inlined attachments at the end of the post again - foreach ($unset_tpl as $index) - { - unset($attachments[$index]); - } -} - -/** -* Check if extension is allowed to be posted. -* -* @param mixed $forum_id The forum id to check or false if private message -* @param string $extension The extension to check, for example zip. -* @param array &$extensions The extension array holding the information from the cache (will be obtained if empty) -* -* @return bool False if the extension is not allowed to be posted, else true. -*/ -function extension_allowed($forum_id, $extension, &$extensions) -{ - if (empty($extensions)) - { - global $cache; - $extensions = $cache->obtain_attach_extensions($forum_id); - } - - return (!isset($extensions['_allowed_'][$extension])) ? false : true; -} - // Little helpers /** @@ -3418,7 +2714,7 @@ function get_backtrace() /** * This function returns a regular expression pattern for commonly used expressions * Use with / as delimiter for email mode and # for url modes -* mode can be: email|bbcode_htm|url|url_inline|www_url|www_url_inline|relative_url|relative_url_inline +* mode can be: email|bbcode_htm|url|url_inline|www_url|www_url_inline|relative_url|relative_url_inline|ipv4|ipv6 */ function get_preg_expression($mode) { @@ -3439,6 +2735,17 @@ function get_preg_expression($mode) ); break; + // Whoa these look impressive! + // The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses + // can be found in the develop directory + case 'ipv4': + return '#^(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$#'; + break; + + case 'ipv6': + return '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){5}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:))$#i'; + break; + case 'url': case 'url_inline': $inline = ($mode == 'url') ? ')' : ''; @@ -3493,141 +2800,13 @@ function short_ipv6($ip, $length) return $ip; } -/** -* 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, $append = '') -{ - $chars = array(); - - $strip_reply = false; - $stripped = false; - if ($allow_reply && strpos($string, 'Re: ') === 0) - { - $strip_reply = true; - $string = substr($string, 4); - } - - $_chars = utf8_str_split(htmlspecialchars_decode($string)); - $chars = array_map('utf8_htmlspecialchars', $_chars); - - // Now check the length ;) - if (sizeof($chars) > $max_length) - { - // Cut off the last elements from the array - $string = implode('', array_slice($chars, 0, $max_length)); - $stripped = true; - } - - if ($strip_reply) - { - $string = 'Re: ' . $string; - } - - if ($append != '' && $stripped) - { - $string = $string . $append; - } - - return $string; -} - -/** -* Get username details for placing into templates. -* -* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour) or full (for obtaining a html string representing a coloured link to the users profile). -* @param int $user_id The users id -* @param string $username The users name -* @param string $username_colour The users colour -* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. -* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} -* -* @return string A string consisting of what is wanted based on $mode. -*/ -function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) -{ - global $phpbb_root_path, $phpEx, $user, $auth; - - $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) - { - // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly). - // For all others the link leads to a login page or the profile. - if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) - { - $profile_url = ''; - } - else - { - $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); - $profile_url .= '&u=' . (int) $user_id; - } - } - else - { - $profile_url = ''; - } - - switch ($mode) - { - case 'profile': - return $profile_url; - break; - - case 'username': - return $username; - break; - - case 'colour': - return $username_colour; - break; - - case 'full': - default: - - $tpl = ''; - if (!$profile_url && !$username_colour) - { - $tpl = '{USERNAME}'; - } - else if (!$profile_url && $username_colour) - { - $tpl = '{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; - } -} - /** * Wrapper for php's checkdnsrr function. * * The windows failover is from the php manual * Please make sure to check the return value for === true and === false, since NULL could * be returned too. -* +* * @return true if entry found, false if not, NULL if this function is not supported by this environment */ function phpbb_checkdnsrr($host, $type = '') @@ -3794,7 +2973,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo ''; echo ''; - exit; + exit_handler(); break; case E_USER_WARNING: @@ -3853,7 +3032,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) page_footer(); } - exit; + exit_handler(); break; } @@ -3925,7 +3104,7 @@ function page_header($page_title = '', $display_online_list = true) SELECT DISTINCT s.session_ip FROM ' . SESSIONS_TABLE . ' s WHERE s.session_user_id = ' . ANONYMOUS . ' - AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . + AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . $reading_sql . ')'; } @@ -3934,7 +3113,7 @@ function page_header($page_title = '', $display_online_list = true) $sql = 'SELECT COUNT(DISTINCT s.session_ip) as num_guests FROM ' . SESSIONS_TABLE . ' s WHERE s.session_user_id = ' . ANONYMOUS . ' - AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . + AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . $reading_sql; } $result = $db->sql_query($sql); @@ -3944,10 +3123,10 @@ function page_header($page_title = '', $display_online_list = true) $sql = 'SELECT u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour, s.session_ip, s.session_viewonline FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s - WHERE s.session_time >= ' . (time() - (intval($config['load_online_time']) * 60)) . + WHERE s.session_time >= ' . (time() - (intval($config['load_online_time']) * 60)) . $reading_sql . ((!$config['load_online_guests']) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . ' - AND u.user_id = s.session_user_id + AND u.user_id = s.session_user_id ORDER BY u.username_clean ASC, s.session_ip ASC'; $result = $db->sql_query($sql); @@ -3959,38 +3138,19 @@ function page_header($page_title = '', $display_online_list = true) // Skip multiple sessions for one user if ($row['user_id'] != $prev_user_id) { - if ($row['user_colour']) - { - $user_colour = ' style="color:#' . $row['user_colour'] . '"'; - $row['username'] = '' . $row['username'] . ''; - } - else - { - $user_colour = ''; - } - if ($row['session_viewonline']) { - $user_online_link = $row['username']; $logged_visible_online++; } else { - $user_online_link = '' . $row['username'] . ''; + $row['username'] = '' . $row['username'] . ''; $logged_hidden_online++; } if (($row['session_viewonline']) || $auth->acl_get('u_viewonline')) { - if ($row['user_type'] <> USER_IGNORE) - { - $user_online_link = '' . $user_online_link . ''; - } - else - { - $user_online_link = ($user_colour) ? '' . $user_online_link . '' : $user_online_link; - } - + $user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']); $online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link; } } @@ -4147,9 +3307,8 @@ function page_header($page_title = '', $display_online_list = true) 'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), 'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), - 'UA_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false), 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup'), - 'UA_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup', false), + 'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=popup')), 'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"), 'U_MEMBERSLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"), 'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '', @@ -4303,11 +3462,7 @@ function page_footer($run_cron = true) $template->display('body'); garbage_collection(); - - if (!defined('PHPBB_EMBEDDED')) - { - exit; - } + exit_handler(); } /** @@ -4332,97 +3487,43 @@ function garbage_collection() } /** -* @package phpBB3 +* Handler for exit calls in phpBB. +* This function supports hooks. +* +* Note: This function is called after the template has been outputted. */ -class bitfield +function exit_handler() { - var $data; + global $phpbb_hook; - function bitfield($bitfield = '') + if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__)) { - $this->data = base64_decode($bitfield); - } - - /** - */ - function get($n) - { - // Get the ($n / 8)th char - $byte = $n >> 3; - - if (strlen($this->data) >= $byte + 1) + if ($phpbb_hook->hook_return(__FUNCTION__)) { - $c = $this->data[$byte]; - - // Lookup the ($n % 8)th bit of the byte - $bit = 7 - ($n & 7); - return (bool) (ord($c) & (1 << $bit)); - } - else - { - return false; + return $phpbb_hook->hook_return_result(__FUNCTION__); } } - function set($n) - { - $byte = $n >> 3; - $bit = 7 - ($n & 7); + exit; +} - if (strlen($this->data) >= $byte + 1) +/** +* Handler for init calls in phpBB. This function is called in user::setup(); +* This function supports hooks. +*/ +function phpbb_user_session_handler() +{ + global $phpbb_hook; + + if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__)) + { + if ($phpbb_hook->hook_return(__FUNCTION__)) { - $this->data[$byte] = $this->data[$byte] | chr(1 << $bit); - } - else - { - $this->data .= str_repeat("\0", $byte - strlen($this->data)); - $this->data .= chr(1 << $bit); + return $phpbb_hook->hook_return_result(__FUNCTION__); } } - function clear($n) - { - $byte = $n >> 3; - - if (strlen($this->data) >= $byte + 1) - { - $bit = 7 - ($n & 7); - $this->data[$byte] = $this->data[$byte] &~ chr(1 << $bit); - } - } - - function get_blob() - { - return $this->data; - } - - function get_base64() - { - return base64_encode($this->data); - } - - function get_bin() - { - $bin = ''; - $len = strlen($this->data); - - for ($i = 0; $i < $len; ++$i) - { - $bin .= str_pad(decbin(ord($this->data[$i])), 8, '0', STR_PAD_LEFT); - } - - return $bin; - } - - function get_all_set() - { - return array_keys(array_filter(str_split($this->get_bin()))); - } - - function merge($bitfield) - { - $this->data = $this->data | $bitfield->get_blob(); - } + return; } ?> \ No newline at end of file diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 4dfd58e28c..05872a907a 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Recalculate Binary Tree function recalc_btree($sql_id, $sql_table, $module_class = '') @@ -33,13 +41,13 @@ function recalc_btree($sql_id, $sql_table, $module_class = '') if ($substract > 0) { - $sql = "UPDATE $sql_table + $sql = "UPDATE $sql_table SET left_id = left_id - $substract, right_id = right_id - $substract $sql_where"; $db->sql_query($sql); } - $sql = "SELECT $sql_id, parent_id, left_id, right_id + $sql = "SELECT $sql_id, parent_id, left_id, right_id FROM $sql_table $sql_where ORDER BY left_id ASC, parent_id ASC, $sql_id ASC"; @@ -219,7 +227,7 @@ function group_select_options($group_id, $exclude_ids = false, $manage_founder = $sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : ''; $sql_founder = ($manage_founder !== false) ? (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . 'group_founder_manage = ' . (int) $manage_founder : ''; - $sql = 'SELECT group_id, group_name, group_type + $sql = 'SELECT group_id, group_name, group_type FROM ' . GROUPS_TABLE . " $exclude_sql $sql_and @@ -476,8 +484,8 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) } $db->sql_freeresult($result); - $sql = 'SELECT forum_id - FROM ' . TOPICS_TABLE . ' + $sql = 'SELECT forum_id + FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $topic_id; $result = $db->sql_query($sql); $forum_row = $db->sql_fetchrow($result); @@ -573,7 +581,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s foreach ($table_ary as $table) { - $sql = "DELETE FROM $table + $sql = "DELETE FROM $table WHERE " . $db->sql_in_set('topic_id', $topic_ids); $db->sql_query($sql); } @@ -596,7 +604,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s if (sizeof($moved_topic_ids)) { - $sql = 'DELETE FROM ' . TOPICS_TABLE . ' + $sql = 'DELETE FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $moved_topic_ids); $db->sql_query($sql); } @@ -685,7 +693,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = foreach ($table_ary as $table) { - $sql = "DELETE FROM $table + $sql = "DELETE FROM $table WHERE " . $db->sql_in_set('post_id', $post_ids); $db->sql_query($sql); } @@ -698,12 +706,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = 0 - WHERE user_id = ' . $poster_id . ' + WHERE user_id = ' . $poster_id . ' AND user_posts < ' . $substract; $db->sql_query($sql); $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts - ' . $substract . ' - WHERE user_id = ' . $poster_id . ' + WHERE user_id = ' . $poster_id . ' AND user_posts >= ' . $substract; $db->sql_query($sql); } @@ -790,7 +798,7 @@ function delete_attachments($mode, $ids, $resync = true) { global $db, $config; - if (is_array($ids)) + if (is_array($ids) && sizeof($ids)) { $ids = array_unique($ids); $ids = array_map('intval', $ids); @@ -890,7 +898,7 @@ function delete_attachments($mode, $ids, $resync = true) { if ($mode == 'post' || $mode == 'topic') { - $sql = 'UPDATE ' . POSTS_TABLE . ' + $sql = 'UPDATE ' . POSTS_TABLE . ' SET post_attachment = 0 WHERE ' . $db->sql_in_set('post_id', $post_ids); $db->sql_query($sql); @@ -901,7 +909,7 @@ function delete_attachments($mode, $ids, $resync = true) $remaining = array(); $sql = 'SELECT post_msg_id - FROM ' . ATTACHMENTS_TABLE . ' + FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('post_msg_id', $post_ids) . ' AND in_message = 0'; $result = $db->sql_query($sql); @@ -916,7 +924,7 @@ function delete_attachments($mode, $ids, $resync = true) if (sizeof($unset_ids)) { - $sql = 'UPDATE ' . POSTS_TABLE . ' + $sql = 'UPDATE ' . POSTS_TABLE . ' SET post_attachment = 0 WHERE ' . $db->sql_in_set('post_id', $unset_ids); $db->sql_query($sql); @@ -925,7 +933,7 @@ function delete_attachments($mode, $ids, $resync = true) $remaining = array(); $sql = 'SELECT post_msg_id - FROM ' . ATTACHMENTS_TABLE . ' + FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('post_msg_id', $post_ids) . ' AND in_message = 1'; $result = $db->sql_query($sql); @@ -940,7 +948,7 @@ function delete_attachments($mode, $ids, $resync = true) if (sizeof($unset_ids)) { - $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' + $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' SET message_attachment = 0 WHERE ' . $db->sql_in_set('msg_id', $unset_ids); $db->sql_query($sql); @@ -964,7 +972,7 @@ function delete_attachments($mode, $ids, $resync = true) $remaining = array(); $sql = 'SELECT topic_id - FROM ' . ATTACHMENTS_TABLE . ' + FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids); $result = $db->sql_query($sql); @@ -978,7 +986,7 @@ function delete_attachments($mode, $ids, $resync = true) if (sizeof($unset_ids)) { - $sql = 'UPDATE ' . TOPICS_TABLE . ' + $sql = 'UPDATE ' . TOPICS_TABLE . ' SET topic_attachment = 0 WHERE ' . $db->sql_in_set('topic_id', $unset_ids); $db->sql_query($sql); @@ -1864,7 +1872,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, { $topic_id = (int) $row['topic_id']; - // Ok, there should be a shadow topic. If there isn't, then there's something wrong with the db. + // Ok, there should be a shadow topic. If there isn't, then there's something wrong with the db. // However, there's not much we can do about it. if (!empty($shadow_topic_data[$topic_id])) { @@ -2047,7 +2055,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync $sql = 'SELECT topic_id FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_id) . " - AND poll_start = 0 + AND poll_start = 0 $sql_and"; $result = $db->sql_query($sql); @@ -2063,8 +2071,8 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync $sql = 'SELECT topic_id FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_id) . " - AND poll_start > 0 - AND poll_last_vote < $prune_date + AND poll_start > 0 + AND poll_last_vote < $prune_date $sql_and"; $result = $db->sql_query($sql); @@ -2423,7 +2431,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id if (isset($user->lang[$row['log_operation']])) { - // We supress the warning about inappropiate number of passed parameters here due to possible changes within LOG strings from one version to another. + // We supress the warning about inappropriate number of passed parameters here due to possible changes within LOG strings from one version to another. $log[$i]['action'] = @vsprintf($log[$i]['action'], $log_data_ary); // If within the admin panel we do not censor text out @@ -2455,7 +2463,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id { $topic_id_list = array_unique($topic_id_list); - // This query is not really needed if move_topics() updates the forum_id field, + // This query is not really needed if move_topics() updates the forum_id field, // although it's also used to determine if the topic still exists in the database $sql = 'SELECT topic_id, forum_id FROM ' . TOPICS_TABLE . ' @@ -2555,7 +2563,7 @@ function update_foes($group_id = false, $user_id = false) // update foes for some user if (is_array($user_id) && sizeof($user_id)) { - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' WHERE ' . $db->sql_in_set('zebra_id', $user_id) . ' AND foe = 1'; $db->sql_query($sql); @@ -2565,7 +2573,7 @@ function update_foes($group_id = false, $user_id = false) // update foes for some group if (is_array($group_id) && sizeof($group_id)) { - // Grab group settings... + // Grab group settings... $sql = $db->sql_build_query('SELECT', array( 'SELECT' => 'a.group_id', @@ -2628,7 +2636,7 @@ function update_foes($group_id = false, $user_id = false) if (sizeof($users)) { - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' WHERE ' . $db->sql_in_set('zebra_id', $users) . ' AND foe = 1'; $db->sql_query($sql); @@ -2651,7 +2659,7 @@ function update_foes($group_id = false, $user_id = false) if (sizeof($perms)) { - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . ' AND foe = 1'; $db->sql_query($sql); @@ -2667,9 +2675,9 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li global $db, $user; $sql = 'SELECT user_id, username, user_regdate, user_lastvisit, user_inactive_time, user_inactive_reason - FROM ' . USERS_TABLE . ' - WHERE user_type = ' . USER_INACTIVE . - (($limit_days) ? " AND user_inactive_time >= $limit_days" : '') . " + FROM ' . USERS_TABLE . ' + WHERE user_type = ' . USER_INACTIVE . + (($limit_days) ? " AND user_inactive_time >= $limit_days" : '') . " ORDER BY $sort_by"; $result = $db->sql_query_limit($sql, $limit, $offset); @@ -2700,7 +2708,7 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li $sql = 'SELECT COUNT(user_id) AS user_count FROM ' . USERS_TABLE . ' - WHERE user_type = ' . USER_INACTIVE . + WHERE user_type = ' . USER_INACTIVE . (($limit_days) ? " AND user_inactive_time >= $limit_days" : ''); $result = $db->sql_query($sql); $user_count = (int) $db->sql_fetchfield('user_count'); diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index ade844b262..36b7d575d9 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -1,13 +1,21 @@ isbz && function_exists('bzclose')) ? 'bzclose' : (($this->isgz && @extension_loaded('zlib')) ? 'gzclose' : 'fclose'); - if ($this->wrote) + if ($this->wrote) { $fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite'); diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php new file mode 100644 index 0000000000..cbd38cd478 --- /dev/null +++ b/phpBB/includes/functions_content.php @@ -0,0 +1,1268 @@ + $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']); + + // Check if the key is selectable. If not, we reset to the first key found. + // This ensures the values are always valid. + if (!isset($limit_days[$sort_days])) + { + @reset($limit_days); + $sort_days = key($limit_days); + } + + if (!isset($sort_by_text[$sort_key])) + { + @reset($sort_by_text); + $sort_key = key($sort_by_text); + } + + if (!isset($sort_dir_text[$sort_dir])) + { + @reset($sort_dir_text); + $sort_dir = key($sort_dir_text); + } + + $s_limit_days = ''; + + $s_sort_key = ''; + + $s_sort_dir = ''; + + $u_sort_param = "st=$sort_days&sk=$sort_key&sd=$sort_dir"; + + return; +} + +/** +* Generate Jumpbox +*/ +function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false, $force_display = false) +{ + global $config, $auth, $template, $user, $db; + + // We only return if the jumpbox is not forced to be displayed (in case it is needed for functionality) + if (!$config['load_jumpbox'] && $force_display === false) + { + return; + } + + $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id + FROM ' . FORUMS_TABLE . ' + ORDER BY left_id ASC'; + $result = $db->sql_query($sql, 600); + + $right = $padding = 0; + $padding_store = array('0' => 0); + $display_jumpbox = false; + $iteration = 0; + + // Sometimes it could happen that forums will be displayed here not be displayed within the index page + // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions. + // If this happens, the padding could be "broken" + + while ($row = $db->sql_fetchrow($result)) + { + if ($row['left_id'] < $right) + { + $padding++; + $padding_store[$row['parent_id']] = $padding; + } + else if ($row['left_id'] > $right + 1) + { + // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. + // @todo digging deep to find out "how" this can happen. + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; + } + + $right = $row['right_id']; + + if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id'])) + { + // Non-postable forum with no subforums, don't display + continue; + } + + if (!$auth->acl_get('f_list', $row['forum_id'])) + { + // if the user does not have permissions to list this forum skip + continue; + } + + if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id'])) + { + continue; + } + + if (!$display_jumpbox) + { + $template->assign_block_vars('jumpbox_forums', array( + 'FORUM_ID' => ($select_all) ? 0 : -1, + 'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'], + 'S_FORUM_COUNT' => $iteration) + ); + + $iteration++; + $display_jumpbox = true; + } + + $template->assign_block_vars('jumpbox_forums', array( + 'FORUM_ID' => $row['forum_id'], + 'FORUM_NAME' => $row['forum_name'], + 'SELECTED' => ($row['forum_id'] == $forum_id) ? ' selected="selected"' : '', + 'S_FORUM_COUNT' => $iteration, + 'S_IS_CAT' => ($row['forum_type'] == FORUM_CAT) ? true : false, + 'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false, + 'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false) + ); + + for ($i = 0; $i < $padding; $i++) + { + $template->assign_block_vars('jumpbox_forums.level', array()); + } + $iteration++; + } + $db->sql_freeresult($result); + unset($padding_store); + + $template->assign_vars(array( + 'S_DISPLAY_JUMPBOX' => $display_jumpbox, + 'S_JUMPBOX_ACTION' => $action) + ); + + return; +} + +/** +* Bump Topic Check - used by posting and viewtopic +*/ +function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster) +{ + global $config, $auth, $user; + + // Check permission and make sure the last post was not already bumped + if (!$auth->acl_get('f_bump', $forum_id) || $topic_bumped) + { + return false; + } + + // Check bump time range, is the user really allowed to bump the topic at this time? + $bump_time = ($config['bump_type'] == 'm') ? $config['bump_interval'] * 60 : (($config['bump_type'] == 'h') ? $config['bump_interval'] * 3600 : $config['bump_interval'] * 86400); + + // Check bump time + if ($last_post_time + $bump_time > time()) + { + return false; + } + + // Check bumper, only topic poster and last poster are allowed to bump + if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id']) + { + return false; + } + + // A bump time of 0 will completely disable the bump feature... not intended but might be useful. + return $bump_time; +} + +/** +* Generates a text with approx. the specified length which contains the specified words and their context +* +* @param string $text The full text from which context shall be extracted +* @param string $words An array of words which should be contained in the result, has to be a valid part of a PCRE pattern (escape with preg_quote!) +* @param int $length The desired length of the resulting text, however the result might be shorter or longer than this value +* +* @return string Context of the specified words separated by "..." +*/ +function get_context($text, $words, $length = 400) +{ + // first replace all whitespaces with single spaces + $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text); + + $word_indizes = array(); + if (sizeof($words)) + { + $match = ''; + // find the starting indizes of all words + foreach ($words as $word) + { + if ($word) + { + if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) + { + $pos = utf8_strpos($text, $match[1]); + if ($pos !== false) + { + $word_indizes[] = $pos; + } + } + } + } + unset($match); + + if (sizeof($word_indizes)) + { + $word_indizes = array_unique($word_indizes); + sort($word_indizes); + + $wordnum = sizeof($word_indizes); + // number of characters on the right and left side of each word + $sequence_length = (int) ($length / (2 * $wordnum)) - 2; + $final_text = ''; + $word = $j = 0; + $final_text_index = -1; + + // cycle through every character in the original text + for ($i = $word_indizes[$word], $n = utf8_strlen($text); $i < $n; $i++) + { + // if the current position is the start of one of the words then append $sequence_length characters to the final text + if (isset($word_indizes[$word]) && ($i == $word_indizes[$word])) + { + if ($final_text_index < $i - $sequence_length - 1) + { + $final_text .= '... ' . preg_replace('#^([^ ]*)#', '', utf8_substr($text, $i - $sequence_length, $sequence_length)); + } + else + { + // if the final text is already nearer to the current word than $sequence_length we only append the text + // from its current index on and distribute the unused length to all other sequenes + $sequence_length += (int) (($final_text_index - $i + $sequence_length + 1) / (2 * $wordnum)); + $final_text .= utf8_substr($text, $final_text_index + 1, $i - $final_text_index - 1); + } + $final_text_index = $i - 1; + + // add the following characters to the final text (see below) + $word++; + $j = 1; + } + + if ($j > 0) + { + // add the character to the final text and increment the sequence counter + $final_text .= utf8_substr($text, $i, 1); + $final_text_index++; + $j++; + + // if this is a whitespace then check whether we are done with this sequence + if (utf8_substr($text, $i, 1) == ' ') + { + // only check whether we have to exit the context generation completely if we haven't already reached the end anyway + if ($i + 4 < $n) + { + if (($j > $sequence_length && $word >= $wordnum) || utf8_strlen($final_text) > $length) + { + $final_text .= ' ...'; + break; + } + } + else + { + // make sure the text really reaches the end + $j -= 4; + } + + // stop context generation and wait for the next word + if ($j > $sequence_length) + { + $j = 0; + } + } + } + } + return $final_text; + } + } + + if (!sizeof($words) || !sizeof($word_indizes)) + { + return (utf8_strlen($text) >= $length + 3) ? utf8_substr($text, 0, $length) . '...' : $text; + } +} + +/** +* Decode text whereby text is coming from the db and expected to be pre-parsed content +* We are placing this outside of the message parser because we are often in need of it... +*/ +function decode_message(&$message, $bbcode_uid = '') +{ + global $config; + + if ($bbcode_uid) + { + $match = array('
', "[/*:m:$bbcode_uid]", ":u:$bbcode_uid", ":o:$bbcode_uid", ":$bbcode_uid"); + $replace = array("\n", '', '', '', ''); + } + else + { + $match = array('
'); + $replace = array("\n"); + } + + $message = str_replace($match, $replace, $message); + + $match = get_preg_expression('bbcode_htm'); + $replace = array('\1', '\1', '\2', '\1', '', ''); + + $message = preg_replace($match, $replace, $message); +} + +/** +* Strips all bbcode from a text and returns the plain content +*/ +function strip_bbcode(&$text, $uid = '') +{ + if (!$uid) + { + $uid = '[0-9a-z]{5,}'; + } + + $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:".*"|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text); + + $match = get_preg_expression('bbcode_htm'); + $replace = array('\1', '\1', '\2', '\1', '', ''); + + $text = preg_replace($match, $replace, $text); +} + +/** +* For display of custom parsed text on user-facing pages +* Expects $text to be the value directly from the database (stored value) +*/ +function generate_text_for_display($text, $uid, $bitfield, $flags) +{ + static $bbcode; + + if (!$text) + { + return ''; + } + + $text = censor_text($text); + + // Parse bbcode if bbcode uid stored and bbcode enabled + if ($uid && ($flags & OPTION_FLAG_BBCODE)) + { + if (!class_exists('bbcode')) + { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/bbcode.' . $phpEx); + } + + if (empty($bbcode)) + { + $bbcode = new bbcode($bitfield); + } + else + { + $bbcode->bbcode($bitfield); + } + + $bbcode->bbcode_second_pass($text, $uid); + } + + $text = bbcode_nl2br($text); + $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES)); + + return $text; +} + +/** +* For parsing custom parsed text to be stored within the database. +* This function additionally returns the uid and bitfield that needs to be stored. +* Expects $text to be the value directly from request_var() and in it's non-parsed form +*/ +function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false) +{ + global $phpbb_root_path, $phpEx; + + $uid = $bitfield = ''; + + if (!$text) + { + return; + } + + if (!class_exists('parse_message')) + { + include($phpbb_root_path . 'includes/message_parser.' . $phpEx); + } + + $message_parser = new parse_message($text); + $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies); + + $text = $message_parser->message; + $uid = $message_parser->bbcode_uid; + + // If the bbcode_bitfield is empty, there is no need for the uid to be stored. + if (!$message_parser->bbcode_bitfield) + { + $uid = ''; + } + + $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0); + $bitfield = $message_parser->bbcode_bitfield; + + return; +} + +/** +* For decoding custom parsed text for edits as well as extracting the flags +* Expects $text to be the value directly from the database (pre-parsed content) +*/ +function generate_text_for_edit($text, $uid, $flags) +{ + global $phpbb_root_path, $phpEx; + + decode_message($text, $uid); + + return array( + 'allow_bbcode' => ($flags & OPTION_FLAG_BBCODE) ? 1 : 0, + 'allow_smilies' => ($flags & OPTION_FLAG_SMILIES) ? 1 : 0, + 'allow_urls' => ($flags & OPTION_FLAG_LINKS) ? 1 : 0, + 'text' => $text + ); +} + +/** +* A subroutine of make_clickable used with preg_replace +* It places correct HTML around an url, shortens the displayed text +* and makes sure no entities are inside URLs +*/ +function make_clickable_callback($type, $whitespace, $url, $relative_url, $class) +{ + $append = ''; + $url = htmlspecialchars_decode($url); + $relative_url = htmlspecialchars_decode($relative_url); + + // make sure no HTML entities were matched + $chars = array('<', '>', '"'); + $split = false; + + foreach ($chars as $char) + { + $next_split = strpos($url, $char); + if ($next_split !== false) + { + $split = ($split !== false) ? min($split, $next_split) : $next_split; + } + } + + if ($split !== false) + { + // an HTML entity was found, so the URL has to end before it + $append = substr($url, $split) . $relative_url; + $url = substr($url, 0, $split); + $relative_url = ''; + } + else if ($relative_url) + { + // same for $relative_url + $split = false; + foreach ($chars as $char) + { + $next_split = strpos($relative_url, $char); + if ($next_split !== false) + { + $split = ($split !== false) ? min($split, $next_split) : $next_split; + } + } + + if ($split !== false) + { + $append = substr($relative_url, $split); + $relative_url = substr($relative_url, 0, $split); + } + } + + // if the last character of the url is a punctuation mark, exclude it from the url + $last_char = ($relative_url) ? $relative_url[strlen($relative_url) - 1] : $url[strlen($url) - 1]; + + switch ($last_char) + { + case '.': + case '?': + case '!': + case ':': + case ',': + $append = $last_char; + if ($relative_url) + { + $relative_url = substr($relative_url, 0, -1); + } + else + { + $url = substr($url, 0, -1); + } + break; + } + + switch ($type) + { + case MAGIC_URL_LOCAL: + $tag = 'l'; + $relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url)); + $url = $url . '/' . $relative_url; + $text = ($relative_url) ? $relative_url : $url; + break; + + case MAGIC_URL_FULL: + $tag = 'm'; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + break; + + case MAGIC_URL_WWW: + $tag = 'w'; + $url = 'http://' . $url; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + break; + + case MAGIC_URL_EMAIL: + $tag = 'e'; + $text = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url; + $url = 'mailto:' . $url; + break; + } + + $url = htmlspecialchars($url); + $text = htmlspecialchars($text); + $append = htmlspecialchars($append); + + $html = "$whitespace$text$append"; + + return $html; +} + +/** +* make_clickable function +* +* Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx. +* Cuts down displayed size of link if over 50 chars, turns absolute links +* into relative versions when the server/script path matches the link +*/ +function make_clickable($text, $server_url = false, $class = 'postlink') +{ + if ($server_url === false) + { + $server_url = generate_board_url(); + } + + static $magic_url_match; + static $magic_url_replace; + static $static_class; + + if (!is_array($magic_url_match) || $static_class != $class) + { + $static_class = $class; + $class = ($static_class) ? ' class="' . $static_class . '"' : ''; + $local_class = ($static_class) ? ' class="' . $static_class . '-local"' : ''; + + $magic_url_match = $magic_url_replace = array(); + // Be sure to not let the matches cross over. ;) + + // relative urls for this board + $magic_url_match[] = '#(^|[\n\t (>])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')"; + + // matches a xxxx://aaaaa.bbb.cccc. ... + $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')"; + + // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing + $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')"; + + // matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode. + $magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie'; + $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')"; + } + + return preg_replace($magic_url_match, $magic_url_replace, $text); +} + +/** +* Censoring +*/ +function censor_text($text) +{ + static $censors; + global $cache; + + if (!isset($censors) || !is_array($censors)) + { + // obtain_word_list is taking care of the users censor option and the board-wide option + $censors = $cache->obtain_word_list(); + } + + if (sizeof($censors)) + { + return preg_replace($censors['match'], $censors['replace'], $text); + } + + return $text; +} + +/** +* custom version of nl2br which takes custom BBCodes into account +*/ +function bbcode_nl2br($text) +{ + // custom BBCodes might contain carriage returns so they + // are not converted into
so now revert that + $text = str_replace(array("\n", "\r"), array('
', "\n"), $text); + return $text; +} + +/** +* Smiley processing +*/ +function smiley_text($text, $force_option = false) +{ + global $config, $user, $phpbb_root_path; + + if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies')) + { + return preg_replace('##', ''; + } + } + + $filesize = $attachment['filesize']; + $size_lang = ($filesize >= 1048576) ? $user->lang['MB'] : ( ($filesize >= 1024) ? $user->lang['KB'] : $user->lang['BYTES'] ); + $filesize = ($filesize >= 1048576) ? round((round($filesize / 1048576 * 100) / 100), 2) : (($filesize >= 1024) ? round((round($filesize / 1024 * 100) / 100), 2) : $filesize); + + $comment = bbcode_nl2br(censor_text($attachment['attach_comment'])); + + $block_array += array( + 'UPLOAD_ICON' => $upload_icon, + 'FILESIZE' => $filesize, + 'SIZE_LANG' => $size_lang, + 'DOWNLOAD_NAME' => basename($attachment['real_filename']), + 'COMMENT' => $comment, + ); + + $denied = false; + + if (!extension_allowed($forum_id, $attachment['extension'], $extensions)) + { + $denied = true; + + $block_array += array( + 'S_DENIED' => true, + 'DENIED_MESSAGE' => sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']) + ); + } + + if (!$denied) + { + $l_downloaded_viewed = $download_link = ''; + $display_cat = $extensions[$attachment['extension']]['display_cat']; + + if ($display_cat == ATTACHMENT_CATEGORY_IMAGE) + { + if ($attachment['thumbnail']) + { + $display_cat = ATTACHMENT_CATEGORY_THUMB; + } + else + { + if ($config['img_display_inlined']) + { + if ($config['img_link_width'] || $config['img_link_height']) + { + $dimension = @getimagesize($filename); + + // If the dimensions could not be determined or the image being 0x0 we display it as a link for safety purposes + if ($dimension === false || empty($dimension[0]) || empty($dimension[1])) + { + $display_cat = ATTACHMENT_CATEGORY_NONE; + } + else + { + $display_cat = ($dimension[0] <= $config['img_link_width'] && $dimension[1] <= $config['img_link_height']) ? ATTACHMENT_CATEGORY_IMAGE : ATTACHMENT_CATEGORY_NONE; + } + } + } + else + { + $display_cat = ATTACHMENT_CATEGORY_NONE; + } + } + } + + // Make some descisions based on user options being set. + if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg')) + { + $display_cat = ATTACHMENT_CATEGORY_NONE; + } + + if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash')) + { + $display_cat = ATTACHMENT_CATEGORY_NONE; + } + + $download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']); + + switch ($display_cat) + { + // Images + case ATTACHMENT_CATEGORY_IMAGE: + $l_downloaded_viewed = 'VIEWED_COUNT'; + $inline_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']); + $download_link .= '&mode=view'; + + $block_array += array( + 'S_IMAGE' => true, + 'U_INLINE_LINK' => $inline_link, + ); + + $update_count[] = $attachment['attach_id']; + break; + + // Images, but display Thumbnail + case ATTACHMENT_CATEGORY_THUMB: + $l_downloaded_viewed = 'VIEWED_COUNT'; + $thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); + $download_link .= '&mode=view'; + + $block_array += array( + 'S_THUMBNAIL' => true, + 'THUMB_IMAGE' => $thumbnail_link, + ); + break; + + // Windows Media Streams + case ATTACHMENT_CATEGORY_WM: + $l_downloaded_viewed = 'VIEWED_COUNT'; + + // Giving the filename directly because within the wm object all variables are in local context making it impossible + // to validate against a valid session (all params can differ) + // $download_link = $filename; + + $block_array += array( + 'U_FORUM' => generate_board_url(), + 'ATTACH_ID' => $attachment['attach_id'], + 'S_WM_FILE' => true, + ); + + // Viewed/Heared File ... update the download count + $update_count[] = $attachment['attach_id']; + break; + + // Real Media Streams + case ATTACHMENT_CATEGORY_RM: + case ATTACHMENT_CATEGORY_QUICKTIME: + $l_downloaded_viewed = 'VIEWED_COUNT'; + + $block_array += array( + 'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false, + 'S_QUICKTIME_FILE' => ($display_cat == ATTACHMENT_CATEGORY_QUICKTIME) ? true : false, + 'U_FORUM' => generate_board_url(), + 'ATTACH_ID' => $attachment['attach_id'], + ); + + // Viewed/Heared File ... update the download count + $update_count[] = $attachment['attach_id']; + break; + + // Macromedia Flash Files + case ATTACHMENT_CATEGORY_FLASH: + list($width, $height) = @getimagesize($filename); + + $l_downloaded_viewed = 'VIEWED_COUNT'; + + $block_array += array( + 'S_FLASH_FILE' => true, + 'WIDTH' => $width, + 'HEIGHT' => $height, + ); + + // Viewed/Heared File ... update the download count + $update_count[] = $attachment['attach_id']; + break; + + default: + $l_downloaded_viewed = 'DOWNLOAD_COUNT'; + + $block_array += array( + 'S_FILE' => true, + ); + break; + } + + $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count'])); + + $block_array += array( + 'U_DOWNLOAD_LINK' => $download_link, + 'L_DOWNLOAD_COUNT' => $l_download_count + ); + } + + $template->assign_block_vars('_file', $block_array); + + $compiled_attachments[] = $template->assign_display('attachment_tpl'); + } + + $attachments = $compiled_attachments; + unset($compiled_attachments); + + $tpl_size = sizeof($attachments); + + $unset_tpl = array(); + + preg_match_all('#(.*?)#', $message, $matches, PREG_PATTERN_ORDER); + + $replace = array(); + foreach ($matches[0] as $num => $capture) + { + // Flip index if we are displaying the reverse way + $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; + + $replace['from'][] = $matches[0][$num]; + $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); + + $unset_tpl[] = $index; + } + + if (isset($replace['from'])) + { + $message = str_replace($replace['from'], $replace['to'], $message); + } + + $unset_tpl = array_unique($unset_tpl); + + // Needed to let not display the inlined attachments at the end of the post again + foreach ($unset_tpl as $index) + { + unset($attachments[$index]); + } +} + +/** +* Check if extension is allowed to be posted. +* +* @param mixed $forum_id The forum id to check or false if private message +* @param string $extension The extension to check, for example zip. +* @param array &$extensions The extension array holding the information from the cache (will be obtained if empty) +* +* @return bool False if the extension is not allowed to be posted, else true. +*/ +function extension_allowed($forum_id, $extension, &$extensions) +{ + if (empty($extensions)) + { + global $cache; + $extensions = $cache->obtain_attach_extensions($forum_id); + } + + return (!isset($extensions['_allowed_'][$extension])) ? false : true; +} + +/** +* 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, $append = '') +{ + $chars = array(); + + $strip_reply = false; + $stripped = false; + if ($allow_reply && strpos($string, 'Re: ') === 0) + { + $strip_reply = true; + $string = substr($string, 4); + } + + $_chars = utf8_str_split(htmlspecialchars_decode($string)); + $chars = array_map('utf8_htmlspecialchars', $_chars); + + // Now check the length ;) + if (sizeof($chars) > $max_length) + { + // Cut off the last elements from the array + $string = implode('', array_slice($chars, 0, $max_length - utf8_strlen($append))); + $stripped = true; + } + + if ($strip_reply) + { + $string = 'Re: ' . $string; + } + + if ($append != '' && $stripped) + { + $string = $string . $append; + } + + return $string; +} + +/** +* Get username details for placing into templates. +* +* @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link) +* @param int $user_id The users id +* @param string $username The users name +* @param string $username_colour The users colour +* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. +* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} +* +* @return string A string consisting of what is wanted based on $mode. +*/ +function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) +{ + global $phpbb_root_path, $phpEx, $user, $auth; + + $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 ($mode != 'no_profile' && $user_id && $user_id != ANONYMOUS) + { + // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly). + // For all others the link leads to a login page or the profile. + if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) + { + $profile_url = ''; + } + else + { + $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id); + } + } + else + { + $profile_url = ''; + } + + switch ($mode) + { + case 'profile': + return $profile_url; + break; + + case 'username': + return $username; + break; + + case 'colour': + return $username_colour; + break; + + case 'no_profile': + case 'full': + default: + + $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; + } +} + +/** +* @package phpBB3 +*/ +class bitfield +{ + var $data; + + function bitfield($bitfield = '') + { + $this->data = base64_decode($bitfield); + } + + /** + */ + function get($n) + { + // Get the ($n / 8)th char + $byte = $n >> 3; + + if (strlen($this->data) >= $byte + 1) + { + $c = $this->data[$byte]; + + // Lookup the ($n % 8)th bit of the byte + $bit = 7 - ($n & 7); + return (bool) (ord($c) & (1 << $bit)); + } + else + { + return false; + } + } + + function set($n) + { + $byte = $n >> 3; + $bit = 7 - ($n & 7); + + if (strlen($this->data) >= $byte + 1) + { + $this->data[$byte] = $this->data[$byte] | chr(1 << $bit); + } + else + { + $this->data .= str_repeat("\0", $byte - strlen($this->data)); + $this->data .= chr(1 << $bit); + } + } + + function clear($n) + { + $byte = $n >> 3; + + if (strlen($this->data) >= $byte + 1) + { + $bit = 7 - ($n & 7); + $this->data[$byte] = $this->data[$byte] &~ chr(1 << $bit); + } + } + + function get_blob() + { + return $this->data; + } + + function get_base64() + { + return base64_encode($this->data); + } + + function get_bin() + { + $bin = ''; + $len = strlen($this->data); + + for ($i = 0; $i < $len; ++$i) + { + $bin .= str_pad(decbin(ord($this->data[$i])), 8, '0', STR_PAD_LEFT); + } + + return $bin; + } + + function get_all_set() + { + return array_keys(array_filter(str_split($this->get_bin()))); + } + + function merge($bitfield) + { + $this->data = $this->data | $bitfield->get_blob(); + } +} + +?> \ No newline at end of file diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 12b3109430..3a572e128c 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Default avatar width/height * @ignore @@ -216,7 +224,7 @@ function is_topic_locked($bool) */ function make_uid($timestamp) { - return substr(md5($timestamp), 0, BBCODE_UID_LEN); + return substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN); } /** @@ -372,7 +380,7 @@ function mimetype($filename) * There can be significant network overhead if there are a large number of remote avatars * @todo Look at the option of allowing the user to decide whether this is called or to force the dimensions */ -function remote_avatar_dims() +function remote_avatar_dims() { global $db; @@ -514,14 +522,14 @@ function base64_unpack($string) for ($i = 1; $i <= $length; $i++) { - $pos = $length - $i; + $pos = $length - $i; $operand = strpos($chars, substr($string, $pos, 1)); - $exponent = pow($base, $i-1); + $exponent = pow($base, $i-1); $dec_value = $operand * $exponent; - $number += $dec_value; + $number += $dec_value; } - return $number; + return $number; } function _import_check($config_var, $source, $use_target) @@ -535,7 +543,7 @@ function _import_check($config_var, $source, $use_target) ); // copy file will prepend $phpBB_root_path - $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); + $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0) { @@ -639,7 +647,6 @@ function import_smiley($source, $use_target = false) } /* -* */ function import_avatar($source, $use_target = false, $user_id = false) { @@ -998,15 +1005,15 @@ function set_user_options() // Key need to be set in row, else default value is chosen $keyoptions = array( - 'viewimg' => array('bit' => 0, 'default' => 1), + 'viewimg' => array('bit' => 0, 'default' => 1), 'viewflash' => array('bit' => 1, 'default' => 1), 'viewsmilies' => array('bit' => 2, 'default' => 1), 'viewsigs' => array('bit' => 3, 'default' => 1), - 'viewavatars' => array('bit' => 4, 'default' => 1), - 'viewcensors' => array('bit' => 5, 'default' => 1), - 'attachsig' => array('bit' => 6, 'default' => 0), - 'bbcode' => array('bit' => 8, 'default' => 1), - 'smilies' => array('bit' => 9, 'default' => 1), + 'viewavatars' => array('bit' => 4, 'default' => 1), + 'viewcensors' => array('bit' => 5, 'default' => 1), + 'attachsig' => array('bit' => 6, 'default' => 0), + 'bbcode' => array('bit' => 8, 'default' => 1), + 'smilies' => array('bit' => 9, 'default' => 1), 'popuppm' => array('bit' => 10, 'default' => 0), ); @@ -1458,7 +1465,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO) if (!isset($group_ids[$ug_id])) { $sql = 'SELECT group_id - FROM ' . GROUPS_TABLE . " + FROM ' . GROUPS_TABLE . " WHERE group_name = '" . $db->sql_escape(strtoupper($ug_id)) . "'"; $result = $db->sql_query_limit($sql, 1); $id = (int) $db->sql_fetchfield('group_id'); @@ -1574,7 +1581,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO) case ACL_NO: if (isset($cur_auth[$forum][$auth_option_id])) { - $sql_ary['delete'][] = "DELETE FROM $table + $sql_ary['delete'][] = "DELETE FROM $table WHERE forum_id = $forum AND auth_option_id = $auth_option_id AND $id_field = $ug_id"; @@ -1588,10 +1595,10 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO) } else if ($cur_auth[$forum][$auth_option_id] != $setting) { - $sql_ary['update'][] = "UPDATE " . $table . " - SET auth_setting = $setting - WHERE $id_field = $ug_id - AND forum_id = $forum + $sql_ary['update'][] = "UPDATE " . $table . " + SET auth_setting = $setting + WHERE $id_field = $ug_id + AND forum_id = $forum AND auth_option_id = $auth_option_id"; } } @@ -1720,7 +1727,7 @@ function add_default_groups() } -/** +/** * Sync post count. We might need to do this in batches. */ function sync_post_count($offset, $limit) @@ -1784,7 +1791,7 @@ function add_bots() 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), 'Francis [Bot]' => array('http://www.neomo.de/', ''), 'Gigabot [Bot]' => array('Gigabot/', ''), - 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''), + 'Google Adsense [Bot]' => array('Mediapartners-Google', ''), 'Google Desktop' => array('Google Desktop', ''), 'Google Feedfetcher' => array('Feedfetcher-Google', ''), 'Google [Bot]' => array('Googlebot', ''), @@ -1898,7 +1905,7 @@ function update_dynamic_config() // set_config('record_online_users', 1, true); // set_config('record_online_date', time(), true); - $sql = 'SELECT COUNT(post_id) AS stat + $sql = 'SELECT COUNT(post_id) AS stat FROM ' . POSTS_TABLE . ' WHERE post_approved = 1'; $result = $db->sql_query($sql); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 208226257d..b75747a862 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Display Forums */ @@ -833,8 +841,8 @@ function display_reasons($reason_id = 0) { global $db, $user, $template; - $sql = 'SELECT * - FROM ' . REPORTS_REASONS_TABLE . ' + $sql = 'SELECT * + FROM ' . REPORTS_REASONS_TABLE . ' ORDER BY reason_order ASC'; $result = $db->sql_query($sql); @@ -1149,7 +1157,7 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $ switch ($avatar_type) { case AVATAR_UPLOAD: - $avatar_img = $phpbb_root_path . "download.$phpEx?avatar="; + $avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar="; break; case AVATAR_GALLERY: diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index d5994f9f98..3e4bd27bcc 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Determine if we are able to load a specified PHP module and do so if possible */ @@ -27,7 +35,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'firebird' => array( 'LABEL' => 'FireBird', 'SCHEMA' => 'firebird', - 'MODULE' => 'interbase', + 'MODULE' => 'interbase', 'DELIM' => ';;', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'firebird', @@ -47,7 +55,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'mysql' => array( 'LABEL' => 'MySQL', 'SCHEMA' => 'mysql', - 'MODULE' => 'mysql', + 'MODULE' => 'mysql', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'mysql', @@ -57,7 +65,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'mssql' => array( 'LABEL' => 'MS SQL Server 2000+', 'SCHEMA' => 'mssql', - 'MODULE' => 'mssql', + 'MODULE' => 'mssql', 'DELIM' => 'GO', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'mssql', @@ -67,7 +75,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'mssql_odbc'=> array( 'LABEL' => 'MS SQL Server [ ODBC ]', 'SCHEMA' => 'mssql', - 'MODULE' => 'odbc', + 'MODULE' => 'odbc', 'DELIM' => 'GO', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'mssql_odbc', @@ -77,7 +85,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'oracle' => array( 'LABEL' => 'Oracle', 'SCHEMA' => 'oracle', - 'MODULE' => 'oci8', + 'MODULE' => 'oci8', 'DELIM' => '/', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'oracle', @@ -87,7 +95,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'postgres' => array( 'LABEL' => 'PostgreSQL 7.x/8.x', 'SCHEMA' => 'postgres', - 'MODULE' => 'pgsql', + 'MODULE' => 'pgsql', 'DELIM' => ';', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'postgres', @@ -97,7 +105,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20 'sqlite' => array( 'LABEL' => 'SQLite', 'SCHEMA' => 'sqlite', - 'MODULE' => 'sqlite', + 'MODULE' => 'sqlite', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'sqlite', @@ -199,8 +207,8 @@ function get_tables($db) case 'mssql': case 'mssql_odbc': - $sql = "SELECT name - FROM sysobjects + $sql = "SELECT name + FROM sysobjects WHERE type='U'"; break; diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php index 04f664139f..8575f339c1 100644 --- a/phpBB/includes/functions_jabber.php +++ b/phpBB/includes/functions_jabber.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * * Jabber class from Flyspray project @@ -216,10 +224,6 @@ class jabber $server = $record[0]['target']; } } - else - { - $this->add_to_log('Warning: dns_get_record() function not found. GTalk will not work.'); - } $server = $use_ssl ? 'ssl://' . $server : $server; @@ -503,6 +507,13 @@ class jabber } else { + // Make sure we only use 'auth' for qop (relevant for $this->encrypt_password()) + // If the is choking up on the changed parameter we may need to adjust encrypt_password() directly + if (isset($decoded['qop']) && $decoded['qop'] != 'auth' && strpos($decoded['qop'], 'auth') !== false) + { + $decoded['qop'] = 'auth'; + } + $response = array( 'username' => $this->username, 'response' => $this->encrypt_password(array_merge($decoded, array('nc' => '00000001'))), @@ -699,25 +710,34 @@ class jabber } /** - * parse_data like a="b",c="d",... + * parse_data like a="b",c="d",... or like a="a, b", c, d="e", f=g,... * @param string $data * @access public * @return array a => b ... */ function parse_data($data) { - // super basic, but should suffice $data = explode(',', $data); $pairs = array(); + $key = false; foreach ($data as $pair) { $dd = strpos($pair, '='); + if ($dd) { - $pairs[substr($pair, 0, $dd)] = trim(substr($pair, $dd + 1), '"'); + $key = trim(substr($pair, 0, $dd)); + $pairs[$key] = trim(trim(substr($pair, $dd + 1)), '"'); + } + else if (strpos(strrev(trim($pair)), '"') === 0 && $key) + { + // We are actually having something left from "a, b" values, add it to the last one we handled. + $pairs[$key] .= ',' . trim(trim($pair), '"'); + continue; } } + return $pairs; } diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index ae156436f0..6bce44209a 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Messenger * @package phpBB3 @@ -275,7 +283,7 @@ class messenger break; } - $message .= '
' . htmlspecialchars($calling_page) . '

' . $msg . '
'; + $message .= '
' . htmlspecialchars($calling_page) . '

' . $msg . '
'; add_log('critical', 'LOG_ERROR_' . $type, $message); } @@ -394,7 +402,7 @@ class messenger // Send message ... if (!$use_queue) { - $mail_to = ($to == '') ? 'Undisclosed-Recipient:;' : $to; + $mail_to = ($to == '') ? 'undisclosed-recipients:;' : $to; $err_msg = ''; if ($config['smtp_delivery']) @@ -465,13 +473,13 @@ class messenger if (!$this->jabber->connect()) { - $this->error('JABBER', 'Could not connect to Jabber server
' . $this->jabber->get_log()); + $this->error('JABBER', $user->lang['ERR_JAB_CONNECT'] . '
' . $this->jabber->get_log()); return false; } if (!$this->jabber->login()) { - $this->error('JABBER', 'Could not authorise on Jabber server
' . $this->jabber->get_log()); + $this->error('JABBER', $user->lang['ERR_JAB_AUTH'] . '
' . $this->jabber->get_log()); return false; } @@ -541,7 +549,7 @@ class queue */ function process() { - global $db, $config, $phpEx, $phpbb_root_path; + global $db, $config, $phpEx, $phpbb_root_path, $user; set_config('last_queue_run', time(), true); @@ -604,13 +612,13 @@ class queue if (!$this->jabber->connect()) { - messenger::error('JABBER', 'Could not connect to Jabber server'); + messenger::error('JABBER', $user->lang['ERR_JAB_CONNECT']); continue 2; } if (!$this->jabber->login()) { - messenger::error('JABBER', 'Could not authorise on Jabber server'); + messenger::error('JABBER', $user->lang['ERR_JAB_AUTH']); continue 2; } @@ -629,7 +637,7 @@ class queue { case 'email': $err_msg = ''; - $to = (!$to) ? 'Undisclosed-Recipient:;' : $to; + $to = (!$to) ? 'undisclosed-recipients:;' : $to; if ($config['smtp_delivery']) { @@ -922,7 +930,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '') $smtp->server_send("Subject: $subject"); // Now the To Header. - $to_header = ($to_header == '') ? 'Undisclosed-Recipients:;' : $to_header; + $to_header = ($to_header == '') ? 'undisclosed-recipients:;' : $to_header; $smtp->server_send("To: $to_header"); // Now the CC Header. @@ -1058,7 +1066,7 @@ class smtp_class // If we are authenticating through pop-before-smtp, we // have to login ones before we get authenticated - // NOTE: on some configurations the time between an update of the auth database takes so + // NOTE: on some configurations the time between an update of the auth database takes so // long that the first email send does not work. This is not a biggie on a live board (only // the install mail will most likely fail) - but on a dynamic ip connection this might produce // severe problems and is not fixable! @@ -1311,7 +1319,7 @@ class smtp_class { $tokens[$matches[1]] = array($tokens[$matches[1]], preg_replace('/^"(.*)"$/', '\\1', $matches[2])); } - } + } else if (!empty($tokens[$matches[1]])) // Any other multiple instance = failure { $tokens = array(); diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 9db2c4fa25..b55c408b8c 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -1,13 +1,21 @@ sql_query($sql, 3600); @@ -311,7 +319,7 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL) $topic_type_array = array_merge(array(0 => array( 'VALUE' => POST_NORMAL, 'S_CHECKED' => ($topic_type == POST_NORMAL) ? ' checked="checked"' : '', - 'L_TOPIC_TYPE' => $user->lang['POST_NORMAL'])), + 'L_TOPIC_TYPE' => $user->lang['POST_NORMAL'])), $topic_type_array ); @@ -571,7 +579,7 @@ function get_supported_image_types($type = false) /** * Create Thumbnail */ -function create_thumbnail($source, $destination, $mimetype) +function create_thumbnail($source, $destination, $mimetype) { global $config; @@ -618,7 +626,7 @@ function create_thumbnail($source, $destination, $mimetype) } } - if (!$used_imagick) + if (!$used_imagick) { $type = get_supported_image_types($type); @@ -630,7 +638,7 @@ function create_thumbnail($source, $destination, $mimetype) return false; } - switch ($type['format']) + switch ($type['format']) { case IMG_GIF: $image = @imagecreatefromgif($source); @@ -769,10 +777,11 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data) $hidden .= ''; } - $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'mode=view&id=' . (int) $attach_row['attach_id'], true, ($attach_row['is_orphan']) ? $user->session_id : false); + $download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'mode=view&id=' . (int) $attach_row['attach_id'], true, ($attach_row['is_orphan']) ? $user->session_id : false); $template->assign_block_vars('attach_row', array( 'FILENAME' => basename($attach_row['real_filename']), + 'A_FILENAME' => addslashes(basename($attach_row['real_filename'])), 'FILE_COMMENT' => $attach_row['attach_comment'], 'ATTACH_ID' => $attach_row['attach_id'], 'S_IS_ORPHAN' => $attach_row['is_orphan'], @@ -785,7 +794,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data) } $template->assign_vars(array( - 'FILE_COMMENT' => $filename_data['filecomment'], + 'FILE_COMMENT' => $filename_data['filecomment'], 'FILESIZE' => $config['max_filesize']) ); @@ -1105,7 +1114,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $topic_title = censor_text($topic_title); // Get banned User ID's - $sql = 'SELECT ban_userid + $sql = 'SELECT ban_userid FROM ' . BANLIST_TABLE; $result = $db->sql_query($sql); @@ -1122,7 +1131,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $notify_rows = array(); // -- get forum_userids || topic_userids - $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber + $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . " AND w.user_id NOT IN ($sql_ignore_users) @@ -1137,11 +1146,11 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id 'user_id' => $row['user_id'], 'username' => $row['username'], 'user_email' => $row['user_email'], - 'user_jabber' => $row['user_jabber'], - 'user_lang' => $row['user_lang'], + 'user_jabber' => $row['user_jabber'], + 'user_lang' => $row['user_lang'], 'notify_type' => ($topic_notification) ? 'topic' : 'forum', 'template' => ($topic_notification) ? 'topic_notify' : 'newtopic_notify', - 'method' => $row['user_notify_type'], + 'method' => $row['user_notify_type'], 'allowed' => false ); } @@ -1155,7 +1164,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows)); } - $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber + $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u WHERE fw.forum_id = $forum_id AND fw.user_id NOT IN ($sql_ignore_users) @@ -1170,11 +1179,11 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id 'user_id' => $row['user_id'], 'username' => $row['username'], 'user_email' => $row['user_email'], - 'user_jabber' => $row['user_jabber'], + 'user_jabber' => $row['user_jabber'], 'user_lang' => $row['user_lang'], 'notify_type' => 'forum', 'template' => 'forum_notify', - 'method' => $row['user_notify_type'], + 'method' => $row['user_notify_type'], 'allowed' => false ); } @@ -1223,7 +1232,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $msg_list_ary = array(); foreach ($msg_users as $row) - { + { $pos = (!isset($msg_list_ary[$row['template']])) ? 0 : sizeof($msg_list_ary[$row['template']]); $msg_list_ary[$row['template']][$pos]['method'] = $row['method']; @@ -1252,7 +1261,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id", 'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&unwatch=topic", - 'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&unwatch=forum", + 'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&unwatch=forum", )); $messenger->send($addr['method']); @@ -1627,6 +1636,12 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1'; } + else if (!$data['post_edit_reason'] && $mode == 'edit' && $auth->acl_get('m_edit', $data['forum_id'])) + { + $sql_data[POSTS_TABLE]['sql'] = array( + 'post_edit_reason' => '', + ); + } // If the person editing this post is different to the one having posted then we will add a log entry stating the edit // Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods @@ -1923,9 +1938,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } $sql_insert_ary = array(); + for ($i = 0, $size = sizeof($poll['poll_options']); $i < $size; $i++) { - if (trim($poll['poll_options'][$i])) + if (strlen(trim($poll['poll_options'][$i]))) { if (empty($cur_poll_options[$i])) { @@ -1952,7 +1968,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u if (sizeof($poll['poll_options']) < sizeof($cur_poll_options)) { $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . ' - WHERE poll_option_id >= ' . sizeof($poll['poll_options']) . ' + WHERE poll_option_id > ' . sizeof($poll['poll_options']) . ' AND topic_id = ' . $data['topic_id']; $db->sql_query($sql); } diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index f0d0520a03..68e77ec421 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -329,11 +329,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $user_id = (int) $user->data['user_id']; $action_ary = $move_into_folder = array(); + $num_not_moved = $num_removed = 0; // Newly processing on-hold messages if ($release) { - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET folder_id = ' . PRIVMSGS_NO_BOX . ' WHERE folder_id = ' . PRIVMSGS_HOLD_BOX . " AND user_id = $user_id"; @@ -384,6 +385,17 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $user_new_privmsg = (int) $user->data['user_new_privmsg']; } } + else + { + // If not relasing we need to check the number of not moved messages... + $sql = 'SELECT COUNT(msg_id) as num_messages + FROM ' . PRIVMSGS_TO_TABLE . " + WHERE user_id = $user_id + AND folder_id = " . PRIVMSGS_HOLD_BOX; + $result = $db->sql_query($sql); + $num_not_moved = (int) $db->sql_fetchfield('num_messages'); + $db->sql_freeresult($result); + } // Get those messages not yet placed into any box $retrieve_sql = 'SELECT t.*, p.*, u.username, u.user_id, u.group_id @@ -411,7 +423,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $user_ids = $memberships = array(); // First of all, grab all rules and retrieve friends/foes - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . PRIVMSGS_RULES_TABLE . " WHERE user_id = $user_id"; $result = $db->sql_query($sql); @@ -454,7 +466,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) if (sizeof($user_ids)) { $sql = 'SELECT * - FROM ' . USER_GROUP_TABLE . ' + FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $user_ids) . ' AND user_pending = 0'; $result = $db->sql_query($sql); @@ -558,7 +570,6 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // Do not change the order of processing // The number of queries needed to be executed here highly depends on the defined rules and are // only gone through if new messages arrive. - $num_not_moved = $num_removed = 0; // Delete messages if (sizeof($delete_ids)) @@ -570,7 +581,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // Set messages to Unread if (sizeof($unread_ids)) { - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET pm_unread = 0 WHERE ' . $db->sql_in_set('msg_id', $unread_ids) . " AND user_id = $user_id @@ -603,7 +614,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $sql_folder[] = $full_folder_action; } - $sql = 'SELECT folder_id, pm_count + $sql = 'SELECT folder_id, pm_count FROM ' . PRIVMSGS_FOLDER_TABLE . ' WHERE ' . $db->sql_in_set('folder_id', $sql_folder) . " AND user_id = $user_id"; @@ -619,12 +630,11 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) if (in_array(PRIVMSGS_INBOX, array_keys($move_into_folder))) { - $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages + $sql = 'SELECT COUNT(msg_id) as num_messages FROM ' . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id - AND folder_id = " . PRIVMSGS_INBOX . " - GROUP BY folder_id"; - $result = $db->sql_query_limit($sql, 1); + AND folder_id = " . PRIVMSGS_INBOX; + $result = $db->sql_query($sql); $folder[PRIVMSGS_INBOX] = (int) $db->sql_fetchfield('num_messages'); $db->sql_freeresult($result); } @@ -673,13 +683,14 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) delete_pm($user_id, $delete_ids, $dest_folder); } } - - // + + // if ($full_folder_action == FULL_FOLDER_HOLD) { $num_not_moved += sizeof($msg_ary); + $num_new -= sizeof($msg_ary); - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET folder_id = ' . PRIVMSGS_HOLD_BOX . ' WHERE folder_id = ' . PRIVMSGS_NO_BOX . " AND user_id = $user_id @@ -688,7 +699,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } else { - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " SET folder_id = $dest_folder, pm_new = 0 WHERE folder_id = " . PRIVMSGS_NO_BOX . " AND user_id = $user_id @@ -715,7 +726,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) { // Move from OUTBOX to SENTBOX // We are not checking any full folder status here... SENTBOX is a special treatment (old messages get deleted) - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET folder_id = ' . PRIVMSGS_SENTBOX . ' WHERE folder_id = ' . PRIVMSGS_OUTBOX . ' AND ' . $db->sql_in_set('msg_id', array_keys($action_ary)); @@ -759,7 +770,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol $move_msg_ids = array($move_msg_ids); } - if (sizeof($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) && + if (sizeof($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) && !in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)) && $cur_folder_id != $dest_folder) { // We have to check the destination folder ;) @@ -832,7 +843,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol $db->sql_query($sql); } } - } + } else if (in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX))) { trigger_error('CANNOT_MOVE_SPECIAL'); @@ -853,14 +864,14 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) global $db, $user; - $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " SET pm_unread = 0 WHERE msg_id = $msg_id AND user_id = $user_id AND folder_id = $folder_id"; $db->sql_query($sql); - $sql = 'UPDATE ' . USERS_TABLE . " + $sql = 'UPDATE ' . USERS_TABLE . " SET user_unread_privmsg = user_unread_privmsg - 1 WHERE user_id = $user_id"; $db->sql_query($sql); @@ -872,7 +883,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) // Try to cope with previous wrong conversions... if ($user->data['user_unread_privmsg'] < 0) { - $sql = 'UPDATE ' . USERS_TABLE . " + $sql = 'UPDATE ' . USERS_TABLE . " SET user_unread_privmsg = 0 WHERE user_id = $user_id"; $db->sql_query($sql); @@ -926,7 +937,7 @@ function handle_mark_actions($user_id, $mark_action) else { $s_hidden_fields = array( - 'cur_folder_id' => $cur_folder_id, + 'cur_folder_id' => $cur_folder_id, 'mark_option' => 'delete_marked', 'submit_mark' => true, 'marked_msg_id' => $msg_ids @@ -1036,8 +1047,8 @@ function delete_pm($user_id, $msg_ids, $folder_id) // if folder id is user defined folder then decrease pm_count if (!in_array($folder_id, array(PRIVMSGS_INBOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX, PRIVMSGS_NO_BOX))) { - $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . " - SET pm_count = pm_count - $num_deleted + $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . " + SET pm_count = pm_count - $num_deleted WHERE folder_id = $folder_id"; $db->sql_query($sql); } @@ -1060,7 +1071,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) } // Now we have to check which messages we can delete completely - $sql = 'SELECT msg_id + $sql = 'SELECT msg_id FROM ' . PRIVMSGS_TO_TABLE . ' WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows)); $result = $db->sql_query($sql); @@ -1150,7 +1161,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false) $address = array(); if (sizeof($u)) { - $sql = 'SELECT user_id, username, user_colour + $sql = 'SELECT user_id, username, user_colour FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $u) . ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; @@ -1178,7 +1189,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false) if ($plaintext) { $sql = 'SELECT group_name, group_type - FROM ' . GROUPS_TABLE . ' + FROM ' . GROUPS_TABLE . ' WHERE ' . $db->sql_in_set('group_id', $g); $result = $db->sql_query($sql); @@ -1279,7 +1290,7 @@ function get_folder_status($folder_id, $folder) } $return = array( - 'folder_name' => $folder['folder_name'], + 'folder_name' => $folder['folder_name'], 'cur' => $folder['num_messages'], 'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0, 'max' => $user->data['message_limit'], @@ -1348,11 +1359,11 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) if (isset($data['address_list']['g']) && sizeof($data['address_list']['g'])) { - $sql = 'SELECT u.user_type, ug.group_id, ug.user_id - FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug + $sql = 'SELECT u.user_type, ug.group_id, ug.user_id + FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug WHERE ' . $db->sql_in_set('ug.group_id', array_keys($data['address_list']['g'])) . ' AND ug.user_pending = 0 - AND u.user_id = ug.user_id + AND u.user_id = ug.user_id AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')'; $result = $db->sql_query($sql); @@ -1378,7 +1389,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) { case 'reply': case 'quote': - $root_level = ($data['reply_from_root_level']) ? $data['reply_from_root_level'] : $data['reply_from_msg_id']; + $root_level = ($data['reply_from_root_level']) ? $data['reply_from_root_level'] : $data['reply_from_msg_id']; // Set message_replied switch for this user $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' @@ -1394,7 +1405,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $sql_data = array( 'root_level' => $root_level, 'author_id' => $data['from_user_id'], - 'icon_id' => $data['icon_id'], + 'icon_id' => $data['icon_id'], 'author_ip' => $data['from_user_ip'], 'message_time' => $current_time, 'enable_bbcode' => $data['enable_bbcode'], @@ -1439,8 +1450,8 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) } else if ($mode == 'edit') { - $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' - SET message_edit_count = message_edit_count + 1, ' . $db->sql_build_array('UPDATE', $sql_data) . ' + $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' + SET message_edit_count = message_edit_count + 1, ' . $db->sql_build_array('UPDATE', $sql_data) . ' WHERE msg_id = ' . $data['msg_id']; $db->sql_query($sql); } @@ -1470,7 +1481,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $db->sql_multi_insert(PRIVMSGS_TO_TABLE, $sql_ary); - $sql = 'UPDATE ' . USERS_TABLE . ' + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = user_new_privmsg + 1, user_unread_privmsg = user_unread_privmsg + 1, user_last_privmsg = ' . time() . ' WHERE ' . $db->sql_in_set('user_id', array_keys($recipients)); $db->sql_query($sql); @@ -1582,8 +1593,8 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) $draft_id = request_var('draft_loaded', 0); if ($draft_id) { - $sql = 'DELETE FROM ' . DRAFTS_TABLE . " - WHERE draft_id = $draft_id + $sql = 'DELETE FROM ' . DRAFTS_TABLE . " + WHERE draft_id = $draft_id AND user_id = " . $data['from_user_id']; $db->sql_query($sql); } @@ -1616,7 +1627,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message) } // Get banned User ID's - $sql = 'SELECT ban_userid + $sql = 'SELECT ban_userid FROM ' . BANLIST_TABLE . ' WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . ' AND ban_exclude = 0'; @@ -1633,7 +1644,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message) return; } - $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber + $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients))); $result = $db->sql_query($sql); @@ -1820,9 +1831,9 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode 'QUOTE_IMG' => $user->img('icon_post_quote', $user->lang['REPLY_WITH_QUOTE']), 'HISTORY_TITLE' => $title, - 'U_VIEW_NEXT_HISTORY' => "$url&p=" . (($next_history_pm) ? $next_history_pm : $msg_id), - 'U_VIEW_PREVIOUS_HISTORY' => "$url&p=" . (($previous_history_pm) ? $previous_history_pm : $msg_id)) - ); + 'U_VIEW_NEXT_HISTORY' => ($next_history_pm) ? "$url&p=" . $next_history_pm : '', + 'U_VIEW_PREVIOUS_HISTORY' => ($previous_history_pm) ? "$url&p=" . $previous_history_pm : '', + )); return true; } diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index cbad80e28e..97b71823ac 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -1,13 +1,21 @@ sql_query($sql); @@ -113,7 +121,7 @@ class custom_profile return 'FIELD_REQUIRED'; } - if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time())) + if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50) { return 'FIELD_INVALID_DATE'; } @@ -141,7 +149,7 @@ class custom_profile { return 'FIELD_TOO_SMALL'; } - else if ($field_value > $field_data['field_maxlen']) + else if ($field_value > $field_data['field_maxlen']) { return 'FIELD_TOO_LARGE'; } @@ -200,12 +208,12 @@ class custom_profile // Display hidden/no_view fields for admin/moderator $sql = 'SELECT l.*, f.* - FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f + FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f WHERE l.lang_id = ' . $user->get_iso_lang_id() . ' AND f.field_active = 1 ' . ((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . ' AND f.field_no_view = 0 - AND l.field_id = f.field_id + AND l.field_id = f.field_id ORDER BY f.field_order'; $result = $db->sql_query($sql); @@ -280,11 +288,11 @@ class custom_profile } $sql = 'SELECT l.*, f.* - FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f + FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f WHERE l.lang_id = $lang_id AND f.field_active = 1 $sql_where - AND l.field_id = f.field_id + AND l.field_id = f.field_id ORDER BY f.field_order"; $result = $db->sql_query($sql); @@ -800,8 +808,8 @@ class custom_profile } $sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value - FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f - WHERE l.lang_id = ' . $user->get_iso_lang_id() . ' + FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f + WHERE l.lang_id = ' . $user->get_iso_lang_id() . ' ' . ((sizeof($sql_not_in)) ? ' AND ' . $db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . ' AND l.field_id = f.field_id'; $result = $db->sql_query($sql); diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 0d8a39eaee..17d3328427 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -1,14 +1,15 @@ filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { - if (!@move_uploaded_file($this->filename, $this->destination_file)) + if (!@move_uploaded_file($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -284,9 +292,9 @@ class filespec case 'move': - if (!@move_uploaded_file($this->filename, $this->destination_file)) + if (!@move_uploaded_file($this->filename, $this->destination_file)) { - if (!@copy($this->filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -299,7 +307,7 @@ class filespec case 'local': - if (!@copy($this->filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -577,7 +585,7 @@ class fileupload if (function_exists('mime_content_type')) { - $mimetype = mime_content_type($filename); + $mimetype = mime_content_type($source_file); } // Some browsers choke on a mimetype of application/octet-stream @@ -653,7 +661,7 @@ class fileupload $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']); return $file; } - + if (empty($match[2])) { $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']); @@ -813,7 +821,7 @@ class fileupload // check Filename if (preg_match("#[\\/:*?\"<>|]#i", $file->get('realname'))) - { + { $file->error[] = sprintf($user->lang[$this->error_prefix . 'INVALID_FILENAME'], $file->get('realname')); } @@ -842,8 +850,8 @@ class fileupload return true; } - if (($file->get('width') > $this->max_width && $this->max_width) || - ($file->get('height') > $this->max_height && $this->max_height) || + if (($file->get('width') > $this->max_width && $this->max_width) || + ($file->get('height') > $this->max_height && $this->max_height) || ($file->get('width') < $this->min_width && $this->min_width) || ($file->get('height') < $this->min_height && $this->min_height)) { @@ -862,7 +870,7 @@ class fileupload } /** - * Return image type/extension mapping + * Return image type/extension mapping */ function image_types() { diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index fed783e880..8501175d5f 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Obtain user_ids from usernames or vice versa. Returns false on * success else the error string @@ -208,6 +216,8 @@ function user_add($user_row, $cp_data = false) 'user_sig' => '', 'user_sig_bbcode_uid' => '', 'user_sig_bbcode_bitfield' => '', + + 'user_form_salt' => unique_id(), ); // Now fill the sql array with not required variables @@ -243,7 +253,7 @@ function user_add($user_row, $cp_data = false) include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); } - $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . + $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', custom_profile::build_insert_sql_array($cp_data)); $db->sql_query($sql); } @@ -525,7 +535,7 @@ function user_delete($mode, $user_id, $post_username = false) continue; } - $sql = 'UPDATE ' . USERS_TABLE . ' + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ', user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . ' WHERE user_id = ' . $_user_id; @@ -551,7 +561,7 @@ function user_delete($mode, $user_id, $post_username = false) /** * Flips user_type from active to inactive and vice versa, handles group membership updates -* +* * @param string $mode can be flip for flipping from active/inactive, activate or deactivate */ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) @@ -580,8 +590,8 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) { $sql_ary = array(); - if ($row['user_type'] == USER_IGNORE || $row['user_type'] == USER_FOUNDER || - ($mode == 'activate' && $row['user_type'] != USER_INACTIVE) || + if ($row['user_type'] == USER_IGNORE || $row['user_type'] == USER_FOUNDER || + ($mode == 'activate' && $row['user_type'] != USER_INACTIVE) || ($mode == 'deactivate' && $row['user_type'] == USER_INACTIVE)) { continue; @@ -672,7 +682,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas else { $ban_other = explode('-', $ban_len_other); - if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) && + if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) && (strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2)) { $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0])); @@ -1112,6 +1122,13 @@ function user_ipwhois($ip) { $ipwhois = ''; + // Check IP + // Only supporting IPv4 at the moment... + if (empty($ip) || !preg_match(get_preg_expression('ipv4'), $ip)) + { + return ''; + } + $match = array( '#RIPE\.NET#is' => 'whois.ripe.net', '#whois\.apnic\.net#is' => 'whois.apnic.net', @@ -1147,7 +1164,10 @@ function user_ipwhois($ip) } } - return $ipwhois; + $ipwhois = htmlspecialchars($ipwhois); + + // Magic URL ;) + return trim(make_clickable($ipwhois, false, '')); } /** @@ -1975,14 +1995,14 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var while (($file = readdir($dp)) !== false) { - if ($file[0] != '.' && is_dir("$path/$file")) + if ($file[0] != '.' && preg_match('#^[^&"\'<>]+$#i', $file) && is_dir("$path/$file")) { $avatar_row_count = $avatar_col_count = 0; $dp2 = @opendir("$path/$file"); while (($sub_file = readdir($dp2)) !== false) { - if (preg_match('#^[^&"<>]*\.(?:gif|png|jpe?g)$#i', $sub_file)) + if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $sub_file)) { $avatar_list[$file][$avatar_row_count][$avatar_col_count] = array( 'file' => "$file/$sub_file", @@ -2198,7 +2218,7 @@ function avatar_process_user(&$error, $custom_userdata = false) } } } - if (($config['avatar_max_width'] || $config['avatar_max_height']) && + if (($config['avatar_max_width'] || $config['avatar_max_height']) && (($data['width'] != $userdata['user_avatar_width']) || $data['height'] != $userdata['user_avatar_height'])) { if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) @@ -2294,7 +2314,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow { $error[] = $user->lang[$err]; } - + if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE))) { $error[] = $user->lang['GROUP_ERR_TYPE']; @@ -2404,7 +2424,6 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow if (sizeof($sql_ary) && sizeof($user_ary)) { group_set_user_default($group_id, $user_ary, $sql_ary); - } $name = ($type == GROUP_SPECIAL) ? $user->lang['G_' . $name] : $name; @@ -2450,7 +2469,7 @@ function avatar_remove_db($avatar_name) $sql = 'UPDATE ' . USERS_TABLE . " SET user_avatar = '', - user_avatar_type = 0 + user_avatar_type = 0 WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\''; $db->sql_query($sql); } @@ -2778,14 +2797,14 @@ function remove_default_avatar($group_id, $user_ids) } $db->sql_freeresult($result); - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_avatar = \'\', - user_avatar_type = 0, - user_avatar_width = 0, - user_avatar_height = 0 - WHERE group_id = ' . (int)$group_id . ' - AND user_avatar = \'' . $db->sql_escape($row['group_avatar']) . '\' - AND ' . $db->sql_in_set('user_id', $user_ids); + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_avatar = '', + user_avatar_type = 0, + user_avatar_width = 0, + user_avatar_height = 0 + WHERE group_id = " . (int) $group_id . " + AND user_avatar = '" . $db->sql_escape($row['group_avatar']) . "' + AND " . $db->sql_in_set('user_id', $user_ids); $db->sql_query($sql); } @@ -2821,9 +2840,9 @@ function remove_default_rank($group_id, $user_ids) $sql = 'UPDATE ' . USERS_TABLE . ' SET user_rank = 0 - WHERE group_id = ' . (int)$group_id . ' - AND user_rank <> 0 - AND user_rank = ' . (int)$row['group_rank'] . ' + WHERE group_id = ' . (int)$group_id . ' + AND user_rank <> 0 + AND user_rank = ' . (int)$row['group_rank'] . ' AND ' . $db->sql_in_set('user_id', $user_ids); $db->sql_query($sql); } @@ -2916,7 +2935,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna break; case 'default': - $sql = 'SELECT user_id, group_id FROM ' . USERS_TABLE . ' + $sql = 'SELECT user_id, group_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $user_id_ary, false, true); $result = $db->sql_query($sql); @@ -2958,7 +2977,7 @@ function group_validate_groupname($group_id, $group_name) { global $config, $db; - $group_name = utf8_clean_string($group_name); + $group_name = utf8_clean_string($group_name); if (!empty($group_id)) { @@ -3035,8 +3054,6 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal $db->sql_freeresult($result); } - - foreach ($attribute_ary as $attribute => $type) { if (isset($group_attributes[$attribute])) diff --git a/phpBB/includes/hooks/index.php b/phpBB/includes/hooks/index.php new file mode 100644 index 0000000000..aa85e63f32 --- /dev/null +++ b/phpBB/includes/hooks/index.php @@ -0,0 +1,250 @@ + $method) + { + $this->add_hook($method); + } + + if (function_exists('phpbb_hook_register')) + { + phpbb_hook_register($this); + } + } + + /** + * Register function/method to be called within hook + * This function is normally called by the modification/application to attach/register the functions. + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + * @param mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition + * @param string $mode Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain. + */ + function register($definition, $hook, $mode = 'normal') + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + // Method able to be hooked? + if (isset($this->hooks[$class][$function])) + { + switch ($mode) + { + case 'standalone': + if (!isset($this->hooks[$class][$function]['standalone'])) + { + $this->hooks[$class][$function] = array('standalone' => $hook); + } + else + { + trigger_error('Hook not able to be called standalone, previous hook already standalone.', E_NOTICE); + } + break; + + case 'first': + case 'last': + $this->hooks[$class][$function][$mode][] = $hook; + break; + + case 'normal': + default: + $this->hooks[$class][$function]['normal'][] = $hook; + break; + } + } + } + + /** + * Calling all functions/methods attached to a specified hook. + * Called by the function allowing hooks... + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + * @return bool False if no hook got executed, true otherwise + */ + function call_hook($definition) + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + if (!empty($this->hooks[$class][$function])) + { + // Developer tries to call a hooked function within the hooked function... + if ($this->current_hook !== NULL && $this->current_hook['class'] === $class && $this->current_hook['function'] === $function) + { + return false; + } + + // Call the hook with the arguments attached and store result + $arguments = func_get_args(); + $this->current_hook = array('class' => $class, 'function' => $function); + $arguments[0] = &$this; + + // Call the hook chain... + if (isset($this->hooks[$class][$function]['standalone'])) + { + $this->hook_result[$class][$function] = call_user_func_array($this->hooks[$class][$function]['standalone'], $arguments); + } + else + { + foreach (array('first', 'normal', 'last') as $mode) + { + if (!isset($this->hooks[$class][$function][$mode])) + { + continue; + } + + foreach ($this->hooks[$class][$function][$mode] as $hook) + { + $this->hook_result[$class][$function] = call_user_func_array($hook, $arguments); + } + } + } + + $this->current_hook = NULL; + return true; + } + + $this->current_hook = NULL; + return false; + } + + /** + * Get result from previously called functions/methods for the same hook + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + * @return mixed False if nothing returned if there is no result, else array('result' => ... ) + */ + function previous_hook_result($definition) + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) + { + return array('result' => $this->hook_result[$class][$function]); + } + + return false; + } + + /** + * Check if the called functions/methods returned something. + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + * @return bool True if results are there, false if not + */ + function hook_return($definition) + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) + { + return true; + } + + return false; + } + + /** + * Give actual result from called functions/methods back. + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + * @return mixed The result + */ + function hook_return_result($definition) + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) + { + $result = $this->hook_result[$class][$function]; + unset($this->hook_result[$class][$function]); + return $result; + } + + return; + } + + /** + * Add new function to the allowed hooks. + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + */ + function add_hook($definition) + { + if (!is_array($definition)) + { + $definition = array('__global', $definition); + } + + $this->hooks[$definition[0]][$definition[1]] = array(); + } + + /** + * Remove function from the allowed hooks. + * + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) + */ + function remove_hook($definition) + { + $class = (!is_array($definition)) ? '__global' : $definition[0]; + $function = (!is_array($definition)) ? $definition : $definition[1]; + + if (isset($this->hooks[$class][$function])) + { + unset($this->hooks[$class][$function]); + + if (isset($this->hook_result[$class][$function])) + { + unset($this->hook_result[$class][$function]); + } + } + } +} + +?> \ No newline at end of file diff --git a/phpBB/includes/mcp/info/mcp_ban.php b/phpBB/includes/mcp/info/mcp_ban.php index 75b30174df..383df30498 100644 --- a/phpBB/includes/mcp/info/mcp_ban.php +++ b/phpBB/includes/mcp/info/mcp_ban.php @@ -1,10 +1,10 @@ ($mode == 'user') ? true : false, 'U_ACTION' => $this->u_action, - 'U_FIND_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_ban&field=ban'), + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_ban&field=ban'), )); if ($mode != 'user') diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index d4c6f1f395..5f736e62b4 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -1,13 +1,21 @@ assign_var('S_MCP_ACTION', append_sid("{$phpbb_root_path}mcp.$phpEx")); - make_jumpbox(append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view'), 0, false, 'm_'); + make_jumpbox(append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view'), 0, false, 'm_', true); } ?> \ No newline at end of file diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index d16cdf0196..6c20cf85b4 100755 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -1,13 +1,21 @@ lang['NO_TOPICS_SELECTED']; + $additional_msg = $user->lang['NO_TOPIC_SELECTED']; } else if (!sizeof($forum_data)) { diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 391d41b6fb..42a64055ce 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -1,13 +1,21 @@ assign_vars(array( 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true', false), 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes'), - 'L_TITLE' => $user->lang['MCP_NOTES']) - ); + 'L_TITLE' => $user->lang['MCP_NOTES'], + )); $this->tpl_name = 'mcp_notes_front'; break; @@ -75,6 +82,8 @@ class mcp_notes $sk = request_var('sk', 'b'); $sd = request_var('sd', 'd'); + add_form_key('mcp_notes'); + $sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; $sql = 'SELECT * @@ -122,15 +131,22 @@ class mcp_notes if ($where_sql || $deleteall) { - $sql = 'DELETE FROM ' . LOG_TABLE . ' - WHERE log_type = ' . LOG_USERS . " - AND reportee_id = $user_id - $where_sql"; - $db->sql_query($sql); + if (check_form_key('mcp_notes')) + { + $sql = 'DELETE FROM ' . LOG_TABLE . ' + WHERE log_type = ' . LOG_USERS . " + AND reportee_id = $user_id + $where_sql"; + $db->sql_query($sql); - add_log('admin', 'LOG_CLEAR_USER', $userrow['username']); + add_log('admin', 'LOG_CLEAR_USER', $userrow['username']); - $msg = ($deletemark) ? 'MARKED_NOTES_DELETED' : 'ALL_NOTES_DELETED'; + $msg = ($deletemark) ? 'MARKED_NOTES_DELETED' : 'ALL_NOTES_DELETED'; + } + else + { + $msg = 'FORM_INVALID'; + } $redirect = $this->u_action . '&u=' . $user_id; meta_refresh(3, $redirect); trigger_error($user->lang[$msg] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); @@ -139,15 +155,22 @@ class mcp_notes if ($usernote && $action == 'add_feedback') { - add_log('admin', 'LOG_USER_FEEDBACK', $userrow['username']); - add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $userrow['username']); - - add_log('user', $user_id, 'LOG_USER_GENERAL', $usernote); + if (check_form_key('mcp_notes')) + { + add_log('admin', 'LOG_USER_FEEDBACK', $userrow['username']); + add_log('mod', 0, 0, 'LOG_USER_FEEDBACK', $userrow['username']); + add_log('user', $user_id, 'LOG_USER_GENERAL', $usernote); + $msg = $user->lang['USER_FEEDBACK_ADDED']; + } + else + { + $msg = $user->lang['FORM_INVALID']; + } $redirect = $this->u_action; meta_refresh(3, $redirect); - trigger_error($user->lang['USER_FEEDBACK_ADDED'] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); + trigger_error($msg . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); } // Generate the appropriate user information for the user we are looking at diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index dd10750d99..8f4630bf4c 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Handling actions in post details screen */ @@ -24,6 +32,8 @@ function mcp_post_details($id, $mode, $action) // Get post data $post_info = get_post_data(array($post_id), false, true); + add_form_key('mcp_post_details'); + if (!sizeof($post_info)) { trigger_error('POST_NOT_EXIST'); @@ -36,20 +46,18 @@ function mcp_post_details($id, $mode, $action) { case 'whois': - $ip = request_var('ip', ''); - include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + if ($auth->acl_get('m_info', $post_info['forum_id'])) + { + $ip = request_var('ip', ''); + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - $whois = user_ipwhois($ip); - - $whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1\2\3', $whois); - $whois = preg_replace('#(\s)(ht{2}p:/{2}\S*)(\s)#', '\1\2\3', $whois); - - $template->assign_vars(array( - 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), - 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id"), - 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), - 'WHOIS' => trim($whois)) - ); + $template->assign_vars(array( + 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), + 'U_RETURN_POST' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id"), + 'L_RETURN_POST' => sprintf($user->lang['RETURN_POST'], '', ''), + 'WHOIS' => user_ipwhois($ip), + )); + } // We're done with the whois page so return return; @@ -84,7 +92,14 @@ function mcp_post_details($id, $mode, $action) if ($auth->acl_get('m_chgposter', $post_info['forum_id'])) { - change_poster($post_info, $row); + if (check_form_key('mcp_post_details')) + { + change_poster($post_info, $row); + } + else + { + trigger_error('FORM_INVALID'); + } } break; @@ -178,7 +193,6 @@ function mcp_post_details($id, $mode, $action) 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true', false), 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), @@ -304,7 +318,7 @@ function mcp_post_details($id, $mode, $action) if (sizeof($users_ary)) { // Get the usernames - $sql = 'SELECT user_id, username + $sql = 'SELECT user_id, username FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', array_keys($users_ary)); $result = $db->sql_query($sql); @@ -406,7 +420,7 @@ function change_poster(&$post_info, $userdata) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts - 1 - WHERE user_id = ' . $post_info['user_id'] .' + WHERE user_id = ' . $post_info['user_id'] .' AND user_posts > 0'; $db->sql_query($sql); diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 0d2ea76498..6d7f9ffaba 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * mcp_queue * Handling the moderation queue diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 9528eec33b..0faa1dc8b7 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * mcp_reports * Handling the reports queue @@ -298,7 +306,7 @@ class mcp_reports $forum_options = ''; foreach ($forum_list_reports as $row) { - $forum_options .= ''; + $forum_options .= ''; $forum_data[$row['forum_id']] = $row; } unset($forum_list_reports); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 1002b1c918..f8214e4f1b 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -1,13 +1,21 @@ $sort_days, + )); + $template->assign_vars(array( 'TOPIC_TITLE' => $topic_info['topic_title'], 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']), @@ -290,10 +307,12 @@ function mcp_topic_view($id, $mode, $action) 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, 'S_SPLIT_VIEW' => ($action == 'split') ? true : false, + 'S_HIDDEN_FIELDS' => $s_hidden_fields, + 'S_SHOW_TOPIC_ICONS' => $s_topic_icons, 'S_TOPIC_ICON' => $icon_id, - 'U_SELECT_TOPIC' => "$url&i=$id&mode=forum_view&action=merge_select", + 'U_SELECT_TOPIC' => "$url&i=$id&mode=forum_view&action=merge_select" . (($forum_id) ? "&f=$forum_id" : ''), 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '', ''), 'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '', ''), diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 892929539f..cab102f1f7 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -1,13 +1,21 @@ page_title = 'MCP_WARN'; + add_form_key('mcp_warn'); + switch ($mode) { case 'front': @@ -71,7 +81,6 @@ class mcp_warn $template->assign_vars(array( 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true', false), 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user'), )); @@ -194,7 +203,7 @@ class mcp_warn $warning = utf8_normalize_nfc(request_var('warning', '', true)); $sql = 'SELECT u.*, p.* - FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u WHERE post_id = $post_id AND u.user_id = p.poster_id"; $result = $db->sql_query($sql); @@ -242,8 +251,15 @@ class mcp_warn if ($warning && $action == 'add_warning') { - add_warning($user_row, $warning, $notify, $post_id); - + if (check_form_key('mcp_warn')) + { + add_warning($user_row, $warning, $notify, $post_id); + $msg = $user->lang['USER_WARNING_ADDED']; + } + else + { + $msg = $user->lang['FORM_INVALID']; + } $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); meta_refresh(2, $redirect); trigger_error($user->lang['USER_WARNING_ADDED'] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); @@ -337,11 +353,18 @@ class mcp_warn if ($warning && $action == 'add_warning') { - add_warning($user_row, $warning, $notify); - + if (check_form_key('mcp_warn')) + { + add_warning($user_row, $warning, $notify); + $msg = $user->lang['USER_WARNING_ADDED']; + } + else + { + $msg = $user->lang['FORM_INVALID']; + } $redirect = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=notes&mode=user_notes&u=$user_id"); meta_refresh(2, $redirect); - trigger_error($user->lang['USER_WARNING_ADDED'] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); + trigger_error($msg . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); } // Generate the appropriate user information for the user we are looking at @@ -423,7 +446,7 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0) $db->sql_query('INSERT INTO ' . WARNINGS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); - $sql = 'UPDATE ' . USERS_TABLE . ' + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_warnings = user_warnings + 1, user_last_warning = ' . time() . ' WHERE user_id = ' . $user_row['user_id']; diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index d2e54e1404..311c75b410 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -672,6 +672,11 @@ class bbcode_firstpass extends bbcode { global $config, $user; + /** + * If you change this code, make sure the cases described within the following reports are still working: + * #3572, #14667 + */ + $in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in))); if (!$in) @@ -801,12 +806,19 @@ class bbcode_firstpass extends bbcode { // Search the text for the next tok... if an ending quote comes first, then change tok to [] $pos1 = strpos($in, '[/quote'); + // If the token ] comes first, we change it to ] $pos2 = strpos($in, ']'); + // If the token [ comes first, we change it to [ + $pos3 = strpos($in, '['); - if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2)) + if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2) && ($pos3 === false || $pos1 < $pos3)) { $tok = '[]'; } + else if ($pos3 !== false && ($pos2 === false || $pos3 < $pos2)) + { + $tok = '['; + } else { $tok = ']'; @@ -875,7 +887,7 @@ class bbcode_firstpass extends bbcode * Validate url * * @param string $var1 optional url parameter for url bbcode: [url(=$var1)]$var2[/url] - * @param string $var2 url bbcode content: [url(=$var1)]$var2[/url] + * @param string $var2 url bbcode content: [url(=$var1)]$var2[/url] */ function validate_url($var1, $var2) { @@ -921,7 +933,7 @@ class bbcode_firstpass extends bbcode $url = append_sid($url); } - return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']'; + return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']'; } return '[url' . (($var1) ? '=' . $var1 : '') . ']' . $var2 . '[/url]'; @@ -967,7 +979,7 @@ class bbcode_firstpass extends bbcode if ($pos_domain !== false && $pos_path >= $pos_domain && $pos_ext >= $pos_path) { // Ok, actually we allow linking to some files (this may be able to be extended in some way later...) - if (strpos($url, '/' . $check_path . '/download.' . $phpEx) !== 0) + if (strpos($url, '/' . $check_path . '/download/file.' . $phpEx) !== 0) { return false; } @@ -1006,7 +1018,7 @@ class parse_message extends bbcode_firstpass function parse_message($message = '') { // Init BBCode UID - $this->bbcode_uid = substr(md5(time()), 0, BBCODE_UID_LEN); + $this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN); if ($message) { @@ -1048,8 +1060,8 @@ class parse_message extends bbcode_firstpass $replace = array("\\1:"); $this->message = preg_replace($match, $replace, trim($this->message)); - // Message length check. -1 disables this check completely. - if ($config['max_' . $mode . '_chars'] != -1) + // Message length check. 0 disables this check completely. + if ($config['max_' . $mode . '_chars'] > 0) { $msg_len = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message)); @@ -1060,6 +1072,13 @@ class parse_message extends bbcode_firstpass } } + // Check for "empty" message + if (!utf8_clean_string($this->message)) + { + $this->warn_msg[] = $user->lang['TOO_FEW_CHARS']; + return $this->warn_msg; + } + // Prepare BBcode (just prepares some tags for better parsing) if ($allow_bbcode && strpos($this->message, '[') !== false) { @@ -1221,20 +1240,20 @@ class parse_message extends bbcode_firstpass { case 'mssql': case 'mssql_odbc': - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' ORDER BY LEN(code) DESC'; break; case 'firebird': - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' ORDER BY CHAR_LENGTH(code) DESC'; break; // LENGTH supported by MySQL, IBM DB2, Oracle and Access for sure... default: - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' ORDER BY LENGTH(code) DESC'; break; diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 38022a21c4..91d70d074e 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -9,6 +9,7 @@ */ /** +* @ignore */ if (!defined('IN_PHPBB')) { diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index ac3fc14f4f..bfcb02f8e6 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1,14 +1,15 @@ put('_search_results_' . $search_key, $store, $config['search_store_results']); - $sql = 'UPDATE ' . SEARCH_RESULTS_TABLE . ' + $sql = 'UPDATE ' . SEARCH_RESULTS_TABLE . ' SET search_time = ' . time() . ' WHERE search_key = \'' . $db->sql_escape($search_key) . '\''; $db->sql_query($sql); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index a029388101..6ddc97fff8 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Session class * @package phpBB3 @@ -51,18 +59,28 @@ class session $script_name = str_replace(array('\\', '//'), '/', $script_name); // Now, remove the sid and let us get a clean query string... + $use_args = array(); + + // Since some browser do not encode correctly we need to do this with some "special" characters... + // " -> %22, ' => %27, < -> %3C, > -> %3E + $find = array('"', "'", '<', '>'); + $replace = array('%22', '%27', '%3C', '%3E'); + foreach ($args as $key => $argument) { if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0) { - unset($args[$key]); + continue; } + + $use_args[str_replace($find, $replace, $key)] = str_replace($find, $replace, $argument); } + unset($args); // The following examples given are for an request uri of {path to the phpbb directory}/adm/index.php?i=10&b=2 // The current query string - $query_string = trim(implode('&', $args)); + $query_string = trim(implode('&', $use_args)); // basenamed page name (for example: index.php) $page_name = basename($script_name); @@ -148,18 +166,12 @@ class session { $this->forwarded_for = preg_replace('#, +#', ', ', $this->forwarded_for); - // Whoa these look impressive! - // The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses - // can be found in the develop directory - $ipv4 = '#^(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$#'; - $ipv6 = '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:::(?:[\dA-F]{1,4}:){5}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:):(?:[\dA-F]{1,4}:){4}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,2}:(?:[\dA-F]{1,4}:){3}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,3}:(?:[\dA-F]{1,4}:){2}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,4}:(?:[\dA-F]{1,4}:)(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,5}:(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])))|(?:(?:[\dA-F]{1,4}:){1,6}:[\dA-F]{1,4})|(?:(?:[\dA-F]{1,4}:){1,7}:))$#i'; - // split the list of IPs $ips = explode(', ', $this->forwarded_for); foreach ($ips as $ip) { // check IPv4 first, the IPv6 is hopefully only going to be used very seldomly - if (!empty($ip) && !preg_match($ipv4, $ip) && !preg_match($ipv6, $ip)) + if (!empty($ip) && !preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip)) { // contains invalid data, don't use the forwarded for header $this->forwarded_for = ''; @@ -363,7 +375,7 @@ class session foreach ($active_bots as $row) { - if ($row['bot_agent'] && strpos(strtolower($this->browser), strtolower($row['bot_agent'])) !== false) + if ($row['bot_agent'] && preg_match('#' . str_replace('\*', '.*?', preg_quote($row['bot_agent'], '#')) . '#i', $this->browser)) { $bot = $row['user_id']; } @@ -637,6 +649,24 @@ class session $this->set_cookie('sid', $this->session_id, $cookie_expire); unset($cookie_expire); + + $sql = 'SELECT COUNT(session_id) AS sessions + FROM ' . SESSIONS_TABLE . ' + WHERE session_user_id = ' . (int) $this->data['user_id'] . ' + AND session_time >= ' . ($this->time_now - $config['form_token_lifetime']); + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ((int) $row['sessions'] <= 1 || empty($this->data['user_form_salt'])) + { + $this->data['user_form_salt'] = unique_id(); + // Update the form key + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_form_salt = \'' . $db->sql_escape($this->data['user_form_salt']) . '\' + WHERE user_id = ' . (int) $this->data['user_id']; + $db->sql_query($sql); + } } else { @@ -746,6 +776,8 @@ class session { global $db, $config; + $batch_size = 10; + if (!$this->time_now) { $this->time_now = time(); @@ -762,7 +794,7 @@ class session FROM ' . SESSIONS_TABLE . ' WHERE session_time < ' . ($this->time_now - $config['session_length']) . ' GROUP BY session_user_id, session_page'; - $result = $db->sql_query_limit($sql, 10); + $result = $db->sql_query_limit($sql, $batch_size); $del_user_id = array(); $del_sessions = 0; @@ -788,23 +820,55 @@ class session $db->sql_query($sql); } - if ($del_sessions < 10) + if ($del_sessions < $batch_size) { - // Less than 10 sessions, update gc timer ... else we want gc + // Less than 10 users, update gc timer ... else we want gc // called again to delete other sessions set_config('session_last_gc', $this->time_now, true); + + if ($config['max_autologin_time']) + { + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE last_login < ' . (time() - (86400 * (int) $config['max_autologin_time'])); + $db->sql_query($sql); + } + $this->confirm_gc(); } - - if ($config['max_autologin_time']) - { - $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' - WHERE last_login < ' . (time() - (86400 * (int) $config['max_autologin_time'])); - $db->sql_query($sql); - } - + return; } + + function confirm_gc($type = 0) + { + global $db, $config; + + $sql = 'SELECT DISTINCT c.session_id + FROM ' . CONFIRM_TABLE . ' c + LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id) + WHERE s.session_id IS NULL' . + ((empty($type)) ? '' : ' AND c.confirm_type = ' . (int) $type); + $result = $db->sql_query($sql); + if ($row = $db->sql_fetchrow($result)) + { + $sql_in = array(); + do + { + $sql_in[] = (string) $row['session_id']; + } + while ($row = $db->sql_fetchrow($result)); + + if (sizeof($sql_in)) + { + $sql = 'DELETE FROM ' . CONFIRM_TABLE . ' + WHERE ' . $db->sql_in_set('session_id', $sql_in); + $db->sql_query($sql); + } + } + $db->sql_freeresult($result); + } + + /** * Sets a cookie * @@ -921,7 +985,7 @@ class session { $ban_triggered_by = 'user'; } - else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips)) + else if ($ip_banned) { $ban_triggered_by = 'ip'; } @@ -1284,7 +1348,7 @@ class user extends session else { // Set up style - $style = ($style) ? $style : ((!$config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $config['default_style']); + $style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']); } $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name @@ -1480,6 +1544,10 @@ class user extends session } } + // Call phpbb_user_session_handler() in case external application want to "bend" some variables or replace classes... + // After calling it we continue script execution... + phpbb_user_session_handler(); + // If this function got called from the error handler we are finished here. if (defined('IN_ERROR_HANDLER')) { diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index b13dbaa99a..2e60beb658 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -1,14 +1,15 @@ call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once)) + { + if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__))) + { + return $phpbb_hook->hook_return_result(array(__CLASS__, __FUNCTION__)); + } + } if (defined('IN_ERROR_HANDLER')) { @@ -400,10 +409,10 @@ class template * * If key is false the position is set to 0 * If key is true the position is set to the last entry - * + * * @param string $mode Mode to execute (valid modes are 'insert' and 'change') * - * If insert, the vararray is inserted at the given position (position counting from zero). + * If insert, the vararray is inserted at the given position (position counting from zero). * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). * * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) diff --git a/phpBB/includes/ucp/info/ucp_attachments.php b/phpBB/includes/ucp/info/ucp_attachments.php index a6aa393da5..84edce446c 100644 --- a/phpBB/includes/ucp/info/ucp_attachments.php +++ b/phpBB/includes/ucp/info/ucp_attachments.php @@ -1,10 +1,10 @@ data['user_id'] . ' + AND is_orphan = 0 + AND ' . $db->sql_in_set('attach_id', $delete_ids); + $result = $db->sql_query($sql); + + $delete_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $delete_ids[] = $row['attach_id']; + } + $db->sql_freeresult($result); + } + if ($delete && sizeof($delete_ids)) { $s_hidden_fields = array( @@ -46,6 +72,7 @@ class ucp_attachments { include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); } + delete_attachments('attach', $delete_ids); meta_refresh(3, $this->u_action); @@ -94,7 +121,7 @@ class ucp_attachments $db->sql_freeresult($result); $sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title - FROM ' . ATTACHMENTS_TABLE . ' a + FROM ' . ATTACHMENTS_TABLE . ' a LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0) LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id AND a.in_message = 1) WHERE a.poster_id = ' . $user->data['user_id'] . " @@ -134,30 +161,30 @@ class ucp_attachments 'S_IN_MESSAGE' => $row['in_message'], - 'U_VIEW_ATTACHMENT' => append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $row['attach_id']), + 'U_VIEW_ATTACHMENT' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $row['attach_id']), 'U_VIEW_TOPIC' => $view_topic) ); $row_count++; - } + } while ($row = $db->sql_fetchrow($result)); } $db->sql_freeresult($result); - $template->assign_vars(array( + $template->assign_vars(array( 'PAGE_NUMBER' => on_page($num_attachments, $config['topics_per_page'], $start), 'PAGINATION' => generate_pagination($this->u_action . "&sk=$sort_key&sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start), 'TOTAL_ATTACHMENTS' => $num_attachments, 'L_TITLE' => $user->lang['UCP_ATTACHMENTS'], - 'U_SORT_FILENAME' => $this->u_action . "&sk=a&sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_FILE_COMMENT' => $this->u_action . "&sk=b&sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_EXTENSION' => $this->u_action . "&sk=c&sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_FILESIZE' => $this->u_action . "&sk=d&sd=" . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_DOWNLOADS' => $this->u_action . "&sk=e&sd=" . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_POST_TIME' => $this->u_action . "&sk=f&sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), - 'U_SORT_TOPIC_TITLE' => $this->u_action . "&sk=g&sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_FILENAME' => $this->u_action . "&sk=a&sd=" . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_FILE_COMMENT' => $this->u_action . "&sk=b&sd=" . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_EXTENSION' => $this->u_action . "&sk=c&sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_FILESIZE' => $this->u_action . "&sk=d&sd=" . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_DOWNLOADS' => $this->u_action . "&sk=e&sd=" . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_POST_TIME' => $this->u_action . "&sk=f&sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), + 'U_SORT_TOPIC_TITLE' => $this->u_action . "&sk=g&sd=" . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'), 'S_DISPLAY_MARK_ALL' => ($num_attachments) ? true : false, 'S_DISPLAY_PAGINATION' => ($num_attachments) ? true : false, diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index e971dbb3ae..0f37c456fa 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -1,13 +1,21 @@ sql_escape($user->session_id) . "' + FROM ' . CONFIRM_TABLE . " + WHERE session_id = '" . $db->sql_escape($user->session_id) . "' AND confirm_id = '" . $db->sql_escape($confirm_id) . "' AND confirm_type = $type"; $result = $db->sql_query($sql); diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 44b5498ca7..a4fc818343 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * ucp_groups * @package ucp @@ -393,11 +401,12 @@ class ucp_groups $this->page_title = 'UCP_USERGROUPS_MANAGE'; $action = (isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''); $group_id = request_var('g', 0); + add_form_key('ucp_groups'); if ($group_id) { - $sql = 'SELECT * - FROM ' . GROUPS_TABLE . " + $sql = 'SELECT * + FROM ' . GROUPS_TABLE . " WHERE group_id = $group_id"; $result = $db->sql_query($sql); $group_row = $db->sql_fetchrow($result); @@ -479,10 +488,10 @@ class ucp_groups { // Avatar stuff $var_ary = array( - 'uploadurl' => array('string', true, 5, 255), - 'remotelink' => array('string', true, 5, 255), - 'width' => array('string', true, 1, 3), - 'height' => array('string', true, 1, 3), + 'uploadurl' => array('string', true, 5, 255), + 'remotelink' => array('string', true, 5, 255), + 'width' => array('string', true, 1, 3), + 'height' => array('string', true, 1, 3), ); if (!($error = validate_data($data, $var_ary))) @@ -552,10 +561,15 @@ class ucp_groups } } + if (!check_form_key('ucp_groups')) + { + $error[] = $user->lang['FORM_INVALID']; + } + if (!sizeof($error)) { // Only set the rank, colour, etc. if it's changed or if we're adding a new - // group. This prevents existing group members being updated if no changes + // group. This prevents existing group members being updated if no changes // were made. $group_attributes = array(); @@ -609,7 +623,7 @@ class ucp_groups $group_rank = $group_row['group_rank']; } - $sql = 'SELECT * + $sql = 'SELECT * FROM ' . RANKS_TABLE . ' WHERE rank_special = 1 ORDER BY rank_title'; @@ -636,6 +650,9 @@ class ucp_groups { avatar_gallery($category, $avatar_select, 4); } + + $avatars_enabled = ($can_upload || ($config['allow_avatar_local'] || $config['allow_avatar_remote'])) ? true : false; + $template->assign_vars(array( 'S_EDIT' => true, @@ -644,6 +661,7 @@ class ucp_groups 'S_FORM_ENCTYPE' => ($can_upload) ? ' enctype="multipart/form-data"' : '', 'S_ERROR' => (sizeof($error)) ? true : false, 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false, + 'S_AVATARS_ENABLED' => $avatars_enabled, 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, @@ -678,7 +696,6 @@ class ucp_groups 'GROUP_HIDDEN' => $type_hidden, 'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'), - 'UA_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour', false), 'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id", 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024))) ); @@ -707,9 +724,9 @@ class ucp_groups $start = request_var('start', 0); // Grab the leaders - always, on every page... - $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending - FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug - WHERE ug.group_id = $group_id + $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending + FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug + WHERE ug.group_id = $group_id AND u.user_id = ug.user_id AND ug.group_leader = 1 ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean"; @@ -731,18 +748,18 @@ class ucp_groups $db->sql_freeresult($result); // Total number of group members (non-leaders) - $sql = 'SELECT COUNT(user_id) AS total_members - FROM ' . USER_GROUP_TABLE . " - WHERE group_id = $group_id + $sql = 'SELECT COUNT(user_id) AS total_members + FROM ' . USER_GROUP_TABLE . " + WHERE group_id = $group_id AND group_leader = 0"; $result = $db->sql_query($sql); $total_members = (int) $db->sql_fetchfield('total_members'); $db->sql_freeresult($result); // Grab the members - $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending - FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug - WHERE ug.group_id = $group_id + $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending + FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug + WHERE ug.group_id = $group_id AND u.user_id = ug.user_id AND ug.group_leader = 0 ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean"; @@ -790,8 +807,7 @@ class ucp_groups 'U_ACTION' => $this->u_action . "&g=$group_id", 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=usernames'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=usernames', false)) - ); + )); break; @@ -850,9 +866,9 @@ class ucp_groups do { - $sql = 'SELECT user_id + $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . " - WHERE group_id = $group_id + WHERE group_id = $group_id ORDER BY user_id"; $result = $db->sql_query_limit($sql, 200, $start); diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index ba40397a55..c2fa50c79e 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -1,13 +1,21 @@ data['user_id'] . ')'; $sql_select .= ', tp.topic_posted'; } @@ -59,7 +67,7 @@ class ucp_main $forum_ary = array_unique(array_keys($forum_ary)); // Determine first forum the user is able to read into - for global announcement link - $sql = 'SELECT forum_id + $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST; @@ -71,7 +79,7 @@ class ucp_main $g_forum_id = (int) $db->sql_fetchfield('forum_id'); $db->sql_freeresult($result); - $sql = "SELECT t.* $sql_select + $sql = "SELECT t.* $sql_select FROM $sql_from WHERE t.forum_id = 0 AND t.topic_type = " . POST_GLOBAL . ' @@ -164,13 +172,13 @@ class ucp_main display_user_activity($user->data); } - // Do the relevant calculations + // Do the relevant calculations $memberdays = max(1, round((time() - $user->data['user_regdate']) / 86400)); $posts_per_day = $user->data['user_posts'] / $memberdays; $percentage = ($config['num_posts']) ? min(100, ($user->data['user_posts'] / $config['num_posts']) * 100) : 0; $template->assign_vars(array( - 'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '', + 'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '', 'JOINED' => $user->format_date($user->data['user_regdate']), 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit), 'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0, @@ -181,7 +189,7 @@ class ucp_main 'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '', 'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '', -// 'S_GROUP_OPTIONS' => $group_options, +// 'S_GROUP_OPTIONS' => $group_options, 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&sr=posts') : '', )); @@ -194,41 +202,51 @@ class ucp_main $user->add_lang('viewforum'); + add_form_key('ucp_front_subscribed'); + $unwatch = (isset($_POST['unwatch'])) ? true : false; if ($unwatch) { - $forums = array_keys(request_var('f', array(0 => 0))); - $topics = array_keys(request_var('t', array(0 => 0))); - - if (sizeof($forums) || sizeof($topics)) + if (check_form_key('ucp_front_subscribed')) { - $l_unwatch = ''; - if (sizeof($forums)) + $forums = array_keys(request_var('f', array(0 => 0))); + $topics = array_keys(request_var('t', array(0 => 0))); + $msg = ''; + + if (sizeof($forums) || sizeof($topics)) { - $sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forums) . ' - AND user_id = ' . $user->data['user_id']; - $db->sql_query($sql); + $l_unwatch = ''; + if (sizeof($forums)) + { + $sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forums) . ' + AND user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + + $l_unwatch .= '_FORUMS'; + } + + if (sizeof($topics)) + { + $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . ' + WHERE ' . $db->sql_in_set('topic_id', $topics) . ' + AND user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + + $l_unwatch .= '_TOPICS'; + } + $msg = $user->lang['UNWATCHED' . $l_unwatch]; - $l_unwatch .= '_FORUMS'; } - - if (sizeof($topics)) - { - $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . ' - WHERE ' . $db->sql_in_set('topic_id', $topics) . ' - AND user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - - $l_unwatch .= '_TOPICS'; - } - - $message = $user->lang['UNWATCHED' . $l_unwatch] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - - meta_refresh(3, append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=subscribed")); - trigger_error($message); } + else + { + $msg = $user->lang['FORM_INVALID']; + } + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + meta_refresh(3, append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=subscribed")); + trigger_error($message); } $forbidden_forums = array(); @@ -246,7 +264,7 @@ class ucp_main FORUMS_TABLE => 'f' ), - 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' + 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' AND f.forum_id = fw.forum_id AND ' . $db->sql_in_set('f.forum_id', $forbidden_forums, true, true), @@ -312,7 +330,7 @@ class ucp_main } $template->assign_block_vars('forumrow', array( - 'FORUM_ID' => $forum_id, + 'FORUM_ID' => $forum_id, 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'), 'FORUM_IMAGE' => ($row['forum_image']) ? '' . $user->lang[$folder_alt] . '' : '', @@ -326,7 +344,7 @@ class ucp_main '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_LAST_POST' => $last_post_url, 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])) ); } @@ -418,53 +436,65 @@ class ucp_main $s_hidden_fields = ($edit) ? '' : ''; $draft_subject = $draft_message = ''; + add_form_key('ucp_draft'); if ($delete) { - $drafts = array_keys(request_var('d', array(0 => 0))); - - if (sizeof($drafts)) + if (check_form_key('ucp_draft')) { - $sql = 'DELETE FROM ' . DRAFTS_TABLE . ' - WHERE ' . $db->sql_in_set('draft_id', $drafts) . ' - AND user_id = ' . $user->data['user_id']; - $db->sql_query($sql); + $drafts = array_keys(request_var('d', array(0 => 0))); - $message = $user->lang['DRAFTS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - - meta_refresh(3, $this->u_action); - trigger_error($message); + if (sizeof($drafts)) + { + $sql = 'DELETE FROM ' . DRAFTS_TABLE . ' + WHERE ' . $db->sql_in_set('draft_id', $drafts) . ' + AND user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + } + $msg = $user->lang['DRAFTS_DELETED']; + unset($drafts); } - - unset($drafts); + else + { + $msg = $user->lang['FORM_INVALID']; + } + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + meta_refresh(3, $this->u_action); + trigger_error($message); } if ($submit && $edit) { $draft_subject = utf8_normalize_nfc(request_var('subject', '', true)); $draft_message = utf8_normalize_nfc(request_var('message', '', true)); - - if ($draft_message && $draft_subject) + if (check_form_key('ucp_draft')) { - $draft_row = array( - 'draft_subject' => $draft_subject, - 'draft_message' => $draft_message - ); + if ($draft_message && $draft_subject) + { + $draft_row = array( + 'draft_subject' => $draft_subject, + 'draft_message' => $draft_message + ); - $sql = 'UPDATE ' . DRAFTS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $draft_row) . " - WHERE draft_id = $draft_id - AND user_id = " . $user->data['user_id']; - $db->sql_query($sql); + $sql = 'UPDATE ' . DRAFTS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $draft_row) . " + WHERE draft_id = $draft_id + AND user_id = " . $user->data['user_id']; + $db->sql_query($sql); - $message = $user->lang['DRAFT_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + $message = $user->lang['DRAFT_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - meta_refresh(3, $this->u_action); - trigger_error($message); + meta_refresh(3, $this->u_action); + trigger_error($message); + } + else + { + $template->assign_var('ERROR', ($draft_message == '') ? $user->lang['EMPTY_DRAFT'] : (($draft_subject == '') ? $user->lang['EMPTY_DRAFT_TITLE'] : '')); + } } else { - $template->assign_var('ERROR', ($draft_message == '') ? $user->lang['EMPTY_DRAFT'] : (($draft_subject == '') ? $user->lang['EMPTY_DRAFT_TITLE'] : '')); + $template->assign_var('ERROR', $user->lang['FORM_INVALID']); } } @@ -482,7 +512,7 @@ class ucp_main $sql = 'SELECT * FROM ' . DRAFTS_TABLE . ' WHERE user_id = ' . $user->data['user_id'] . ' ' . (($edit) ? "AND draft_id = $draft_id" : '') . ' - AND forum_id = 0 + AND forum_id = 0 AND topic_id = 0 ORDER BY save_time DESC'; } @@ -578,10 +608,10 @@ class ucp_main } - $template->assign_vars(array( + $template->assign_vars(array( 'L_TITLE' => $user->lang['UCP_MAIN_' . strtoupper($mode)], - 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false, + 'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !isset($_GET['edit']))) ? true : false, 'S_HIDDEN_FIELDS' => (isset($s_hidden_fields)) ? $s_hidden_fields : '', 'S_UCP_ACTION' => $this->u_action, diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 63660b006d..e843e89139 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -7,7 +7,15 @@ * */ -/** +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** * Private Message Class * * $_REQUEST['folder'] display folder with the id used @@ -95,7 +103,7 @@ class ucp_pm $template->assign_vars(array( 'MESSAGE' => $l_new_message, 'S_NOT_LOGGED_IN' => ($user->data['user_id'] == ANONYMOUS) ? true : false, - 'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '', ''), + 'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '', ''), 'U_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'), 'UA_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false)) ); @@ -245,10 +253,10 @@ class ucp_pm if ($user->data['user_new_privmsg'] && $action == 'view_folder') { $return = place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); - $num_not_moved = $user->data['user_new_privmsg']; + $num_not_moved = $return['not_moved']; // Make sure num_not_moved is valid. - if ($num_not_moved < 0) + if ($user->data['user_new_privmsg'] < 0 || $num_not_moved < 0) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new_privmsg = 0, user_unread_privmsg = 0 @@ -271,7 +279,7 @@ class ucp_pm $sql = 'SELECT folder_id FROM ' . PRIVMSGS_TO_TABLE . " WHERE msg_id = $msg_id - AND folder_id <> " . PRIVMSGS_NO_BOX . ' + AND folder_id <> " . PRIVMSGS_NO_BOX . ' AND user_id = ' . $user->data['user_id']; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 20086e605e..ff5ab13716 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * Compose private message * Called from ucp_pm with mode == 'compose' @@ -25,6 +33,7 @@ function compose_pm($id, $mode, $action) { $action = 'post'; } + add_form_key('ucp_pm_compose'); // Grab only parameters needed here $to_user_id = request_var('u', 0); @@ -105,8 +114,7 @@ function compose_pm($id, $mode, $action) 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false, 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '', 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single"), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single", false)) - ); + )); } $sql = ''; @@ -533,6 +541,10 @@ function compose_pm($id, $mode, $action) if ($submit || $preview || $refresh) { + if (!check_form_key('ucp_pm_compose')) + { + $error[] = $user->lang['FORM_INVALID']; + } $subject = utf8_normalize_nfc(request_var('subject', '', true)); $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); @@ -605,7 +617,7 @@ function compose_pm($id, $mode, $action) $pm_data = array( 'msg_id' => (int) $msg_id, 'from_user_id' => $user->data['user_id'], - 'from_user_ip' => $user->data['user_ip'], + 'from_user_ip' => $user->ip, 'from_username' => $user->data['username'], 'reply_from_root_level' => (isset($post['root_level'])) ? (int) $post['root_level'] : 0, 'reply_from_msg_id' => (int) $msg_id, @@ -630,7 +642,7 @@ function compose_pm($id, $mode, $action) $return_folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=outbox'); meta_refresh(3, $return_message_url); - $message = $user->lang['MESSAGE_STORED'] . '

' . sprintf($user->lang['VIEW_MESSAGE'], '', '') . '

' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '', '', $user->lang['PM_OUTBOX']); + $message = $user->lang['MESSAGE_STORED'] . '

' . sprintf($user->lang['VIEW_PRIVATE_MESSAGE'], '', '') . '

' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '', '', $user->lang['PM_OUTBOX']); trigger_error($message); } @@ -969,9 +981,8 @@ function compose_pm($id, $mode, $action) 'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']), 'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup'), - 'UA_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup', false), - ) - ); + 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", 'f=0&mode=popup')), + )); // Build custom bbcodes array display_custom_bbcodes(); diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index b4f2cbeb65..2d2ff23cab 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -1,13 +1,21 @@ sql_escape($folder_name) . "' - AND user_id = " . $user->data['user_id']; - $result = $db->sql_query_limit($sql, 1); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $folder_name = utf8_normalize_nfc(request_var('foldername', '', true)); + $msg = ''; - if ($row) + if ($folder_name) { - trigger_error(sprintf($user->lang['FOLDER_NAME_EXIST'], $folder_name)); + $sql = 'SELECT folder_name + FROM ' . PRIVMSGS_FOLDER_TABLE . " + WHERE folder_name = '" . $db->sql_escape($folder_name) . "' + AND user_id = " . $user->data['user_id']; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + trigger_error(sprintf($user->lang['FOLDER_NAME_EXIST'], $folder_name)); + } + + $sql = 'SELECT COUNT(folder_id) as num_folder + FROM ' . PRIVMSGS_FOLDER_TABLE . ' + WHERE user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $num_folder = (int) $db->sql_fetchfield('num_folder'); + $db->sql_freeresult($result); + + if ($num_folder >= $config['pm_max_boxes']) + { + trigger_error('MAX_FOLDER_REACHED'); + } + + $sql = 'INSERT INTO ' . PRIVMSGS_FOLDER_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'user_id' => (int) $user->data['user_id'], + 'folder_name' => $folder_name) + ); + $db->sql_query($sql); + $msg = $user->lang['FOLDER_ADDED']; } - - $sql = 'SELECT COUNT(folder_id) as num_folder - FROM ' . PRIVMSGS_FOLDER_TABLE . ' - WHERE user_id = ' . $user->data['user_id']; - $result = $db->sql_query($sql); - $num_folder = (int) $db->sql_fetchfield('num_folder'); - $db->sql_freeresult($result); - - if ($num_folder >= $config['pm_max_boxes']) - { - trigger_error('MAX_FOLDER_REACHED'); - } - - $sql = 'INSERT INTO ' . PRIVMSGS_FOLDER_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'user_id' => (int) $user->data['user_id'], - 'folder_name' => $folder_name) - ); - $db->sql_query($sql); - - $message = $user->lang['FOLDER_ADDED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - meta_refresh(3, $redirect_url); - trigger_error($message); } + else + { + $msg = $user->lang['FORM_INVALID']; + } + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + meta_refresh(3, $redirect_url); + trigger_error($message); } // Rename folder if (isset($_POST['rename_folder'])) { - $new_folder_name = utf8_normalize_nfc(request_var('new_folder_name', '', true)); - $rename_folder_id= request_var('rename_folder_id', 0); - - if (!$new_folder_name) + if (check_form_key('ucp_pm_options')) { - trigger_error('NO_NEW_FOLDER_NAME'); + $new_folder_name = utf8_normalize_nfc(request_var('new_folder_name', '', true)); + $rename_folder_id= request_var('rename_folder_id', 0); + + if (!$new_folder_name) + { + trigger_error('NO_NEW_FOLDER_NAME'); + } + + // Select custom folder + $sql = 'SELECT folder_name, pm_count + FROM ' . PRIVMSGS_FOLDER_TABLE . " + WHERE user_id = {$user->data['user_id']} + AND folder_id = $rename_folder_id"; + $result = $db->sql_query_limit($sql, 1); + $folder_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$folder_row) + { + trigger_error('CANNOT_RENAME_FOLDER'); + } + + $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . " + SET folder_name = '" . $db->sql_escape($new_folder_name) . "' + WHERE folder_id = $rename_folder_id + AND user_id = {$user->data['user_id']}"; + $db->sql_query($sql); + $msg = $user->lang['FOLDER_RENAMED']; + } + else + { + $msg = $user->lang['FORM_INVALID']; } - // Select custom folder - $sql = 'SELECT folder_name, pm_count - FROM ' . PRIVMSGS_FOLDER_TABLE . " - WHERE user_id = {$user->data['user_id']} - AND folder_id = $rename_folder_id"; - $result = $db->sql_query_limit($sql, 1); - $folder_row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - if (!$folder_row) - { - trigger_error('CANNOT_RENAME_FOLDER'); - } - - $sql = 'UPDATE ' . PRIVMSGS_FOLDER_TABLE . " - SET folder_name = '" . $db->sql_escape($new_folder_name) . "' - WHERE folder_id = $rename_folder_id - AND user_id = {$user->data['user_id']}"; - $db->sql_query($sql); - - $message = $user->lang['FOLDER_RENAMED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); meta_refresh(3, $redirect_url); trigger_error($message); } @@ -177,7 +204,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit if (confirm_box(true)) { // Gather message ids - $sql = 'SELECT msg_id + $sql = 'SELECT msg_id FROM ' . PRIVMSGS_TO_TABLE . ' WHERE user_id = ' . $user->data['user_id'] . " AND folder_id = $remove_folder_id"; @@ -251,60 +278,68 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit // Add Rule if (isset($_POST['add_rule'])) { - $check_option = request_var('check_option', 0); - $rule_option = request_var('rule_option', 0); - $cond_option = request_var('cond_option', ''); - $action_option = explode('|', request_var('action_option', '')); - $rule_string = ($cond_option != 'none') ? utf8_normalize_nfc(request_var('rule_string', '', true)) : ''; - $rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0; - $rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0; - - $action = (int) $action_option[0]; - $folder_id = (int) $action_option[1]; - - if (!$action || !$check_option || !$rule_option || !$cond_option || ($cond_option != 'none' && !$rule_string)) + if (check_form_key('ucp_pm_options')) { - trigger_error('RULE_NOT_DEFINED'); - } + $check_option = request_var('check_option', 0); + $rule_option = request_var('rule_option', 0); + $cond_option = request_var('cond_option', ''); + $action_option = explode('|', request_var('action_option', '')); + $rule_string = ($cond_option != 'none') ? utf8_normalize_nfc(request_var('rule_string', '', true)) : ''; + $rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0; + $rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0; - if (($cond_option == 'user' && !$rule_user_id) || ($cond_option == 'group' && !$rule_group_id)) + $action = (int) $action_option[0]; + $folder_id = (int) $action_option[1]; + + if (!$action || !$check_option || !$rule_option || !$cond_option || ($cond_option != 'none' && !$rule_string)) + { + trigger_error('RULE_NOT_DEFINED'); + } + + if (($cond_option == 'user' && !$rule_user_id) || ($cond_option == 'group' && !$rule_group_id)) + { + trigger_error('RULE_NOT_DEFINED'); + } + + $rule_ary = array( + 'user_id' => $user->data['user_id'], + 'rule_check' => $check_option, + 'rule_connection' => $rule_option, + 'rule_string' => $rule_string, + 'rule_user_id' => $rule_user_id, + 'rule_group_id' => $rule_group_id, + 'rule_action' => $action, + 'rule_folder_id' => $folder_id + ); + + $sql = 'SELECT rule_id + FROM ' . PRIVMSGS_RULES_TABLE . ' + WHERE ' . $db->sql_build_array('SELECT', $rule_ary); + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + trigger_error('RULE_ALREADY_DEFINED'); + } + + $sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary); + $db->sql_query($sql); + + // Update users message rules + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_message_rules = 1 + WHERE user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + + $msg = $user->lang['RULE_ADDED']; + } + else { - trigger_error('RULE_NOT_DEFINED'); + $msg = $user->lang['FORM_INVALID']; } - - $rule_ary = array( - 'user_id' => $user->data['user_id'], - 'rule_check' => $check_option, - 'rule_connection' => $rule_option, - 'rule_string' => $rule_string, - 'rule_user_id' => $rule_user_id, - 'rule_group_id' => $rule_group_id, - 'rule_action' => $action, - 'rule_folder_id' => $folder_id - ); - - $sql = 'SELECT rule_id - FROM ' . PRIVMSGS_RULES_TABLE . ' - WHERE ' . $db->sql_build_array('SELECT', $rule_ary); - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($row) - { - trigger_error('RULE_ALREADY_DEFINED'); - } - - $sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary); - $db->sql_query($sql); - - // Update users message rules - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_message_rules = 1 - WHERE user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - - $message = $user->lang['RULE_ADDED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); meta_refresh(3, $redirect_url); trigger_error($message); } @@ -332,7 +367,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $message = $user->lang['RULE_DELETED']; // Reset user_message_rules if no more assigned - $sql = 'SELECT rule_id + $sql = 'SELECT rule_id FROM ' . PRIVMSGS_RULES_TABLE . ' WHERE user_id = ' . $user->data['user_id']; $result = $db->sql_query_limit($sql, 1); @@ -369,11 +404,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $db->sql_freeresult($result); $folder[PRIVMSGS_INBOX] = array( - 'folder_name' => $user->lang['PM_INBOX'], + 'folder_name' => $user->lang['PM_INBOX'], 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $num_messages, $user->data['message_limit']) ); - $sql = 'SELECT folder_id, folder_name, pm_count + $sql = 'SELECT folder_id, folder_name, pm_count FROM ' . PRIVMSGS_FOLDER_TABLE . ' WHERE user_id = ' . $user->data['user_id']; $result = $db->sql_query($sql); @@ -383,7 +418,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit { $num_user_folder++; $folder[$row['folder_id']] = array( - 'folder_name' => $row['folder_name'], + 'folder_name' => $row['folder_name'], 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $row['pm_count'], $user->data['message_limit']) ); } @@ -443,8 +478,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit 'DEFAULT_ACTION' => ($config['full_folder_action'] == 1) ? $user->lang['DELETE_OLDEST_MESSAGES'] : $user->lang['HOLD_NEW_MESSAGES'], 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=rule_string&select_single=true'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=rule_string&select_single=true', false)) - ); + )); $rule_lang = $action_lang = $check_lang = array(); @@ -533,7 +567,7 @@ function define_check_option($hardcoded, $check_option, $check_lang) { foreach ($check_lang as $value => $lang) { - $s_check_options .= ''; + $s_check_options .= ''; } } @@ -605,7 +639,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary) { foreach ($check_ary as $value => $_check) { - $s_rule_options .= ''; + $s_rule_options .= ''; } } @@ -705,10 +739,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule case 'group': $rule_group_id = request_var('rule_group_id', 0); $rule_string = utf8_normalize_nfc(request_var('rule_string', '', true)); - + $sql = 'SELECT g.group_id, g.group_name, g.group_type FROM ' . GROUPS_TABLE . ' g '; - + if (!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) { $sql .= 'LEFT JOIN ' . USER_GROUP_TABLE . ' ug @@ -738,7 +772,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule $rule_string = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']); } - $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : ''; + $s_class = ($row['group_type'] == GROUP_SPECIAL) ? ' class="sep"' : ''; $s_selected = ($row['group_id'] == $rule_group_id) ? ' selected="selected"' : ''; $s_group_options .= ''; diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 79b663a39d..e9c337519a 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -1,13 +1,21 @@ $l_edited_by, 'MESSAGE_ID' => $message_row['msg_id'], - 'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&p=' . $message_row['msg_id'], true, $user->session_id) : '', + 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['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=' . $author_id) : '', + 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '', + 'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($user_info['user_icq']) : '', + 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '', + 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '', + 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '', + 'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '', + 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', 'U_EMAIL' => $user_info['email'], 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '', diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index b0e8f098c2..3ce3ea73ed 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -1,13 +1,21 @@ request_var('notifymethod', $user->data['user_notify_type']), 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), @@ -55,6 +63,11 @@ class ucp_prefs 'tz' => array('num', false, -14, 14), )); + if (!check_form_key('ucp_prefs_personal')) + { + $error[] = 'FORM_INVALID'; + } + if (!sizeof($error)) { $user->optionset('popuppm', $data['popuppm']); @@ -140,6 +153,8 @@ class ucp_prefs case 'view': + add_form_key('ucp_prefs_view'); + $data = array( 'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'), 'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'), @@ -166,6 +181,11 @@ class ucp_prefs 'post_sd' => array('string', false, 1, 1), )); + if (!check_form_key('ucp_prefs_view')) + { + $error[] = 'FORM_INVALID'; + } + if (!sizeof($error)) { $user->optionset('viewimg', $data['images']); @@ -276,25 +296,34 @@ class ucp_prefs 'sig' => request_var('sig', $user->optionget('attachsig')), 'notify' => request_var('notify', $user->data['user_notify']), ); + add_form_key('ucp_prefs_post'); if ($submit) { - $user->optionset('bbcode', $data['bbcode']); - $user->optionset('smilies', $data['smilies']); - $user->optionset('attachsig', $data['sig']); + if (check_form_key('ucp_prefs_post')) + { + $user->optionset('bbcode', $data['bbcode']); + $user->optionset('smilies', $data['smilies']); + $user->optionset('attachsig', $data['sig']); - $sql_ary = array( - 'user_options' => $user->data['user_options'], - 'user_notify' => $data['notify'], - ); + $sql_ary = array( + 'user_options' => $user->data['user_options'], + 'user_notify' => $data['notify'], + ); - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE user_id = ' . $user->data['user_id']; - $db->sql_query($sql); + $sql = 'UPDATE ' . USERS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + $msg = $user->lang['PREFERENCES_UPDATED']; + } + else + { + $msg = $user->lang['FORM_INVALID']; + } meta_refresh(3, $this->u_action); - $message = $user->lang['PREFERENCES_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + $message = $msg . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); trigger_error($message); } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 269c3aad44..3fe3d72d59 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * ucp_profile * Changing profile settings @@ -44,6 +52,8 @@ class ucp_profile 'password_confirm' => request_var('password_confirm', '', true), ); + add_form_key('ucp_reg_details'); + if ($submit) { // Do not check cur_password, it is the old one. @@ -73,13 +83,13 @@ class ucp_profile $error[] = 'NEW_PASSWORD_ERROR'; } - if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && md5($data['cur_password']) != $user->data['user_password']) + if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password'])) { $error[] = 'CUR_PASSWORD_ERROR'; } // Only check the new password against the previous password if there have been no errors - if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && md5($data['new_password']) == $user->data['user_password']) + if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && phpbb_check_hash($data['new_password'], $user->data['user_password'])) { $error[] = 'SAME_PASSWORD_ERROR'; } @@ -89,6 +99,11 @@ class ucp_profile $error[] = 'NEW_EMAIL_ERROR'; } + if (!check_form_key('ucp_reg_details')) + { + $error[] = 'FORM_INVALID'; + } + if (!sizeof($error)) { $sql_ary = array( @@ -96,7 +111,7 @@ class ucp_profile 'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'], 'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'], 'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32($data['email']) . strlen($data['email']) : $user->data['user_email_hash'], - 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? md5($data['new_password']) : $user->data['user_password'], + 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : $user->data['user_password'], 'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0, ); @@ -105,7 +120,7 @@ class ucp_profile add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_NAME', $user->data['username'], $data['username']); } - if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && md5($data['new_password']) != $user->data['user_password']) + if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !phpbb_check_hash($data['new_password'], $user->data['user_password'])) { $user->reset_login_keys(); add_log('user', $user->data['user_id'], 'LOG_USER_NEW_PASSWORD', $data['username']); @@ -224,7 +239,7 @@ class ucp_profile trigger_error($message); } - + // Replace "error" strings with their real, localised form $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } @@ -282,6 +297,8 @@ class ucp_profile $data['bday_year'] = request_var('bday_year', $data['bday_year']); } + add_form_key('ucp_profile_info'); + if ($submit) { $validate_array = array( @@ -307,7 +324,7 @@ class ucp_profile $validate_array = array_merge($validate_array, array( 'bday_day' => array('num', true, 1, 31), 'bday_month' => array('num', true, 1, 12), - 'bday_year' => array('num', true, 1901, gmdate('Y', time())), + 'bday_year' => array('num', true, 1901, gmdate('Y', time()) + 50), )); } @@ -321,6 +338,11 @@ class ucp_profile $error = array_merge($error, $cp_error); } + if (!check_form_key('ucp_profile_info')) + { + $error[] = 'FORM_INVALID'; + } + if (!sizeof($error)) { $sql_ary = array( @@ -446,6 +468,8 @@ class ucp_profile $signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true)); + add_form_key('ucp_sig'); + if ($submit || $preview) { include($phpbb_root_path . 'includes/message_parser.' . $phpEx); @@ -462,6 +486,11 @@ class ucp_profile $error[] = implode('
', $message_parser->warn_msg); } + if (!check_form_key('ucp_sig')) + { + $error[] = 'FORM_INVALID'; + } + if (!sizeof($error) && $submit) { $sql_ary = array( @@ -470,8 +499,8 @@ class ucp_profile 'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield ); - $sql = 'UPDATE ' . USERS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + $sql = 'UPDATE ' . USERS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $user->data['user_id']; $db->sql_query($sql); @@ -517,7 +546,7 @@ class ucp_profile 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false, 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false) ); - + // Build custom bbcodes array display_custom_bbcodes(); @@ -533,15 +562,23 @@ class ucp_profile $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + add_form_key('ucp_avatar'); + if ($submit) { - if (avatar_process_user($error)) + if (check_form_key('ucp_avatar')) { - meta_refresh(3, $this->u_action); - $message = $user->lang['PROFILE_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - trigger_error($message); + if (avatar_process_user($error)) + { + meta_refresh(3, $this->u_action); + $message = $user->lang['PROFILE_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + trigger_error($message); + } + } + else + { + $error[] = 'FORM_INVALID'; } - // Replace "error" strings with their real, localised form $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index ca44260760..91660020e9 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -8,6 +8,14 @@ * */ +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + /** * ucp_register * Board registration @@ -36,6 +44,24 @@ class ucp_register $change_lang = request_var('change_lang', ''); $user_lang = request_var('lang', $user->lang_name); + + // not so fast, buddy + if (($submit && !check_form_key('ucp_register', false, '', false, $config['min_time_reg'])) + || (!$submit && !check_form_key('ucp_register_terms', false, '', false, $config['min_time_terms']))) + { + $agreed = false; + } + + if ($agreed) + { + add_form_key('ucp_register'); + } + else + { + add_form_key('ucp_register_terms'); + } + + if ($change_lang || $user_lang != $config['default_lang']) { $use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang); @@ -103,8 +129,8 @@ class ucp_register 'S_SHOW_COPPA' => true, 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), - 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang)) - ); + 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang), + )); } else { @@ -114,7 +140,9 @@ class ucp_register 'S_SHOW_COPPA' => false, 'S_REGISTRATION' => true, 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), - 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa)) + 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa), + 'S_TIME' => 1000 * ((int) $config['min_time_terms']), + ) ); } @@ -122,6 +150,7 @@ class ucp_register return; } + // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1 $timezone = date('Z') / 3600; $is_dst = date('I'); @@ -289,7 +318,7 @@ class ucp_register $user_row = array( 'username' => $data['username'], - 'user_password' => md5($data['new_password']), + 'user_password' => phpbb_hash($data['new_password']), 'user_email' => $data['email'], 'group_id' => (int) $group_id, 'user_timezone' => (float) $data['tz'], @@ -427,31 +456,8 @@ class ucp_register $str = ''; if (!$change_lang) { - $sql = 'SELECT DISTINCT c.session_id - FROM ' . CONFIRM_TABLE . ' c - LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id) - WHERE s.session_id IS NULL'; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - $sql_in = array(); - do - { - $sql_in[] = (string) $row['session_id']; - } - while ($row = $db->sql_fetchrow($result)); - - if (sizeof($sql_in)) - { - $sql = 'DELETE FROM ' . CONFIRM_TABLE . ' - WHERE ' . $db->sql_in_set('session_id', $sql_in) . ' - AND confirm_type = ' . CONFIRM_REG; - $db->sql_query($sql); - } - } - $db->sql_freeresult($result); - + $user->confirm_gc(CONFIRM_REG); + $sql = 'SELECT COUNT(session_id) AS attempts FROM ' . CONFIRM_TABLE . " WHERE session_id = '" . $db->sql_escape($user->session_id) . "' @@ -522,7 +528,9 @@ class ucp_register 'S_CONFIRM_CODE' => ($config['enable_confirm']) ? true : false, 'S_COPPA' => $coppa, 'S_HIDDEN_FIELDS' => $s_hidden_fields, - 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register')) + 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), + 'S_TIME' => 1000 * ((int) $config['min_time_reg']), + ) ); // diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php index b761e772f6..12de817099 100644 --- a/phpBB/includes/ucp/ucp_remind.php +++ b/phpBB/includes/ucp/ucp_remind.php @@ -1,13 +1,21 @@ sql_escape(md5($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "' + SET user_newpasswd = '" . $db->sql_escape(phpbb_hash($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "' WHERE user_id = " . $user_row['user_id']; $db->sql_query($sql); diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index 10a1b672bd..48176a3989 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -1,13 +1,21 @@ sql_escape($email) . "' @@ -120,7 +135,7 @@ class ucp_resend $messenger->assign_vars(array( 'USERNAME' => htmlspecialchars_decode($user_row['username']), - 'U_USER_DETAILS' => generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}", + 'U_USER_DETAILS' => generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}", 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}") ); @@ -131,7 +146,8 @@ class ucp_resend meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); - $message = $user->lang['ACTIVATION_EMAIL_SENT'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); + $message = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT']; + $message .= '

' . sprintf($user->lang['RETURN_INDEX'], '', ''); trigger_error($message); } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 49ba7329be..fb5df9394b 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -1,13 +1,21 @@ data['user_id'] . ' AND u.user_id = z.zebra_id'; $result = $db->sql_query($sql); @@ -104,7 +112,7 @@ class ucp_zebra if (sizeof($data['add'])) { $sql = 'SELECT user_id, user_type - FROM ' . USERS_TABLE . ' + FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $data['add']) . ' AND user_type <> ' . USER_INACTIVE; $result = $db->sql_query($sql); @@ -180,8 +188,8 @@ class ucp_zebra // Force integer values $data['usernames'] = array_map('intval', $data['usernames']); - $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' - WHERE user_id = ' . $user->data['user_id'] . ' + $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' + WHERE user_id = ' . $user->data['user_id'] . ' AND ' . $db->sql_in_set('zebra_id', $data['usernames']); $db->sql_query($sql); @@ -212,10 +220,10 @@ class ucp_zebra } $sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1'; - $sql = 'SELECT z.*, u.username, u.username_clean - FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u + $sql = 'SELECT z.*, u.username, u.username_clean + FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u WHERE z.user_id = ' . $user->data['user_id'] . " - AND $sql_and + AND $sql_and AND u.user_id = z.zebra_id ORDER BY u.username_clean ASC"; $result = $db->sql_query($sql); @@ -227,11 +235,10 @@ class ucp_zebra } $db->sql_freeresult($result); - $template->assign_vars(array( + $template->assign_vars(array( 'L_TITLE' => $user->lang['UCP_ZEBRA_' . $l_mode], 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=add'), - 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=add', false), 'S_USERNAME_OPTIONS' => $s_username_options, 'S_HIDDEN_FIELDS' => $s_hidden_fields, diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php index 4c705b05cb..a77952499a 100644 --- a/phpBB/includes/utf/utf_normalizer.php +++ b/phpBB/includes/utf/utf_normalizer.php @@ -1,13 +1,20 @@ 'phpBB 2.0.x', - 'version' => '1.0.RC5', + 'version' => '1.0.RC6', 'phpbb_version' => '3.0.0', 'author' => 'phpBB Group', 'dbms' => $dbms, @@ -57,9 +57,9 @@ $tables = array( 'forum_prune', 'forums', 'groups', - 'posts', - 'posts_text', - 'privmsgs', + 'posts', + 'posts_text', + 'privmsgs', 'privmsgs_text', 'ranks', 'smilies', @@ -70,7 +70,7 @@ $tables = array( 'vote_desc', 'vote_results', 'vote_voters', - 'words' + 'words' ); /** @@ -140,7 +140,7 @@ $config_schema = array( /** * $test_file is the name of a file which is present on the source -* forum which can be used to check that the path specified by the +* forum which can be used to check that the path specified by the * user was correct */ $test_file = 'modcp.php'; @@ -250,14 +250,14 @@ if (!$get_info) * * // DB INSERT array * This one consist of three parameters -* First Parameter: +* First Parameter: * The key need to be filled within the target table * If this is empty, the target table gets not assigned the source value * Second Parameter: * Source value. If the first parameter is specified, it will be assigned this value. * If the first parameter is empty, this only gets added to the select query * Third Parameter: -* Custom Function. Function to execute while storing source value into target table. +* Custom Function. Function to execute while storing source value into target table. * The functions return value get stored. * The function parameter consist of the value of the second parameter. * @@ -596,7 +596,7 @@ if (!$get_info) 'autoincrement' => 'post_id', 'query_first' => array('target', $convert->truncate_statement . POSTS_TABLE), 'execute_first' => ' - $config["max_post_chars"] = -1; + $config["max_post_chars"] = 0; $config["max_quote_depth"] = 0; ', @@ -645,7 +645,7 @@ if (!$get_info) ), 'execute_first' => ' - $config["max_post_chars"] = -1; + $config["max_post_chars"] = 0; $config["max_quote_depth"] = 0; ', @@ -706,7 +706,7 @@ if (!$get_info) array('pm_forwarded', 0, ''), array('folder_id', PRIVMSGS_INBOX, ''), - 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id + 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)', ), @@ -746,7 +746,7 @@ if (!$get_info) array('pm_forwarded', 0, ''), array('folder_id', PRIVMSGS_SENTBOX, ''), - 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id + 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 2', ), @@ -766,7 +766,7 @@ if (!$get_info) array('pm_forwarded', 0, ''), array('folder_id', 'privmsgs.privmsgs_to_userid', 'phpbb_get_savebox_id'), - 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id + 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 3', ), @@ -786,7 +786,7 @@ if (!$get_info) array('pm_forwarded', 0, ''), array('folder_id', 'privmsgs.privmsgs_from_userid', 'phpbb_get_savebox_id'), - 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id + 'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id AND privmsgs.privmsgs_type = 4', ), @@ -853,15 +853,15 @@ if (!$get_info) array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')), array('user_password', 'users.user_password', ''), array('user_pass_convert', 1, ''), - array('user_posts', 'users.user_posts', ''), + array('user_posts', 'users.user_posts', 'intval'), array('user_email', 'users.user_email', 'strtolower'), array('user_email_hash', 'users.user_email', 'gen_email_hash'), array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'), - array('user_lastvisit', 'users.user_lastvisit', ''), - array('user_lastmark', 'users.user_lastvisit', ''), + array('user_lastvisit', 'users.user_lastvisit', 'intval'), + array('user_lastmark', 'users.user_lastvisit', 'intval'), array('user_lang', $config['default_lang'], ''), array('', 'users.user_lang', ''), - array('user_timezone', 'users.user_timezone', ''), + array('user_timezone', 'users.user_timezone', 'floatval'), array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')), array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_time', '', 'phpbb_inactive_time'), @@ -875,7 +875,7 @@ if (!$get_info) array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')), - array('user_rank', 'users.user_rank', ''), + array('user_rank', 'users.user_rank', 'intval'), array('user_permissions', '', ''), array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'), @@ -885,14 +885,14 @@ if (!$get_info) array('user_new_privmsg', 'users.user_new_privmsg', ''), array('user_unread_privmsg', 0, ''), //'users.user_unread_privmsg' - array('user_last_privmsg', 'users.user_last_privmsg', ''), + array('user_last_privmsg', 'users.user_last_privmsg', 'intval'), array('user_emailtime', 'users.user_emailtime', 'null_to_zero'), - array('user_notify', 'users.user_notify', ''), - array('user_notify_pm', 'users.user_notify_pm', ''), + array('user_notify', 'users.user_notify', 'intval'), + array('user_notify_pm', 'users.user_notify_pm', 'intval'), array('user_notify_type', NOTIFY_EMAIL, ''), - array('user_allow_pm', 'users.user_allow_pm', ''), - array('user_allow_viewonline', 'users.user_allow_viewonline', ''), - array('user_allow_viewemail', 'users.user_viewemail', ''), + array('user_allow_pm', 'users.user_allow_pm', 'intval'), + array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'), + array('user_allow_viewemail', 'users.user_viewemail', 'intval'), array('user_actkey', 'users.user_actkey', ''), array('user_newpasswd', '', ''), // Users need to re-request their password... array('user_style', $config['default_style'], ''), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 74ca47986e..1f62d80852 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1,13 +1,18 @@ htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'), 'forum_type' => FORUM_POST, 'forum_status' => is_item_locked($row['forum_status']), - 'enable_prune' => ($prune_enabled) ? $row['prune_enable'] : 0, + 'enable_prune' => ($prune_enabled) ? (int)$row['prune_enable'] : 0, 'prune_next' => (int) null_to_zero($row['prune_next']), 'prune_days' => (int) null_to_zero($row['prune_days']), 'prune_viewed' => 0, @@ -524,7 +529,7 @@ function phpbb_user_id($user_id) // A user id of 0 can happen, for example within the ban table if no user is banned... // Within the posts and topics table this can be "dangerous" but is the fault of the user - // having mods installed (a poster id of 0 is not possible in 2.0.x). + // having mods installed (a poster id of 0 is not possible in 2.0.x). // Therefore, we return the user id "as is". return (int) $user_id; diff --git a/phpBB/install/data/confusables.php b/phpBB/install/data/confusables.php index 4472946a55..c543ddfc81 100644 --- a/phpBB/install/data/confusables.php +++ b/phpBB/install/data/confusables.php @@ -1,4 +1,20 @@ 'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','Û'=>'','Ü'=>'','á †'=>'','á Ž'=>'','​'=>'','‌'=>'','â€'=>'','
'=>'','
'=>'','â '=>'','â¡'=>'','â¢'=>'','â£'=>'','âª'=>'','â«'=>'','â¬'=>'','â­'=>'','â®'=>'','â¯'=>'',''=>'',''=>'',''=>'','ï¿»'=>'',''=>'','ð…³'=>'','ð…´'=>'','ð…µ'=>'','ð…¶'=>'','ð…·'=>'','ð…¸'=>'','ð…¹'=>'','ð…º'=>'','Û¬'=>'ÛŸ','̓'=>'Ì“','Ù'=>'Ì“','Öœ'=>'Ì','Í'=>'Ì','݇'=>'Ì','॔'=>'Ì','Í€'=>'Ì€','॓'=>'Ì€','ÌŒ'=>'̆','Ì‘'=>'Ì‚','Ö¯'=>'ÌŠ','ஂ'=>'ÌŠ','à¹'=>'ÌŠ','à»'=>'ÌŠ','ံ'=>'ÌŠ','ំ'=>'ÌŠ','៓'=>'ÌŠ','゚'=>'ÌŠ','゚'=>'ÌŠ','ͦ'=>'ÌŠ','Í‚'=>'̃','ׄ'=>'̇','Ö¹'=>'̇','ׂ'=>'̇','×'=>'̇','Ý'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','à¯'=>'̇','Ì…'=>'Ì„','〬'=>'̉','̱'=>'Ì ','॒'=>'Ì ','̧'=>'Ì¡','̦'=>'Ì¡','̨'=>'Ì¢','़'=>'Ì£','়'=>'Ì£','਼'=>'Ì£','઼'=>'Ì£','଼'=>'Ì£','͇'=>'̳','̶'=>'̵','ﱞ'=>'ï¹²Ù‘','ﱟ'=>'ï¹´Ù‘','ï³²'=>'ï¹·Ù‘','ï± '=>'ï¹¶Ù‘','ï³³'=>'ï¹¹Ù‘','ﱡ'=>'ﹸّ','ï³´'=>'ï¹»Ù‘','ï±¢'=>'ﹺّ','ï±£'=>'ï¹¼Ù°','Ù´'=>'Ù”','Ý‚'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'ã‚™',' '=>' ',' '=>' ','â€'=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','âŸ'=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','ï½€'=>'`','á¿€'=>'Ëœ','ï¼¾'=>'^','︿'=>'^','_'=>'_','ï¹'=>'_','﹎'=>'_','ï¹'=>'_','⌇'=>'︴','ï¼'=>'-','â€'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'â“','ï½¥'=>'・','•'=>'・',','=>',','‚'=>',','Ù¬'=>'ØŒ','、'=>'ã€',';'=>';','ï¼›'=>';',':'=>':','Ö‰'=>':','︰'=>':','׃'=>':','â©´'=>'::=','.'=>'.','․'=>'.','Ü‚'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','â‹…'=>'·','á§'=>'·','ᔯ'=>'·4','áŒ'=>'·á','áŽ'=>'·áƒ','á'=>'·á„','á’'=>'·á…','á”'=>'·á†','á—'=>'·áŠ','á™'=>'·á‹','á·'=>'·á³','á‘€'=>'·á³','á‘‚'=>'·á´','á‘„'=>'·á¸','ᑆ'=>'·á¹','á‘—'=>'·ᑌ','á‘™'=>'·ᑎ','á‘›'=>'·á‘','á‘”'=>'·á‘','á‘'=>'·á‘','ᑟ'=>'·ᑑ','á‘¡'=>'·ᑕ','á‘£'=>'·ᑖ','á‘´'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','á’€'=>'·ᑳ','á’’'=>'·ᒉ','á’”'=>'·ᒋ','á’–'=>'·ᒌ','á’š'=>'·ᒎ','á’œ'=>'·á’','á’ž'=>'·ᒑ','á’¬'=>'·ᒣ','á’®'=>'·ᒥ','á’°'=>'·ᒦ','á’²'=>'·ᒧ','á’´'=>'·ᒨ','á’¶'=>'·L','á’¸'=>'·ᒫ','ᓉ'=>'·ᓀ','á“‹'=>'·ᓇ','á“'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','á“ '=>'·ᓖ','á“¢'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','á“¶'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','á”—'=>'·á”','á”™'=>'·ᔑ','á”›'=>'·ᔒ','á”'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','á”±'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','á”·'=>'·ᔫ','ᔹ'=>'·ᔭ','á”»'=>'·ᔮ','ᕎ'=>'·ᕌ','á•›'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','â‘´'=>'(1)','â’§'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','â‘¿'=>'(12)','â’€'=>'(13)','â’'=>'(14)','â’‚'=>'(15)','â’ƒ'=>'(16)','â’„'=>'(17)','â’…'=>'(18)','â’†'=>'(19)','⑵'=>'(2)','â’‡'=>'(20)','â‘¶'=>'(3)','â‘·'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','â‘»'=>'(8)','⑼'=>'(9)','â’œ'=>'(a)','â’'=>'(b)','â’ž'=>'(c)','â’Ÿ'=>'(d)','â’ '=>'(e)','â’¡'=>'(f)','â’¢'=>'(g)','â’£'=>'(h)','â’¤'=>'(i)','â’¥'=>'(j)','â’¦'=>'(k)','â’¨'=>'(m)','â’©'=>'(n)','â’ª'=>'(o)','â’«'=>'(p)','â’¬'=>'(q)','â’­'=>'(r)','â’®'=>'(s)','â’¯'=>'(t)','â’°'=>'(u)','â’±'=>'(v)','â’²'=>'(w)','â’³'=>'(x)','â’´'=>'(y)','â’µ'=>'(z)','㈀'=>'(á„€)','㈎'=>'(ê°€)','ãˆ'=>'(á„‚)','ãˆ'=>'(나)','㈂'=>'(ᄃ)','ãˆ'=>'(다)','㈃'=>'(á„…)','㈑'=>'(ë¼)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(ë°”)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(á„‹)','㈕'=>'(ì•„)','ãˆ'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(ìž)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(ì°¨)','㈊'=>'(á„)','㈘'=>'(ì¹´)','㈋'=>'(á„)','㈙'=>'(타)','㈌'=>'(á„‘)','㈚'=>'(파)','ãˆ'=>'(á„’)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(ä¹)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(ä¼)','ã‰'=>'(休)','㈧'=>'(å…«)','㈥'=>'(å…­)','㈸'=>'(労)','㈩'=>'(å)','㈿'=>'(å”)','㈴'=>'(å)','㈺'=>'(呼)','㈣'=>'(å››)','㈯'=>'(土)','㈻'=>'(å­¦)','㈰'=>'(æ—¥)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(æ ª)','㈬'=>'(æ°´)','㈫'=>'(ç«)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(ç¥)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','ï¼»'=>'[','〔'=>'[','ï¼½'=>']','〕'=>']','ï½›'=>'{','ï½'=>'}','⦅'=>'⦅','ï½ '=>'⦆','ï½¢'=>'「','ï½£'=>'ã€','ï¼ '=>'@','*'=>'*','ï¼'=>'/','â„'=>'/','∕'=>'/','ï¼¼'=>'\\','&'=>'&','#'=>'#','ï¼…'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','Í´'=>'ʹ','ËŠ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','×´'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','â—'=>'ʹʹʹʹ','¯'=>'ˉ','ï¿£'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','Ëš'=>'°','௵'=>'௳','ï¿©'=>'â†','ï¿«'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','ð››'=>'∂','ðœ•'=>'∂','ð'=>'∂','ðž‰'=>'∂','ðŸƒ'=>'∂','ð›'=>'∇','ð›»'=>'∇','ðœµ'=>'∇','ð¯'=>'∇','ðž©'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','ï¼'=>'=','⩵'=>'==','â©¶'=>'===','›'=>'>','>'=>'>','ï¿¢'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','â‹€'=>'∧','â‹'=>'∨','â‹‚'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','â™'=>'⊕','☉'=>'⊙','⟂'=>'⊥','â–·'=>'⊲','â¨'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','â–'=>'â–Œ','ï¿­'=>'â– ','â˜'=>'â–¡','ï¿®'=>'â—‹','⦾'=>'â—Ž','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','â§™'=>'⦚','〶'=>'〒','ï½°'=>'ー','ï¿ '=>'¢','$'=>'$','ï¿¡'=>'£','ï¿¥'=>'Y̵','₩'=>'W̵','ï¼'=>'0','ðŸŽ'=>'0','ðŸ˜'=>'0','ðŸ¢'=>'0','ðŸ¬'=>'0','ðŸ¶'=>'0','০'=>'0','à­¦'=>'0','௦'=>'0','á '=>'0','〇'=>'0','ðŽ'=>'0','ð‘‚'=>'0','ð‘¶'=>'0','ð’ª'=>'0','ð“ž'=>'0','ð”’'=>'0','ð•†'=>'0','ð•º'=>'0','ð–®'=>'0','ð—¢'=>'0','ð˜–'=>'0','ð™Š'=>'0','ð™¾'=>'0','ðš¶'=>'0','ð›°'=>'0','ðœª'=>'0','ð¤'=>'0','ðžž'=>'0','âµ”'=>'0','à´ '=>'0','⊖'=>'0̵','ðš¯'=>'0̵','ðš¹'=>'0̵','ð›©'=>'0̵','ð›³'=>'0̵','ðœ£'=>'0̵','ðœ­'=>'0̵','ð'=>'0̵','ð§'=>'0̵','ðž—'=>'0̵','ðž¡'=>'0̵','â´±'=>'0̵','Ꮎ'=>'0̵','Û°'=>'Ù ','á­œ'=>'á­','ã˜'=>'0点','1'=>'1','ðŸ'=>'1','ðŸ™'=>'1','ðŸ£'=>'1','ðŸ­'=>'1','ðŸ·'=>'1','â„'=>'1','â„‘'=>'1','ðˆ'=>'1','ð¼'=>'1','ð‘°'=>'1','ð“˜'=>'1','ð•€'=>'1','ð•´'=>'1','ð–¨'=>'1','ð—œ'=>'1','ð˜'=>'1','ð™„'=>'1','ð™¸'=>'1','l'=>'l','l'=>'l','â…¼'=>'1','â„“'=>'l','ð¥'=>'l','ð‘™'=>'l','ð’'=>'l','ð“'=>'l','ð“µ'=>'l','ð”©'=>'l','ð•'=>'l','ð–‘'=>'l','ð—…'=>'l','ð—¹'=>'l','ð˜­'=>'l','ð™¡'=>'l','ðš•'=>'l','ðš°'=>'l','ð›ª'=>'l','ðœ¤'=>'l','ðž'=>'l','ðž˜'=>'l','â‘ '=>'➀','É­'=>'lÌ¢','É«'=>'lÌ´','Æš'=>'l̵','Å‚'=>'lÌ·','Û±'=>'Ù¡','â’ˆ'=>'1.','Å€'=>'l·','á’·'=>'1·','â‘©'=>'➉','â’‘'=>'10.','ã©'=>'10æ—¥','㋉'=>'10月','ã¢'=>'10点','â’’'=>'11.','ãª'=>'11æ—¥','㋊'=>'11月','ã£'=>'11点','â’“'=>'12.','ã«'=>'12æ—¥','ã‹‹'=>'12月','ã¤'=>'12点','â’”'=>'13.','ã¬'=>'13æ—¥','ã¥'=>'13点','â’•'=>'14.','ã­'=>'14æ—¥','ã¦'=>'14点','â’–'=>'15.','ã®'=>'15æ—¥','ã§'=>'15点','â’—'=>'16.','ã¯'=>'16æ—¥','ã¨'=>'16点','â’˜'=>'17.','ã°'=>'17æ—¥','ã©'=>'17点','â’™'=>'18.','ã±'=>'18æ—¥','ãª'=>'18点','â’š'=>'19.','ã²'=>'19æ—¥','ã«'=>'19点','lj'=>'lj','ã '=>'1æ—¥','ã‹€'=>'1月','ã™'=>'1点','ï¼’'=>'2','ðŸ'=>'2','ðŸš'=>'2','ðŸ¤'=>'2','ðŸ®'=>'2','ðŸ¸'=>'2','á’¿'=>'2','â‘¡'=>'âž','Û²'=>'Ù¢','â’‰'=>'2.','â’›'=>'20.','ã³'=>'20æ—¥','ã¬'=>'20点','ã´'=>'21æ—¥','ã­'=>'21点','ãµ'=>'22æ—¥','ã®'=>'22点','ã¶'=>'23æ—¥','ã¯'=>'23点','ã·'=>'24æ—¥','ã°'=>'24点','ã¸'=>'25æ—¥','ã¹'=>'26æ—¥','ãº'=>'27æ—¥','ã»'=>'28æ—¥','ã¼'=>'29æ—¥','ã¡'=>'2æ—¥','ã‹'=>'2月','ãš'=>'2点','3'=>'3','ðŸ‘'=>'3','ðŸ›'=>'3','ðŸ¥'=>'3','ðŸ¯'=>'3','ðŸ¹'=>'3','â‘¢'=>'âž‚','Û³'=>'Ù£','â’Š'=>'3.','ã½'=>'30æ—¥','ã¾'=>'31æ—¥','ã¢'=>'3æ—¥','ã‹‚'=>'3月','ã›'=>'3点','ï¼”'=>'4','ðŸ’'=>'4','ðŸœ'=>'4','ðŸ¦'=>'4','ðŸ°'=>'4','ðŸº'=>'4','áŽ'=>'4','â‘£'=>'➃','â’‹'=>'4.','á”°'=>'4·','ã£'=>'4æ—¥','㋃'=>'4月','ãœ'=>'4点','5'=>'5','ðŸ“'=>'5','ðŸ'=>'5','ðŸ§'=>'5','ðŸ±'=>'5','ðŸ»'=>'5','⑤'=>'âž„','â’Œ'=>'5.','ã¤'=>'5æ—¥','ã‹„'=>'5月','ã'=>'5点','ï¼–'=>'6','ðŸ”'=>'6','ðŸž'=>'6','ðŸ¨'=>'6','ðŸ²'=>'6','ðŸ¼'=>'6','б'=>'6','â‘¥'=>'âž…','â’'=>'6.','ã¥'=>'6æ—¥','ã‹…'=>'6月','ãž'=>'6点','ï¼—'=>'7','ðŸ•'=>'7','ðŸŸ'=>'7','ðŸ©'=>'7','ðŸ³'=>'7','ðŸ½'=>'7','⑦'=>'➆','Û·'=>'Ù§','â’Ž'=>'7.','ã¦'=>'7æ—¥','㋆'=>'7月','ãŸ'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','ðŸ–'=>'8','ðŸ '=>'8','ðŸª'=>'8','ðŸ´'=>'8','ðŸ¾'=>'8','È£'=>'8','â‘§'=>'➇','Û¸'=>'Ù¨','â’'=>'8.','ã§'=>'8æ—¥','㋇'=>'8月','ã '=>'8点','à©§'=>'9','à­¨'=>'9','à§­'=>'9','ï¼™'=>'9','ðŸ—'=>'9','ðŸ¡'=>'9','ðŸ«'=>'9','ðŸµ'=>'9','ðŸ¿'=>'9','⑨'=>'➈','Û¹'=>'Ù©','â’'=>'9.','ã¨'=>'9æ—¥','㋈'=>'9月','ã¡'=>'9点','ï½'=>'a','ðš'=>'a','ð‘Ž'=>'a','ð’‚'=>'a','ð’¶'=>'a','ð“ª'=>'a','ð”ž'=>'a','ð•’'=>'a','ð–†'=>'a','ð–º'=>'a','ð—®'=>'a','ð˜¢'=>'a','ð™–'=>'a','ðšŠ'=>'a','â„€'=>'a/c','â„'=>'a/s','æ'=>'ae','b'=>'b','ð›'=>'b','ð‘'=>'b','ð’ƒ'=>'b','ð’·'=>'b','ð“«'=>'b','ð”Ÿ'=>'b','ð•“'=>'b','ð–‡'=>'b','ð–»'=>'b','ð—¯'=>'b','ð˜£'=>'b','ð™—'=>'b','ðš‹'=>'b','É“'=>'bÌ”','ƃ'=>'bÌ„','Æ€'=>'b̵','c'=>'c','â…½'=>'c','ðœ'=>'c','ð‘'=>'c','ð’„'=>'c','ð’¸'=>'c','ð“¬'=>'c','ð” '=>'c','ð•”'=>'c','ð–ˆ'=>'c','ð–¼'=>'c','ð—°'=>'c','ð˜¤'=>'c','ð™˜'=>'c','ðšŒ'=>'c','ð›“'=>'c','ðœ'=>'c','ð‡'=>'c','ðž'=>'c','ðž»'=>'c','â„…'=>'c/o','℆'=>'c/u','d'=>'d','â…¾'=>'d','â…†'=>'d','ð'=>'d','ð‘‘'=>'d','ð’…'=>'d','ð’¹'=>'d','ð“­'=>'d','ð”¡'=>'d','ð••'=>'d','ð–‰'=>'d','ð–½'=>'d','ð—±'=>'d','ð˜¥'=>'d','ð™™'=>'d','ðš'=>'d','É—'=>'dÌ”','ÆŒ'=>'dÌ„','É–'=>'dÌ¢','Ä‘'=>'d̵','dz'=>'dz','dž'=>'dž','ï½…'=>'e','ℯ'=>'e','â…‡'=>'e','ðž'=>'e','ð‘’'=>'e','ð’†'=>'e','ð“®'=>'e','ð”¢'=>'e','ð•–'=>'e','ð–Š'=>'e','ð–¾'=>'e','ð—²'=>'e','ð˜¦'=>'e','ð™š'=>'e','ðšŽ'=>'e','â´¹'=>'E','É™'=>'Ç','Éš'=>'ÇËž','â‹´'=>'É›','ð›†'=>'É›','ð›œ'=>'É›','ðœ€'=>'É›','ðœ–'=>'É›','ðœº'=>'É›','ð'=>'É›','ð´'=>'É›','ðžŠ'=>'É›','ðž®'=>'É›','ðŸ„'=>'É›','f'=>'f','ðŸ'=>'f','ð‘“'=>'f','ð’‡'=>'f','ð’»'=>'f','ð“¯'=>'f','ð”£'=>'f','ð•—'=>'f','ð–‹'=>'f','ð–¿'=>'f','ð—³'=>'f','ð˜§'=>'f','ð™›'=>'f','ðš'=>'f','Æ’'=>'fÌ¡','g'=>'g','ℊ'=>'g','ð '=>'g','ð‘”'=>'g','ð’ˆ'=>'g','ð“°'=>'g','ð”¤'=>'g','ð•˜'=>'g','ð–Œ'=>'g','ð—€'=>'g','ð—´'=>'g','ð˜¨'=>'g','ð™œ'=>'g','ðš'=>'g','É¡'=>'g','É '=>'gÌ”','Ç¥'=>'g̵','h'=>'h','ℎ'=>'h','ð¡'=>'h','ð’‰'=>'h','ð’½'=>'h','ð“±'=>'h','ð”¥'=>'h','ð•™'=>'h','ð–'=>'h','ð—'=>'h','ð—µ'=>'h','ð˜©'=>'h','ð™'=>'h','ðš‘'=>'h','ɦ'=>'hÌ”','ħ'=>'h̵','â„'=>'h̵','῾'=>'Ê»','‘'=>'Ê»','‛'=>'Ê»','ʽ'=>'Ê»','â³'=>'i','i'=>'i','â…°'=>'i','ℹ'=>'i','â…ˆ'=>'i','ð¢'=>'i','ð‘–'=>'i','ð’Š'=>'i','ð’¾'=>'i','ð“²'=>'i','ð”¦'=>'i','ð•š'=>'i','ð–Ž'=>'i','ð—‚'=>'i','ð—¶'=>'i','ð˜ª'=>'i','ð™ž'=>'i','ðš’'=>'i','ı'=>'i','ðš¤'=>'i','ɪ'=>'i','É©'=>'i','ð›Š'=>'i','ðœ„'=>'i','ðœ¾'=>'i','ð¸'=>'i','ðž²'=>'i','ɨ'=>'i̵','â…±'=>'ii','â…²'=>'iii','ij'=>'ij','â…³'=>'iv','â…¸'=>'ix','j'=>'j','â…‰'=>'j','ð£'=>'j','ð‘—'=>'j','ð’‹'=>'j','ð’¿'=>'j','ð“³'=>'j','ð”§'=>'j','ð•›'=>'j','ð–'=>'j','ð—ƒ'=>'j','ð—·'=>'j','ð˜«'=>'j','ð™Ÿ'=>'j','ðš“'=>'j','ϳ'=>'j','ðš¥'=>'È·','k'=>'k','ð¤'=>'k','ð‘˜'=>'k','ð’Œ'=>'k','ð“€'=>'k','ð“´'=>'k','ð”¨'=>'k','ð•œ'=>'k','ð–'=>'k','ð—„'=>'k','ð—¸'=>'k','ð˜¬'=>'k','ð™ '=>'k','ðš”'=>'k','Æ™'=>'kÌ”','ï½'=>'m','â…¿'=>'m','ð¦'=>'m','ð‘š'=>'m','ð’Ž'=>'m','ð“‚'=>'m','ð“¶'=>'m','ð”ª'=>'m','ð•ž'=>'m','ð–’'=>'m','ð—†'=>'m','ð—º'=>'m','ð˜®'=>'m','ð™¢'=>'m','ðš–'=>'m','ɱ'=>'mÌ¡','n'=>'n','ð§'=>'n','ð‘›'=>'n','ð’'=>'n','ð“ƒ'=>'n','ð“·'=>'n','ð”«'=>'n','ð•Ÿ'=>'n','ð–“'=>'n','ð—‡'=>'n','ð—»'=>'n','ð˜¯'=>'n','ð™£'=>'n','ðš—'=>'n','ð'=>'N','ð‘'=>'N','ð‘µ'=>'N','ð’©'=>'N','ð“'=>'N','ð”‘'=>'N','ð•¹'=>'N','ð–­'=>'N','ð—¡'=>'N','ð˜•'=>'N','ð™‰'=>'N','ð™½'=>'N','ðš´'=>'N','ð›®'=>'N','ðœ¨'=>'N','ð¢'=>'N','ðžœ'=>'N','ɲ'=>'ņ','ɳ'=>'nÌ¢','Æž'=>'nÌ©','ð›ˆ'=>'nÌ©','ðœ‚'=>'nÌ©','ðœ¼'=>'nÌ©','ð¶'=>'nÌ©','ðž°'=>'nÌ©','ÇŒ'=>'nj','ï½'=>'o','â„´'=>'o','ð¨'=>'o','ð‘œ'=>'o','ð’'=>'o','ð“¸'=>'o','ð”¬'=>'o','ð• '=>'o','ð–”'=>'o','ð—ˆ'=>'o','ð—¼'=>'o','ð˜°'=>'o','ð™¤'=>'o','ðš˜'=>'o','á´'=>'o','ð›'=>'o','ðœŠ'=>'o','ð„'=>'o','ð¾'=>'o','ðž¸'=>'o','ɵ'=>'o̵','Ç¿'=>'o̵Ì','ø'=>'oÌ·','Å“'=>'oe','Æ¡'=>'oʼ','â´'=>'p','ï½'=>'p','ð©'=>'p','ð‘'=>'p','ð’‘'=>'p','ð“…'=>'p','ð“¹'=>'p','ð”­'=>'p','ð•¡'=>'p','ð–•'=>'p','ð—‰'=>'p','ð—½'=>'p','ð˜±'=>'p','ð™¥'=>'p','ðš™'=>'p','ð›’'=>'p','ð› '=>'p','ðœŒ'=>'p','ðœš'=>'p','ð†'=>'p','ð”'=>'p','ðž€'=>'p','ðžŽ'=>'p','ðžº'=>'p','ðŸˆ'=>'p','Æ¥'=>'pÌ”','q'=>'q','ðª'=>'q','ð‘ž'=>'q','ð’’'=>'q','ð“†'=>'q','ð“º'=>'q','ð”®'=>'q','ð•¢'=>'q','ð––'=>'q','ð—Š'=>'q','ð—¾'=>'q','ð˜²'=>'q','ð™¦'=>'q','ðšš'=>'q','ð'=>'Q','ð‘„'=>'Q','ð‘¸'=>'Q','ð’¬'=>'Q','ð“ '=>'Q','ð””'=>'Q','ð•¼'=>'Q','ð–°'=>'Q','ð—¤'=>'Q','ð˜˜'=>'Q','ð™Œ'=>'Q','ðš€'=>'Q','Ê '=>'qÌ”','ð›‹'=>'ĸ','ð›ž'=>'ĸ','ðœ…'=>'ĸ','ðœ˜'=>'ĸ','ðœ¿'=>'ĸ','ð’'=>'ĸ','ð¹'=>'ĸ','ðžŒ'=>'ĸ','ðž³'=>'ĸ','ðŸ†'=>'ĸ','ï½’'=>'r','ð«'=>'r','ð‘Ÿ'=>'r','ð’“'=>'r','ð“‡'=>'r','ð“»'=>'r','ð”¯'=>'r','ð•£'=>'r','ð–—'=>'r','ð—‹'=>'r','ð—¿'=>'r','ð˜³'=>'r','ð™§'=>'r','ðš›'=>'r','ɽ'=>'rÌ¢','ɼ'=>'rÌ©','s'=>'s','ð¬'=>'s','ð‘ '=>'s','ð’”'=>'s','ð“ˆ'=>'s','ð“¼'=>'s','ð”°'=>'s','ð•¤'=>'s','ð–˜'=>'s','ð—Œ'=>'s','ð˜€'=>'s','ð˜´'=>'s','ð™¨'=>'s','ðšœ'=>'s','ƽ'=>'s','Ê‚'=>'sÌ¢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','ï½”'=>'t','ð­'=>'t','ð‘¡'=>'t','ð’•'=>'t','ð“‰'=>'t','ð“½'=>'t','ð”±'=>'t','ð•¥'=>'t','ð–™'=>'t','ð—'=>'t','ð˜'=>'t','ð˜µ'=>'t','ð™©'=>'t','ðš'=>'t','ð‘‡'=>'T','ð‘»'=>'T','ð’¯'=>'T','ð“£'=>'T','ð”—'=>'T','ð•‹'=>'T','ð•¿'=>'T','ð–³'=>'T','ð—§'=>'T','ð˜›'=>'T','ð™'=>'T','ðšƒ'=>'T','ðš»'=>'T','ð›µ'=>'T','ðœ¯'=>'T','ð©'=>'T','ðž£'=>'T','Æ­'=>'tÌ”','È›'=>'Å£','Æ«'=>'Å£','ŧ'=>'t̵','u'=>'u','ð®'=>'u','ð‘¢'=>'u','ð’–'=>'u','ð“Š'=>'u','ð“¾'=>'u','ð”²'=>'u','ð•¦'=>'u','ð–š'=>'u','ð—Ž'=>'u','ð˜‚'=>'u','ð˜¶'=>'u','ð™ª'=>'u','ðšž'=>'u','ÊŠ'=>'u','Ê‹'=>'u','ð›–'=>'u','ðœ'=>'u','ðŠ'=>'u','ðž„'=>'u','ðž¾'=>'u','ð‘ˆ'=>'U','ð‘¼'=>'U','ð’°'=>'U','ð“¤'=>'U','ð”˜'=>'U','ð•Œ'=>'U','ð–€'=>'U','ð–´'=>'U','ð—¨'=>'U','ð˜œ'=>'U','ð™'=>'U','ðš„'=>'U','ï½–'=>'v','â…´'=>'v','ð¯'=>'v','ð‘£'=>'v','ð’—'=>'v','ð“‹'=>'v','ð“¿'=>'v','ð”³'=>'v','ð•§'=>'v','ð–›'=>'v','ð—'=>'v','ð˜ƒ'=>'v','ð˜·'=>'v','ð™«'=>'v','ðšŸ'=>'v','ð›Ž'=>'v','ðœˆ'=>'v','ð‚'=>'v','ð¼'=>'v','ðž¶'=>'v','â…µ'=>'vi','â…¶'=>'vii','â…·'=>'viii','ɯ'=>'w','ï½—'=>'w','ð°'=>'w','ð‘¤'=>'w','ð’˜'=>'w','ð“Œ'=>'w','ð”€'=>'w','ð”´'=>'w','ð•¨'=>'w','ð–œ'=>'w','ð—'=>'w','ð˜„'=>'w','ð˜¸'=>'w','ð™¬'=>'w','ðš '=>'w','ð‘Š'=>'W','ð‘¾'=>'W','ð’²'=>'W','ð“¦'=>'W','ð”š'=>'W','ð•Ž'=>'W','ð–‚'=>'W','ð–¶'=>'W','ð—ª'=>'W','ð˜ž'=>'W','ð™’'=>'W','ðš†'=>'W','×'=>'x','x'=>'x','â…¹'=>'x','ð±'=>'x','ð‘¥'=>'x','ð’™'=>'x','ð“'=>'x','ð”'=>'x','ð”µ'=>'x','ð•©'=>'x','ð–'=>'x','ð—‘'=>'x','ð˜…'=>'x','ð˜¹'=>'x','ð™­'=>'x','ðš¡'=>'x','á™­'=>'X','ð‘‹'=>'X','ð‘¿'=>'X','ð’³'=>'X','ð“§'=>'X','ð”›'=>'X','ð•'=>'X','ð–ƒ'=>'X','ð–·'=>'X','ð—«'=>'X','ð˜Ÿ'=>'X','ð™“'=>'X','ðš‡'=>'X','ðš¾'=>'X','ð›¸'=>'X','ðœ²'=>'X','ð¬'=>'X','ðž¦'=>'X','â…º'=>'xi','â…»'=>'xii','ï½™'=>'y','ð²'=>'y','ð‘¦'=>'y','ð’š'=>'y','ð“Ž'=>'y','ð”‚'=>'y','ð”¶'=>'y','ð•ª'=>'y','ð–ž'=>'y','ð—’'=>'y','ð˜†'=>'y','ð˜º'=>'y','ð™®'=>'y','ðš¢'=>'y','Æ´'=>'yÌ”','z'=>'z','ð³'=>'z','ð‘§'=>'z','ð’›'=>'z','ð“'=>'z','ð”ƒ'=>'z','ð”·'=>'z','ð•«'=>'z','ð–Ÿ'=>'z','ð—“'=>'z','ð˜‡'=>'z','ð˜»'=>'z','ð™¯'=>'z','ðš£'=>'z','È¥'=>'zÌ¡','Ê'=>'zÌ¢','ƶ'=>'z̵','È'=>'Ê’','?'=>'Ê”','?'=>'Ê”','â‡'=>'ʔʔ','âˆ'=>'ʔǃ','á¾½'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','ï¼'=>'ǃ','â‰'=>'ǃʔ','‼'=>'ǃǃ','âº'=>'α','ð›‚'=>'α','ð›¼'=>'α','ðœ¶'=>'α','ð°'=>'α','ðžª'=>'α','ð›ƒ'=>'β','ð›½'=>'β','ðœ·'=>'β','ð±'=>'β','ðž«'=>'β','ℽ'=>'γ','ð›„'=>'γ','ð›¾'=>'γ','ðœ¸'=>'γ','ð²'=>'γ','ðž¬'=>'γ','ð›…'=>'δ','ð›¿'=>'δ','ðœ¹'=>'δ','ð³'=>'δ','ðž­'=>'δ','ðŸ‹'=>'Ï','ð›‡'=>'ζ','ðœ'=>'ζ','ðœ»'=>'ζ','ðµ'=>'ζ','ðž¯'=>'ζ','â¬'=>'θ','ð›‰'=>'θ','ð›'=>'θ','ðœƒ'=>'θ','ðœ—'=>'θ','ðœ½'=>'θ','ð‘'=>'θ','ð·'=>'θ','ðž‹'=>'θ','ðž±'=>'θ','ðŸ…'=>'θ','ð›Œ'=>'λ','ðœ†'=>'λ','ð€'=>'λ','ðº'=>'λ','ðž´'=>'λ','ð›¬'=>'Λ','ðœ¦'=>'Λ','ð '=>'Λ','ðžš'=>'Λ','ð›'=>'μ','ðœ‡'=>'μ','ð'=>'μ','ð»'=>'μ','ðžµ'=>'μ','ð›'=>'ξ','ðœ‰'=>'ξ','ðƒ'=>'ξ','ð½'=>'ξ','ðž·'=>'ξ','ð›¯'=>'Ξ','ðœ©'=>'Ξ','ð£'=>'Ξ','ðž'=>'Ξ','ℼ'=>'Ï€','ð›‘'=>'Ï€','ð›¡'=>'Ï€','ðœ‹'=>'Ï€','ðœ›'=>'Ï€','ð…'=>'Ï€','ð•'=>'Ï€','ð¿'=>'Ï€','ðž'=>'Ï€','ðž¹'=>'Ï€','ðŸ‰'=>'Ï€','á´¨'=>'Ï€','âˆ'=>'Π','ðš·'=>'Π','ð›±'=>'Π','ðœ«'=>'Π','ð¥'=>'Π','ðžŸ'=>'Π','ð›”'=>'σ','ðœŽ'=>'σ','ðˆ'=>'σ','ðž‚'=>'σ','ðž¼'=>'σ','ð›•'=>'Ï„','ðœ'=>'Ï„','ð‰'=>'Ï„','ðžƒ'=>'Ï„','ðž½'=>'Ï„','ð˜'=>'Y','ð‘Œ'=>'Y','ð’€'=>'Y','ð’´'=>'Y','ð“¨'=>'Y','ð”œ'=>'Y','ð•'=>'Y','ð–„'=>'Y','ð–¸'=>'Y','ð—¬'=>'Y','ð˜ '=>'Y','ð™”'=>'Y','ðšˆ'=>'Y','ðš¼'=>'Y','ð›¶'=>'Y','ðœ°'=>'Y','ðª'=>'Y','ðž¤'=>'Y','ð›—'=>'φ','ð›Ÿ'=>'φ','ðœ‘'=>'φ','ðœ™'=>'φ','ð‹'=>'φ','ð“'=>'φ','ðž…'=>'φ','ðž'=>'φ','ðž¿'=>'φ','ðŸ‡'=>'φ','ð›·'=>'Φ','ðœ±'=>'Φ','ð«'=>'Φ','ðž¥'=>'Φ','ð›˜'=>'χ','ðœ’'=>'χ','ðŒ'=>'χ','ðž†'=>'χ','ðŸ€'=>'χ','ð›™'=>'ψ','ðœ“'=>'ψ','ð'=>'ψ','ðž‡'=>'ψ','ðŸ'=>'ψ','ð›¹'=>'Ψ','ðœ³'=>'Ψ','ð­'=>'Ψ','ðž§'=>'Ψ','âµ'=>'ω','ð›š'=>'ω','ðœ”'=>'ω','ðŽ'=>'ω','ðžˆ'=>'ω','ðŸ‚'=>'ω','Ó•'=>'ae','Ò“'=>'r̵','Ò‘'=>'rᑊ','Ò—'=>'ж̩','Ò™'=>'з̡','Ó'=>'i','Ò‹'=>'й̡','Ò›'=>'ĸ̩','ÒŸ'=>'ĸ̵','á´«'=>'л','Ó†'=>'л̡','ÓŽ'=>'м̡','ÓŠ'=>'н̡','Óˆ'=>'н̡','Ò£'=>'н̩','Ó©'=>'o̵','ѳ'=>'o̵','Ò«'=>'cÌ¡','Ò­'=>'т̩','Ò¯'=>'y','Ò±'=>'y̵','Ñ›'=>'h̵','ѽ'=>'ѡ҃','ÓŒ'=>'Ò·','Ò¿'=>'ҽ̢','Ò'=>'Ь̵','Õ¦'=>'q','Õ¼'=>'n','ℵ'=>'×','ﬡ'=>'×','אָ'=>'אַ','אּ'=>'אַ','ï­'=>'×ל','â„¶'=>'ב','â„·'=>'×’','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'×”','ﬤ'=>'×›','ﬥ'=>'ל','ﬦ'=>'×','ﬠ'=>'×¢','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'Ø¡','ﺂ'=>'Ø¢','ïº'=>'Ø¢','ﺄ'=>'Ø£','ﺃ'=>'Ø£','Ùµ'=>'أ','ï­‘'=>'Ù±','ï­'=>'Ù±','ﺆ'=>'ؤ','ﺅ'=>'ؤ','Ù¶'=>'ÙˆÙ”','ﺈ'=>'Ø¥','ﺇ'=>'Ø¥','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ï²—'=>'ئج','ï°€'=>'ئج','ﲘ'=>'ئح','ï°'=>'ئح','ï²™'=>'ئخ','ﱤ'=>'ئر','ï±¥'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ï°‚'=>'ئم','ï±§'=>'ئن','ï²›'=>'ئه','ï³ '=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ï°ƒ'=>'ئى','ﱩ'=>'ئى','ï°„'=>'ئى','ﺎ'=>'ا','ïº'=>'ا','ï´¼'=>'اً','ï´½'=>'اً','ï·³'=>'اكبر','ï·²'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ïº'=>'ب','ïº'=>'ب','ﲜ'=>'بج','ï°…'=>'بج','ï²'=>'بح','ï°†'=>'بح','ï·‚'=>'بحى','ﲞ'=>'بخ','ï°‡'=>'بخ','ï¶ž'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ï°ˆ'=>'بم','ï±­'=>'بن','ï² '=>'به','ï³¢'=>'به','ï±®'=>'بى','ï°‰'=>'بى','ﱯ'=>'بى','ï°Š'=>'بى','ï­”'=>'Ù»','ï­•'=>'Ù»','ï­“'=>'Ù»','ï­’'=>'Ù»','Û'=>'Ù»','ﯦ'=>'Ù»','ﯧ'=>'Ù»','ﯥ'=>'Ù»','ﯤ'=>'Ù»','ï­˜'=>'Ù¾','ï­™'=>'Ù¾','ï­—'=>'Ù¾','ï­–'=>'Ù¾','ï­œ'=>'Ú€','ï­'=>'Ú€','ï­›'=>'Ú€','ï­š'=>'Ú€','ﺔ'=>'Ø©','ﺓ'=>'Ø©','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ï°‹'=>'تج','ïµ'=>'تجم','ï¶ '=>'تجى','ï¶Ÿ'=>'تجى','ï²¢'=>'تح','ï°Œ'=>'تح','ïµ’'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ï²£'=>'تخ','ï°'=>'تخ','ïµ”'=>'تخم','ï¶¢'=>'تخى','ï¶¡'=>'تخى','ï±°'=>'تر','ï±±'=>'تز','ﲤ'=>'تم','ï³£'=>'تم','ï±²'=>'تم','ï°Ž'=>'تم','ﵕ'=>'تمج','ïµ–'=>'تمح','ïµ—'=>'تمخ','ﶤ'=>'تمى','ï¶£'=>'تمى','ï±³'=>'تن','ï²¥'=>'ته','ﳤ'=>'ته','ï±´'=>'تى','ï°'=>'تى','ï±µ'=>'تى','ï°'=>'تى','ﺛ'=>'Ø«','ﺜ'=>'Ø«','ﺚ'=>'Ø«','ﺙ'=>'Ø«','ï°‘'=>'ثج','ï±¶'=>'ثر','ï±·'=>'ثز','ﲦ'=>'ثم','ï³¥'=>'ثم','ﱸ'=>'ثم','ï°’'=>'ثم','ï±¹'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ï°“'=>'ثى','ï±»'=>'ثى','ï°”'=>'ثى','ï­¨'=>'Ù¹','ï­©'=>'Ù¹','ï­§'=>'Ù¹','ï­¦'=>'Ù¹','Ú»'=>'Ù¹','ﮢ'=>'Ù¹','ﮣ'=>'Ù¹','ﮡ'=>'Ù¹','ï® '=>'Ù¹','ï­ '=>'Ùº','ï­¡'=>'Ùº','ï­Ÿ'=>'Ùº','ï­ž'=>'Ùº','ï­¤'=>'Ù¿','ï­¥'=>'Ù¿','ï­£'=>'Ù¿','ï­¢'=>'Ù¿','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ïº'=>'ج','ï²§'=>'جح','ï°•'=>'جح','ﶦ'=>'جحى','ï¶¾'=>'جحى','ï·»'=>'جل جلاله','ﲨ'=>'جم','ï°–'=>'جم','ïµ™'=>'جمح','ﵘ'=>'جمح','ï¶§'=>'جمى','ï¶¥'=>'جمى','ï´'=>'جى','ï´'=>'جى','ï´ž'=>'جى','ï´‚'=>'جى','ï­¸'=>'Úƒ','ï­¹'=>'Úƒ','ï­·'=>'Úƒ','ï­¶'=>'Úƒ','ï­´'=>'Ú„','ï­µ'=>'Ú„','ï­³'=>'Ú„','ï­²'=>'Ú„','ï­¼'=>'Ú†','ï­½'=>'Ú†','ï­»'=>'Ú†','ï­º'=>'Ú†','ﮀ'=>'Ú‡','ï®'=>'Ú‡','ï­¿'=>'Ú‡','ï­¾'=>'Ú‡','ﺣ'=>'Ø­','ﺤ'=>'Ø­','ﺢ'=>'Ø­','ﺡ'=>'Ø­','ﲩ'=>'حج','ï°—'=>'حج','ï¶¿'=>'حجى','ﲪ'=>'حم','ï°˜'=>'حم','ïµ›'=>'حمى','ﵚ'=>'حمى','ï´›'=>'حى','ﳿ'=>'حى','ï´œ'=>'حى','ï´€'=>'حى','ﺧ'=>'Ø®','ﺨ'=>'Ø®','ﺦ'=>'Ø®','ﺥ'=>'Ø®','ﲫ'=>'خج','ï°™'=>'خج','ï°š'=>'خح','ﲬ'=>'خم','ï°›'=>'خم','ï´Ÿ'=>'خى','ï´ƒ'=>'خى','ï´ '=>'خى','ï´„'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ï±›'=>'ذٰ','ﮉ'=>'Úˆ','ﮈ'=>'Úˆ','ï®…'=>'ÚŒ','ﮄ'=>'ÚŒ','ﮃ'=>'Ú','ﮂ'=>'Ú','ﮇ'=>'ÚŽ','ﮆ'=>'ÚŽ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ï·¶'=>'رسول','ï·¼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ï®'=>'Ú‘','ﮌ'=>'Ú‘','ﮋ'=>'Ú˜','ﮊ'=>'Ú˜','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ï²­'=>'سج','ï´´'=>'سج','ï°œ'=>'سج','ïµ'=>'سجح','ﵞ'=>'سجى','ï²®'=>'سح','ï´µ'=>'سح','ï°'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ï´¶'=>'سخ','ï°ž'=>'سخ','ﶨ'=>'سخى','ï·†'=>'سخى','ï´ª'=>'سر','ï´Ž'=>'سر','ï²°'=>'سم','ï³§'=>'سم','ï°Ÿ'=>'سم','ﵡ'=>'سمج','ïµ '=>'سمح','ﵟ'=>'سمح','ïµ£'=>'سمم','ïµ¢'=>'سمم','ï´±'=>'سه','ﳨ'=>'سه','ï´—'=>'سى','ï³»'=>'سى','ï´˜'=>'سى','ï³¼'=>'سى','ﺷ'=>'Ø´','ﺸ'=>'Ø´','ﺶ'=>'Ø´','ﺵ'=>'Ø´','ï´­'=>'شج','ï´·'=>'شج','ï´¥'=>'شج','ï´‰'=>'شج','ﵩ'=>'شجى','ï´®'=>'شح','ï´¸'=>'شح','ï´¦'=>'شح','ï´Š'=>'شح','ﵨ'=>'شحم','ïµ§'=>'شحم','ﶪ'=>'شحى','ï´¯'=>'شخ','ï´¹'=>'شخ','ï´§'=>'شخ','ï´‹'=>'شخ','ï´©'=>'شر','ï´'=>'شر','ï´°'=>'شم','ﳩ'=>'شم','ï´¨'=>'شم','ï´Œ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ïµ­'=>'شمم','ﵬ'=>'شمم','ï´²'=>'شه','ﳪ'=>'شه','ï´™'=>'شى','ï³½'=>'شى','ï´š'=>'شى','ï³¾'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ï²±'=>'صح','ï° '=>'صح','ïµ¥'=>'صحح','ﵤ'=>'صحح','ï¶©'=>'صحى','ï²²'=>'صخ','ï´«'=>'صر','ï´'=>'صر','ï·µ'=>'صلعم','ï·¹'=>'صلى','ï·º'=>'صلى الله علىه وسلم','ï·°'=>'صلے','ï²³'=>'صم','ï°¡'=>'صم','ï·…'=>'صمم','ﵦ'=>'صمم','ï´¡'=>'صى','ï´…'=>'صى','ï´¢'=>'صى','ï´†'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ï²´'=>'ضج','ï°¢'=>'ضج','ï²µ'=>'ضح','ï°£'=>'ضح','ïµ®'=>'ضحى','ï¶«'=>'ضحى','ï²¶'=>'ضخ','ï°¤'=>'ضخ','ïµ°'=>'ضخم','ﵯ'=>'ضخم','ï´¬'=>'ضر','ï´'=>'ضر','ï²·'=>'ضم','ï°¥'=>'ضم','ï´£'=>'ضى','ï´‡'=>'ضى','ï´¤'=>'ضى','ï´ˆ'=>'ضى','ﻃ'=>'Ø·','ﻄ'=>'Ø·','ﻂ'=>'Ø·','ï»'=>'Ø·','ﲸ'=>'طح','ï°¦'=>'طح','ï´³'=>'طم','ï´º'=>'طم','ï°§'=>'طم','ïµ²'=>'طمح','ïµ±'=>'طمح','ïµ³'=>'طمم','ïµ´'=>'طمى','ï´‘'=>'طى','ï³µ'=>'طى','ï´’'=>'طى','ï³¶'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ï»…'=>'ظ','ï²¹'=>'ظم','ï´»'=>'ظم','ï°¨'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ï°©'=>'عج','ï·„'=>'عجم','ïµµ'=>'عجم','ï··'=>'علىه','ï²»'=>'عم','ï°ª'=>'عم','ïµ·'=>'عمم','ïµ¶'=>'عمم','ﵸ'=>'عمى','ï¶¶'=>'عمى','ï´“'=>'عى','ï³·'=>'عى','ï´”'=>'عى','ﳸ'=>'عى','ï»'=>'غ','ï»'=>'غ','ﻎ'=>'غ','ï»'=>'غ','ï²¼'=>'غج','ï°«'=>'غج','ï²½'=>'غم','ï°¬'=>'غم','ïµ¹'=>'غمم','ïµ»'=>'غمى','ﵺ'=>'غمى','ï´•'=>'غى','ï³¹'=>'غى','ï´–'=>'غى','ﳺ'=>'غى','ﻓ'=>'Ù','ï»”'=>'Ù','ï»’'=>'Ù','ﻑ'=>'Ù','ï²¾'=>'ÙØ¬','ï°­'=>'ÙØ¬','ﲿ'=>'ÙØ­','ï°®'=>'ÙØ­','ï³€'=>'ÙØ®','ï°¯'=>'ÙØ®','ïµ½'=>'ÙØ®Ù…','ïµ¼'=>'ÙØ®Ù…','ï³'=>'ÙÙ…','ï°°'=>'ÙÙ…','ï·'=>'Ùمى','ï±¼'=>'ÙÙ‰','ï°±'=>'ÙÙ‰','ï±½'=>'ÙÙ‰','ï°²'=>'ÙÙ‰','ï­¬'=>'Ú¤','ï­­'=>'Ú¤','ï­«'=>'Ú¤','ï­ª'=>'Ú¤','ï­°'=>'Ú¦','ï­±'=>'Ú¦','ï­¯'=>'Ú¦','ï­®'=>'Ú¦','ï»—'=>'Ù‚','ﻘ'=>'Ù‚','ï»–'=>'Ù‚','ﻕ'=>'Ù‚','ﳂ'=>'قح','ï°³'=>'قح','ï·±'=>'قلے','ﳃ'=>'قم','ï°´'=>'قم','ï¶´'=>'قمح','ïµ¾'=>'قمح','ﵿ'=>'قمم','ï¶²'=>'قمى','ï±¾'=>'قى','ï°µ'=>'قى','ﱿ'=>'قى','ï°¶'=>'قى','ï»›'=>'Ùƒ','ﻜ'=>'Ùƒ','ﻚ'=>'Ùƒ','ï»™'=>'Ùƒ','Ú©'=>'Ùƒ','ï®'=>'Ùƒ','ﮑ'=>'Ùƒ','ï®'=>'Ùƒ','ﮎ'=>'Ùƒ','ï²€'=>'كا','ï°·'=>'كا','ﳄ'=>'كج','ï°¸'=>'كج','ï³…'=>'كح','ï°¹'=>'كح','ﳆ'=>'كخ','ï°º'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ï²'=>'كل','ï°»'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ï°¼'=>'كم','ï·ƒ'=>'كمم','ï¶»'=>'كمم','ï¶·'=>'كمى','ﲃ'=>'كى','ï°½'=>'كى','ﲄ'=>'كى','ï°¾'=>'كى','ﯕ'=>'Ú­','ﯖ'=>'Ú­','ﯔ'=>'Ú­','ﯓ'=>'Ú­','ï®”'=>'Ú¯','ﮕ'=>'Ú¯','ﮓ'=>'Ú¯','ï®’'=>'Ú¯','ﮜ'=>'Ú±','ï®'=>'Ú±','ï®›'=>'Ú±','ﮚ'=>'Ú±','ﮘ'=>'Ú³','ï®™'=>'Ú³','ï®—'=>'Ú³','ï®–'=>'Ú³','ﻟ'=>'Ù„','ï» '=>'Ù„','ﻞ'=>'Ù„','ï»'=>'Ù„','ï»¶'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ï»·'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ï»»'=>'لا','ﳉ'=>'لج','ï°¿'=>'لج','ﶃ'=>'لجج','ï¶„'=>'لجج','ﶺ'=>'لجم','ï¶¼'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ï±€'=>'لح','ï¶µ'=>'لحم','ï¶€'=>'لحم','ï¶‚'=>'لحى','ï¶'=>'لحى','ﳋ'=>'لخ','ï±'=>'لخ','ﶆ'=>'لخم','ï¶…'=>'لخم','ﳌ'=>'لم','ï³­'=>'لم','ï²…'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ï¶­'=>'لمى','ï³'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'Ù…','ﻤ'=>'Ù…','ﻢ'=>'Ù…','ﻡ'=>'Ù…','ﲈ'=>'ما','ﳎ'=>'مج','ï±…'=>'مج','ï¶Œ'=>'مجح','ï¶’'=>'مجخ','ï¶'=>'مجم','ï·€'=>'مجى','ï³'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ï¶Š'=>'محم','ï·´'=>'محمد','ï¶‹'=>'محى','ï³'=>'مخ','ﱇ'=>'مخ','ï¶Ž'=>'مخج','ï¶'=>'مخم','ï¶¹'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ï¶±'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ï»§'=>'Ù†','ﻨ'=>'Ù†','ﻦ'=>'Ù†','ﻥ'=>'Ù†','ï³’'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ï¶½'=>'نجح','ﶘ'=>'نجم','ï¶—'=>'نجم','ï¶™'=>'نجى','ï·‡'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ï¶•'=>'نحم','ï¶–'=>'نحى','ï¶³'=>'نحى','ï³”'=>'نخ','ï±'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ï³®'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ï¶›'=>'نمى','ï¶š'=>'نمى','ï²'=>'نن','ï³–'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ï±'=>'نى','ï²'=>'نى','ï±'=>'نى','ﮟ'=>'Úº','ﮞ'=>'Úº','ﻫ'=>'Ù‡','ﻬ'=>'Ù‡','ﻪ'=>'Ù‡','ﻩ'=>'Ù‡','Ú¾'=>'Ù‡','ﮬ'=>'Ù‡','ï®­'=>'Ù‡','ﮫ'=>'Ù‡','ﮪ'=>'Ù‡','Û'=>'Ù‡','ﮨ'=>'Ù‡','ﮩ'=>'Ù‡','ï®§'=>'Ù‡','ﮦ'=>'Ù‡','Û•'=>'Ù‡','ï³™'=>'هٰ','ï³—'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ï±’'=>'هم','ï¶“'=>'همج','ï¶”'=>'همم','ﱓ'=>'هى','ï±”'=>'هى','ﮥ'=>'Û€','ﮤ'=>'Û€','ï»®'=>'Ùˆ','ï»­'=>'Ùˆ','ï·¸'=>'وسلم','ﯡ'=>'Û…','ﯠ'=>'Û…','ﯚ'=>'Û†','ﯙ'=>'Û†','ﯘ'=>'Û‡','ﯗ'=>'Û‡','Ù·'=>'Û‡Ù”','ï¯'=>'Û‡Ù”','ﯜ'=>'Ûˆ','ﯛ'=>'Ûˆ','ﯣ'=>'Û‰','ﯢ'=>'Û‰','ﯟ'=>'Û‹','ﯞ'=>'Û‹','ﯨ'=>'Ù‰','ﯩ'=>'Ù‰','ï»°'=>'Ù‰','ﻯ'=>'Ù‰','ÙŠ'=>'Ù‰','ﻳ'=>'Ù‰','ï»´'=>'Ù‰','ﻲ'=>'Ù‰','ï»±'=>'Ù‰','ÛŒ'=>'Ù‰','ﯾ'=>'Ù‰','ﯿ'=>'Ù‰','ﯽ'=>'Ù‰','ﯼ'=>'Ù‰','Ù¸'=>'Ù‰Ù”','ï²'=>'ىٰ','ï±'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ï³›'=>'ىح','ï±–'=>'ىح','ï¶®'=>'ىحى','ﳜ'=>'ىخ','ï±—'=>'ىخ','ﲑ'=>'ىر','ï²’'=>'ىز','ï³'=>'ىم','ï³°'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ï¶'=>'ىمم','ï¶œ'=>'ىمم','ï¶°'=>'ىمى','ï²”'=>'ىن','ﳞ'=>'ىه','ï³±'=>'ىه','ﲕ'=>'ىى','ï±™'=>'ىى','ï²–'=>'ىى','ﱚ'=>'ىى','Û§'=>'Û¦','ﮯ'=>'Û’','ï®®'=>'Û’','ï®±'=>'Û“','ï®°'=>'Û“','∃'=>'â´º','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','à¤'=>'à¤à¥…','ऎ'=>'à¤à¥†','à¤'=>'à¤à¥‡','ई'=>'रà¥à¤‡','আ'=>'অা','à§ '=>'ঋৃ','à§¡'=>'ঌৢ','ਉ'=>'ੳà©','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','à¨'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','à¨'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','àª'=>'અૅ','àª'=>'અે','àª'=>'અૈ','ଆ'=>'ଅା','௮'=>'à®…','à®°'=>'ஈ','ா'=>'ஈ','௫'=>'ஈà¯','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'à®','௧'=>'க','௪'=>'ச','௬'=>'சà¯','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'à®·','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','à± '=>'à°‹à°¾','ౡ'=>'ఌా','à°”'=>'ఒౌ','à°“'=>'ఒౕ','à°¢'=>'à°¡Ì£','à°­'=>'బ̣','à°·'=>'వ̣','à°¹'=>'వా','à°®'=>'à°µà±','ూ'=>'à±à°¾','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','à´ˆ'=>'ഇൗ','à´Š'=>'உൗ','à´'=>'എെ','à´“'=>'à´’à´¾','à´”'=>'ഒൗ','ൡ'=>'à´ž','൫'=>'à´¦àµà´°','à´Œ'=>'നூ','à´™'=>'നூ','൯'=>'à´¨àµ','à´±'=>'à´°','൪'=>'à´°àµ','൮'=>'à´µàµ','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','à¸'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','à¹'=>'เเ','ໜ'=>'ຫນ','à»'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','á€'=>'o','ឣ'=>'អ','á§'=>'ᦞ','á­’'=>'á¬','á­“'=>'ᬑ','á­˜'=>'ᬨ','ᢖ'=>'ᡜ','á¡•'=>'á µ','á’'=>'Ꭱ','Ꮍ'=>'y','ð€'=>'A','ð´'=>'A','ð‘¨'=>'A','ð’œ'=>'A','ð“'=>'A','ð”„'=>'A','ð”¸'=>'A','ð•¬'=>'A','ð– '=>'A','ð—”'=>'A','ð˜ˆ'=>'A','ð˜¼'=>'A','ð™°'=>'A','ðš¨'=>'A','ð›¢'=>'A','ðœœ'=>'A','ð–'=>'A','ðž'=>'A','ð‰'=>'J','ð½'=>'J','ð‘±'=>'J','ð’¥'=>'J','ð“™'=>'J','ð”'=>'J','ð•'=>'J','ð•µ'=>'J','ð–©'=>'J','ð—'=>'J','ð˜‘'=>'J','ð™…'=>'J','ð™¹'=>'J','á§'=>'J','â‹¿'=>'E','â„°'=>'E','ð„'=>'E','ð¸'=>'E','ð‘¬'=>'E','ð“”'=>'E','ð”ˆ'=>'E','ð”¼'=>'E','ð•°'=>'E','ð–¤'=>'E','ð—˜'=>'E','ð˜Œ'=>'E','ð™€'=>'E','ð™´'=>'E','ðš¬'=>'E','ð›¦'=>'E','ðœ '=>'E','ðš'=>'E','ðž”'=>'E','ℾ'=>'Ꮁ','ðšª'=>'Ꮁ','ð›¤'=>'Ꮁ','ðœž'=>'Ꮁ','ð˜'=>'Ꮁ','ðž’'=>'Ꮁ','á”'=>'w','ℳ'=>'M','ðŒ'=>'M','ð‘€'=>'M','ð‘´'=>'M','ð“œ'=>'M','ð”'=>'M','ð•„'=>'M','ð•¸'=>'M','ð–¬'=>'M','ð— '=>'M','ð˜”'=>'M','ð™ˆ'=>'M','ð™¼'=>'M','ðš³'=>'M','ð›­'=>'M','ðœ§'=>'M','ð¡'=>'M','ðž›'=>'M','â„‹'=>'H','ℌ'=>'H','â„'=>'H','ð‡'=>'H','ð»'=>'H','ð‘¯'=>'H','ð“—'=>'H','ð•³'=>'H','ð–§'=>'H','ð—›'=>'H','ð˜'=>'H','ð™ƒ'=>'H','ð™·'=>'H','ðš®'=>'H','ð›¨'=>'H','ðœ¢'=>'H','ðœ'=>'H','ðž–'=>'H','ð†'=>'G','ðº'=>'G','ð‘®'=>'G','ð’¢'=>'G','ð“–'=>'G','ð”Š'=>'G','ð”¾'=>'G','ð•²'=>'G','ð–¦'=>'G','ð—š'=>'G','ð˜Ž'=>'G','ð™‚'=>'G','ð™¶'=>'G','á³'=>'G','ℤ'=>'Z','ℨ'=>'Z','ð™'=>'Z','ð‘'=>'Z','ð’'=>'Z','ð’µ'=>'Z','ð“©'=>'Z','ð–…'=>'Z','ð–¹'=>'Z','ð—­'=>'Z','ð˜¡'=>'Z','ð™•'=>'Z','ðš‰'=>'Z','ðš­'=>'Z','ð›§'=>'Z','ðœ¡'=>'Z','ð›'=>'Z','ðž•'=>'Z','ð’'=>'S','ð‘†'=>'S','ð‘º'=>'S','ð’®'=>'S','ð“¢'=>'S','ð”–'=>'S','ð•Š'=>'S','ð•¾'=>'S','ð–²'=>'S','ð—¦'=>'S','ð˜š'=>'S','ð™Ž'=>'S','ðš‚'=>'S','áš'=>'S','ð•'=>'V','ð‘‰'=>'V','ð‘½'=>'V','ð’±'=>'V','ð“¥'=>'V','ð”™'=>'V','ð•'=>'V','ð–'=>'V','ð–µ'=>'V','ð—©'=>'V','ð˜'=>'V','ð™‘'=>'V','ðš…'=>'V','â„’'=>'L','ð‹'=>'L','ð¿'=>'L','ð‘³'=>'L','ð“›'=>'L','ð”'=>'L','ð•ƒ'=>'L','ð•·'=>'L','ð–«'=>'L','ð—Ÿ'=>'L','ð˜“'=>'L','ð™‡'=>'L','ð™»'=>'L','∑'=>'C','â…€'=>'C','â„‚'=>'C','â„­'=>'C','ð‚'=>'C','ð¶'=>'C','ð‘ª'=>'C','ð’ž'=>'C','ð“’'=>'C','ð•®'=>'C','ð–¢'=>'C','ð—–'=>'C','ð˜Š'=>'C','ð˜¾'=>'C','ð™²'=>'C','ðšº'=>'C','ð›´'=>'C','ðœ®'=>'C','ð¨'=>'C','ðž¢'=>'C','â„™'=>'P','ð'=>'P','ð‘ƒ'=>'P','ð‘·'=>'P','ð’«'=>'P','ð“Ÿ'=>'P','ð”“'=>'P','ð•»'=>'P','ð–¯'=>'P','ð—£'=>'P','ð˜—'=>'P','ð™‹'=>'P','ð™¿'=>'P','ðš¸'=>'P','ð›²'=>'P','ðœ¬'=>'P','ð¦'=>'P','ðž '=>'P','ðŠ'=>'K','ð¾'=>'K','ð‘²'=>'K','ð’¦'=>'K','ð“š'=>'K','ð”Ž'=>'K','ð•‚'=>'K','ð•¶'=>'K','ð–ª'=>'K','ð—ž'=>'K','ð˜’'=>'K','ð™†'=>'K','ð™º'=>'K','ðš±'=>'K','ð›«'=>'K','ðœ¥'=>'K','ðŸ'=>'K','ðž™'=>'K','ℬ'=>'B','ð'=>'B','ðµ'=>'B','ð‘©'=>'B','ð“‘'=>'B','ð”…'=>'B','ð”¹'=>'B','ð•­'=>'B','ð–¡'=>'B','ð—•'=>'B','ð˜‰'=>'B','ð˜½'=>'B','ð™±'=>'B','ðš©'=>'B','ð›£'=>'B','ðœ'=>'B','ð—'=>'B','ðž‘'=>'B','á'=>'á·','∆'=>'áƒ','ðš«'=>'áƒ','ð›¥'=>'áƒ','ðœŸ'=>'áƒ','ð™'=>'áƒ','ðž“'=>'áƒ','á'=>'áƒÂ·','á‘'=>'á„·','á“'=>'á…·','á•'=>'á†Â·','á˜'=>'áŠÂ·','áš'=>'á‹Â·','á“‘'=>'á¡','á‘¶'=>'·P','ᑺ'=>'·d','á’˜'=>'·J','á‘'=>'á³Â·','ᑃ'=>'á´Â·','á‘…'=>'á¸Â·','ᑇ'=>'á¹Â·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','á‘§'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'á‘·','ᑞ'=>'á‘·','á‘©'=>'á‘ᑊ','á‘ '=>'ᑑ·','á‘¢'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','á’…'=>'ᑫᑊ','á‘·'=>'P·','á’†'=>'Pᑊ','ᑹ'=>'ᑮ·','á‘»'=>'d·','á’‡'=>'dᑊ','ᑽ'=>'ᑰ·','á‘¿'=>'ᑲ·','á’ˆ'=>'ᑲᑊ','á’'=>'ᑳ·','ᘃ'=>'á’‰','á’“'=>'ᒉ·','á’•'=>'ᒋ·','á’—'=>'ᒌ·','á’™'=>'J·','á’›'=>'ᒎ·','ᘂ'=>'á’','á’'=>'á’·','á’Ÿ'=>'ᒑ·','á’­'=>'ᒣ·','á’¯'=>'ᒥ·','á’±'=>'ᒦ·','á’³'=>'ᒧ·','á’µ'=>'ᒨ·','á’¹'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'á““','á“'=>'ᓓ·','ᓟ'=>'ᓕ·','á“¡'=>'ᓖ·','á“£'=>'ᓗ·','á“¥'=>'ᓘ·','ᘇ'=>'ᓚ','á“§'=>'ᓚ·','á“©'=>'ᓛ·','á“·'=>'ᓭ·','ᓹ'=>'ᓯ·','á“»'=>'ᓰ·','ᓽ'=>'ᓱ·','á“¿'=>'ᓲ·','á”'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋá¸','á”'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','á”'=>'ᔋá’','ᔘ'=>'á”·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','á” '=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','á”´'=>'ᔩ·','á”¶'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','á™®'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','á•'=>'ᕌ·','ᙯ'=>'á•á‘«','ᕾ'=>'á•ᑬ','á•¿'=>'á•P','á–€'=>'á•á‘®','á–'=>'á•d','á–‚'=>'á•á‘°','á–ƒ'=>'á•ᑲ','á–„'=>'á•ᑳ','á–…'=>'á•á’ƒ','ᕜ'=>'ᕚ·','á•©'=>'ᕧ·','â„›'=>'R','ℜ'=>'R','â„'=>'R','ð‘'=>'R','ð‘…'=>'R','ð‘¹'=>'R','ð“¡'=>'R','ð•½'=>'R','ð–±'=>'R','ð—¥'=>'R','ð˜™'=>'R','ð™'=>'R','ðš'=>'R','á™°'=>'á–•á’‰','á–Ž'=>'á–•á’Š','á–'=>'á–•á’‹','á–'=>'á–•á’Œ','á–‘'=>'á–•J','á–’'=>'á–•á’Ž','á–“'=>'á–•á’','á–”'=>'á–•á’‘','á™±'=>'á––á’‹','ᙲ'=>'á––á’Œ','ᙳ'=>'á––J','á™´'=>'á––á’Ž','ᙵ'=>'á––á’','á™¶'=>'á––á’‘','ℱ'=>'F','ð…'=>'F','ð¹'=>'F','ð‘­'=>'F','ð“•'=>'F','ð”‰'=>'F','ð”½'=>'F','ð•±'=>'F','ð–¥'=>'F','ð—™'=>'F','ð˜'=>'F','ð™'=>'F','ð™µ'=>'F','ðŸŠ'=>'F','â……'=>'D','ðƒ'=>'D','ð·'=>'D','ð‘«'=>'D','ð’Ÿ'=>'D','ð““'=>'D','ð”‡'=>'D','ð”»'=>'D','ð•¯'=>'D','ð–£'=>'D','ð——'=>'D','ð˜‹'=>'D','ð˜¿'=>'D','ð™³'=>'D','á—ª'=>'D','â„§'=>'ᘮ','ᘴ'=>'ᘮ','ð›€'=>'ᘯ','ð›º'=>'ᘯ','ðœ´'=>'ᘯ','ð®'=>'ᘯ','ðž¨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'á„€','ᄀ'=>'á„€','ᆨ'=>'á„€','ㄲ'=>'á„','ï¾¢'=>'á„','ᆩ'=>'á„','ã„´'=>'á„‚','ᄂ'=>'á„‚','ᆫ'=>'á„‚','ã„·'=>'ᄃ','ï¾§'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'á„„','ᄄ'=>'á„„','ㄹ'=>'á„…','ᄅ'=>'á„…','ᆯ'=>'á„…','ã…'=>'ᄆ','ï¾±'=>'ᄆ','ᆷ'=>'ᄆ','ã…‚'=>'ᄇ','ï¾²'=>'ᄇ','ᆸ'=>'ᄇ','ã…ƒ'=>'ᄈ','ï¾³'=>'ᄈ','ã……'=>'ᄉ','ï¾µ'=>'ᄉ','ᆺ'=>'ᄉ','ã…†'=>'ᄊ','ï¾¶'=>'ᄊ','ᆻ'=>'ᄊ','ã…‡'=>'á„‹','ï¾·'=>'á„‹','ᆼ'=>'á„‹','ã…ˆ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ã…‰'=>'á„','ï¾¹'=>'á„','ã…Š'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ã…‹'=>'á„','ï¾»'=>'á„','ᆿ'=>'á„','ã…Œ'=>'á„','ï¾¼'=>'á„','ᇀ'=>'á„','ã…'=>'á„‘','ï¾½'=>'á„‘','á‡'=>'á„‘','ã…Ž'=>'á„’','ï¾¾'=>'á„’','ᇂ'=>'á„’','ᇅ'=>'á„“','ã…¥'=>'á„”','ã…¦'=>'á„•','ᇆ'=>'á„•','ᇊ'=>'á„—','á‡'=>'ᄘ','á‡'=>'á„™','ã…€'=>'ᄚ','ï¾°'=>'ᄚ','á„»'=>'ᄚ','ᆶ'=>'ᄚ','ã…®'=>'ᄜ','ᇜ'=>'ᄜ','ã…±'=>'á„','ᇢ'=>'á„','ã…²'=>'ᄞ','ã…³'=>'á„ ','ã…„'=>'á„¡','ï¾´'=>'á„¡','ᆹ'=>'á„¡','ã…´'=>'á„¢','ã…µ'=>'á„£','ã…¶'=>'á„§','ã…·'=>'á„©','ã…¸'=>'á„«','ᇦ'=>'á„«','ã…¹'=>'ᄬ','ã…º'=>'á„­','ᇧ'=>'á„­','ã…»'=>'á„®','ã…¼'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'á„°','ã…½'=>'ᄲ','ᇪ'=>'ᄲ','ã…¾'=>'á„¶','ã…¿'=>'á…€','ᇫ'=>'á…€','ᇬ'=>'á…','ᇱ'=>'á……','ㆂ'=>'á……','ᇲ'=>'á…†','ㆃ'=>'á…†','ㆀ'=>'á…‡','ᇮ'=>'á…‡','ã†'=>'á…Œ','ᇰ'=>'á…Œ','ᇳ'=>'á…–','ㆄ'=>'á…—','ᇴ'=>'á…—','ㆅ'=>'á…˜','ㆆ'=>'á…™','ᇹ'=>'á…™','ã…¤'=>'á… ','ï¾ '=>'á… ','ã…'=>'á…¡','ï¿‚'=>'á…¡','ã…'=>'á…¢','ᅢ'=>'á…¢','ã…‘'=>'á…£','ï¿„'=>'á…£','ã…’'=>'á…¤','ï¿…'=>'á…¤','ã…“'=>'á…¥','ᅥ'=>'á…¥','ã…”'=>'á…¦','ᅦ'=>'á…¦','ã…•'=>'á…§','ᅧ'=>'á…§','ã…–'=>'á…¨','ï¿‹'=>'á…¨','ã…—'=>'á…©','ᅩ'=>'á…©','ã…˜'=>'á…ª','ï¿'=>'á…ª','ã…™'=>'á…«','ᅫ'=>'á…«','ã…š'=>'á…¬','ï¿'=>'á…¬','ã…›'=>'á…­','ï¿’'=>'á…­','ã…œ'=>'á…®','ï¿“'=>'á…®','ã…'=>'á…¯','ï¿”'=>'á…¯','ã…ž'=>'á…°','ï¿•'=>'á…°','ã…Ÿ'=>'á…±','ï¿–'=>'á…±','ã… '=>'á…²','ï¿—'=>'á…²','ã…¡'=>'一','ᅳ'=>'一','ã…¢'=>'á…´','ï¿›'=>'á…´','ã…£'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ã†'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ï¾£'=>'ᆪ','ㄵ'=>'ᆬ','ï¾¥'=>'ᆬ','ã„¶'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ã„»'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ï¾­'=>'ᆳ','ㄾ'=>'ᆴ','ï¾®'=>'ᆴ','ã„¿'=>'ᆵ','ᆵ'=>'ᆵ','ã…§'=>'ᇇ','ã…¨'=>'ᇈ','ã…©'=>'ᇌ','ã…ª'=>'ᇎ','ã…«'=>'ᇓ','ã…¬'=>'ᇗ','ã…­'=>'ᇙ','ã…¯'=>'á‡','ã…°'=>'ᇟ','ï½§'=>'ã‚¡','ï½±'=>'ã‚¢','ィ'=>'ã‚£','ï½²'=>'イ','ゥ'=>'ã‚¥','ï½³'=>'ウ','ェ'=>'ã‚§','ï½´'=>'エ','ォ'=>'ã‚©','ï½µ'=>'オ','ï½¶'=>'ã‚«','ï½·'=>'ã‚­','ク'=>'ク','ï½¹'=>'ケ','コ'=>'コ','ï½»'=>'サ','ï½¼'=>'ã‚·','ï½½'=>'ス','ï½¾'=>'ã‚»','ソ'=>'ソ','ï¾€'=>'ã‚¿','ï¾'=>'ãƒ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ãƒ','ノ'=>'ノ','ハ'=>'ãƒ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ã¸','ホ'=>'ホ','ï¾'=>'マ','â§„'=>'〼','ï¾'=>'ミ','ム'=>'ム','ï¾’'=>'メ','モ'=>'モ','ャ'=>'ャ','ï¾”'=>'ヤ','ï½­'=>'ュ','ユ'=>'ユ','ï½®'=>'ョ','ï¾–'=>'ヨ','ï¾—'=>'ラ','リ'=>'リ','ï¾™'=>'ル','レ'=>'レ','ï¾›'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ï¾'=>'ン','ê’ž'=>'êŠ','ê’¬'=>'ê','ê’œ'=>'ꃀ','ê’¿'=>'ꉙ','ê’¾'=>'ꊱ','ê“€'=>'ꎫ','ê“‚'=>'ꎵ','ê’º'=>'ꎿ','ê’°'=>'ê‚','ð’ '=>'ð’†','—'=>'一','―'=>'一','−'=>'一','─'=>'一','â¼€'=>'一','不'=>'ä¸','ï©°'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','â¼'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','ð¯ '=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'ä¹','⼄'=>'ä¹™','亂'=>'亂','â¼…'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','ï§½'=>'什','仌'=>'仌','令'=>'令','你'=>'ä½ ','倂'=>'ä½µ','倂'=>'ä½µ','侀'=>'ä¾€','來'=>'來','例'=>'例','侮'=>'ä¾®','侮'=>'ä¾®','侻'=>'ä¾»','便'=>'便','值'=>'値','ï§”'=>'倫','偺'=>'åº','備'=>'å‚™','像'=>'åƒ','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'å„¿','兀'=>'å…€','ï©´'=>'å……','免'=>'å…','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','⼊'=>'å…¥','內'=>'å…§','全'=>'å…¨','兩'=>'å…©','⼋'=>'å…«','ï§‘'=>'å…­','具'=>'å…·','冀'=>'冀','⼌'=>'冂','再'=>'å†','冒'=>'冒','冕'=>'冕','â¼'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','â¼'=>'几','ð¯ '=>'凵','â¼'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','ð¯¡'=>'切','列'=>'列','ï§'=>'利','ï§¿'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','â¼’'=>'力','ï¦'=>'劣','劳'=>'劳','ï©¶'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'å‹’','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','ï©·'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','â¼”'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','â¼–'=>'匸','ï§«'=>'匿','â¼—'=>'å','〸'=>'å','〹'=>'å„','〺'=>'å…','卉'=>'å‰','卑'=>'å‘','卑'=>'å‘','博'=>'åš','⼘'=>'åœ','â¼™'=>'å©','即'=>'å³','卵'=>'åµ','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','⼚'=>'厂','â¼›'=>'厶','參'=>'åƒ','⼜'=>'åˆ','及'=>'åŠ','叟'=>'åŸ','â¼'=>'å£','句'=>'å¥','叫'=>'å«','叱'=>'å±','吆'=>'å†','ï§ž'=>'å','ï§­'=>'å','吸'=>'å¸','呂'=>'å‘‚','呈'=>'呈','周'=>'周','咞'=>'å’ž','咢'=>'å’¢','咽'=>'å’½','ð¯¡'=>'å“¶','唐'=>'å”','啓'=>'å•“','啟'=>'å•“','啕'=>'å••','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喇'=>'å–‡','喙'=>'å–™','喙'=>'å–™','喝'=>'å–','喝'=>'å–','喫'=>'å–«','喳'=>'å–³','ï¨'=>'å—€','嗂'=>'å—‚','ï©»'=>'å—¢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','ð¯¡'=>'å™´','⼞'=>'å›—','囹'=>'囹','圖'=>'圖','ð¯¡'=>'圗','⼟'=>'土','型'=>'åž‹','城'=>'城','埴'=>'埴','堍'=>'å ','報'=>'å ±','堲'=>'å ²','塀'=>'å¡€','ï¨'=>'塚','塚'=>'塚','塞'=>'塞','å¡«'=>'å¡¡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','â¼ '=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','â¼¢'=>'夊','â¼£'=>'夕','ð¯¡'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','ï©¿'=>'奔','奢'=>'奢','ï¦'=>'女','â¼¥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'å©¢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','ïª'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'å­','â¼§'=>'宀','宅'=>'å®…','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'å°†','⼩'=>'å°','尢'=>'å°¢','⼪'=>'å°¢','⼫'=>'å°¸','尿'=>'å°¿','屠'=>'å± ','屢'=>'å±¢','層'=>'層','ï§Ÿ'=>'å±¥','屮'=>'å±®','屮'=>'å±®','⼬'=>'å±®','â¼­'=>'å±±','岍'=>'å²','峀'=>'å³€','ï§•'=>'å´™','嵃'=>'嵃','嵐'=>'åµ','嵫'=>'嵫','嵮'=>'åµ®','嵼'=>'åµ¼','嶲'=>'å¶²','嶺'=>'嶺','â¼®'=>'å·›','ð¯¢'=>'å·¡','巢'=>'å·¢','⼯'=>'å·¥','â¼°'=>'å·±','巽'=>'å·½','â¼±'=>'å·¾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','â¼²'=>'å¹²','年'=>'å¹´','â¼³'=>'幺','â¼´'=>'广','ï¨'=>'度','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'å»’','廓'=>'廓','廙'=>'å»™','廬'=>'廬','â¼µ'=>'å»´','ð¯¢'=>'廾','â¼¶'=>'廾','弄'=>'弄','â¼·'=>'弋','⼸'=>'弓','弢'=>'å¼¢','弢'=>'å¼¢','â¼¹'=>'å½','当'=>'当','⼺'=>'彡','形'=>'å½¢','彩'=>'彩','彫'=>'彫','â¼»'=>'å½³','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'å¾­','â¼¼'=>'心','ð¯¢'=>'å¿','志'=>'å¿—','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'æ‚','悔'=>'æ‚”','悔'=>'æ‚”','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','ï§™'=>'æ…„','慈'=>'æ…ˆ','慌'=>'æ…Œ','慌'=>'æ…Œ','慎'=>'æ…Ž','慎'=>'æ…Ž','慠'=>'æ… ','慨'=>'æ…¨','慺'=>'æ…º','憎'=>'憎','憎'=>'憎','憎'=>'憎','ï¦'=>'æ†','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','ï©€'=>'懲','懲'=>'懲','懲'=>'懲','ï¤'=>'懶','懶'=>'懶','ï¦'=>'戀','â¼½'=>'戈','成'=>'æˆ','戛'=>'戛','ï§’'=>'戮','戴'=>'戴','â¼¾'=>'戶','⼿'=>'手','扝'=>'æ‰','抱'=>'抱','拉'=>'拉','拏'=>'æ‹','拓'=>'æ‹“','拔'=>'æ‹”','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'æ','捨'=>'æ¨','捻'=>'æ»','掃'=>'掃','掠'=>'掠','ð¯£'=>'掩','ïª'=>'æ„','揅'=>'æ…','揤'=>'æ¤','ã©'=>'æ‰','搜'=>'æœ','搢'=>'æ¢','ïª'=>'æ‘’','摩'=>'æ‘©','摷'=>'æ‘·','摾'=>'摾','撚'=>'æ’š','撝'=>'æ’','擄'=>'æ“„','â½€'=>'支','â½'=>'æ”´','ï©'=>'æ•','敏'=>'æ•','ïª'=>'æ•–','敬'=>'敬','數'=>'數','⽂'=>'æ–‡','⽃'=>'æ–—','料'=>'æ–™','⽄'=>'æ–¤','â½…'=>'æ–¹','旅'=>'æ—…','⽆'=>'æ— ','ï©‚'=>'æ—¢','旣'=>'æ—£','⽇'=>'æ—¥','ï§ '=>'易','ð¯£'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'æ™´','晴'=>'æ™´','ï§…'=>'暈','暑'=>'æš‘','ð¯£'=>'æš‘','暜'=>'æšœ','暴'=>'æš´','曆'=>'曆','⽈'=>'æ›°','ï¤'=>'æ›´','㫚'=>'æ›¶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','èƒ'=>'æœ','胊'=>'æœ','è„'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','è„§'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','ï§¡'=>'æŽ','杓'=>'æ“','杖'=>'æ–','杞'=>'æž','柿'=>'æ®','杻'=>'æ»','枅'=>'æž…','ï§´'=>'æž—','柳'=>'柳','柺'=>'柺','ï§š'=>'æ —','栟'=>'æ Ÿ','桒'=>'æ¡’','梁'=>'æ¢','ï©„'=>'梅','梅'=>'梅','梎'=>'梎','ï§¢'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'æ¦','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'æ«“','櫛'=>'æ«›','ï¤'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'æ­”','⽌'=>'æ­¢','歲'=>'æ­²','歷'=>'æ­·','歹'=>'æ­¹','â½'=>'æ­¹','殟'=>'殟','殮'=>'æ®®','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'æ®»','â½'=>'毋','⺟'=>'æ¯','â½'=>'比','⽑'=>'毛','â½’'=>'æ°','⽓'=>'æ°”','â½”'=>'æ°´','汎'=>'汎','汧'=>'æ±§','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'æ³','ï§£'=>'æ³¥','洖'=>'æ´–','洛'=>'æ´›','洞'=>'æ´ž','洴'=>'æ´´','派'=>'æ´¾','ï§Š'=>'æµ','流'=>'æµ','流'=>'æµ','浩'=>'浩','浪'=>'浪','ï©…'=>'æµ·','ð¯¤'=>'æµ·','浸'=>'浸','涅'=>'æ¶…','ï§µ'=>'æ·‹','ï¥'=>'æ·š','ï§–'=>'æ·ª','淹'=>'æ·¹','渚'=>'渚','港'=>'港','湮'=>'æ¹®','æ½™'=>'溈','ï§‹'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'æ»›','漏'=>'æ¼','漢'=>'æ¼¢','漢'=>'æ¼¢','漣'=>'æ¼£','ð¯¤'=>'æ½®','濆'=>'濆','濫'=>'æ¿«','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'çŠ','⽕'=>'ç«','灰'=>'ç°','灷'=>'ç·','災'=>'ç½','ï§»'=>'ç‚™','炭'=>'ç‚­','烈'=>'烈','烙'=>'烙','煅'=>'ç……','煉'=>'ç…‰','煮'=>'ç…®','煮'=>'ç…®','熜'=>'熜','ï§€'=>'燎','ï§®'=>'ç‡','爐'=>'çˆ','爛'=>'爛','爨'=>'爨','â½–'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','â½—'=>'父','⽘'=>'爻','â½™'=>'爿','⽚'=>'片','牐'=>'ç‰','â½›'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','â½'=>'犬','犯'=>'犯','狀'=>'ç‹€','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'çµ','獺'=>'çº','⽞'=>'玄','率'=>'率','ï§›'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'çž','理'=>'ç†','ï§Œ'=>'ç‰','琢'=>'ç¢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'ç‘©','瑱'=>'瑱','瑱'=>'瑱','璅'=>'ç’…','璉'=>'ç’‰','璘'=>'ç’˜','瓊'=>'瓊','â½ '=>'瓜','⽡'=>'瓦','甆'=>'甆','â½¢'=>'甘','â½£'=>'生','甤'=>'甤','⽤'=>'用','â½¥'=>'ç”°','画'=>'ç”»','甾'=>'甾','ï§'=>'ç•™','略'=>'ç•¥','異'=>'ç•°','異'=>'ç•°','⽦'=>'ç–‹','â½§'=>'ç–’','ï§¥'=>'ç—¢','瘐'=>'ç˜','瘝'=>'ç˜','瘟'=>'瘟','ï§'=>'療','癩'=>'癩','⽨'=>'ç™¶','⽩'=>'白','⽪'=>'çš®','⽫'=>'çš¿','益'=>'益','益'=>'益','盛'=>'ç››','盧'=>'ç›§','⽬'=>'ç›®','直'=>'ç›´','直'=>'ç›´','省'=>'çœ','眞'=>'眞','真'=>'真','真'=>'真','着'=>'ç€','睊'=>'çŠ','睊'=>'çŠ','瞋'=>'çž‹','ïª'=>'çž§','â½­'=>'矛','â½®'=>'矢','⽯'=>'石','ç¡'=>'ç ”','硎'=>'硎','ï§Ž'=>'ç¡«','碌'=>'碌','ð¯¥'=>'碌','ï©‹'=>'碑','磊'=>'磊','磌'=>'磌','ð¯¥'=>'磌','磻'=>'磻','礪'=>'礪','â½°'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','ï©'=>'祉','ï©'=>'ç¥','ï©'=>'祖','祖'=>'祖','ï©‘'=>'ç¥','神'=>'神','祥'=>'祥','祿'=>'祿','ï©’'=>'ç¦','ï©“'=>'禎','福'=>'ç¦','福'=>'ç¦','禮'=>'禮','â½±'=>'禸','â½²'=>'禾','秊'=>'ç§Š','秫'=>'ç§«','稜'=>'稜','ï©”'=>'ç©€','穀'=>'ç©€','穊'=>'穊','穏'=>'ç©','â½³'=>'ç©´','ï©•'=>'çª','窱'=>'窱','ï§·'=>'ç«‹','â½´'=>'ç«‹','竮'=>'ç«®','â½µ'=>'竹','笠'=>'笠','ï©–'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'ç°¾','籠'=>'ç± ','â½¶'=>'ç±³','类'=>'ç±»','ï§¹'=>'ç²’','ï¨'=>'ç²¾','糒'=>'ç³’','糖'=>'ç³–','糣'=>'ç³£','糧'=>'ç³§','糨'=>'糨','â½·'=>'糸','紀'=>'ç´€','ï§'=>'ç´','索'=>'ç´¢','ï¥'=>'ç´¯','çµ¶'=>'絕','絛'=>'çµ›','絣'=>'çµ£','綠'=>'ç¶ ','綾'=>'ç¶¾','緇'=>'ç·‡','練'=>'ç·´','ï©—'=>'ç·´','練'=>'ç·´','縂'=>'縂','縉'=>'縉','ï¥'=>'縷','ï©™'=>'ç¹','繅'=>'ç¹…','⽸'=>'ç¼¶','缾'=>'ç¼¾','â½¹'=>'网','⺫'=>'ç½’','署'=>'ç½²','罹'=>'ç½¹','罺'=>'罺','ï¤'=>'ç¾…','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'ç¾½','â½»'=>'ç¾½','翺'=>'翺','老'=>'è€','â½¼'=>'è€','ï©›'=>'者','者'=>'者','者'=>'者','â½½'=>'而','â½¾'=>'耒','⽿'=>'耳','聆'=>'è†','聠'=>'è ','聯'=>'è¯','聰'=>'è°','聾'=>'è¾','â¾€'=>'è¿','â¾'=>'肉','肋'=>'è‚‹','肭'=>'è‚­','育'=>'育','㬵'=>'胶','è…'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','ï§¶'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','â¾…'=>'臼','舁'=>'èˆ','舁'=>'èˆ','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','ï©'=>'艹','艹'=>'艹','ð¯¦'=>'芋','ð¯¦'=>'芑','芝'=>'èŠ','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'è‹¥','若'=>'è‹¥','苦'=>'苦','茝'=>'èŒ','茣'=>'茣','ï§¾'=>'茶','荒'=>'è’','荓'=>'è“','荣'=>'è£','莭'=>'莭','ð¯¦'=>'莽','菉'=>'è‰','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','菧'=>'è§','華'=>'è¯','菱'=>'è±','落'=>'è½','葉'=>'葉','著'=>'è‘—','著'=>'è‘—','蔿'=>'è’','蓮'=>'è“®','蓱'=>'蓱','蓳'=>'蓳','ï§‚'=>'蓼','蔖'=>'è”–','蕤'=>'蕤','藍'=>'è—','ï§°'=>'è—º','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','è™'=>'蘷','ï¤'=>'蘿','⾌'=>'è™','虐'=>'è™','虜'=>'虜','虜'=>'虜','虧'=>'è™§','虩'=>'虩','â¾'=>'虫','蚈'=>'蚈','蚩'=>'èš©','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'è«','蝹'=>'è¹','蝹'=>'è¹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','ð¯§'=>'è ','蠟'=>'è Ÿ','⾎'=>'è¡€','行'=>'行','â¾'=>'行','衠'=>'è¡ ','衣'=>'è¡£','â¾'=>'è¡£','裂'=>'裂','ï§§'=>'è£','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','ï© '=>'è¤','襁'=>'è¥','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','â¾’'=>'見','ï©¡'=>'視','視'=>'視','⾓'=>'è§’','â¾”'=>'言','äš¶'=>'訞','詽'=>'訮','ð¯§'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'è«‹','諒'=>'è«’','ï¥'=>'è«–','諭'=>'è«­','ð¯§'=>'è«­','諸'=>'諸','諸'=>'諸','ï¥'=>'諾','諾'=>'諾','ï©¢'=>'è¬','謁'=>'è¬','ï©£'=>'謹','謹'=>'謹','ï§¼'=>'è­˜','讀'=>'讀','è®'=>'讆','ï«€'=>'變','變'=>'變','⾕'=>'è°·','â¾–'=>'豆','豈'=>'豈','豕'=>'豕','â¾—'=>'豕','⾘'=>'豸','â¾™'=>'è²','貫'=>'貫','賁'=>'è³','賂'=>'賂','賈'=>'賈','賓'=>'賓','ï©¥'=>'è´ˆ','ï«'=>'è´ˆ','贛'=>'è´›','⾚'=>'赤','â¾›'=>'èµ°','起'=>'èµ·','趆'=>'赿','⾜'=>'è¶³','趼'=>'è¶¼','跋'=>'è·‹','è·º'=>'è·¥','路'=>'è·¯','跰'=>'è·°','躛'=>'躗','â¾'=>'身','車'=>'車','⾞'=>'車','軔'=>'è»”','è¼§'=>'軿','輦'=>'輦','ï§—'=>'輪','ï«‚'=>'輸','輸'=>'輸','輻'=>'è¼»','ï¦'=>'è½¢','⾟'=>'è¾›','ð¯¦'=>'辞','辰'=>'è¾°','â¾ '=>'è¾°','⾡'=>'è¾µ','辶'=>'è¾¶','⻌'=>'è¾¶','連'=>'連','逸'=>'逸','ï©§'=>'逸','遲'=>'é²','遼'=>'é¼','邏'=>'é‚','â¾¢'=>'é‚‘','邔'=>'é‚”','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'é„‘','鄛'=>'é„›','â¾£'=>'é…‰','酪'=>'é…ª','ï«„'=>'醙','醴'=>'醴','⾤'=>'釆','ï§©'=>'里','â¾¥'=>'里','量'=>'é‡','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','ï«…'=>'鉶','鉼'=>'鉼','鋗'=>'é‹—','鋘'=>'鋘','錄'=>'錄','鍊'=>'éŠ','鎮'=>'鎭','鏹'=>'é¹','鐕'=>'é•','â¾§'=>'é•·','⾨'=>'é–€','開'=>'é–‹','閭'=>'é–­','閷'=>'é–·','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'é™','陵'=>'陵','ï§“'=>'陸','陼'=>'陼','ï§œ'=>'隆','ï§±'=>'隣','⾪'=>'éš¶','隸'=>'隸','⾫'=>'éš¹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'é›¶','雷'=>'é›·','霣'=>'霣','露'=>'露','靈'=>'éˆ','â¾­'=>'é‘','靖'=>'é–','靖'=>'é–','â¾®'=>'éž','⾯'=>'é¢','â¾°'=>'é©','â¾±'=>'韋','韛'=>'韛','韠'=>'韠','â¾²'=>'韭','â¾³'=>'音','ï©©'=>'響','響'=>'響','â¾´'=>'é ','ï«‹'=>'é ‹','頋'=>'é ‹','頋'=>'é ‹','領'=>'é ˜','頩'=>'é ©','頻'=>'é »','頻'=>'é »','ï§'=>'類','â¾µ'=>'風','â¾¶'=>'飛','â»'=>'食','â¾·'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','â¾¹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'é§‚','駱'=>'é§±','駾'=>'é§¾','驪'=>'驪','â¾»'=>'骨','â¾¼'=>'高','â¾½'=>'髟','ï«'=>'鬒','鬒'=>'鬒','â¾¾'=>'鬥','⾿'=>'鬯','â¿€'=>'鬲','â¿'=>'鬼','â¿‚'=>'é­š','魯'=>'é­¯','鱀'=>'é±€','ï§²'=>'é±—','⿃'=>'é³¥','鳽'=>'é³½','ð¯¨'=>'éµ§','鶴'=>'é¶´','鷺'=>'é·º','鸞'=>'鸞','鹃'=>'鹂','â¿„'=>'é¹µ','鹿'=>'鹿','â¿…'=>'鹿','麗'=>'麗','ï§³'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'é»','黎'=>'黎','⿊'=>'黑','黹'=>'黹','â¿‹'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'é¼…','â¿'=>'鼎','鼏'=>'é¼','⿎'=>'鼓','鼖'=>'é¼–','â¿'=>'é¼ ','鼻'=>'é¼»','â¿'=>'é¼»','齃'=>'齃','â¿‘'=>'齊','â¿’'=>'é½’','ï§„'=>'é¾','â¿“'=>'é¾','ï«™'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','â¿”'=>'龜','⻳'=>'龟','â¿•'=>'é¾ ','㒞'=>'ã’ž','㒹'=>'ã’¹','㒻'=>'ã’»','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'ã–ˆ','㛮'=>'ã›®','㛼'=>'㛼','㞁'=>'ãž','㠯'=>'ã ¯','㡢'=>'ã¡¢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','ð¯£'=>'㬈','㬙'=>'㬙','ä '=>'㬻','㭉'=>'ã­‰','ï«’'=>'ã®','㮝'=>'ã®','㰘'=>'ã°˜','㱎'=>'㱎','㴳'=>'ã´³','㶖'=>'ã¶–','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'ã¼›','㿼'=>'㿼','䀈'=>'䀈','ï«“'=>'䀘','ï«”'=>'䀹','䀹'=>'䀹','䁆'=>'ä†','䂖'=>'ä‚–','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'äŒ','䌴'=>'䌴','䍙'=>'ä™','ð¯¦'=>'ä•','䏙'=>'ä™','䐋'=>'ä‹','䑫'=>'ä‘«','䔫'=>'䔫','䕝'=>'ä•','䕡'=>'ä•¡','䕫'=>'ä•«','䗗'=>'ä——','䗹'=>'ä—¹','䘵'=>'䘵','ð¯§'=>'äš¾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'ä©®','䩶'=>'ä©¶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','ð¯¨'=>'䳎','䳭'=>'ä³­','䳸'=>'䳸','䵖'=>'äµ–','𠄢'=>'ð „¢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'ð •‹','ð¯ '=>'𠘺','𠠄'=>'ð  „','ð¯§'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'ð ­£','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'ð¡´‹','𡷤'=>'ð¡·¤','𡷦'=>'ð¡·¦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','ï«'=>'𢡄','ï«'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'ð£Ÿ','𣎓'=>'𣎓','𣎜'=>'𣎜','ð¯£'=>'ð£ƒ','ï«‘'=>'ð£•','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'ð£ª','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','ð¯¤'=>'𣻑','ð¯¤'=>'𣽞','𣾎'=>'𣾎','ð¯¤'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','𥃲'=>'𥃲','ð¯¥'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','ï«•'=>'𥉉','ð¯¥'=>'ð¥','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','ï«–'=>'ð¥³','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'ð§Š','𧙧'=>'ð§™§','𧢮'=>'ð§¢®','𧥦'=>'𧥦','𧲨'=>'𧲨','ï«—'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'ð©……','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'ð©Š','𩒖'=>'ð©’–','ð¯¨'=>'ð©–¶','𩬰'=>'𩬰','ð¯¨'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','ð¯¢'=>'𪎒','ð¯¨'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Æ','â„»'=>'FAX','â„•'=>'N','â„–'=>'No','ℚ'=>'Q','₨'=>'Rs','ð“'=>'T','â„¡'=>'TEL','ð”'=>'U','ð–'=>'W','â‚©'=>'W̵','ð—'=>'X','Â¥'=>'Y̵','ðš²'=>'Λ','ðšµ'=>'Ξ','â„¿'=>'Π','ϲ'=>'c','Ï’'=>'Y','ðš½'=>'Φ','ðš¿'=>'Ψ','Ñ£'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'à°ƒ','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ÑŠ'=>'ˉb','៙'=>'à¹','à³§'=>'à±§','૨'=>'२','೨'=>'౨','à«©'=>'३','૪'=>'४','à«®'=>'८','೯'=>'౯','а'=>'a','á'=>'b','á–¯'=>'b','Ñ'=>'c','Ô'=>'d','ᑯ'=>'d','е'=>'e','Ó™'=>'Ç','ε'=>'É›','Ñ”'=>'É›','Ö„'=>'f','Ö'=>'g','Ò»'=>'h','Õ°'=>'h','á‚'=>'h','á²'=>'hÌ”','ι'=>'i','Ñ–'=>'i','Ꭵ'=>'i','ј'=>'j','Õµ'=>'j','á—°'=>'m','Õ¸'=>'n','η'=>'nÌ©','à°‚'=>'o','ಂ'=>'o','à´‚'=>'o','०'=>'o','੦'=>'o','૦'=>'o','à¹'=>'o','à»'=>'o','ο'=>'o','о'=>'o','Ö…'=>'o','á€'=>'o','Ï'=>'p','Ñ€'=>'p','á´©'=>'á´˜','Õ£'=>'q','κ'=>'ĸ','к'=>'ĸ','á´¦'=>'r','г'=>'r','Ñ•'=>'s','Ï…'=>'u','Õ½'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','á—¯'=>'w','Ñ…'=>'x','á•'=>'x','у'=>'y','Ꭹ'=>'y','Ó¡'=>'Ê’','ჳ'=>'Ê’','Ï©'=>'ƨ','ÑŒ'=>'Æ…','Ñ‹'=>'Æ…i','É‘'=>'α','Õ®'=>'δ','á•·'=>'δ','п'=>'Ï€','ɸ'=>'φ','Ñ„'=>'φ','Ê™'=>'в','Éœ'=>'з','á´'=>'м','Êœ'=>'н','É¢'=>'Ô','á´›'=>'Ñ‚','á´™'=>'Ñ','ઽ'=>'ऽ','à«'=>'à¥','à«‚'=>'ू','à©‹'=>'ॆ','à©'=>'à¥','à«'=>'à¥','à´‰'=>'உ','à´œ'=>'à®','à´£'=>'ண','à´´'=>'à®´','à´¿'=>'ி','àµ'=>'ூ','ಅ'=>'à°…','ಆ'=>'à°†','ಇ'=>'à°‡','ಒ'=>'à°’','ಓ'=>'ఒౕ','ಜ'=>'à°œ','ಞ'=>'à°ž','ಣ'=>'à°£','à°¥'=>'à°§Ö¼','ಯ'=>'à°¯','à° '=>'à°°Ö¼','ಱ'=>'à°±','ಲ'=>'à°²','à¶Œ'=>'à´¨àµà´¨','à®¶'=>'à´¶','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','àº'=>'à¸','ພ'=>'พ','ຟ'=>'ฟ','àº'=>'ย','។'=>'ฯ','áž·'=>'ิ','ី'=>'ี','áž¹'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','á—…'=>'A','á’'=>'J','ᕼ'=>'H','á¯'=>'V','á‘­'=>'P','á—·'=>'B','ヘ'=>'ã¸','ð‘'=>'ðŽ‚','ð“'=>'ðŽ“','𒀸'=>'ðŽš','á…³'=>'一','Ç€'=>'丨','á…µ'=>'丨','Ꭺ'=>'A','á´'=>'B','áŸ'=>'C','á—ž'=>'D','Ꭼ'=>'E','á–´'=>'F','á€'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','á¦'=>'K','áž'=>'L','Ꮇ'=>'M','á¢'=>'P','á–‡'=>'R','á•'=>'S','á™'=>'V','áƒ'=>'Z'); \ No newline at end of file +return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','Û'=>'','Ü'=>'','á †'=>'','á Ž'=>'','​'=>'','‌'=>'','â€'=>'','
'=>'','
'=>'','â '=>'','â¡'=>'','â¢'=>'','â£'=>'','âª'=>'','â«'=>'','â¬'=>'','â­'=>'','â®'=>'','â¯'=>'',''=>'',''=>'',''=>'','ï¿»'=>'',''=>'','ð…³'=>'','ð…´'=>'','ð…µ'=>'','ð…¶'=>'','ð…·'=>'','ð…¸'=>'','ð…¹'=>'','ð…º'=>'','Û¬'=>'ÛŸ','̓'=>'Ì“','Ù'=>'Ì“','Öœ'=>'Ì','Í'=>'Ì','݇'=>'Ì','॔'=>'Ì','Í€'=>'Ì€','॓'=>'Ì€','ÌŒ'=>'̆','Ì‘'=>'Ì‚','Ö¯'=>'ÌŠ','ஂ'=>'ÌŠ','à¹'=>'ÌŠ','à»'=>'ÌŠ','ံ'=>'ÌŠ','ំ'=>'ÌŠ','៓'=>'ÌŠ','゚'=>'ÌŠ','゚'=>'ÌŠ','ͦ'=>'ÌŠ','Í‚'=>'̃','ׄ'=>'̇','Ö¹'=>'̇','ׂ'=>'̇','×'=>'̇','Ý'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','à¯'=>'̇','Ì…'=>'Ì„','〬'=>'̉','̱'=>'Ì ','॒'=>'Ì ','̧'=>'Ì¡','̦'=>'Ì¡','̨'=>'Ì¢','़'=>'Ì£','়'=>'Ì£','਼'=>'Ì£','઼'=>'Ì£','଼'=>'Ì£','͇'=>'̳','̶'=>'̵','ﱞ'=>'ï¹²Ù‘','ﱟ'=>'ï¹´Ù‘','ï³²'=>'ï¹·Ù‘','ï± '=>'ï¹¶Ù‘','ï³³'=>'ï¹¹Ù‘','ﱡ'=>'ﹸّ','ï³´'=>'ï¹»Ù‘','ï±¢'=>'ﹺّ','ï±£'=>'ï¹¼Ù°','Ù´'=>'Ù”','Ý‚'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'ã‚™',' '=>' ',' '=>' ','â€'=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','âŸ'=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','ï½€'=>'`','á¿€'=>'Ëœ','ï¼¾'=>'^','︿'=>'^','_'=>'_','ï¹'=>'_','﹎'=>'_','ï¹'=>'_','⌇'=>'︴','ï¼'=>'-','â€'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'â“','ï½¥'=>'・','•'=>'・',','=>',','‚'=>',','Ù¬'=>'ØŒ','、'=>'ã€',';'=>';','ï¼›'=>';',':'=>':','Ö‰'=>':','︰'=>':','׃'=>':','â©´'=>'::=','.'=>'.','․'=>'.','Ü‚'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','â‹…'=>'·','á§'=>'·','ᔯ'=>'·4','áŒ'=>'·á','áŽ'=>'·áƒ','á'=>'·á„','á’'=>'·á…','á”'=>'·á†','á—'=>'·áŠ','á™'=>'·á‹','á·'=>'·á³','á‘€'=>'·á³','á‘‚'=>'·á´','á‘„'=>'·á¸','ᑆ'=>'·á¹','á‘—'=>'·ᑌ','á‘™'=>'·ᑎ','á‘›'=>'·á‘','á‘”'=>'·á‘','á‘'=>'·á‘','ᑟ'=>'·ᑑ','á‘¡'=>'·ᑕ','á‘£'=>'·ᑖ','á‘´'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','á’€'=>'·ᑳ','á’’'=>'·ᒉ','á’”'=>'·ᒋ','á’–'=>'·ᒌ','á’š'=>'·ᒎ','á’œ'=>'·á’','á’ž'=>'·ᒑ','á’¬'=>'·ᒣ','á’®'=>'·ᒥ','á’°'=>'·ᒦ','á’²'=>'·ᒧ','á’´'=>'·ᒨ','á’¶'=>'·L','á’¸'=>'·ᒫ','ᓉ'=>'·ᓀ','á“‹'=>'·ᓇ','á“'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','á“ '=>'·ᓖ','á“¢'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','á“¶'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','á”—'=>'·á”','á”™'=>'·ᔑ','á”›'=>'·ᔒ','á”'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','á”±'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','á”·'=>'·ᔫ','ᔹ'=>'·ᔭ','á”»'=>'·ᔮ','ᕎ'=>'·ᕌ','á•›'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','â‘´'=>'(1)','â’§'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','â‘¿'=>'(12)','â’€'=>'(13)','â’'=>'(14)','â’‚'=>'(15)','â’ƒ'=>'(16)','â’„'=>'(17)','â’…'=>'(18)','â’†'=>'(19)','⑵'=>'(2)','â’‡'=>'(20)','â‘¶'=>'(3)','â‘·'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','â‘»'=>'(8)','⑼'=>'(9)','â’œ'=>'(a)','â’'=>'(b)','â’ž'=>'(c)','â’Ÿ'=>'(d)','â’ '=>'(e)','â’¡'=>'(f)','â’¢'=>'(g)','â’£'=>'(h)','â’¤'=>'(i)','â’¥'=>'(j)','â’¦'=>'(k)','â’¨'=>'(m)','â’©'=>'(n)','â’ª'=>'(o)','â’«'=>'(p)','â’¬'=>'(q)','â’­'=>'(r)','â’®'=>'(s)','â’¯'=>'(t)','â’°'=>'(u)','â’±'=>'(v)','â’²'=>'(w)','â’³'=>'(x)','â’´'=>'(y)','â’µ'=>'(z)','㈀'=>'(á„€)','㈎'=>'(ê°€)','ãˆ'=>'(á„‚)','ãˆ'=>'(나)','㈂'=>'(ᄃ)','ãˆ'=>'(다)','㈃'=>'(á„…)','㈑'=>'(ë¼)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(ë°”)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(á„‹)','㈕'=>'(ì•„)','ãˆ'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(ìž)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(ì°¨)','㈊'=>'(á„)','㈘'=>'(ì¹´)','㈋'=>'(á„)','㈙'=>'(타)','㈌'=>'(á„‘)','㈚'=>'(파)','ãˆ'=>'(á„’)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(ä¹)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(ä¼)','ã‰'=>'(休)','㈧'=>'(å…«)','㈥'=>'(å…­)','㈸'=>'(労)','㈩'=>'(å)','㈿'=>'(å”)','㈴'=>'(å)','㈺'=>'(呼)','㈣'=>'(å››)','㈯'=>'(土)','㈻'=>'(å­¦)','㈰'=>'(æ—¥)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(æ ª)','㈬'=>'(æ°´)','㈫'=>'(ç«)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(ç¥)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','ï¼»'=>'[','〔'=>'[','ï¼½'=>']','〕'=>']','ï½›'=>'{','ï½'=>'}','⦅'=>'⦅','ï½ '=>'⦆','ï½¢'=>'「','ï½£'=>'ã€','ï¼ '=>'@','*'=>'*','ï¼'=>'/','â„'=>'/','∕'=>'/','ï¼¼'=>'\\','&'=>'&','#'=>'#','ï¼…'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','Í´'=>'ʹ','ËŠ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','×´'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','â—'=>'ʹʹʹʹ','¯'=>'ˉ','ï¿£'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','Ëš'=>'°','௵'=>'௳','ï¿©'=>'â†','ï¿«'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','ð››'=>'∂','ðœ•'=>'∂','ð'=>'∂','ðž‰'=>'∂','ðŸƒ'=>'∂','ð›'=>'∇','ð›»'=>'∇','ðœµ'=>'∇','ð¯'=>'∇','ðž©'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','ï¼'=>'=','⩵'=>'==','â©¶'=>'===','›'=>'>','>'=>'>','ï¿¢'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','â‹€'=>'∧','â‹'=>'∨','â‹‚'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','â™'=>'⊕','☉'=>'⊙','⟂'=>'⊥','â–·'=>'⊲','â¨'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','â–'=>'â–Œ','ï¿­'=>'â– ','â˜'=>'â–¡','ï¿®'=>'â—‹','⦾'=>'â—Ž','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','â§™'=>'⦚','〶'=>'〒','ï½°'=>'ー','ï¿ '=>'¢','$'=>'$','ï¿¡'=>'£','ï¿¥'=>'Y̵','₩'=>'W̵','ï¼'=>'0','ðŸŽ'=>'0','ðŸ˜'=>'0','ðŸ¢'=>'0','ðŸ¬'=>'0','ðŸ¶'=>'0','০'=>'0','à­¦'=>'0','௦'=>'0','á '=>'0','〇'=>'0','ðŽ'=>'0','ð‘‚'=>'0','ð‘¶'=>'0','ð’ª'=>'0','ð“ž'=>'0','ð”’'=>'0','ð•†'=>'0','ð•º'=>'0','ð–®'=>'0','ð—¢'=>'0','ð˜–'=>'0','ð™Š'=>'0','ð™¾'=>'0','ðš¶'=>'0','ð›°'=>'0','ðœª'=>'0','ð¤'=>'0','ðžž'=>'0','âµ”'=>'0','à´ '=>'0','⊖'=>'0̵','ðš¯'=>'0̵','ðš¹'=>'0̵','ð›©'=>'0̵','ð›³'=>'0̵','ðœ£'=>'0̵','ðœ­'=>'0̵','ð'=>'0̵','ð§'=>'0̵','ðž—'=>'0̵','ðž¡'=>'0̵','â´±'=>'0̵','Ꮎ'=>'0̵','Û°'=>'Ù ','á­œ'=>'á­','ã˜'=>'0点','1'=>'1','ðŸ'=>'1','ðŸ™'=>'1','ðŸ£'=>'1','ðŸ­'=>'1','ðŸ·'=>'1','â„'=>'1','â„‘'=>'1','ðˆ'=>'1','ð¼'=>'1','ð‘°'=>'1','ð“˜'=>'1','ð•€'=>'1','ð•´'=>'1','ð–¨'=>'1','ð—œ'=>'1','ð˜'=>'1','ð™„'=>'1','ð™¸'=>'1','l'=>'l','l'=>'l','â…¼'=>'1','â„“'=>'l','ð¥'=>'l','ð‘™'=>'l','ð’'=>'l','ð“'=>'l','ð“µ'=>'l','ð”©'=>'l','ð•'=>'l','ð–‘'=>'l','ð—…'=>'l','ð—¹'=>'l','ð˜­'=>'l','ð™¡'=>'l','ðš•'=>'l','ðš°'=>'l','ð›ª'=>'l','ðœ¤'=>'l','ðž'=>'l','ðž˜'=>'l','â‘ '=>'➀','É­'=>'lÌ¢','É«'=>'lÌ´','Æš'=>'l̵','Å‚'=>'lÌ·','Û±'=>'Ù¡','â’ˆ'=>'1.','Å€'=>'l·','á’·'=>'1·','â‘©'=>'➉','â’‘'=>'10.','ã©'=>'10æ—¥','㋉'=>'10月','ã¢'=>'10点','â’’'=>'11.','ãª'=>'11æ—¥','㋊'=>'11月','ã£'=>'11点','â’“'=>'12.','ã«'=>'12æ—¥','ã‹‹'=>'12月','ã¤'=>'12点','â’”'=>'13.','ã¬'=>'13æ—¥','ã¥'=>'13点','â’•'=>'14.','ã­'=>'14æ—¥','ã¦'=>'14点','â’–'=>'15.','ã®'=>'15æ—¥','ã§'=>'15点','â’—'=>'16.','ã¯'=>'16æ—¥','ã¨'=>'16点','â’˜'=>'17.','ã°'=>'17æ—¥','ã©'=>'17点','â’™'=>'18.','ã±'=>'18æ—¥','ãª'=>'18点','â’š'=>'19.','ã²'=>'19æ—¥','ã«'=>'19点','lj'=>'lj','ã '=>'1æ—¥','ã‹€'=>'1月','ã™'=>'1点','ï¼’'=>'2','ðŸ'=>'2','ðŸš'=>'2','ðŸ¤'=>'2','ðŸ®'=>'2','ðŸ¸'=>'2','á’¿'=>'2','â‘¡'=>'âž','Û²'=>'Ù¢','â’‰'=>'2.','â’›'=>'20.','ã³'=>'20æ—¥','ã¬'=>'20点','ã´'=>'21æ—¥','ã­'=>'21点','ãµ'=>'22æ—¥','ã®'=>'22点','ã¶'=>'23æ—¥','ã¯'=>'23点','ã·'=>'24æ—¥','ã°'=>'24点','ã¸'=>'25æ—¥','ã¹'=>'26æ—¥','ãº'=>'27æ—¥','ã»'=>'28æ—¥','ã¼'=>'29æ—¥','ã¡'=>'2æ—¥','ã‹'=>'2月','ãš'=>'2点','3'=>'3','ðŸ‘'=>'3','ðŸ›'=>'3','ðŸ¥'=>'3','ðŸ¯'=>'3','ðŸ¹'=>'3','â‘¢'=>'âž‚','Û³'=>'Ù£','â’Š'=>'3.','ã½'=>'30æ—¥','ã¾'=>'31æ—¥','ã¢'=>'3æ—¥','ã‹‚'=>'3月','ã›'=>'3点','ï¼”'=>'4','ðŸ’'=>'4','ðŸœ'=>'4','ðŸ¦'=>'4','ðŸ°'=>'4','ðŸº'=>'4','áŽ'=>'4','â‘£'=>'➃','â’‹'=>'4.','á”°'=>'4·','ã£'=>'4æ—¥','㋃'=>'4月','ãœ'=>'4点','5'=>'5','ðŸ“'=>'5','ðŸ'=>'5','ðŸ§'=>'5','ðŸ±'=>'5','ðŸ»'=>'5','⑤'=>'âž„','â’Œ'=>'5.','ã¤'=>'5æ—¥','ã‹„'=>'5月','ã'=>'5点','ï¼–'=>'6','ðŸ”'=>'6','ðŸž'=>'6','ðŸ¨'=>'6','ðŸ²'=>'6','ðŸ¼'=>'6','б'=>'6','â‘¥'=>'âž…','â’'=>'6.','ã¥'=>'6æ—¥','ã‹…'=>'6月','ãž'=>'6点','ï¼—'=>'7','ðŸ•'=>'7','ðŸŸ'=>'7','ðŸ©'=>'7','ðŸ³'=>'7','ðŸ½'=>'7','⑦'=>'➆','Û·'=>'Ù§','â’Ž'=>'7.','ã¦'=>'7æ—¥','㋆'=>'7月','ãŸ'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','ðŸ–'=>'8','ðŸ '=>'8','ðŸª'=>'8','ðŸ´'=>'8','ðŸ¾'=>'8','È£'=>'8','â‘§'=>'➇','Û¸'=>'Ù¨','â’'=>'8.','ã§'=>'8æ—¥','㋇'=>'8月','ã '=>'8点','à©§'=>'9','à­¨'=>'9','à§­'=>'9','ï¼™'=>'9','ðŸ—'=>'9','ðŸ¡'=>'9','ðŸ«'=>'9','ðŸµ'=>'9','ðŸ¿'=>'9','⑨'=>'➈','Û¹'=>'Ù©','â’'=>'9.','ã¨'=>'9æ—¥','㋈'=>'9月','ã¡'=>'9点','ï½'=>'a','ðš'=>'a','ð‘Ž'=>'a','ð’‚'=>'a','ð’¶'=>'a','ð“ª'=>'a','ð”ž'=>'a','ð•’'=>'a','ð–†'=>'a','ð–º'=>'a','ð—®'=>'a','ð˜¢'=>'a','ð™–'=>'a','ðšŠ'=>'a','â„€'=>'a/c','â„'=>'a/s','æ'=>'ae','b'=>'b','ð›'=>'b','ð‘'=>'b','ð’ƒ'=>'b','ð’·'=>'b','ð“«'=>'b','ð”Ÿ'=>'b','ð•“'=>'b','ð–‡'=>'b','ð–»'=>'b','ð—¯'=>'b','ð˜£'=>'b','ð™—'=>'b','ðš‹'=>'b','É“'=>'bÌ”','ƃ'=>'bÌ„','Æ€'=>'b̵','c'=>'c','â…½'=>'c','ðœ'=>'c','ð‘'=>'c','ð’„'=>'c','ð’¸'=>'c','ð“¬'=>'c','ð” '=>'c','ð•”'=>'c','ð–ˆ'=>'c','ð–¼'=>'c','ð—°'=>'c','ð˜¤'=>'c','ð™˜'=>'c','ðšŒ'=>'c','ð›“'=>'c','ðœ'=>'c','ð‡'=>'c','ðž'=>'c','ðž»'=>'c','â„…'=>'c/o','℆'=>'c/u','d'=>'d','â…¾'=>'d','â…†'=>'d','ð'=>'d','ð‘‘'=>'d','ð’…'=>'d','ð’¹'=>'d','ð“­'=>'d','ð”¡'=>'d','ð••'=>'d','ð–‰'=>'d','ð–½'=>'d','ð—±'=>'d','ð˜¥'=>'d','ð™™'=>'d','ðš'=>'d','É—'=>'dÌ”','ÆŒ'=>'dÌ„','É–'=>'dÌ¢','Ä‘'=>'d̵','dz'=>'dz','dž'=>'dž','ï½…'=>'e','ℯ'=>'e','â…‡'=>'e','ðž'=>'e','ð‘’'=>'e','ð’†'=>'e','ð“®'=>'e','ð”¢'=>'e','ð•–'=>'e','ð–Š'=>'e','ð–¾'=>'e','ð—²'=>'e','ð˜¦'=>'e','ð™š'=>'e','ðšŽ'=>'e','â´¹'=>'E','É™'=>'Ç','Éš'=>'ÇËž','â‹´'=>'É›','ð›†'=>'É›','ð›œ'=>'É›','ðœ€'=>'É›','ðœ–'=>'É›','ðœº'=>'É›','ð'=>'É›','ð´'=>'É›','ðžŠ'=>'É›','ðž®'=>'É›','ðŸ„'=>'É›','f'=>'f','ðŸ'=>'f','ð‘“'=>'f','ð’‡'=>'f','ð’»'=>'f','ð“¯'=>'f','ð”£'=>'f','ð•—'=>'f','ð–‹'=>'f','ð–¿'=>'f','ð—³'=>'f','ð˜§'=>'f','ð™›'=>'f','ðš'=>'f','Æ’'=>'fÌ¡','g'=>'g','ℊ'=>'g','ð '=>'g','ð‘”'=>'g','ð’ˆ'=>'g','ð“°'=>'g','ð”¤'=>'g','ð•˜'=>'g','ð–Œ'=>'g','ð—€'=>'g','ð—´'=>'g','ð˜¨'=>'g','ð™œ'=>'g','ðš'=>'g','É¡'=>'g','É '=>'gÌ”','Ç¥'=>'g̵','h'=>'h','ℎ'=>'h','ð¡'=>'h','ð’‰'=>'h','ð’½'=>'h','ð“±'=>'h','ð”¥'=>'h','ð•™'=>'h','ð–'=>'h','ð—'=>'h','ð—µ'=>'h','ð˜©'=>'h','ð™'=>'h','ðš‘'=>'h','ɦ'=>'hÌ”','ħ'=>'h̵','â„'=>'h̵','῾'=>'Ê»','‘'=>'Ê»','‛'=>'Ê»','ʽ'=>'Ê»','â³'=>'i','i'=>'i','â…°'=>'i','ℹ'=>'i','â…ˆ'=>'i','ð¢'=>'i','ð‘–'=>'i','ð’Š'=>'i','ð’¾'=>'i','ð“²'=>'i','ð”¦'=>'i','ð•š'=>'i','ð–Ž'=>'i','ð—‚'=>'i','ð—¶'=>'i','ð˜ª'=>'i','ð™ž'=>'i','ðš’'=>'i','ı'=>'i','ðš¤'=>'i','ɪ'=>'i','É©'=>'i','ð›Š'=>'i','ðœ„'=>'i','ðœ¾'=>'i','ð¸'=>'i','ðž²'=>'i','ɨ'=>'i̵','â…±'=>'ii','â…²'=>'iii','ij'=>'ij','â…³'=>'iv','â…¸'=>'ix','j'=>'j','â…‰'=>'j','ð£'=>'j','ð‘—'=>'j','ð’‹'=>'j','ð’¿'=>'j','ð“³'=>'j','ð”§'=>'j','ð•›'=>'j','ð–'=>'j','ð—ƒ'=>'j','ð—·'=>'j','ð˜«'=>'j','ð™Ÿ'=>'j','ðš“'=>'j','ϳ'=>'j','ðš¥'=>'È·','k'=>'k','ð¤'=>'k','ð‘˜'=>'k','ð’Œ'=>'k','ð“€'=>'k','ð“´'=>'k','ð”¨'=>'k','ð•œ'=>'k','ð–'=>'k','ð—„'=>'k','ð—¸'=>'k','ð˜¬'=>'k','ð™ '=>'k','ðš”'=>'k','Æ™'=>'kÌ”','ï½'=>'m','â…¿'=>'m','ð¦'=>'m','ð‘š'=>'m','ð’Ž'=>'m','ð“‚'=>'m','ð“¶'=>'m','ð”ª'=>'m','ð•ž'=>'m','ð–’'=>'m','ð—†'=>'m','ð—º'=>'m','ð˜®'=>'m','ð™¢'=>'m','ðš–'=>'m','ɱ'=>'mÌ¡','n'=>'n','ð§'=>'n','ð‘›'=>'n','ð’'=>'n','ð“ƒ'=>'n','ð“·'=>'n','ð”«'=>'n','ð•Ÿ'=>'n','ð–“'=>'n','ð—‡'=>'n','ð—»'=>'n','ð˜¯'=>'n','ð™£'=>'n','ðš—'=>'n','ð'=>'N','ð‘'=>'N','ð‘µ'=>'N','ð’©'=>'N','ð“'=>'N','ð”‘'=>'N','ð•¹'=>'N','ð–­'=>'N','ð—¡'=>'N','ð˜•'=>'N','ð™‰'=>'N','ð™½'=>'N','ðš´'=>'N','ð›®'=>'N','ðœ¨'=>'N','ð¢'=>'N','ðžœ'=>'N','ɲ'=>'ņ','ɳ'=>'nÌ¢','Æž'=>'nÌ©','ð›ˆ'=>'nÌ©','ðœ‚'=>'nÌ©','ðœ¼'=>'nÌ©','ð¶'=>'nÌ©','ðž°'=>'nÌ©','ÇŒ'=>'nj','ï½'=>'o','â„´'=>'o','ð¨'=>'o','ð‘œ'=>'o','ð’'=>'o','ð“¸'=>'o','ð”¬'=>'o','ð• '=>'o','ð–”'=>'o','ð—ˆ'=>'o','ð—¼'=>'o','ð˜°'=>'o','ð™¤'=>'o','ðš˜'=>'o','á´'=>'o','ð›'=>'o','ðœŠ'=>'o','ð„'=>'o','ð¾'=>'o','ðž¸'=>'o','ɵ'=>'o̵','Ç¿'=>'o̵Ì','ø'=>'oÌ·','Å“'=>'oe','Æ¡'=>'oʼ','â´'=>'p','ï½'=>'p','ð©'=>'p','ð‘'=>'p','ð’‘'=>'p','ð“…'=>'p','ð“¹'=>'p','ð”­'=>'p','ð•¡'=>'p','ð–•'=>'p','ð—‰'=>'p','ð—½'=>'p','ð˜±'=>'p','ð™¥'=>'p','ðš™'=>'p','ð›’'=>'p','ð› '=>'p','ðœŒ'=>'p','ðœš'=>'p','ð†'=>'p','ð”'=>'p','ðž€'=>'p','ðžŽ'=>'p','ðžº'=>'p','ðŸˆ'=>'p','Æ¥'=>'pÌ”','q'=>'q','ðª'=>'q','ð‘ž'=>'q','ð’’'=>'q','ð“†'=>'q','ð“º'=>'q','ð”®'=>'q','ð•¢'=>'q','ð––'=>'q','ð—Š'=>'q','ð—¾'=>'q','ð˜²'=>'q','ð™¦'=>'q','ðšš'=>'q','ð'=>'Q','ð‘„'=>'Q','ð‘¸'=>'Q','ð’¬'=>'Q','ð“ '=>'Q','ð””'=>'Q','ð•¼'=>'Q','ð–°'=>'Q','ð—¤'=>'Q','ð˜˜'=>'Q','ð™Œ'=>'Q','ðš€'=>'Q','Ê '=>'qÌ”','ð›‹'=>'ĸ','ð›ž'=>'ĸ','ðœ…'=>'ĸ','ðœ˜'=>'ĸ','ðœ¿'=>'ĸ','ð’'=>'ĸ','ð¹'=>'ĸ','ðžŒ'=>'ĸ','ðž³'=>'ĸ','ðŸ†'=>'ĸ','ï½’'=>'r','ð«'=>'r','ð‘Ÿ'=>'r','ð’“'=>'r','ð“‡'=>'r','ð“»'=>'r','ð”¯'=>'r','ð•£'=>'r','ð–—'=>'r','ð—‹'=>'r','ð—¿'=>'r','ð˜³'=>'r','ð™§'=>'r','ðš›'=>'r','ɽ'=>'rÌ¢','ɼ'=>'rÌ©','s'=>'s','ð¬'=>'s','ð‘ '=>'s','ð’”'=>'s','ð“ˆ'=>'s','ð“¼'=>'s','ð”°'=>'s','ð•¤'=>'s','ð–˜'=>'s','ð—Œ'=>'s','ð˜€'=>'s','ð˜´'=>'s','ð™¨'=>'s','ðšœ'=>'s','ƽ'=>'s','Ê‚'=>'sÌ¢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','ï½”'=>'t','ð­'=>'t','ð‘¡'=>'t','ð’•'=>'t','ð“‰'=>'t','ð“½'=>'t','ð”±'=>'t','ð•¥'=>'t','ð–™'=>'t','ð—'=>'t','ð˜'=>'t','ð˜µ'=>'t','ð™©'=>'t','ðš'=>'t','ð‘‡'=>'T','ð‘»'=>'T','ð’¯'=>'T','ð“£'=>'T','ð”—'=>'T','ð•‹'=>'T','ð•¿'=>'T','ð–³'=>'T','ð—§'=>'T','ð˜›'=>'T','ð™'=>'T','ðšƒ'=>'T','ðš»'=>'T','ð›µ'=>'T','ðœ¯'=>'T','ð©'=>'T','ðž£'=>'T','Æ­'=>'tÌ”','È›'=>'Å£','Æ«'=>'Å£','ŧ'=>'t̵','u'=>'u','ð®'=>'u','ð‘¢'=>'u','ð’–'=>'u','ð“Š'=>'u','ð“¾'=>'u','ð”²'=>'u','ð•¦'=>'u','ð–š'=>'u','ð—Ž'=>'u','ð˜‚'=>'u','ð˜¶'=>'u','ð™ª'=>'u','ðšž'=>'u','ÊŠ'=>'u','Ê‹'=>'u','ð›–'=>'u','ðœ'=>'u','ðŠ'=>'u','ðž„'=>'u','ðž¾'=>'u','ð‘ˆ'=>'U','ð‘¼'=>'U','ð’°'=>'U','ð“¤'=>'U','ð”˜'=>'U','ð•Œ'=>'U','ð–€'=>'U','ð–´'=>'U','ð—¨'=>'U','ð˜œ'=>'U','ð™'=>'U','ðš„'=>'U','ï½–'=>'v','â…´'=>'v','ð¯'=>'v','ð‘£'=>'v','ð’—'=>'v','ð“‹'=>'v','ð“¿'=>'v','ð”³'=>'v','ð•§'=>'v','ð–›'=>'v','ð—'=>'v','ð˜ƒ'=>'v','ð˜·'=>'v','ð™«'=>'v','ðšŸ'=>'v','ð›Ž'=>'v','ðœˆ'=>'v','ð‚'=>'v','ð¼'=>'v','ðž¶'=>'v','â…µ'=>'vi','â…¶'=>'vii','â…·'=>'viii','ɯ'=>'w','ï½—'=>'w','ð°'=>'w','ð‘¤'=>'w','ð’˜'=>'w','ð“Œ'=>'w','ð”€'=>'w','ð”´'=>'w','ð•¨'=>'w','ð–œ'=>'w','ð—'=>'w','ð˜„'=>'w','ð˜¸'=>'w','ð™¬'=>'w','ðš '=>'w','ð‘Š'=>'W','ð‘¾'=>'W','ð’²'=>'W','ð“¦'=>'W','ð”š'=>'W','ð•Ž'=>'W','ð–‚'=>'W','ð–¶'=>'W','ð—ª'=>'W','ð˜ž'=>'W','ð™’'=>'W','ðš†'=>'W','×'=>'x','x'=>'x','â…¹'=>'x','ð±'=>'x','ð‘¥'=>'x','ð’™'=>'x','ð“'=>'x','ð”'=>'x','ð”µ'=>'x','ð•©'=>'x','ð–'=>'x','ð—‘'=>'x','ð˜…'=>'x','ð˜¹'=>'x','ð™­'=>'x','ðš¡'=>'x','á™­'=>'X','ð‘‹'=>'X','ð‘¿'=>'X','ð’³'=>'X','ð“§'=>'X','ð”›'=>'X','ð•'=>'X','ð–ƒ'=>'X','ð–·'=>'X','ð—«'=>'X','ð˜Ÿ'=>'X','ð™“'=>'X','ðš‡'=>'X','ðš¾'=>'X','ð›¸'=>'X','ðœ²'=>'X','ð¬'=>'X','ðž¦'=>'X','â…º'=>'xi','â…»'=>'xii','ï½™'=>'y','ð²'=>'y','ð‘¦'=>'y','ð’š'=>'y','ð“Ž'=>'y','ð”‚'=>'y','ð”¶'=>'y','ð•ª'=>'y','ð–ž'=>'y','ð—’'=>'y','ð˜†'=>'y','ð˜º'=>'y','ð™®'=>'y','ðš¢'=>'y','Æ´'=>'yÌ”','z'=>'z','ð³'=>'z','ð‘§'=>'z','ð’›'=>'z','ð“'=>'z','ð”ƒ'=>'z','ð”·'=>'z','ð•«'=>'z','ð–Ÿ'=>'z','ð—“'=>'z','ð˜‡'=>'z','ð˜»'=>'z','ð™¯'=>'z','ðš£'=>'z','È¥'=>'zÌ¡','Ê'=>'zÌ¢','ƶ'=>'z̵','È'=>'Ê’','?'=>'Ê”','?'=>'Ê”','â‡'=>'ʔʔ','âˆ'=>'ʔǃ','á¾½'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','ï¼'=>'ǃ','â‰'=>'ǃʔ','‼'=>'ǃǃ','âº'=>'α','ð›‚'=>'α','ð›¼'=>'α','ðœ¶'=>'α','ð°'=>'α','ðžª'=>'α','ð›ƒ'=>'β','ð›½'=>'β','ðœ·'=>'β','ð±'=>'β','ðž«'=>'β','ℽ'=>'γ','ð›„'=>'γ','ð›¾'=>'γ','ðœ¸'=>'γ','ð²'=>'γ','ðž¬'=>'γ','ð›…'=>'δ','ð›¿'=>'δ','ðœ¹'=>'δ','ð³'=>'δ','ðž­'=>'δ','ðŸ‹'=>'Ï','ð›‡'=>'ζ','ðœ'=>'ζ','ðœ»'=>'ζ','ðµ'=>'ζ','ðž¯'=>'ζ','â¬'=>'θ','ð›‰'=>'θ','ð›'=>'θ','ðœƒ'=>'θ','ðœ—'=>'θ','ðœ½'=>'θ','ð‘'=>'θ','ð·'=>'θ','ðž‹'=>'θ','ðž±'=>'θ','ðŸ…'=>'θ','ð›Œ'=>'λ','ðœ†'=>'λ','ð€'=>'λ','ðº'=>'λ','ðž´'=>'λ','ð›¬'=>'Λ','ðœ¦'=>'Λ','ð '=>'Λ','ðžš'=>'Λ','ð›'=>'μ','ðœ‡'=>'μ','ð'=>'μ','ð»'=>'μ','ðžµ'=>'μ','ð›'=>'ξ','ðœ‰'=>'ξ','ðƒ'=>'ξ','ð½'=>'ξ','ðž·'=>'ξ','ð›¯'=>'Ξ','ðœ©'=>'Ξ','ð£'=>'Ξ','ðž'=>'Ξ','ℼ'=>'Ï€','ð›‘'=>'Ï€','ð›¡'=>'Ï€','ðœ‹'=>'Ï€','ðœ›'=>'Ï€','ð…'=>'Ï€','ð•'=>'Ï€','ð¿'=>'Ï€','ðž'=>'Ï€','ðž¹'=>'Ï€','ðŸ‰'=>'Ï€','á´¨'=>'Ï€','âˆ'=>'Π','ðš·'=>'Π','ð›±'=>'Π','ðœ«'=>'Π','ð¥'=>'Π','ðžŸ'=>'Π','ð›”'=>'σ','ðœŽ'=>'σ','ðˆ'=>'σ','ðž‚'=>'σ','ðž¼'=>'σ','ð›•'=>'Ï„','ðœ'=>'Ï„','ð‰'=>'Ï„','ðžƒ'=>'Ï„','ðž½'=>'Ï„','ð˜'=>'Y','ð‘Œ'=>'Y','ð’€'=>'Y','ð’´'=>'Y','ð“¨'=>'Y','ð”œ'=>'Y','ð•'=>'Y','ð–„'=>'Y','ð–¸'=>'Y','ð—¬'=>'Y','ð˜ '=>'Y','ð™”'=>'Y','ðšˆ'=>'Y','ðš¼'=>'Y','ð›¶'=>'Y','ðœ°'=>'Y','ðª'=>'Y','ðž¤'=>'Y','ð›—'=>'φ','ð›Ÿ'=>'φ','ðœ‘'=>'φ','ðœ™'=>'φ','ð‹'=>'φ','ð“'=>'φ','ðž…'=>'φ','ðž'=>'φ','ðž¿'=>'φ','ðŸ‡'=>'φ','ð›·'=>'Φ','ðœ±'=>'Φ','ð«'=>'Φ','ðž¥'=>'Φ','ð›˜'=>'χ','ðœ’'=>'χ','ðŒ'=>'χ','ðž†'=>'χ','ðŸ€'=>'χ','ð›™'=>'ψ','ðœ“'=>'ψ','ð'=>'ψ','ðž‡'=>'ψ','ðŸ'=>'ψ','ð›¹'=>'Ψ','ðœ³'=>'Ψ','ð­'=>'Ψ','ðž§'=>'Ψ','âµ'=>'ω','ð›š'=>'ω','ðœ”'=>'ω','ðŽ'=>'ω','ðžˆ'=>'ω','ðŸ‚'=>'ω','Ó•'=>'ae','Ò“'=>'r̵','Ò‘'=>'rᑊ','Ò—'=>'ж̩','Ò™'=>'з̡','Ó'=>'i','Ò‹'=>'й̡','Ò›'=>'ĸ̩','ÒŸ'=>'ĸ̵','á´«'=>'л','Ó†'=>'л̡','ÓŽ'=>'м̡','ÓŠ'=>'н̡','Óˆ'=>'н̡','Ò£'=>'н̩','Ó©'=>'o̵','ѳ'=>'o̵','Ò«'=>'cÌ¡','Ò­'=>'т̩','Ò¯'=>'y','Ò±'=>'y̵','Ñ›'=>'h̵','ѽ'=>'ѡ҃','ÓŒ'=>'Ò·','Ò¿'=>'ҽ̢','Ò'=>'Ь̵','Õ¦'=>'q','Õ¼'=>'n','ℵ'=>'×','ﬡ'=>'×','אָ'=>'אַ','אּ'=>'אַ','ï­'=>'×ל','â„¶'=>'ב','â„·'=>'×’','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'×”','ﬤ'=>'×›','ﬥ'=>'ל','ﬦ'=>'×','ﬠ'=>'×¢','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'Ø¡','ﺂ'=>'Ø¢','ïº'=>'Ø¢','ﺄ'=>'Ø£','ﺃ'=>'Ø£','Ùµ'=>'أ','ï­‘'=>'Ù±','ï­'=>'Ù±','ﺆ'=>'ؤ','ﺅ'=>'ؤ','Ù¶'=>'ÙˆÙ”','ﺈ'=>'Ø¥','ﺇ'=>'Ø¥','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ï²—'=>'ئج','ï°€'=>'ئج','ﲘ'=>'ئح','ï°'=>'ئح','ï²™'=>'ئخ','ﱤ'=>'ئر','ï±¥'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ï°‚'=>'ئم','ï±§'=>'ئن','ï²›'=>'ئه','ï³ '=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ï°ƒ'=>'ئى','ﱩ'=>'ئى','ï°„'=>'ئى','ﺎ'=>'ا','ïº'=>'ا','ï´¼'=>'اً','ï´½'=>'اً','ï·³'=>'اكبر','ï·²'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ïº'=>'ب','ïº'=>'ب','ﲜ'=>'بج','ï°…'=>'بج','ï²'=>'بح','ï°†'=>'بح','ï·‚'=>'بحى','ﲞ'=>'بخ','ï°‡'=>'بخ','ï¶ž'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ï°ˆ'=>'بم','ï±­'=>'بن','ï² '=>'به','ï³¢'=>'به','ï±®'=>'بى','ï°‰'=>'بى','ﱯ'=>'بى','ï°Š'=>'بى','ï­”'=>'Ù»','ï­•'=>'Ù»','ï­“'=>'Ù»','ï­’'=>'Ù»','Û'=>'Ù»','ﯦ'=>'Ù»','ﯧ'=>'Ù»','ﯥ'=>'Ù»','ﯤ'=>'Ù»','ï­˜'=>'Ù¾','ï­™'=>'Ù¾','ï­—'=>'Ù¾','ï­–'=>'Ù¾','ï­œ'=>'Ú€','ï­'=>'Ú€','ï­›'=>'Ú€','ï­š'=>'Ú€','ﺔ'=>'Ø©','ﺓ'=>'Ø©','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ï°‹'=>'تج','ïµ'=>'تجم','ï¶ '=>'تجى','ï¶Ÿ'=>'تجى','ï²¢'=>'تح','ï°Œ'=>'تح','ïµ’'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ï²£'=>'تخ','ï°'=>'تخ','ïµ”'=>'تخم','ï¶¢'=>'تخى','ï¶¡'=>'تخى','ï±°'=>'تر','ï±±'=>'تز','ﲤ'=>'تم','ï³£'=>'تم','ï±²'=>'تم','ï°Ž'=>'تم','ﵕ'=>'تمج','ïµ–'=>'تمح','ïµ—'=>'تمخ','ﶤ'=>'تمى','ï¶£'=>'تمى','ï±³'=>'تن','ï²¥'=>'ته','ﳤ'=>'ته','ï±´'=>'تى','ï°'=>'تى','ï±µ'=>'تى','ï°'=>'تى','ﺛ'=>'Ø«','ﺜ'=>'Ø«','ﺚ'=>'Ø«','ﺙ'=>'Ø«','ï°‘'=>'ثج','ï±¶'=>'ثر','ï±·'=>'ثز','ﲦ'=>'ثم','ï³¥'=>'ثم','ﱸ'=>'ثم','ï°’'=>'ثم','ï±¹'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ï°“'=>'ثى','ï±»'=>'ثى','ï°”'=>'ثى','ï­¨'=>'Ù¹','ï­©'=>'Ù¹','ï­§'=>'Ù¹','ï­¦'=>'Ù¹','Ú»'=>'Ù¹','ﮢ'=>'Ù¹','ﮣ'=>'Ù¹','ﮡ'=>'Ù¹','ï® '=>'Ù¹','ï­ '=>'Ùº','ï­¡'=>'Ùº','ï­Ÿ'=>'Ùº','ï­ž'=>'Ùº','ï­¤'=>'Ù¿','ï­¥'=>'Ù¿','ï­£'=>'Ù¿','ï­¢'=>'Ù¿','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ïº'=>'ج','ï²§'=>'جح','ï°•'=>'جح','ﶦ'=>'جحى','ï¶¾'=>'جحى','ï·»'=>'جل جلاله','ﲨ'=>'جم','ï°–'=>'جم','ïµ™'=>'جمح','ﵘ'=>'جمح','ï¶§'=>'جمى','ï¶¥'=>'جمى','ï´'=>'جى','ï´'=>'جى','ï´ž'=>'جى','ï´‚'=>'جى','ï­¸'=>'Úƒ','ï­¹'=>'Úƒ','ï­·'=>'Úƒ','ï­¶'=>'Úƒ','ï­´'=>'Ú„','ï­µ'=>'Ú„','ï­³'=>'Ú„','ï­²'=>'Ú„','ï­¼'=>'Ú†','ï­½'=>'Ú†','ï­»'=>'Ú†','ï­º'=>'Ú†','ﮀ'=>'Ú‡','ï®'=>'Ú‡','ï­¿'=>'Ú‡','ï­¾'=>'Ú‡','ﺣ'=>'Ø­','ﺤ'=>'Ø­','ﺢ'=>'Ø­','ﺡ'=>'Ø­','ﲩ'=>'حج','ï°—'=>'حج','ï¶¿'=>'حجى','ﲪ'=>'حم','ï°˜'=>'حم','ïµ›'=>'حمى','ﵚ'=>'حمى','ï´›'=>'حى','ﳿ'=>'حى','ï´œ'=>'حى','ï´€'=>'حى','ﺧ'=>'Ø®','ﺨ'=>'Ø®','ﺦ'=>'Ø®','ﺥ'=>'Ø®','ﲫ'=>'خج','ï°™'=>'خج','ï°š'=>'خح','ﲬ'=>'خم','ï°›'=>'خم','ï´Ÿ'=>'خى','ï´ƒ'=>'خى','ï´ '=>'خى','ï´„'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ï±›'=>'ذٰ','ﮉ'=>'Úˆ','ﮈ'=>'Úˆ','ï®…'=>'ÚŒ','ﮄ'=>'ÚŒ','ﮃ'=>'Ú','ﮂ'=>'Ú','ﮇ'=>'ÚŽ','ﮆ'=>'ÚŽ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ï·¶'=>'رسول','ï·¼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ï®'=>'Ú‘','ﮌ'=>'Ú‘','ﮋ'=>'Ú˜','ﮊ'=>'Ú˜','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ï²­'=>'سج','ï´´'=>'سج','ï°œ'=>'سج','ïµ'=>'سجح','ﵞ'=>'سجى','ï²®'=>'سح','ï´µ'=>'سح','ï°'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ï´¶'=>'سخ','ï°ž'=>'سخ','ﶨ'=>'سخى','ï·†'=>'سخى','ï´ª'=>'سر','ï´Ž'=>'سر','ï²°'=>'سم','ï³§'=>'سم','ï°Ÿ'=>'سم','ﵡ'=>'سمج','ïµ '=>'سمح','ﵟ'=>'سمح','ïµ£'=>'سمم','ïµ¢'=>'سمم','ï´±'=>'سه','ﳨ'=>'سه','ï´—'=>'سى','ï³»'=>'سى','ï´˜'=>'سى','ï³¼'=>'سى','ﺷ'=>'Ø´','ﺸ'=>'Ø´','ﺶ'=>'Ø´','ﺵ'=>'Ø´','ï´­'=>'شج','ï´·'=>'شج','ï´¥'=>'شج','ï´‰'=>'شج','ﵩ'=>'شجى','ï´®'=>'شح','ï´¸'=>'شح','ï´¦'=>'شح','ï´Š'=>'شح','ﵨ'=>'شحم','ïµ§'=>'شحم','ﶪ'=>'شحى','ï´¯'=>'شخ','ï´¹'=>'شخ','ï´§'=>'شخ','ï´‹'=>'شخ','ï´©'=>'شر','ï´'=>'شر','ï´°'=>'شم','ﳩ'=>'شم','ï´¨'=>'شم','ï´Œ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ïµ­'=>'شمم','ﵬ'=>'شمم','ï´²'=>'شه','ﳪ'=>'شه','ï´™'=>'شى','ï³½'=>'شى','ï´š'=>'شى','ï³¾'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ï²±'=>'صح','ï° '=>'صح','ïµ¥'=>'صحح','ﵤ'=>'صحح','ï¶©'=>'صحى','ï²²'=>'صخ','ï´«'=>'صر','ï´'=>'صر','ï·µ'=>'صلعم','ï·¹'=>'صلى','ï·º'=>'صلى الله علىه وسلم','ï·°'=>'صلے','ï²³'=>'صم','ï°¡'=>'صم','ï·…'=>'صمم','ﵦ'=>'صمم','ï´¡'=>'صى','ï´…'=>'صى','ï´¢'=>'صى','ï´†'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ï²´'=>'ضج','ï°¢'=>'ضج','ï²µ'=>'ضح','ï°£'=>'ضح','ïµ®'=>'ضحى','ï¶«'=>'ضحى','ï²¶'=>'ضخ','ï°¤'=>'ضخ','ïµ°'=>'ضخم','ﵯ'=>'ضخم','ï´¬'=>'ضر','ï´'=>'ضر','ï²·'=>'ضم','ï°¥'=>'ضم','ï´£'=>'ضى','ï´‡'=>'ضى','ï´¤'=>'ضى','ï´ˆ'=>'ضى','ﻃ'=>'Ø·','ﻄ'=>'Ø·','ﻂ'=>'Ø·','ï»'=>'Ø·','ﲸ'=>'طح','ï°¦'=>'طح','ï´³'=>'طم','ï´º'=>'طم','ï°§'=>'طم','ïµ²'=>'طمح','ïµ±'=>'طمح','ïµ³'=>'طمم','ïµ´'=>'طمى','ï´‘'=>'طى','ï³µ'=>'طى','ï´’'=>'طى','ï³¶'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ï»…'=>'ظ','ï²¹'=>'ظم','ï´»'=>'ظم','ï°¨'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ï°©'=>'عج','ï·„'=>'عجم','ïµµ'=>'عجم','ï··'=>'علىه','ï²»'=>'عم','ï°ª'=>'عم','ïµ·'=>'عمم','ïµ¶'=>'عمم','ﵸ'=>'عمى','ï¶¶'=>'عمى','ï´“'=>'عى','ï³·'=>'عى','ï´”'=>'عى','ﳸ'=>'عى','ï»'=>'غ','ï»'=>'غ','ﻎ'=>'غ','ï»'=>'غ','ï²¼'=>'غج','ï°«'=>'غج','ï²½'=>'غم','ï°¬'=>'غم','ïµ¹'=>'غمم','ïµ»'=>'غمى','ﵺ'=>'غمى','ï´•'=>'غى','ï³¹'=>'غى','ï´–'=>'غى','ﳺ'=>'غى','ﻓ'=>'Ù','ï»”'=>'Ù','ï»’'=>'Ù','ﻑ'=>'Ù','ï²¾'=>'ÙØ¬','ï°­'=>'ÙØ¬','ﲿ'=>'ÙØ­','ï°®'=>'ÙØ­','ï³€'=>'ÙØ®','ï°¯'=>'ÙØ®','ïµ½'=>'ÙØ®Ù…','ïµ¼'=>'ÙØ®Ù…','ï³'=>'ÙÙ…','ï°°'=>'ÙÙ…','ï·'=>'Ùمى','ï±¼'=>'ÙÙ‰','ï°±'=>'ÙÙ‰','ï±½'=>'ÙÙ‰','ï°²'=>'ÙÙ‰','ï­¬'=>'Ú¤','ï­­'=>'Ú¤','ï­«'=>'Ú¤','ï­ª'=>'Ú¤','ï­°'=>'Ú¦','ï­±'=>'Ú¦','ï­¯'=>'Ú¦','ï­®'=>'Ú¦','ï»—'=>'Ù‚','ﻘ'=>'Ù‚','ï»–'=>'Ù‚','ﻕ'=>'Ù‚','ﳂ'=>'قح','ï°³'=>'قح','ï·±'=>'قلے','ﳃ'=>'قم','ï°´'=>'قم','ï¶´'=>'قمح','ïµ¾'=>'قمح','ﵿ'=>'قمم','ï¶²'=>'قمى','ï±¾'=>'قى','ï°µ'=>'قى','ﱿ'=>'قى','ï°¶'=>'قى','ï»›'=>'Ùƒ','ﻜ'=>'Ùƒ','ﻚ'=>'Ùƒ','ï»™'=>'Ùƒ','Ú©'=>'Ùƒ','ï®'=>'Ùƒ','ﮑ'=>'Ùƒ','ï®'=>'Ùƒ','ﮎ'=>'Ùƒ','ï²€'=>'كا','ï°·'=>'كا','ﳄ'=>'كج','ï°¸'=>'كج','ï³…'=>'كح','ï°¹'=>'كح','ﳆ'=>'كخ','ï°º'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ï²'=>'كل','ï°»'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ï°¼'=>'كم','ï·ƒ'=>'كمم','ï¶»'=>'كمم','ï¶·'=>'كمى','ﲃ'=>'كى','ï°½'=>'كى','ﲄ'=>'كى','ï°¾'=>'كى','ﯕ'=>'Ú­','ﯖ'=>'Ú­','ﯔ'=>'Ú­','ﯓ'=>'Ú­','ï®”'=>'Ú¯','ﮕ'=>'Ú¯','ﮓ'=>'Ú¯','ï®’'=>'Ú¯','ﮜ'=>'Ú±','ï®'=>'Ú±','ï®›'=>'Ú±','ﮚ'=>'Ú±','ﮘ'=>'Ú³','ï®™'=>'Ú³','ï®—'=>'Ú³','ï®–'=>'Ú³','ﻟ'=>'Ù„','ï» '=>'Ù„','ﻞ'=>'Ù„','ï»'=>'Ù„','ï»¶'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ï»·'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ï»»'=>'لا','ﳉ'=>'لج','ï°¿'=>'لج','ﶃ'=>'لجج','ï¶„'=>'لجج','ﶺ'=>'لجم','ï¶¼'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ï±€'=>'لح','ï¶µ'=>'لحم','ï¶€'=>'لحم','ï¶‚'=>'لحى','ï¶'=>'لحى','ﳋ'=>'لخ','ï±'=>'لخ','ﶆ'=>'لخم','ï¶…'=>'لخم','ﳌ'=>'لم','ï³­'=>'لم','ï²…'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ï¶­'=>'لمى','ï³'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'Ù…','ﻤ'=>'Ù…','ﻢ'=>'Ù…','ﻡ'=>'Ù…','ﲈ'=>'ما','ﳎ'=>'مج','ï±…'=>'مج','ï¶Œ'=>'مجح','ï¶’'=>'مجخ','ï¶'=>'مجم','ï·€'=>'مجى','ï³'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ï¶Š'=>'محم','ï·´'=>'محمد','ï¶‹'=>'محى','ï³'=>'مخ','ﱇ'=>'مخ','ï¶Ž'=>'مخج','ï¶'=>'مخم','ï¶¹'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ï¶±'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ï»§'=>'Ù†','ﻨ'=>'Ù†','ﻦ'=>'Ù†','ﻥ'=>'Ù†','ï³’'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ï¶½'=>'نجح','ﶘ'=>'نجم','ï¶—'=>'نجم','ï¶™'=>'نجى','ï·‡'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ï¶•'=>'نحم','ï¶–'=>'نحى','ï¶³'=>'نحى','ï³”'=>'نخ','ï±'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ï³®'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ï¶›'=>'نمى','ï¶š'=>'نمى','ï²'=>'نن','ï³–'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ï±'=>'نى','ï²'=>'نى','ï±'=>'نى','ﮟ'=>'Úº','ﮞ'=>'Úº','ﻫ'=>'Ù‡','ﻬ'=>'Ù‡','ﻪ'=>'Ù‡','ﻩ'=>'Ù‡','Ú¾'=>'Ù‡','ﮬ'=>'Ù‡','ï®­'=>'Ù‡','ﮫ'=>'Ù‡','ﮪ'=>'Ù‡','Û'=>'Ù‡','ﮨ'=>'Ù‡','ﮩ'=>'Ù‡','ï®§'=>'Ù‡','ﮦ'=>'Ù‡','Û•'=>'Ù‡','ï³™'=>'هٰ','ï³—'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ï±’'=>'هم','ï¶“'=>'همج','ï¶”'=>'همم','ﱓ'=>'هى','ï±”'=>'هى','ﮥ'=>'Û€','ﮤ'=>'Û€','ï»®'=>'Ùˆ','ï»­'=>'Ùˆ','ï·¸'=>'وسلم','ﯡ'=>'Û…','ﯠ'=>'Û…','ﯚ'=>'Û†','ﯙ'=>'Û†','ﯘ'=>'Û‡','ﯗ'=>'Û‡','Ù·'=>'Û‡Ù”','ï¯'=>'Û‡Ù”','ﯜ'=>'Ûˆ','ﯛ'=>'Ûˆ','ﯣ'=>'Û‰','ﯢ'=>'Û‰','ﯟ'=>'Û‹','ﯞ'=>'Û‹','ﯨ'=>'Ù‰','ﯩ'=>'Ù‰','ï»°'=>'Ù‰','ﻯ'=>'Ù‰','ÙŠ'=>'Ù‰','ﻳ'=>'Ù‰','ï»´'=>'Ù‰','ﻲ'=>'Ù‰','ï»±'=>'Ù‰','ÛŒ'=>'Ù‰','ﯾ'=>'Ù‰','ﯿ'=>'Ù‰','ﯽ'=>'Ù‰','ﯼ'=>'Ù‰','Ù¸'=>'Ù‰Ù”','ï²'=>'ىٰ','ï±'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ï³›'=>'ىح','ï±–'=>'ىح','ï¶®'=>'ىحى','ﳜ'=>'ىخ','ï±—'=>'ىخ','ﲑ'=>'ىر','ï²’'=>'ىز','ï³'=>'ىم','ï³°'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ï¶'=>'ىمم','ï¶œ'=>'ىمم','ï¶°'=>'ىمى','ï²”'=>'ىن','ﳞ'=>'ىه','ï³±'=>'ىه','ﲕ'=>'ىى','ï±™'=>'ىى','ï²–'=>'ىى','ﱚ'=>'ىى','Û§'=>'Û¦','ﮯ'=>'Û’','ï®®'=>'Û’','ï®±'=>'Û“','ï®°'=>'Û“','∃'=>'â´º','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','à¤'=>'à¤à¥…','ऎ'=>'à¤à¥†','à¤'=>'à¤à¥‡','ई'=>'रà¥à¤‡','আ'=>'অা','à§ '=>'ঋৃ','à§¡'=>'ঌৢ','ਉ'=>'ੳà©','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','à¨'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','à¨'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','àª'=>'અૅ','àª'=>'અે','àª'=>'અૈ','ଆ'=>'ଅା','௮'=>'à®…','à®°'=>'ஈ','ா'=>'ஈ','௫'=>'ஈà¯','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'à®','௧'=>'க','௪'=>'ச','௬'=>'சà¯','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'à®·','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','à± '=>'à°‹à°¾','ౡ'=>'ఌా','à°”'=>'ఒౌ','à°“'=>'ఒౕ','à°¢'=>'à°¡Ì£','à°­'=>'బ̣','à°·'=>'వ̣','à°¹'=>'వా','à°®'=>'à°µà±','ూ'=>'à±à°¾','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','à´ˆ'=>'ഇൗ','à´Š'=>'உൗ','à´'=>'എെ','à´“'=>'à´’à´¾','à´”'=>'ഒൗ','ൡ'=>'à´ž','൫'=>'à´¦àµà´°','à´Œ'=>'നூ','à´™'=>'നூ','൯'=>'à´¨àµ','à´±'=>'à´°','൪'=>'à´°àµ','൮'=>'à´µàµ','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','à¸'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','à¹'=>'เเ','ໜ'=>'ຫນ','à»'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','á€'=>'o','ឣ'=>'អ','á§'=>'ᦞ','á­’'=>'á¬','á­“'=>'ᬑ','á­˜'=>'ᬨ','ᢖ'=>'ᡜ','á¡•'=>'á µ','á’'=>'Ꭱ','Ꮍ'=>'y','ð€'=>'A','ð´'=>'A','ð‘¨'=>'A','ð’œ'=>'A','ð“'=>'A','ð”„'=>'A','ð”¸'=>'A','ð•¬'=>'A','ð– '=>'A','ð—”'=>'A','ð˜ˆ'=>'A','ð˜¼'=>'A','ð™°'=>'A','ðš¨'=>'A','ð›¢'=>'A','ðœœ'=>'A','ð–'=>'A','ðž'=>'A','ð‰'=>'J','ð½'=>'J','ð‘±'=>'J','ð’¥'=>'J','ð“™'=>'J','ð”'=>'J','ð•'=>'J','ð•µ'=>'J','ð–©'=>'J','ð—'=>'J','ð˜‘'=>'J','ð™…'=>'J','ð™¹'=>'J','á§'=>'J','â‹¿'=>'E','â„°'=>'E','ð„'=>'E','ð¸'=>'E','ð‘¬'=>'E','ð“”'=>'E','ð”ˆ'=>'E','ð”¼'=>'E','ð•°'=>'E','ð–¤'=>'E','ð—˜'=>'E','ð˜Œ'=>'E','ð™€'=>'E','ð™´'=>'E','ðš¬'=>'E','ð›¦'=>'E','ðœ '=>'E','ðš'=>'E','ðž”'=>'E','ℾ'=>'Ꮁ','ðšª'=>'Ꮁ','ð›¤'=>'Ꮁ','ðœž'=>'Ꮁ','ð˜'=>'Ꮁ','ðž’'=>'Ꮁ','á”'=>'w','ℳ'=>'M','ðŒ'=>'M','ð‘€'=>'M','ð‘´'=>'M','ð“œ'=>'M','ð”'=>'M','ð•„'=>'M','ð•¸'=>'M','ð–¬'=>'M','ð— '=>'M','ð˜”'=>'M','ð™ˆ'=>'M','ð™¼'=>'M','ðš³'=>'M','ð›­'=>'M','ðœ§'=>'M','ð¡'=>'M','ðž›'=>'M','â„‹'=>'H','ℌ'=>'H','â„'=>'H','ð‡'=>'H','ð»'=>'H','ð‘¯'=>'H','ð“—'=>'H','ð•³'=>'H','ð–§'=>'H','ð—›'=>'H','ð˜'=>'H','ð™ƒ'=>'H','ð™·'=>'H','ðš®'=>'H','ð›¨'=>'H','ðœ¢'=>'H','ðœ'=>'H','ðž–'=>'H','ð†'=>'G','ðº'=>'G','ð‘®'=>'G','ð’¢'=>'G','ð“–'=>'G','ð”Š'=>'G','ð”¾'=>'G','ð•²'=>'G','ð–¦'=>'G','ð—š'=>'G','ð˜Ž'=>'G','ð™‚'=>'G','ð™¶'=>'G','á³'=>'G','ℤ'=>'Z','ℨ'=>'Z','ð™'=>'Z','ð‘'=>'Z','ð’'=>'Z','ð’µ'=>'Z','ð“©'=>'Z','ð–…'=>'Z','ð–¹'=>'Z','ð—­'=>'Z','ð˜¡'=>'Z','ð™•'=>'Z','ðš‰'=>'Z','ðš­'=>'Z','ð›§'=>'Z','ðœ¡'=>'Z','ð›'=>'Z','ðž•'=>'Z','ð’'=>'S','ð‘†'=>'S','ð‘º'=>'S','ð’®'=>'S','ð“¢'=>'S','ð”–'=>'S','ð•Š'=>'S','ð•¾'=>'S','ð–²'=>'S','ð—¦'=>'S','ð˜š'=>'S','ð™Ž'=>'S','ðš‚'=>'S','áš'=>'S','ð•'=>'V','ð‘‰'=>'V','ð‘½'=>'V','ð’±'=>'V','ð“¥'=>'V','ð”™'=>'V','ð•'=>'V','ð–'=>'V','ð–µ'=>'V','ð—©'=>'V','ð˜'=>'V','ð™‘'=>'V','ðš…'=>'V','â„’'=>'L','ð‹'=>'L','ð¿'=>'L','ð‘³'=>'L','ð“›'=>'L','ð”'=>'L','ð•ƒ'=>'L','ð•·'=>'L','ð–«'=>'L','ð—Ÿ'=>'L','ð˜“'=>'L','ð™‡'=>'L','ð™»'=>'L','∑'=>'C','â…€'=>'C','â„‚'=>'C','â„­'=>'C','ð‚'=>'C','ð¶'=>'C','ð‘ª'=>'C','ð’ž'=>'C','ð“’'=>'C','ð•®'=>'C','ð–¢'=>'C','ð—–'=>'C','ð˜Š'=>'C','ð˜¾'=>'C','ð™²'=>'C','ðšº'=>'C','ð›´'=>'C','ðœ®'=>'C','ð¨'=>'C','ðž¢'=>'C','â„™'=>'P','ð'=>'P','ð‘ƒ'=>'P','ð‘·'=>'P','ð’«'=>'P','ð“Ÿ'=>'P','ð”“'=>'P','ð•»'=>'P','ð–¯'=>'P','ð—£'=>'P','ð˜—'=>'P','ð™‹'=>'P','ð™¿'=>'P','ðš¸'=>'P','ð›²'=>'P','ðœ¬'=>'P','ð¦'=>'P','ðž '=>'P','ðŠ'=>'K','ð¾'=>'K','ð‘²'=>'K','ð’¦'=>'K','ð“š'=>'K','ð”Ž'=>'K','ð•‚'=>'K','ð•¶'=>'K','ð–ª'=>'K','ð—ž'=>'K','ð˜’'=>'K','ð™†'=>'K','ð™º'=>'K','ðš±'=>'K','ð›«'=>'K','ðœ¥'=>'K','ðŸ'=>'K','ðž™'=>'K','ℬ'=>'B','ð'=>'B','ðµ'=>'B','ð‘©'=>'B','ð“‘'=>'B','ð”…'=>'B','ð”¹'=>'B','ð•­'=>'B','ð–¡'=>'B','ð—•'=>'B','ð˜‰'=>'B','ð˜½'=>'B','ð™±'=>'B','ðš©'=>'B','ð›£'=>'B','ðœ'=>'B','ð—'=>'B','ðž‘'=>'B','á'=>'á·','∆'=>'áƒ','ðš«'=>'áƒ','ð›¥'=>'áƒ','ðœŸ'=>'áƒ','ð™'=>'áƒ','ðž“'=>'áƒ','á'=>'áƒÂ·','á‘'=>'á„·','á“'=>'á…·','á•'=>'á†Â·','á˜'=>'áŠÂ·','áš'=>'á‹Â·','á“‘'=>'á¡','á‘¶'=>'·P','ᑺ'=>'·d','á’˜'=>'·J','á‘'=>'á³Â·','ᑃ'=>'á´Â·','á‘…'=>'á¸Â·','ᑇ'=>'á¹Â·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','á‘§'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'á‘·','ᑞ'=>'á‘·','á‘©'=>'á‘ᑊ','á‘ '=>'ᑑ·','á‘¢'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','á’…'=>'ᑫᑊ','á‘·'=>'P·','á’†'=>'Pᑊ','ᑹ'=>'ᑮ·','á‘»'=>'d·','á’‡'=>'dᑊ','ᑽ'=>'ᑰ·','á‘¿'=>'ᑲ·','á’ˆ'=>'ᑲᑊ','á’'=>'ᑳ·','ᘃ'=>'á’‰','á’“'=>'ᒉ·','á’•'=>'ᒋ·','á’—'=>'ᒌ·','á’™'=>'J·','á’›'=>'ᒎ·','ᘂ'=>'á’','á’'=>'á’·','á’Ÿ'=>'ᒑ·','á’­'=>'ᒣ·','á’¯'=>'ᒥ·','á’±'=>'ᒦ·','á’³'=>'ᒧ·','á’µ'=>'ᒨ·','á’¹'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'á““','á“'=>'ᓓ·','ᓟ'=>'ᓕ·','á“¡'=>'ᓖ·','á“£'=>'ᓗ·','á“¥'=>'ᓘ·','ᘇ'=>'ᓚ','á“§'=>'ᓚ·','á“©'=>'ᓛ·','á“·'=>'ᓭ·','ᓹ'=>'ᓯ·','á“»'=>'ᓰ·','ᓽ'=>'ᓱ·','á“¿'=>'ᓲ·','á”'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋá¸','á”'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','á”'=>'ᔋá’','ᔘ'=>'á”·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','á” '=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','á”´'=>'ᔩ·','á”¶'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','á™®'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','á•'=>'ᕌ·','ᙯ'=>'á•á‘«','ᕾ'=>'á•ᑬ','á•¿'=>'á•P','á–€'=>'á•á‘®','á–'=>'á•d','á–‚'=>'á•á‘°','á–ƒ'=>'á•ᑲ','á–„'=>'á•ᑳ','á–…'=>'á•á’ƒ','ᕜ'=>'ᕚ·','á•©'=>'ᕧ·','â„›'=>'R','ℜ'=>'R','â„'=>'R','ð‘'=>'R','ð‘…'=>'R','ð‘¹'=>'R','ð“¡'=>'R','ð•½'=>'R','ð–±'=>'R','ð—¥'=>'R','ð˜™'=>'R','ð™'=>'R','ðš'=>'R','á™°'=>'á–•á’‰','á–Ž'=>'á–•á’Š','á–'=>'á–•á’‹','á–'=>'á–•á’Œ','á–‘'=>'á–•J','á–’'=>'á–•á’Ž','á–“'=>'á–•á’','á–”'=>'á–•á’‘','á™±'=>'á––á’‹','ᙲ'=>'á––á’Œ','ᙳ'=>'á––J','á™´'=>'á––á’Ž','ᙵ'=>'á––á’','á™¶'=>'á––á’‘','ℱ'=>'F','ð…'=>'F','ð¹'=>'F','ð‘­'=>'F','ð“•'=>'F','ð”‰'=>'F','ð”½'=>'F','ð•±'=>'F','ð–¥'=>'F','ð—™'=>'F','ð˜'=>'F','ð™'=>'F','ð™µ'=>'F','ðŸŠ'=>'F','â……'=>'D','ðƒ'=>'D','ð·'=>'D','ð‘«'=>'D','ð’Ÿ'=>'D','ð““'=>'D','ð”‡'=>'D','ð”»'=>'D','ð•¯'=>'D','ð–£'=>'D','ð——'=>'D','ð˜‹'=>'D','ð˜¿'=>'D','ð™³'=>'D','á—ª'=>'D','â„§'=>'ᘮ','ᘴ'=>'ᘮ','ð›€'=>'ᘯ','ð›º'=>'ᘯ','ðœ´'=>'ᘯ','ð®'=>'ᘯ','ðž¨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'á„€','ᄀ'=>'á„€','ᆨ'=>'á„€','ㄲ'=>'á„','ï¾¢'=>'á„','ᆩ'=>'á„','ã„´'=>'á„‚','ᄂ'=>'á„‚','ᆫ'=>'á„‚','ã„·'=>'ᄃ','ï¾§'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'á„„','ᄄ'=>'á„„','ㄹ'=>'á„…','ᄅ'=>'á„…','ᆯ'=>'á„…','ã…'=>'ᄆ','ï¾±'=>'ᄆ','ᆷ'=>'ᄆ','ã…‚'=>'ᄇ','ï¾²'=>'ᄇ','ᆸ'=>'ᄇ','ã…ƒ'=>'ᄈ','ï¾³'=>'ᄈ','ã……'=>'ᄉ','ï¾µ'=>'ᄉ','ᆺ'=>'ᄉ','ã…†'=>'ᄊ','ï¾¶'=>'ᄊ','ᆻ'=>'ᄊ','ã…‡'=>'á„‹','ï¾·'=>'á„‹','ᆼ'=>'á„‹','ã…ˆ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ã…‰'=>'á„','ï¾¹'=>'á„','ã…Š'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ã…‹'=>'á„','ï¾»'=>'á„','ᆿ'=>'á„','ã…Œ'=>'á„','ï¾¼'=>'á„','ᇀ'=>'á„','ã…'=>'á„‘','ï¾½'=>'á„‘','á‡'=>'á„‘','ã…Ž'=>'á„’','ï¾¾'=>'á„’','ᇂ'=>'á„’','ᇅ'=>'á„“','ã…¥'=>'á„”','ã…¦'=>'á„•','ᇆ'=>'á„•','ᇊ'=>'á„—','á‡'=>'ᄘ','á‡'=>'á„™','ã…€'=>'ᄚ','ï¾°'=>'ᄚ','á„»'=>'ᄚ','ᆶ'=>'ᄚ','ã…®'=>'ᄜ','ᇜ'=>'ᄜ','ã…±'=>'á„','ᇢ'=>'á„','ã…²'=>'ᄞ','ã…³'=>'á„ ','ã…„'=>'á„¡','ï¾´'=>'á„¡','ᆹ'=>'á„¡','ã…´'=>'á„¢','ã…µ'=>'á„£','ã…¶'=>'á„§','ã…·'=>'á„©','ã…¸'=>'á„«','ᇦ'=>'á„«','ã…¹'=>'ᄬ','ã…º'=>'á„­','ᇧ'=>'á„­','ã…»'=>'á„®','ã…¼'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'á„°','ã…½'=>'ᄲ','ᇪ'=>'ᄲ','ã…¾'=>'á„¶','ã…¿'=>'á…€','ᇫ'=>'á…€','ᇬ'=>'á…','ᇱ'=>'á……','ㆂ'=>'á……','ᇲ'=>'á…†','ㆃ'=>'á…†','ㆀ'=>'á…‡','ᇮ'=>'á…‡','ã†'=>'á…Œ','ᇰ'=>'á…Œ','ᇳ'=>'á…–','ㆄ'=>'á…—','ᇴ'=>'á…—','ㆅ'=>'á…˜','ㆆ'=>'á…™','ᇹ'=>'á…™','ã…¤'=>'á… ','ï¾ '=>'á… ','ã…'=>'á…¡','ï¿‚'=>'á…¡','ã…'=>'á…¢','ᅢ'=>'á…¢','ã…‘'=>'á…£','ï¿„'=>'á…£','ã…’'=>'á…¤','ï¿…'=>'á…¤','ã…“'=>'á…¥','ᅥ'=>'á…¥','ã…”'=>'á…¦','ᅦ'=>'á…¦','ã…•'=>'á…§','ᅧ'=>'á…§','ã…–'=>'á…¨','ï¿‹'=>'á…¨','ã…—'=>'á…©','ᅩ'=>'á…©','ã…˜'=>'á…ª','ï¿'=>'á…ª','ã…™'=>'á…«','ᅫ'=>'á…«','ã…š'=>'á…¬','ï¿'=>'á…¬','ã…›'=>'á…­','ï¿’'=>'á…­','ã…œ'=>'á…®','ï¿“'=>'á…®','ã…'=>'á…¯','ï¿”'=>'á…¯','ã…ž'=>'á…°','ï¿•'=>'á…°','ã…Ÿ'=>'á…±','ï¿–'=>'á…±','ã… '=>'á…²','ï¿—'=>'á…²','ã…¡'=>'一','ᅳ'=>'一','ã…¢'=>'á…´','ï¿›'=>'á…´','ã…£'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ã†'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ï¾£'=>'ᆪ','ㄵ'=>'ᆬ','ï¾¥'=>'ᆬ','ã„¶'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ã„»'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ï¾­'=>'ᆳ','ㄾ'=>'ᆴ','ï¾®'=>'ᆴ','ã„¿'=>'ᆵ','ᆵ'=>'ᆵ','ã…§'=>'ᇇ','ã…¨'=>'ᇈ','ã…©'=>'ᇌ','ã…ª'=>'ᇎ','ã…«'=>'ᇓ','ã…¬'=>'ᇗ','ã…­'=>'ᇙ','ã…¯'=>'á‡','ã…°'=>'ᇟ','ï½§'=>'ã‚¡','ï½±'=>'ã‚¢','ィ'=>'ã‚£','ï½²'=>'イ','ゥ'=>'ã‚¥','ï½³'=>'ウ','ェ'=>'ã‚§','ï½´'=>'エ','ォ'=>'ã‚©','ï½µ'=>'オ','ï½¶'=>'ã‚«','ï½·'=>'ã‚­','ク'=>'ク','ï½¹'=>'ケ','コ'=>'コ','ï½»'=>'サ','ï½¼'=>'ã‚·','ï½½'=>'ス','ï½¾'=>'ã‚»','ソ'=>'ソ','ï¾€'=>'ã‚¿','ï¾'=>'ãƒ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ï¾…'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ãƒ','ノ'=>'ノ','ハ'=>'ãƒ','ヒ'=>'ヒ','フ'=>'フ','ï¾'=>'ã¸','ホ'=>'ホ','ï¾'=>'マ','â§„'=>'〼','ï¾'=>'ミ','ム'=>'ム','ï¾’'=>'メ','モ'=>'モ','ャ'=>'ャ','ï¾”'=>'ヤ','ï½­'=>'ュ','ユ'=>'ユ','ï½®'=>'ョ','ï¾–'=>'ヨ','ï¾—'=>'ラ','リ'=>'リ','ï¾™'=>'ル','レ'=>'レ','ï¾›'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ï¾'=>'ン','ê’ž'=>'êŠ','ê’¬'=>'ê','ê’œ'=>'ꃀ','ê’¿'=>'ꉙ','ê’¾'=>'ꊱ','ê“€'=>'ꎫ','ê“‚'=>'ꎵ','ê’º'=>'ꎿ','ê’°'=>'ê‚','ð’ '=>'ð’†','—'=>'一','―'=>'一','−'=>'一','─'=>'一','â¼€'=>'一','不'=>'ä¸','ï©°'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','â¼'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','ð¯ '=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'ä¹','⼄'=>'ä¹™','亂'=>'亂','â¼…'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','ï§½'=>'什','仌'=>'仌','令'=>'令','你'=>'ä½ ','倂'=>'ä½µ','倂'=>'ä½µ','侀'=>'ä¾€','來'=>'來','例'=>'例','侮'=>'ä¾®','侮'=>'ä¾®','侻'=>'ä¾»','便'=>'便','值'=>'値','ï§”'=>'倫','偺'=>'åº','備'=>'å‚™','像'=>'åƒ','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'å„¿','兀'=>'å…€','ï©´'=>'å……','免'=>'å…','免'=>'å…','ð¯ '=>'å…”','ð¯ '=>'å…¤','⼊'=>'å…¥','內'=>'å…§','全'=>'å…¨','兩'=>'å…©','⼋'=>'å…«','ï§‘'=>'å…­','具'=>'å…·','冀'=>'冀','⼌'=>'冂','再'=>'å†','冒'=>'冒','冕'=>'冕','â¼'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','â¼'=>'几','ð¯ '=>'凵','â¼'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','ð¯¡'=>'切','列'=>'列','ï§'=>'利','ï§¿'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','â¼’'=>'力','ï¦'=>'劣','劳'=>'劳','ï©¶'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'å‹’','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','ï©·'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','â¼”'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','â¼–'=>'匸','ï§«'=>'匿','â¼—'=>'å','〸'=>'å','〹'=>'å„','〺'=>'å…','卉'=>'å‰','卑'=>'å‘','卑'=>'å‘','博'=>'åš','⼘'=>'åœ','â¼™'=>'å©','即'=>'å³','卵'=>'åµ','卽'=>'å½','卿'=>'å¿','卿'=>'å¿','卿'=>'å¿','⼚'=>'厂','â¼›'=>'厶','參'=>'åƒ','⼜'=>'åˆ','及'=>'åŠ','叟'=>'åŸ','â¼'=>'å£','句'=>'å¥','叫'=>'å«','叱'=>'å±','吆'=>'å†','ï§ž'=>'å','ï§­'=>'å','吸'=>'å¸','呂'=>'å‘‚','呈'=>'呈','周'=>'周','咞'=>'å’ž','咢'=>'å’¢','咽'=>'å’½','ð¯¡'=>'å“¶','唐'=>'å”','啓'=>'å•“','啟'=>'å•“','啕'=>'å••','啣'=>'å•£','善'=>'å–„','善'=>'å–„','喇'=>'å–‡','喙'=>'å–™','喙'=>'å–™','喝'=>'å–','喝'=>'å–','喫'=>'å–«','喳'=>'å–³','ï¨'=>'å—€','嗂'=>'å—‚','ï©»'=>'å—¢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','ð¯¡'=>'å™´','⼞'=>'å›—','囹'=>'囹','圖'=>'圖','ð¯¡'=>'圗','⼟'=>'土','型'=>'åž‹','城'=>'城','埴'=>'埴','堍'=>'å ','報'=>'å ±','堲'=>'å ²','塀'=>'å¡€','ï¨'=>'塚','塚'=>'塚','塞'=>'塞','å¡«'=>'å¡¡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','â¼ '=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','â¼¢'=>'夊','â¼£'=>'夕','ð¯¡'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','ï©¿'=>'奔','奢'=>'奢','ï¦'=>'女','â¼¥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'å©¢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','ïª'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'å­','â¼§'=>'宀','宅'=>'å®…','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'å°†','⼩'=>'å°','尢'=>'å°¢','⼪'=>'å°¢','⼫'=>'å°¸','尿'=>'å°¿','屠'=>'å± ','屢'=>'å±¢','層'=>'層','ï§Ÿ'=>'å±¥','屮'=>'å±®','屮'=>'å±®','⼬'=>'å±®','â¼­'=>'å±±','岍'=>'å²','峀'=>'å³€','ï§•'=>'å´™','嵃'=>'嵃','嵐'=>'åµ','嵫'=>'嵫','嵮'=>'åµ®','嵼'=>'åµ¼','嶲'=>'å¶²','嶺'=>'嶺','â¼®'=>'å·›','ð¯¢'=>'å·¡','巢'=>'å·¢','⼯'=>'å·¥','â¼°'=>'å·±','巽'=>'å·½','â¼±'=>'å·¾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','â¼²'=>'å¹²','年'=>'å¹´','â¼³'=>'幺','â¼´'=>'广','ï¨'=>'度','庰'=>'庰','庳'=>'庳','ð¯¢'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'å»’','廓'=>'廓','廙'=>'å»™','廬'=>'廬','â¼µ'=>'å»´','ð¯¢'=>'廾','â¼¶'=>'廾','弄'=>'弄','â¼·'=>'弋','⼸'=>'弓','弢'=>'å¼¢','弢'=>'å¼¢','â¼¹'=>'å½','当'=>'当','⼺'=>'彡','形'=>'å½¢','彩'=>'彩','彫'=>'彫','â¼»'=>'å½³','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'å¾­','â¼¼'=>'心','ð¯¢'=>'å¿','志'=>'å¿—','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'æ‚','悔'=>'æ‚”','悔'=>'æ‚”','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','ï§™'=>'æ…„','慈'=>'æ…ˆ','慌'=>'æ…Œ','慌'=>'æ…Œ','慎'=>'æ…Ž','慎'=>'æ…Ž','慠'=>'æ… ','慨'=>'æ…¨','慺'=>'æ…º','憎'=>'憎','憎'=>'憎','憎'=>'憎','ï¦'=>'æ†','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','ï©€'=>'懲','懲'=>'懲','懲'=>'懲','ï¤'=>'懶','懶'=>'懶','ï¦'=>'戀','â¼½'=>'戈','成'=>'æˆ','戛'=>'戛','ï§’'=>'戮','戴'=>'戴','â¼¾'=>'戶','⼿'=>'手','扝'=>'æ‰','抱'=>'抱','拉'=>'拉','拏'=>'æ‹','拓'=>'æ‹“','拔'=>'æ‹”','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'æ','捨'=>'æ¨','捻'=>'æ»','掃'=>'掃','掠'=>'掠','ð¯£'=>'掩','ïª'=>'æ„','揅'=>'æ…','揤'=>'æ¤','ã©'=>'æ‰','搜'=>'æœ','搢'=>'æ¢','ïª'=>'æ‘’','摩'=>'æ‘©','摷'=>'æ‘·','摾'=>'摾','撚'=>'æ’š','撝'=>'æ’','擄'=>'æ“„','â½€'=>'支','â½'=>'æ”´','ï©'=>'æ•','敏'=>'æ•','ïª'=>'æ•–','敬'=>'敬','數'=>'數','⽂'=>'æ–‡','⽃'=>'æ–—','料'=>'æ–™','⽄'=>'æ–¤','â½…'=>'æ–¹','旅'=>'æ—…','⽆'=>'æ— ','ï©‚'=>'æ—¢','旣'=>'æ—£','⽇'=>'æ—¥','ï§ '=>'易','ð¯£'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'æ™´','晴'=>'æ™´','ï§…'=>'暈','暑'=>'æš‘','ð¯£'=>'æš‘','暜'=>'æšœ','暴'=>'æš´','曆'=>'曆','⽈'=>'æ›°','ï¤'=>'æ›´','㫚'=>'æ›¶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','èƒ'=>'æœ','胊'=>'æœ','è„'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','è„§'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','ï§¡'=>'æŽ','杓'=>'æ“','杖'=>'æ–','杞'=>'æž','柿'=>'æ®','杻'=>'æ»','枅'=>'æž…','ï§´'=>'æž—','柳'=>'柳','柺'=>'柺','ï§š'=>'æ —','栟'=>'æ Ÿ','桒'=>'æ¡’','梁'=>'æ¢','ï©„'=>'梅','梅'=>'梅','梎'=>'梎','ï§¢'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'æ¦','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'æ«“','櫛'=>'æ«›','ï¤'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'æ­”','⽌'=>'æ­¢','歲'=>'æ­²','歷'=>'æ­·','歹'=>'æ­¹','â½'=>'æ­¹','殟'=>'殟','殮'=>'æ®®','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'æ®»','â½'=>'毋','⺟'=>'æ¯','â½'=>'比','⽑'=>'毛','â½’'=>'æ°','⽓'=>'æ°”','â½”'=>'æ°´','汎'=>'汎','汧'=>'æ±§','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'æ³','ï§£'=>'æ³¥','洖'=>'æ´–','洛'=>'æ´›','洞'=>'æ´ž','洴'=>'æ´´','派'=>'æ´¾','ï§Š'=>'æµ','流'=>'æµ','流'=>'æµ','浩'=>'浩','浪'=>'浪','ï©…'=>'æµ·','ð¯¤'=>'æµ·','浸'=>'浸','涅'=>'æ¶…','ï§µ'=>'æ·‹','ï¥'=>'æ·š','ï§–'=>'æ·ª','淹'=>'æ·¹','渚'=>'渚','港'=>'港','湮'=>'æ¹®','æ½™'=>'溈','ï§‹'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'æ»›','漏'=>'æ¼','漢'=>'æ¼¢','漢'=>'æ¼¢','漣'=>'æ¼£','ð¯¤'=>'æ½®','濆'=>'濆','濫'=>'æ¿«','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'çŠ','⽕'=>'ç«','灰'=>'ç°','灷'=>'ç·','災'=>'ç½','ï§»'=>'ç‚™','炭'=>'ç‚­','烈'=>'烈','烙'=>'烙','煅'=>'ç……','煉'=>'ç…‰','煮'=>'ç…®','煮'=>'ç…®','熜'=>'熜','ï§€'=>'燎','ï§®'=>'ç‡','爐'=>'çˆ','爛'=>'爛','爨'=>'爨','â½–'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','â½—'=>'父','⽘'=>'爻','â½™'=>'爿','⽚'=>'片','牐'=>'ç‰','â½›'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','â½'=>'犬','犯'=>'犯','狀'=>'ç‹€','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'çµ','獺'=>'çº','⽞'=>'玄','率'=>'率','ï§›'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'çž','理'=>'ç†','ï§Œ'=>'ç‰','琢'=>'ç¢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'ç‘©','瑱'=>'瑱','瑱'=>'瑱','璅'=>'ç’…','璉'=>'ç’‰','璘'=>'ç’˜','瓊'=>'瓊','â½ '=>'瓜','⽡'=>'瓦','甆'=>'甆','â½¢'=>'甘','â½£'=>'生','甤'=>'甤','⽤'=>'用','â½¥'=>'ç”°','画'=>'ç”»','甾'=>'甾','ï§'=>'ç•™','略'=>'ç•¥','異'=>'ç•°','異'=>'ç•°','⽦'=>'ç–‹','â½§'=>'ç–’','ï§¥'=>'ç—¢','瘐'=>'ç˜','瘝'=>'ç˜','瘟'=>'瘟','ï§'=>'療','癩'=>'癩','⽨'=>'ç™¶','⽩'=>'白','⽪'=>'çš®','⽫'=>'çš¿','益'=>'益','益'=>'益','盛'=>'ç››','盧'=>'ç›§','⽬'=>'ç›®','直'=>'ç›´','直'=>'ç›´','省'=>'çœ','眞'=>'眞','真'=>'真','真'=>'真','着'=>'ç€','睊'=>'çŠ','睊'=>'çŠ','瞋'=>'çž‹','ïª'=>'çž§','â½­'=>'矛','â½®'=>'矢','⽯'=>'石','ç¡'=>'ç ”','硎'=>'硎','ï§Ž'=>'ç¡«','碌'=>'碌','ð¯¥'=>'碌','ï©‹'=>'碑','磊'=>'磊','磌'=>'磌','ð¯¥'=>'磌','磻'=>'磻','礪'=>'礪','â½°'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','ï©'=>'祉','ï©'=>'ç¥','ï©'=>'祖','祖'=>'祖','ï©‘'=>'ç¥','神'=>'神','祥'=>'祥','祿'=>'祿','ï©’'=>'ç¦','ï©“'=>'禎','福'=>'ç¦','福'=>'ç¦','禮'=>'禮','â½±'=>'禸','â½²'=>'禾','秊'=>'ç§Š','秫'=>'ç§«','稜'=>'稜','ï©”'=>'ç©€','穀'=>'ç©€','穊'=>'穊','穏'=>'ç©','â½³'=>'ç©´','ï©•'=>'çª','窱'=>'窱','ï§·'=>'ç«‹','â½´'=>'ç«‹','竮'=>'ç«®','â½µ'=>'竹','笠'=>'笠','ï©–'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'ç°¾','籠'=>'ç± ','â½¶'=>'ç±³','类'=>'ç±»','ï§¹'=>'ç²’','ï¨'=>'ç²¾','糒'=>'ç³’','糖'=>'ç³–','糣'=>'ç³£','糧'=>'ç³§','糨'=>'糨','â½·'=>'糸','紀'=>'ç´€','ï§'=>'ç´','索'=>'ç´¢','ï¥'=>'ç´¯','çµ¶'=>'絕','絛'=>'çµ›','絣'=>'çµ£','綠'=>'ç¶ ','綾'=>'ç¶¾','緇'=>'ç·‡','練'=>'ç·´','ï©—'=>'ç·´','練'=>'ç·´','縂'=>'縂','縉'=>'縉','ï¥'=>'縷','ï©™'=>'ç¹','繅'=>'ç¹…','⽸'=>'ç¼¶','缾'=>'ç¼¾','â½¹'=>'网','⺫'=>'ç½’','署'=>'ç½²','罹'=>'ç½¹','罺'=>'罺','ï¤'=>'ç¾…','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'ç¾½','â½»'=>'ç¾½','翺'=>'翺','老'=>'è€','â½¼'=>'è€','ï©›'=>'者','者'=>'者','者'=>'者','â½½'=>'而','â½¾'=>'耒','⽿'=>'耳','聆'=>'è†','聠'=>'è ','聯'=>'è¯','聰'=>'è°','聾'=>'è¾','â¾€'=>'è¿','â¾'=>'肉','肋'=>'è‚‹','肭'=>'è‚­','育'=>'育','㬵'=>'胶','è…'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','ï§¶'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','â¾…'=>'臼','舁'=>'èˆ','舁'=>'èˆ','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','ï©'=>'艹','艹'=>'艹','ð¯¦'=>'芋','ð¯¦'=>'芑','芝'=>'èŠ','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'è‹¥','若'=>'è‹¥','苦'=>'苦','茝'=>'èŒ','茣'=>'茣','ï§¾'=>'茶','荒'=>'è’','荓'=>'è“','荣'=>'è£','莭'=>'莭','ð¯¦'=>'莽','菉'=>'è‰','菊'=>'èŠ','菌'=>'èŒ','菜'=>'èœ','菧'=>'è§','華'=>'è¯','菱'=>'è±','落'=>'è½','葉'=>'葉','著'=>'è‘—','著'=>'è‘—','蔿'=>'è’','蓮'=>'è“®','蓱'=>'蓱','蓳'=>'蓳','ï§‚'=>'蓼','蔖'=>'è”–','蕤'=>'蕤','藍'=>'è—','ï§°'=>'è—º','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','è™'=>'蘷','ï¤'=>'蘿','⾌'=>'è™','虐'=>'è™','虜'=>'虜','虜'=>'虜','虧'=>'è™§','虩'=>'虩','â¾'=>'虫','蚈'=>'蚈','蚩'=>'èš©','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'è«','蝹'=>'è¹','蝹'=>'è¹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','ð¯§'=>'è ','蠟'=>'è Ÿ','⾎'=>'è¡€','行'=>'行','â¾'=>'行','衠'=>'è¡ ','衣'=>'è¡£','â¾'=>'è¡£','裂'=>'裂','ï§§'=>'è£','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','ï© '=>'è¤','襁'=>'è¥','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','â¾’'=>'見','ï©¡'=>'視','視'=>'視','⾓'=>'è§’','â¾”'=>'言','äš¶'=>'訞','詽'=>'訮','ð¯§'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'è«‹','諒'=>'è«’','ï¥'=>'è«–','諭'=>'è«­','ð¯§'=>'è«­','諸'=>'諸','諸'=>'諸','ï¥'=>'諾','諾'=>'諾','ï©¢'=>'è¬','謁'=>'è¬','ï©£'=>'謹','謹'=>'謹','ï§¼'=>'è­˜','讀'=>'讀','è®'=>'讆','ï«€'=>'變','變'=>'變','⾕'=>'è°·','â¾–'=>'豆','豈'=>'豈','豕'=>'豕','â¾—'=>'豕','⾘'=>'豸','â¾™'=>'è²','貫'=>'貫','賁'=>'è³','賂'=>'賂','賈'=>'賈','賓'=>'賓','ï©¥'=>'è´ˆ','ï«'=>'è´ˆ','贛'=>'è´›','⾚'=>'赤','â¾›'=>'èµ°','起'=>'èµ·','趆'=>'赿','⾜'=>'è¶³','趼'=>'è¶¼','跋'=>'è·‹','è·º'=>'è·¥','路'=>'è·¯','跰'=>'è·°','躛'=>'躗','â¾'=>'身','車'=>'車','⾞'=>'車','軔'=>'è»”','è¼§'=>'軿','輦'=>'輦','ï§—'=>'輪','ï«‚'=>'輸','輸'=>'輸','輻'=>'è¼»','ï¦'=>'è½¢','⾟'=>'è¾›','ð¯¦'=>'辞','辰'=>'è¾°','â¾ '=>'è¾°','⾡'=>'è¾µ','辶'=>'è¾¶','⻌'=>'è¾¶','連'=>'連','逸'=>'逸','ï©§'=>'逸','遲'=>'é²','遼'=>'é¼','邏'=>'é‚','â¾¢'=>'é‚‘','邔'=>'é‚”','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'é„‘','鄛'=>'é„›','â¾£'=>'é…‰','酪'=>'é…ª','ï«„'=>'醙','醴'=>'醴','⾤'=>'釆','ï§©'=>'里','â¾¥'=>'里','量'=>'é‡','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','ï«…'=>'鉶','鉼'=>'鉼','鋗'=>'é‹—','鋘'=>'鋘','錄'=>'錄','鍊'=>'éŠ','鎮'=>'鎭','鏹'=>'é¹','鐕'=>'é•','â¾§'=>'é•·','⾨'=>'é–€','開'=>'é–‹','閭'=>'é–­','閷'=>'é–·','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'é™','陵'=>'陵','ï§“'=>'陸','陼'=>'陼','ï§œ'=>'隆','ï§±'=>'隣','⾪'=>'éš¶','隸'=>'隸','⾫'=>'éš¹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'é›¶','雷'=>'é›·','霣'=>'霣','露'=>'露','靈'=>'éˆ','â¾­'=>'é‘','靖'=>'é–','靖'=>'é–','â¾®'=>'éž','⾯'=>'é¢','â¾°'=>'é©','â¾±'=>'韋','韛'=>'韛','韠'=>'韠','â¾²'=>'韭','â¾³'=>'音','ï©©'=>'響','響'=>'響','â¾´'=>'é ','ï«‹'=>'é ‹','頋'=>'é ‹','頋'=>'é ‹','領'=>'é ˜','頩'=>'é ©','頻'=>'é »','頻'=>'é »','ï§'=>'類','â¾µ'=>'風','â¾¶'=>'飛','â»'=>'食','â¾·'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','â¾¹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'é§‚','駱'=>'é§±','駾'=>'é§¾','驪'=>'驪','â¾»'=>'骨','â¾¼'=>'高','â¾½'=>'髟','ï«'=>'鬒','鬒'=>'鬒','â¾¾'=>'鬥','⾿'=>'鬯','â¿€'=>'鬲','â¿'=>'鬼','â¿‚'=>'é­š','魯'=>'é­¯','鱀'=>'é±€','ï§²'=>'é±—','⿃'=>'é³¥','鳽'=>'é³½','ð¯¨'=>'éµ§','鶴'=>'é¶´','鷺'=>'é·º','鸞'=>'鸞','鹃'=>'鹂','â¿„'=>'é¹µ','鹿'=>'鹿','â¿…'=>'鹿','麗'=>'麗','ï§³'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'é»','黎'=>'黎','⿊'=>'黑','黹'=>'黹','â¿‹'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'é¼…','â¿'=>'鼎','鼏'=>'é¼','⿎'=>'鼓','鼖'=>'é¼–','â¿'=>'é¼ ','鼻'=>'é¼»','â¿'=>'é¼»','齃'=>'齃','â¿‘'=>'齊','â¿’'=>'é½’','ï§„'=>'é¾','â¿“'=>'é¾','ï«™'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','â¿”'=>'龜','⻳'=>'龟','â¿•'=>'é¾ ','㒞'=>'ã’ž','㒹'=>'ã’¹','㒻'=>'ã’»','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'ã–ˆ','㛮'=>'ã›®','㛼'=>'㛼','㞁'=>'ãž','㠯'=>'ã ¯','㡢'=>'ã¡¢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','ð¯£'=>'㬈','㬙'=>'㬙','ä '=>'㬻','㭉'=>'ã­‰','ï«’'=>'ã®','㮝'=>'ã®','㰘'=>'ã°˜','㱎'=>'㱎','㴳'=>'ã´³','㶖'=>'ã¶–','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'ã¼›','㿼'=>'㿼','䀈'=>'䀈','ï«“'=>'䀘','ï«”'=>'䀹','䀹'=>'䀹','䁆'=>'ä†','䂖'=>'ä‚–','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'äŒ','䌴'=>'䌴','䍙'=>'ä™','ð¯¦'=>'ä•','䏙'=>'ä™','䐋'=>'ä‹','䑫'=>'ä‘«','䔫'=>'䔫','䕝'=>'ä•','䕡'=>'ä•¡','䕫'=>'ä•«','䗗'=>'ä——','䗹'=>'ä—¹','䘵'=>'䘵','ð¯§'=>'äš¾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'ä©®','䩶'=>'ä©¶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','ð¯¨'=>'䳎','䳭'=>'ä³­','䳸'=>'䳸','䵖'=>'äµ–','𠄢'=>'ð „¢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'ð •‹','ð¯ '=>'𠘺','𠠄'=>'ð  „','ð¯§'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'ð ­£','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'ð¡´‹','𡷤'=>'ð¡·¤','𡷦'=>'ð¡·¦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','ï«'=>'𢡄','ï«'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'ð£Ÿ','𣎓'=>'𣎓','𣎜'=>'𣎜','ð¯£'=>'ð£ƒ','ï«‘'=>'ð£•','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'ð£ª','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','ð¯¤'=>'𣻑','ð¯¤'=>'𣽞','𣾎'=>'𣾎','ð¯¤'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'ð¥„','𥃲'=>'𥃲','ð¯¥'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','ï«•'=>'𥉉','ð¯¥'=>'ð¥','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','ð¯¥'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','ï«–'=>'ð¥³','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'ð§Š','𧙧'=>'ð§™§','𧢮'=>'ð§¢®','𧥦'=>'𧥦','𧲨'=>'𧲨','ï«—'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'ð©……','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'ð©Š','𩒖'=>'ð©’–','ð¯¨'=>'ð©–¶','𩬰'=>'𩬰','ð¯¨'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','ð¯¢'=>'𪎒','ð¯¨'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Æ','â„»'=>'FAX','â„•'=>'N','â„–'=>'No','ℚ'=>'Q','₨'=>'Rs','ð“'=>'T','â„¡'=>'TEL','ð”'=>'U','ð–'=>'W','â‚©'=>'W̵','ð—'=>'X','Â¥'=>'Y̵','ðš²'=>'Λ','ðšµ'=>'Ξ','â„¿'=>'Π','ϲ'=>'c','Ï’'=>'Y','ðš½'=>'Φ','ðš¿'=>'Ψ','Ñ£'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'à°ƒ','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ÑŠ'=>'ˉb','៙'=>'à¹','à³§'=>'à±§','૨'=>'२','೨'=>'౨','à«©'=>'३','૪'=>'४','à«®'=>'८','೯'=>'౯','а'=>'a','á'=>'b','á–¯'=>'b','Ñ'=>'c','Ô'=>'d','ᑯ'=>'d','е'=>'e','Ó™'=>'Ç','ε'=>'É›','Ñ”'=>'É›','Ö„'=>'f','Ö'=>'g','Ò»'=>'h','Õ°'=>'h','á‚'=>'h','á²'=>'hÌ”','ι'=>'i','Ñ–'=>'i','Ꭵ'=>'i','ј'=>'j','Õµ'=>'j','á—°'=>'m','Õ¸'=>'n','η'=>'nÌ©','à°‚'=>'o','ಂ'=>'o','à´‚'=>'o','०'=>'o','੦'=>'o','૦'=>'o','à¹'=>'o','à»'=>'o','ο'=>'o','о'=>'o','Ö…'=>'o','á€'=>'o','Ï'=>'p','Ñ€'=>'p','á´©'=>'á´˜','Õ£'=>'q','κ'=>'ĸ','к'=>'ĸ','á´¦'=>'r','г'=>'r','Ñ•'=>'s','Ï…'=>'u','Õ½'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','á—¯'=>'w','Ñ…'=>'x','á•'=>'x','у'=>'y','Ꭹ'=>'y','Ó¡'=>'Ê’','ჳ'=>'Ê’','Ï©'=>'ƨ','ÑŒ'=>'Æ…','Ñ‹'=>'Æ…i','É‘'=>'α','Õ®'=>'δ','á•·'=>'δ','п'=>'Ï€','ɸ'=>'φ','Ñ„'=>'φ','Ê™'=>'в','Éœ'=>'з','á´'=>'м','Êœ'=>'н','É¢'=>'Ô','á´›'=>'Ñ‚','á´™'=>'Ñ','ઽ'=>'ऽ','à«'=>'à¥','à«‚'=>'ू','à©‹'=>'ॆ','à©'=>'à¥','à«'=>'à¥','à´‰'=>'உ','à´œ'=>'à®','à´£'=>'ண','à´´'=>'à®´','à´¿'=>'ி','àµ'=>'ூ','ಅ'=>'à°…','ಆ'=>'à°†','ಇ'=>'à°‡','ಒ'=>'à°’','ಓ'=>'ఒౕ','ಜ'=>'à°œ','ಞ'=>'à°ž','ಣ'=>'à°£','à°¥'=>'à°§Ö¼','ಯ'=>'à°¯','à° '=>'à°°Ö¼','ಱ'=>'à°±','ಲ'=>'à°²','à¶Œ'=>'à´¨àµà´¨','à®¶'=>'à´¶','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','àº'=>'à¸','ພ'=>'พ','ຟ'=>'ฟ','àº'=>'ย','។'=>'ฯ','áž·'=>'ิ','ី'=>'ี','áž¹'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','á—…'=>'A','á’'=>'J','ᕼ'=>'H','á¯'=>'V','á‘­'=>'P','á—·'=>'B','ヘ'=>'ã¸','ð‘'=>'ðŽ‚','ð“'=>'ðŽ“','𒀸'=>'ðŽš','á…³'=>'一','Ç€'=>'丨','á…µ'=>'丨','Ꭺ'=>'A','á´'=>'B','áŸ'=>'C','á—ž'=>'D','Ꭼ'=>'E','á–´'=>'F','á€'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','á¦'=>'K','áž'=>'L','Ꮇ'=>'M','á¢'=>'P','á–‡'=>'R','á•'=>'S','á™'=>'V','áƒ'=>'Z'); + +?> \ No newline at end of file diff --git a/phpBB/install/data/new_normalizer.php b/phpBB/install/data/new_normalizer.php index bd9920f5cd..e266f73408 100644 --- a/phpBB/install/data/new_normalizer.php +++ b/phpBB/install/data/new_normalizer.php @@ -1,5 +1,20 @@ obtain_hooks() as $hook) + { + @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); + } +} +else +{ + $phpbb_hook = false; +} + // Connect to DB $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); @@ -314,27 +337,6 @@ $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP'); // Only an example, but also commented out $database_update_info = array( - // Changes from 3.0.RC1 to the next version - '3.0.RC1' => array( - // Remove the following keys - 'drop_keys' => array( - STYLES_IMAGESET_DATA_TABLE => array( - 'i_id', - ), - ACL_ROLES_DATA_TABLE => array( - 'ath_opt_id', - ), - ), - // Add the following keys - 'add_index' => array( - STYLES_IMAGESET_DATA_TABLE => array( - 'i_d' => array('imageset_id'), - ), - ACL_ROLES_DATA_TABLE => array( - 'ath_opt_id' => array('auth_option_id'), - ), - ), - ), // Changes from 3.0.RC2 to the next version '3.0.RC2' => array( // Change the following columns @@ -424,6 +426,27 @@ $database_update_info = array( ), ), ), + // Changes from 3.0.RC5 to the next version + '3.0.RC5' => array( + // Add the following columns + 'add_columns' => array( + USERS_TABLE => array( + 'user_form_salt' => array('VCHAR_UNI:32', ''), + ), + ), + // Change the following columns + 'change_columns' => array( + POSTS_TABLE => array( + 'bbcode_uid' => array('VCHAR:8', ''), + ), + PRIVMSGS_TABLE => array( + 'bbcode_uid' => array('VCHAR:8', ''), + ), + USERS_TABLE => array( + 'user_sig_bbcode_uid' => array('VCHAR:8', ''), + ), + ), + ), ); // Determine mapping database type @@ -983,7 +1006,10 @@ if ($exit) sql_escape('BOTS') . "'"; - $result = $db->sql_query($sql); - $bot_group_id = (int) $db->sql_fetchfield('group_id'); - $db->sql_freeresult($result); - - $bots = array(); - $sql = 'SELECT u.user_id - FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug - WHERE ug.group_id = ' . $bot_group_id . ' - AND ug.user_id = u.user_id'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $bots[] = (int)$row['user_id']; - } - $db->sql_freeresult($result); - - if (sizeof($bots)) - { - $sql = 'DELETE FROM ' . USER_GROUP_TABLE . " - WHERE group_id <> $bot_group_id - AND " . $db->sql_in_set('user_id', $bots); - $db->sql_query($sql); - } - - if ($map_dbms === 'mysql_41') - { - sql_column_change($map_dbms, POSTS_TABLE, 'post_subject', array('XSTEXT_UNI', '', 'true_sort')); - } - - $sql = 'DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'jab_resource'"; - _sql($sql, $errored, $error_ary); - - set_config('jab_use_ssl', '0'); - set_config('allow_post_flash', '1'); - - $no_updates = false; -} - if (version_compare($current_version, '3.0.RC2', '<=')) { $smileys = array(); - $sql = 'SELECT smiley_id, code + $sql = 'SELECT smiley_id, code FROM ' . SMILIES_TABLE; $result = $db->sql_query($sql); @@ -1194,7 +1175,7 @@ if (version_compare($current_version, '3.0.RC2', '<=')) $new_code = str_replace('>', '>', $new_code); $new_code = utf8_htmlspecialchars($new_code); - $sql = 'UPDATE ' . SMILIES_TABLE . ' + $sql = 'UPDATE ' . SMILIES_TABLE . ' SET code = \'' . $db->sql_escape($new_code) . '\' WHERE smiley_id = ' . (int) $id; $db->sql_query($sql); @@ -1292,7 +1273,7 @@ if (version_compare($current_version, '3.0.RC3', '<=')) } // Make sure empty smiley codes do not exist - $sql = 'DELETE FROM ' . SMILIES_TABLE . " + $sql = 'DELETE FROM ' . SMILIES_TABLE . " WHERE code = ''"; _sql($sql, $errored, $error_ary); @@ -1474,7 +1455,7 @@ if (version_compare($current_version, '3.0.RC4', '<=')) [template_filename] [varchar] (100) DEFAULT ('') NOT NULL , [template_included] [varchar] (8000) DEFAULT ('') NOT NULL , [template_mtime] [int] DEFAULT (0) NOT NULL , - [template_data] [text] DEFAULT ('') NOT NULL + [template_data] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]"; _sql($sql, $errored, $error_ary); @@ -1502,6 +1483,40 @@ if (version_compare($current_version, '3.0.RC4', '<=')) $no_updates = false; } +if (version_compare($current_version, '3.0.RC5', '<=')) +{ + // In case the user is having the bot mediapartner google "as is", adjust it. + $sql = 'UPDATE ' . BOTS_TABLE . " + SET bot_agent = '" . $db->sql_escape('Mediapartners-Google') . "' + WHERE bot_agent = '" . $db->sql_escape('Mediapartners-Google/') . "'"; + _sql($sql, $errored, $error_ary); + + set_config('form_token_lifetime', '7200'); + set_config('form_token_mintime', '0'); + set_config('min_time_reg', '5'); + set_config('min_time_terms', '2'); + set_config('form_token_sid_guests', '1'); + + $db->sql_transaction('begin'); + + $sql = 'SELECT forum_id, forum_password + FROM ' . FORUMS_TABLE; + $result = _sql($sql, $errored, $error_ary); + + while ($row = $db->sql_fetchrow($result)) + { + if (!empty($row['forum_password'])) + { + _sql('UPDATE ' . FORUMS_TABLE . " SET forum_password = '" . md5($row['forum_password']) . "' WHERE forum_id = {$row['forum_id']}", $errored, $error_ary); + } + } + $db->sql_freeresult($result); + + $db->sql_transaction('commit'); + + $no_updates = false; +} + _write_result($no_updates, $errored, $error_ary); $error_ary = array(); @@ -1529,8 +1544,8 @@ $sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''"; _sql($sql, $errored, $error_ary); -/* Optimize/vacuum analyze the tables where appropriate -// this should be done for each version in future along with +/* Optimize/vacuum analyze the tables where appropriate +// this should be done for each version in future along with // the version number update switch ($db->sql_layer) { @@ -1604,7 +1619,10 @@ $cache->purge(); sql_query($sql); @@ -2050,8 +2068,8 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data) { global $db; $sql = "SELECT sql - FROM sqlite_master - WHERE type = 'table' + FROM sqlite_master + WHERE type = 'table' AND name = '{$table_name}' ORDER BY type DESC, name;"; $result = $db->sql_query($sql); @@ -2147,8 +2165,8 @@ function sql_column_remove($dbms, $table_name, $column_name) { global $db; $sql = "SELECT sql - FROM sqlite_master - WHERE type = 'table' + FROM sqlite_master + WHERE type = 'table' AND name = '{$table_name}' ORDER BY type DESC, name;"; $result = $db->sql_query($sql); @@ -2177,7 +2195,7 @@ function sql_column_remove($dbms, $table_name, $column_name) foreach ($old_table_cols as $declaration) { $entities = preg_split('#\s+#', trim($declaration)); - if ($entities[0] == 'PRIMARY' || $entities[0] === '$column_name') + if ($entities[0] == 'PRIMARY' || $entities[0] === $column_name) { continue; } @@ -2266,8 +2284,8 @@ function sql_create_primary_key($dbms, $table_name, $column) case 'sqlite': $sql = "SELECT sql - FROM sqlite_master - WHERE type = 'table' + FROM sqlite_master + WHERE type = 'table' AND name = '{$table_name}' ORDER BY type DESC, name;"; $result = _sql($sql, $errored, $error_ary); @@ -2649,8 +2667,8 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) case 'sqlite': $sql = "SELECT sql - FROM sqlite_master - WHERE type = 'table' + FROM sqlite_master + WHERE type = 'table' AND name = '{$table_name}' ORDER BY type DESC, name;"; $result = _sql($sql, $errored, $error_ary); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 56da3590ff..60265d5a29 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -1,10 +1,10 @@ true, - '_GET' => true, - '_POST' => true, - '_COOKIE' => true, - '_REQUEST' => true, - '_SERVER' => true, - '_SESSION' => true, - '_ENV' => true, - '_FILES' => true, - 'phpEx' => true, - 'phpbb_root_path' => true + 'GLOBALS' => true, + '_GET' => true, + '_POST' => true, + '_COOKIE' => true, + '_REQUEST' => true, + '_SERVER' => true, + '_SESSION' => true, + '_ENV' => true, + '_FILES' => true, + 'phpEx' => true, + 'phpbb_root_path' => true ); // Not only will array_merge and array_keys give a warning if @@ -55,8 +55,7 @@ function deregister_globals() $_SESSION = array(); } - // Merge all into one extremely huge array; unset - // this later + // Merge all into one extremely huge array; unset this later $input = array_merge( array_keys($_GET), array_keys($_POST), @@ -71,8 +70,26 @@ function deregister_globals() { if (isset($not_unset[$varname])) { - // Hacking attempt. No point in continuing. - exit; + // Hacking attempt. No point in continuing unless it's a COOKIE + if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS'])) + { + exit; + } + else + { + $cookie = &$_COOKIE; + while (isset($cookie['GLOBALS'])) + { + foreach ($cookie['GLOBALS'] as $registered_var => $value) + { + if (!isset($not_unset[$registered_var])) + { + unset($GLOBALS[$registered_var]); + } + } + $cookie = &$cookie['GLOBALS']; + } + } } unset($GLOBALS[$varname]); @@ -132,6 +149,12 @@ else // Include essential scripts require($phpbb_root_path . 'includes/functions.' . $phpEx); + +if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx)) +{ + require($phpbb_root_path . 'includes/functions_content.' . $phpEx); +} + include($phpbb_root_path . 'includes/auth.' . $phpEx); include($phpbb_root_path . 'includes/session.' . $phpEx); include($phpbb_root_path . 'includes/template.' . $phpEx); @@ -211,13 +234,29 @@ $mode = request_var('mode', 'overview'); $sub = request_var('sub', ''); // Set PHP error handler to ours -set_error_handler('msg_handler'); +set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); $user = new user(); $auth = new auth(); $cache = new cache(); $template = new template(); +// Add own hook handler, if present. :o +if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) +{ + require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); + $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display'))); + + foreach ($cache->obtain_hooks() as $hook) + { + @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); + } +} +else +{ + $phpbb_hook = false; +} + // Set some standard variables we want to force $config = array( 'load_tplcompile' => '1' @@ -387,7 +426,10 @@ class module 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/', 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], + 'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right', + 'S_CONTENT_FLOW_END' => ($lang['DIRECTION'] == 'ltr') ? 'right' : 'left', 'S_CONTENT_ENCODING' => 'UTF-8', + 'S_USER_LANG' => $lang['USER_LANG'], ) ); @@ -415,7 +457,10 @@ class module $db->sql_close(); } - exit; + if (function_exists('exit_handler')) + { + exit_handler(); + } } /** @@ -501,7 +546,7 @@ class module if (is_array($this->module_ary[$this->id]['subs'])) { - $subs = $this->module_ary[$this->id]['subs']; + $subs = $this->module_ary[$this->id]['subs']; foreach ($subs as $option) { $l_option = (!empty($lang['SUB_' . $option])) ? $lang['SUB_' . $option] : preg_replace('#_#', ' ', $option); @@ -518,7 +563,7 @@ class module if (is_array($this->module_ary[$this->id]['stages'])) { - $subs = $this->module_ary[$this->id]['stages']; + $subs = $this->module_ary[$this->id]['stages']; $matched = false; foreach ($subs as $option) { @@ -606,7 +651,7 @@ class module $db->sql_close(); } - exit; + exit_handler(); } /** diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 0f2486d874..6fd5016a42 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1,10 +1,10 @@ $lang['AVAILABLE_CONVERTORS'], 'L_CONVERT' => $lang['CONVERT'], 'L_NO_CONVERTORS' => $lang['NO_CONVERTORS'], - 'L_OPTIONS' => $lang['OPTIONS'], + 'L_OPTIONS' => $lang['CONVERT_OPTIONS'], 'L_SOFTWARE' => $lang['SOFTWARE'], 'L_VERSION' => $lang['VERSION'], @@ -521,7 +521,7 @@ class install_convert extends module set_config('convert_options', serialize(array('forum_path' => './../' . $forum_path, 'refresh' => $refresh)), true); $template->assign_block_vars('checks', array( - 'TITLE' => $lang['SPECIFY_OPTIONS'], + 'TITLE' => $lang['VERIFY_OPTIONS'], 'RESULT' => $lang['CONVERT_SETTINGS_VERIFIED'], )); @@ -536,7 +536,7 @@ class install_convert extends module else { $template->assign_block_vars('checks', array( - 'TITLE' => $lang['SPECIFY_OPTIONS'], + 'TITLE' => $lang['VERIFY_OPTIONS'], 'RESULT' => '' . implode('
', $error) . '
', )); } @@ -612,7 +612,7 @@ class install_convert extends module $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues - $config['max_post_chars'] = -1; + $config['max_post_chars'] = 0; // Set up a user as well. We _should_ have enough of a database here at this point to do this // and it helps for any core code we call @@ -990,7 +990,7 @@ class install_convert extends module $config['max_quote_depth'] = 0; // @todo Need to confirm that max post length in source is <= max post length in destination or there may be interesting formatting issues - $config['max_post_chars'] = -1; + $config['max_post_chars'] = 0; } $template->assign_block_vars('checks', array( @@ -1198,7 +1198,7 @@ class install_convert extends module $schema['order_by'] = $schema['primary']; } $sql .= (!empty($schema['order_by'])) ? "\nORDER BY " . $schema['order_by'] : ''; - + // Counting basically holds the amount of rows processed. $counting = -1; $batch_time = 0; @@ -1561,7 +1561,7 @@ class install_convert extends module { global $db, $phpbb_root_path, $convert, $config, $user, $template; - $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " + $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'convert_progress' OR config_name = 'convert_options' OR config_name = 'convert_db_server' diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 4dd7e73db5..ca86816e9c 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1,10 +1,10 @@ ' . $lang['YES'] . ''; @@ -211,7 +211,7 @@ class install_install extends module )); - // Check for getimagesize + // Check for getimagesize if (@function_exists('getimagesize')) { $passed['imagesize'] = true; @@ -278,7 +278,7 @@ class install_install extends module foreach ($checks as $mb_checks) { - $ini_val = ini_get('mbstring.' . $mb_checks[0]); + $ini_val = @ini_get('mbstring.' . $mb_checks[0]); switch ($mb_checks[1]) { case '&': @@ -1326,16 +1326,16 @@ class install_install extends module OR topic_last_poster_name = 'Admin'", 'UPDATE ' . $data['table_prefix'] . "users - SET user_regdate = $current_time", + SET user_regdate = $current_time", 'UPDATE ' . $data['table_prefix'] . "posts - SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'", + SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'", 'UPDATE ' . $data['table_prefix'] . "topics - SET topic_time = $current_time, topic_last_post_time = $current_time", + SET topic_time = $current_time, topic_last_post_time = $current_time", 'UPDATE ' . $data['table_prefix'] . "forums - SET forum_last_post_time = $current_time", + SET forum_last_post_time = $current_time", ); if (@extension_loaded('gd') || can_load_dll('gd')) @@ -1390,7 +1390,7 @@ class install_install extends module $data = $this->get_submitted_data(); $table_prefix = $data['table_prefix']; - // If we get here and the extension isn't loaded it should be safe to just go ahead and load it + // If we get here and the extension isn't loaded it should be safe to just go ahead and load it $available_dbms = get_available_dbms($data['dbms']); // Load the appropriate database class if not already loaded @@ -1609,7 +1609,7 @@ class install_install extends module foreach ($this->module_extras[$module_class] as $cat_name => $mods) { $sql = 'SELECT module_id, left_id, right_id - FROM ' . MODULES_TABLE . " + FROM ' . MODULES_TABLE . " WHERE module_langname = '" . $db->sql_escape($cat_name) . "' AND module_class = '" . $db->sql_escape($module_class) . "'"; $result = $db->sql_query_limit($sql, 1); @@ -1619,7 +1619,7 @@ class install_install extends module foreach ($mods as $mod_name) { $sql = 'SELECT * - FROM ' . MODULES_TABLE . " + FROM ' . MODULES_TABLE . " WHERE module_langname = '" . $db->sql_escape($mod_name) . "' AND module_class = '" . $db->sql_escape($module_class) . "' AND module_basename <> ''"; @@ -2060,7 +2060,7 @@ class install_install extends module 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), 'Francis [Bot]' => array('http://www.neomo.de/', ''), 'Gigabot [Bot]' => array('Gigabot/', ''), - 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''), + 'Google Adsense [Bot]' => array('Mediapartners-Google', ''), 'Google Desktop' => array('Google Desktop', ''), 'Google Feedfetcher' => array('Feedfetcher-Google', ''), 'Google [Bot]' => array('Googlebot', ''), diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php index cc8367f01b..e9f35efa1d 100755 --- a/phpBB/install/install_main.php +++ b/phpBB/install/install_main.php @@ -1,10 +1,10 @@ destroy('_update_list'); + $cache->destroy('_diff_files'); break; case 'version_check': @@ -290,6 +291,9 @@ class install_update extends module case 'file_check': + // Make sure the previous file collection is no longer valid... + $cache->destroy('_diff_files'); + $this->page_title = 'STAGE_FILE_CHECK'; // Now make sure our update list is correct if the admin refreshes @@ -317,10 +321,32 @@ class install_update extends module $get_new_list = true; } + if (!$get_new_list && $update_list['status'] != 'finished') + { + $get_new_list = true; + } + if ($get_new_list) { - $update_list = $this->get_update_structure(); + $this->get_update_structure($update_list); $cache->put('_update_list', $update_list); + + // Refresh the page if we are still not finished... + if ($update_list['status'] != 'finished') + { + $refresh_url = append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"); + meta_refresh(2, $refresh_url); + + $template->assign_vars(array( + 'S_IN_PROGRESS' => true, + 'S_COLLECTED' => (int) $update_list['status'], + 'S_TO_COLLECT' => sizeof($this->update_info['files']), + 'L_IN_PROGRESS' => $user->lang['COLLECTING_FILE_DIFFS'], + 'L_IN_PROGRESS_EXPLAIN' => sprintf($user->lang['NUMBER_OF_FILES_COLLECTED'], (int) $update_list['status'], sizeof($this->update_info['files'])), + )); + + return; + } } if ($action == 'diff') @@ -340,7 +366,7 @@ class install_update extends module // Now assign the list to the template foreach ($update_list as $status => $filelist) { - if ($status == 'no_update' || !sizeof($filelist)) + if ($status == 'no_update' || !sizeof($filelist) || $status == 'status') { continue; } @@ -398,7 +424,7 @@ class install_update extends module $all_up_to_date = true; foreach ($update_list as $status => $filelist) { - if ($status != 'up_to_date' && $status != 'custom' && sizeof($filelist)) + if ($status != 'up_to_date' && $status != 'custom' && $status != 'status' && sizeof($filelist)) { $all_up_to_date = false; break; @@ -419,7 +445,7 @@ class install_update extends module // Add database update to log add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->latest_version); - // Refresh prosilver css data - this may cause some unhappy users, but + // Refresh prosilver css data - this may cause some unhappy users, but $sql = 'SELECT * FROM ' . STYLES_THEME_TABLE . " WHERE theme_name = 'prosilver'"; @@ -492,12 +518,14 @@ class install_update extends module $this->page_title = 'STAGE_UPDATE_FILES'; $s_hidden_fields = ''; + $params = array(); $conflicts = request_var('conflict', array('' => 0)); $modified = request_var('modified', array('' => 0)); foreach ($conflicts as $filename => $merge_option) { $s_hidden_fields .= ''; + $params[] = 'conflict[' . urlencode($filename) . ']=' . urlencode($merge_option); } foreach ($modified as $filename => $merge_option) @@ -507,6 +535,7 @@ class install_update extends module continue; } $s_hidden_fields .= ''; + $params[] = 'modified[' . urlencode($filename) . ']=' . urlencode($merge_option); } $no_update = request_var('no_update', array(0 => '')); @@ -514,171 +543,11 @@ class install_update extends module foreach ($no_update as $index => $filename) { $s_hidden_fields .= ''; + $params[] = 'no_update[]=' . urlencode($filename); } - if (!empty($_POST['download'])) - { - $this->include_file('includes/functions_compress.' . $phpEx); - - $use_method = request_var('use_method', ''); - $methods = array('.tar'); - - $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib'); - foreach ($available_methods as $type => $module) - { - if (!@extension_loaded($module)) - { - continue; - } - - $methods[] = $type; - } - - // Let the user decide in which format he wants to have the pack - if (!$use_method) - { - $this->page_title = 'SELECT_DOWNLOAD_FORMAT'; - - $radio_buttons = ''; - foreach ($methods as $method) - { - $radio_buttons .= ''; - } - - $template->assign_vars(array( - 'S_DOWNLOAD_FILES' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), - 'RADIO_BUTTONS' => $radio_buttons, - 'S_HIDDEN_FIELDS' => $s_hidden_fields) - ); - - // To ease the update process create a file location map - $update_list = $cache->get('_update_list'); - $script_path = ($config['force_server_vars']) ? (($config['script_path'] == '/') ? '/' : $config['script_path'] . '/') : $user->page['root_script_path']; - - foreach ($update_list as $status => $files) - { - if ($status == 'up_to_date' || $status == 'no_update') - { - continue; - } - - foreach ($files as $file_struct) - { - if (in_array($file_struct['filename'], $no_update)) - { - continue; - } - - $template->assign_block_vars('location', array( - 'SOURCE' => htmlspecialchars($file_struct['filename']), - 'DESTINATION' => $script_path . htmlspecialchars($file_struct['filename']), - )); - } - } - - return; - } - - if (!in_array($use_method, $methods)) - { - $use_method = '.tar'; - } - - $update_mode = 'download'; - } - else - { - $this->include_file('includes/functions_transfer.' . $phpEx); - - // Choose FTP, if not available use fsock... - $method = request_var('method', ''); - $submit = (isset($_POST['submit'])) ? true : false; - $test_ftp_connection = request_var('test_connection', ''); - - if (!$method) - { - $method = 'ftp'; - $methods = transfer::methods(); - - if (!in_array('ftp', $methods)) - { - $method = $methods[0]; - } - } - - $test_connection = false; - if ($test_ftp_connection || $submit) - { - $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', '')); - $test_connection = $transfer->open_session(); - - // Make sure that the directory is correct by checking for the existence of common.php - if ($test_connection === true) - { - // Check for common.php file - if (!$transfer->file_exists($phpbb_root_path, 'common.' . $phpEx)) - { - $test_connection = 'ERR_WRONG_PATH_TO_PHPBB'; - } - } - - $transfer->close_session(); - - // Make sure the login details are correct before continuing - if ($submit && $test_connection !== true) - { - $submit = false; - $test_ftp_connection = true; - } - } - - if (!$submit) - { - $this->page_title = 'SELECT_FTP_SETTINGS'; - - if (!class_exists($method)) - { - trigger_error('Method does not exist.', E_USER_ERROR); - } - - $requested_data = call_user_func(array($method, 'data')); - foreach ($requested_data as $data => $default) - { - $template->assign_block_vars('data', array( - 'DATA' => $data, - 'NAME' => $user->lang[strtoupper($method . '_' . $data)], - 'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'], - 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default - )); - } - - $s_hidden_fields .= build_hidden_fields(array('method' => $method)); - - $template->assign_vars(array( - 'S_CONNECTION_SUCCESS' => ($test_ftp_connection && $test_connection === true) ? true : false, - 'S_CONNECTION_FAILED' => ($test_ftp_connection && $test_connection !== true) ? true : false, - 'ERROR_MSG' => ($test_ftp_connection && $test_connection !== true) ? $user->lang[$test_connection] : '', - - 'S_FTP_UPLOAD' => true, - 'UPLOAD_METHOD' => $method, - 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), - 'S_HIDDEN_FIELDS' => $s_hidden_fields) - ); - - return; - } - - $update_mode = 'upload'; - } - - // Now update the installation or download the archive... - $download_filename = 'update_' . $this->update_info['version']['from'] . '_to_' . $this->update_info['version']['to']; - $archive_filename = $download_filename . '_' . time() . '_' . unique_id(); - + // Before the user is choosing his preferred method, let's create the content list... $update_list = $cache->get('_update_list'); - $conflicts = request_var('conflict', array('' => 0)); - $modified = request_var('modified', array('' => 0)); if ($update_list === false) { @@ -733,6 +602,313 @@ class install_update extends module trigger_error($user->lang['MERGE_SELECT_ERROR'], E_USER_ERROR); } + // Before we do anything, let us diff the files and store the raw file information "somewhere" + $get_files = false; + $file_list = $cache->get('_diff_files'); + + if ($file_list === false || $file_list['status'] != 'finished') + { + $get_files = true; + } + + if ($get_files) + { + if ($file_list === false) + { + $file_list = array( + 'status' => 0, + ); + } + + $processed = 0; + foreach ($update_list as $status => $files) + { + if (!is_array($files)) + { + continue; + } + + foreach ($files as $file_struct) + { + // Skip this file if the user selected to not update it + if (in_array($file_struct['filename'], $no_update)) + { + continue; + } + + // Already handled... then skip of course... + if (isset($file_list[$file_struct['filename']])) + { + continue; + } + + // Refresh if we reach 5 diffs... + if ($processed >= 5) + { + $cache->put('_diff_files', $file_list); + + if (!empty($_REQUEST['download'])) + { + $params[] = 'download=1'; + } + + $redirect_url = append_sid($this->p_master->module_url, "mode=$mode&sub=update_files&" . implode('&', $params)); + meta_refresh(3, $redirect_url); + + $template->assign_vars(array( + 'S_IN_PROGRESS' => true, + 'L_IN_PROGRESS' => $user->lang['MERGING_FILES'], + 'L_IN_PROGRESS_EXPLAIN' => $user->lang['MERGING_FILES_EXPLAIN'], + )); + + return; + } + + $original_filename = ($file_struct['custom']) ? $file_struct['original'] : $file_struct['filename']; + + switch ($status) + { + case 'modified': + + $option = (isset($modified[$file_struct['filename']])) ? $modified[$file_struct['filename']] : 0; + + switch ($option) + { + case MERGE_NO_MERGE_NEW: + $contents = file_get_contents($this->new_location . $original_filename); + break; + + case MERGE_NO_MERGE_MOD: + $contents = file_get_contents($phpbb_root_path . $file_struct['filename']); + break; + + default: + $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); + + $contents = implode("\n", $diff->merged_output()); + unset($diff); + break; + } + + $file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']); + $cache->put($file_list[$file_struct['filename']], base64_encode($contents)); + + $file_list['status']++; + $processed++; + + break; + + case 'conflict': + + $option = $conflicts[$file_struct['filename']]; + $contents = ''; + + switch ($option) + { + case MERGE_NO_MERGE_NEW: + $contents = file_get_contents($this->new_location . $original_filename); + break; + + case MERGE_NO_MERGE_MOD: + $contents = file_get_contents($phpbb_root_path . $file_struct['filename']); + break; + + default: + + $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); + + if ($option == MERGE_NEW_FILE) + { + $contents = implode("\n", $diff->merged_new_output()); + } + else if ($option == MERGE_MOD_FILE) + { + $contents = implode("\n", $diff->merged_orig_output()); + } + else + { + unset($diff); + break 2; + } + + unset($diff); + break; + } + + $file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']); + $cache->put($file_list[$file_struct['filename']], base64_encode($contents)); + + $file_list['status']++; + $processed++; + + break; + } + } + } + } + + $file_list['status'] = 'finished'; + $cache->put('_diff_files', $file_list); + + if (!empty($_REQUEST['download'])) + { + $this->include_file('includes/functions_compress.' . $phpEx); + + $use_method = request_var('use_method', ''); + $methods = array('.tar'); + + $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib'); + foreach ($available_methods as $type => $module) + { + if (!@extension_loaded($module)) + { + continue; + } + + $methods[] = $type; + } + + // Let the user decide in which format he wants to have the pack + if (!$use_method) + { + $this->page_title = 'SELECT_DOWNLOAD_FORMAT'; + + $radio_buttons = ''; + foreach ($methods as $method) + { + $radio_buttons .= ''; + } + + $template->assign_vars(array( + 'S_DOWNLOAD_FILES' => true, + 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), + 'RADIO_BUTTONS' => $radio_buttons, + 'S_HIDDEN_FIELDS' => $s_hidden_fields) + ); + + // To ease the update process create a file location map + $update_list = $cache->get('_update_list'); + $script_path = ($config['force_server_vars']) ? (($config['script_path'] == '/') ? '/' : $config['script_path'] . '/') : $user->page['root_script_path']; + + foreach ($update_list as $status => $files) + { + if ($status == 'up_to_date' || $status == 'no_update' || $status == 'status') + { + continue; + } + + foreach ($files as $file_struct) + { + if (in_array($file_struct['filename'], $no_update)) + { + continue; + } + + $template->assign_block_vars('location', array( + 'SOURCE' => htmlspecialchars($file_struct['filename']), + 'DESTINATION' => $script_path . htmlspecialchars($file_struct['filename']), + )); + } + } + return; + } + + if (!in_array($use_method, $methods)) + { + $use_method = '.tar'; + } + + $update_mode = 'download'; + } + else + { + $this->include_file('includes/functions_transfer.' . $phpEx); + + // Choose FTP, if not available use fsock... + $method = basename(request_var('method', '')); + $submit = (isset($_POST['submit'])) ? true : false; + $test_ftp_connection = request_var('test_connection', ''); + + if (!$method || !class_exists($method)) + { + $method = 'ftp'; + $methods = transfer::methods(); + + if (!in_array('ftp', $methods)) + { + $method = $methods[0]; + } + } + + $test_connection = false; + if ($test_ftp_connection || $submit) + { + $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', '')); + $test_connection = $transfer->open_session(); + + // Make sure that the directory is correct by checking for the existence of common.php + if ($test_connection === true) + { + // Check for common.php file + if (!$transfer->file_exists($phpbb_root_path, 'common.' . $phpEx)) + { + $test_connection = 'ERR_WRONG_PATH_TO_PHPBB'; + } + } + + $transfer->close_session(); + + // Make sure the login details are correct before continuing + if ($submit && $test_connection !== true) + { + $submit = false; + $test_ftp_connection = true; + } + } + + $s_hidden_fields .= build_hidden_fields(array('method' => $method)); + + if (!$submit) + { + $this->page_title = 'SELECT_FTP_SETTINGS'; + + if (!class_exists($method)) + { + trigger_error('Method does not exist.', E_USER_ERROR); + } + + $requested_data = call_user_func(array($method, 'data')); + foreach ($requested_data as $data => $default) + { + $template->assign_block_vars('data', array( + 'DATA' => $data, + 'NAME' => $user->lang[strtoupper($method . '_' . $data)], + 'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'], + 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default + )); + } + + $template->assign_vars(array( + 'S_CONNECTION_SUCCESS' => ($test_ftp_connection && $test_connection === true) ? true : false, + 'S_CONNECTION_FAILED' => ($test_ftp_connection && $test_connection !== true) ? true : false, + 'ERROR_MSG' => ($test_ftp_connection && $test_connection !== true) ? $user->lang[$test_connection] : '', + + 'S_FTP_UPLOAD' => true, + 'UPLOAD_METHOD' => $method, + 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_files"), + 'S_HIDDEN_FIELDS' => $s_hidden_fields) + ); + + return; + } + + $update_mode = 'upload'; + } + + // Now update the installation or download the archive... + $download_filename = 'update_' . $this->update_info['version']['from'] . '_to_' . $this->update_info['version']['to']; + $archive_filename = $download_filename . '_' . time() . '_' . unique_id(); + // Now init the connection if ($update_mode == 'download') { @@ -754,6 +930,11 @@ class install_update extends module // Ok, go through the update list and do the operations based on their status foreach ($update_list as $status => $files) { + if (!is_array($files)) + { + continue; + } + foreach ($files as $file_struct) { // Skip this file if the user selected to not update it @@ -769,6 +950,7 @@ class install_update extends module case 'new': case 'new_conflict': case 'not_modified': + if ($update_mode == 'download') { $compress->add_custom_file($this->new_location . $original_filename, $file_struct['filename']); @@ -779,31 +961,22 @@ class install_update extends module { $transfer->rename($file_struct['filename'], $file_struct['filename'] . '.bak'); } + + // New directory too? + $dirname = dirname($file_struct['filename']); + + if ($dirname && !file_exists($phpbb_root_path . $dirname)) + { + $transfer->make_dir($dirname); + } + $transfer->copy_file($this->new_location . $original_filename, $file_struct['filename']); } break; case 'modified': - $option = (isset($modified[$file_struct['filename']])) ? $modified[$file_struct['filename']] : 0; - - switch ($option) - { - case MERGE_NO_MERGE_NEW: - $contents = file_get_contents($this->new_location . $original_filename); - break; - - case MERGE_NO_MERGE_MOD: - $contents = file_get_contents($phpbb_root_path . $file_struct['filename']); - break; - - default: - $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); - - $contents = implode("\n", $diff->merged_output()); - unset($diff); - break; - } + $contents = base64_decode($cache->get($file_list[$file_struct['filename']])); if ($update_mode == 'download') { @@ -819,40 +992,7 @@ class install_update extends module case 'conflict': - $option = $conflicts[$file_struct['filename']]; - $contents = ''; - - switch ($option) - { - case MERGE_NO_MERGE_NEW: - $contents = file_get_contents($this->new_location . $original_filename); - break; - - case MERGE_NO_MERGE_MOD: - $contents = file_get_contents($phpbb_root_path . $file_struct['filename']); - break; - - default: - - $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); - - if ($option == MERGE_NEW_FILE) - { - $contents = implode("\n", $diff->merged_new_output()); - } - else if ($option == MERGE_MOD_FILE) - { - $contents = implode("\n", $diff->merged_orig_output()); - } - else - { - unset($diff); - break 2; - } - - unset($diff); - break; - } + $contents = base64_decode($cache->get($file_list[$file_struct['filename']])); if ($update_mode == 'download') { @@ -1058,23 +1198,50 @@ class install_update extends module /** * Collect all file status infos we need for the update by diffing all files */ - function get_update_structure() + function get_update_structure(&$update_list) { global $phpbb_root_path, $phpEx, $user; - $update_list = array( - 'up_to_date' => array(), - 'new' => array(), - 'not_modified' => array(), - 'modified' => array(), - 'new_conflict' => array(), - 'conflict' => array(), - 'no_update' => array(), - ); + if ($update_list === false) + { + $update_list = array( + 'up_to_date' => array(), + 'new' => array(), + 'not_modified' => array(), + 'modified' => array(), + 'new_conflict' => array(), + 'conflict' => array(), + 'no_update' => array(), + 'status' => 0, + ); + } + + /* if (!empty($this->update_info['custom'])) + { + foreach ($this->update_info['custom'] as $original_file => $file_ary) + { + foreach ($file_ary as $index => $file) + { + $this->make_update_diff($update_list, $original_file, $file, true); + } + } + } */ // Get a list of those files which are completely new by checking with file_exists... + $num_bytes_processed = 0; + foreach ($this->update_info['files'] as $index => $file) { + if (is_int($update_list['status']) && $index <= $update_list['status']) + { + continue; + } + + if ($num_bytes_processed >= 500 * 1024) + { + return; + } + if (!file_exists($phpbb_root_path . $file)) { // Make sure the update files are consistent by checking if the file is in new_files... @@ -1090,7 +1257,7 @@ class install_update extends module // $update_list['removed'][] = $file; // } - // Only include a new file as new if the underlying path exist + /* Only include a new file as new if the underlying path exist // The path normally do not exist if the original style or language has been removed if (file_exists($phpbb_root_path . dirname($file))) { @@ -1104,12 +1271,28 @@ class install_update extends module { $update_list['no_update'][] = $file; } + }*/ + + if (file_exists($phpbb_root_path . dirname($file)) || (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0)) + { + $this->get_custom_info($update_list['new'], $file); + $update_list['new'][] = array('filename' => $file, 'custom' => false); } - unset($this->update_info['files'][$index]); + + // unset($this->update_info['files'][$index]); } + else + { + // not modified? + $this->make_update_diff($update_list, $file, $file); + } + + $num_bytes_processed += (file_exists($this->new_location . $file)) ? filesize($this->new_location . $file) : 100 * 1024; + $update_list['status']++; } - if (!sizeof($this->update_info['files'])) + $update_list['status'] = 'finished'; +/* if (!sizeof($this->update_info['files'])) { return $update_list; } @@ -1136,7 +1319,7 @@ class install_update extends module } } - return $update_list; + return $update_list;*/ } /** @@ -1180,6 +1363,12 @@ class install_update extends module return; } + // Old file removed? + if (file_exists($this->old_location . $original_file) && !file_exists($this->new_location . $original_file)) + { + return; + } + // Check for existance, else abort immediately if (!file_exists($this->old_location . $original_file) || !file_exists($this->new_location . $original_file)) { diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 38ef13c412..95123f9c18 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -629,7 +629,7 @@ CREATE TABLE phpbb_posts ( post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, post_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_uid VARCHAR(5) CHARACTER SET NONE DEFAULT '' NOT NULL, + bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, post_postcount INTEGER DEFAULT 1 NOT NULL, post_edit_time INTEGER DEFAULT 0 NOT NULL, post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, @@ -676,7 +676,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user INTEGER DEFAULT 0 NOT NULL, message_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_uid VARCHAR(5) CHARACTER SET NONE DEFAULT '' NOT NULL, + bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, message_edit_time INTEGER DEFAULT 0 NOT NULL, message_edit_count INTEGER DEFAULT 0 NOT NULL, to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, @@ -1342,7 +1342,7 @@ CREATE TABLE phpbb_users ( user_avatar_width INTEGER DEFAULT 0 NOT NULL, user_avatar_height INTEGER DEFAULT 0 NOT NULL, user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - user_sig_bbcode_uid VARCHAR(5) CHARACTER SET NONE DEFAULT '' NOT NULL, + user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL, @@ -1354,7 +1354,8 @@ CREATE TABLE phpbb_users ( user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_newpasswd VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE + user_newpasswd VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE );; ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 37e8f66b2a..ccb6b2ea7b 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -764,7 +764,7 @@ CREATE TABLE [phpbb_posts] ( [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL , [post_attachment] [int] DEFAULT (0) NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , + [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [post_postcount] [int] DEFAULT (1) NOT NULL , [post_edit_time] [int] DEFAULT (0) NOT NULL , [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL , @@ -820,7 +820,7 @@ CREATE TABLE [phpbb_privmsgs] ( [message_edit_user] [int] DEFAULT (0) NOT NULL , [message_attachment] [int] DEFAULT (0) NOT NULL , [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , + [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [message_edit_time] [int] DEFAULT (0) NOT NULL , [message_edit_count] [int] DEFAULT (0) NOT NULL , [to_address] [varchar] (4000) DEFAULT ('') NOT NULL , @@ -1609,7 +1609,7 @@ CREATE TABLE [phpbb_users] ( [user_avatar_width] [int] DEFAULT (0) NOT NULL , [user_avatar_height] [int] DEFAULT (0) NOT NULL , [user_sig] [text] DEFAULT ('') NOT NULL , - [user_sig_bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , + [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [user_from] [varchar] (100) DEFAULT ('') NOT NULL , [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , @@ -1621,7 +1621,8 @@ CREATE TABLE [phpbb_users] ( [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL , [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , - [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL + [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL , + [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a1450cacee..1e5faf7c63 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -441,7 +441,7 @@ CREATE TABLE phpbb_posts ( post_checksum varbinary(32) DEFAULT '' NOT NULL, post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - bbcode_uid varbinary(5) DEFAULT '' NOT NULL, + bbcode_uid varbinary(8) DEFAULT '' NOT NULL, post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_edit_reason blob NOT NULL, @@ -476,7 +476,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - bbcode_uid varbinary(5) DEFAULT '' NOT NULL, + bbcode_uid varbinary(8) DEFAULT '' NOT NULL, message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, to_address blob NOT NULL, @@ -942,7 +942,7 @@ CREATE TABLE phpbb_users ( user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_sig mediumblob NOT NULL, - user_sig_bbcode_uid varbinary(5) DEFAULT '' NOT NULL, + user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, user_from blob NOT NULL, user_icq varbinary(15) DEFAULT '' NOT NULL, @@ -955,6 +955,7 @@ CREATE TABLE phpbb_users ( user_interests blob NOT NULL, user_actkey varbinary(32) DEFAULT '' NOT NULL, user_newpasswd varbinary(96) DEFAULT '' NOT NULL, + user_form_salt varbinary(96) DEFAULT '' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 4cee662be6..ade22d4f84 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -441,7 +441,7 @@ CREATE TABLE phpbb_posts ( post_checksum varchar(32) DEFAULT '' NOT NULL, post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_edit_reason varchar(255) DEFAULT '' NOT NULL, @@ -476,7 +476,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, to_address text NOT NULL, @@ -942,7 +942,7 @@ CREATE TABLE phpbb_users ( user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_sig mediumtext NOT NULL, - user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL, + user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_from varchar(100) DEFAULT '' NOT NULL, user_icq varchar(15) DEFAULT '' NOT NULL, @@ -955,6 +955,7 @@ CREATE TABLE phpbb_users ( user_interests text NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, + user_form_salt varchar(32) DEFAULT '' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index aabc00f0e2..8e327150be 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -15,17 +15,17 @@ /* CREATE TABLESPACE "PHPBB" - LOGGING - DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora' + LOGGING + DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora' SIZE 10M AUTOEXTEND ON NEXT 10M MAXSIZE 100M; -CREATE USER "PHPBB" - PROFILE "DEFAULT" - IDENTIFIED BY "phpbb_password" - DEFAULT TABLESPACE "PHPBB" - QUOTA UNLIMITED ON "PHPBB" +CREATE USER "PHPBB" + PROFILE "DEFAULT" + IDENTIFIED BY "phpbb_password" + DEFAULT TABLESPACE "PHPBB" + QUOTA UNLIMITED ON "PHPBB" ACCOUNT UNLOCK; GRANT ANALYZE ANY TO "PHPBB"; @@ -853,7 +853,7 @@ CREATE TABLE phpbb_posts ( post_checksum varchar2(32) DEFAULT '' , post_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield varchar2(255) DEFAULT '' , - bbcode_uid varchar2(5) DEFAULT '' , + bbcode_uid varchar2(8) DEFAULT '' , post_postcount number(1) DEFAULT '1' NOT NULL, post_edit_time number(11) DEFAULT '0' NOT NULL, post_edit_reason varchar2(765) DEFAULT '' , @@ -913,7 +913,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user number(8) DEFAULT '0' NOT NULL, message_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield varchar2(255) DEFAULT '' , - bbcode_uid varchar2(5) DEFAULT '' , + bbcode_uid varchar2(8) DEFAULT '' , message_edit_time number(11) DEFAULT '0' NOT NULL, message_edit_count number(4) DEFAULT '0' NOT NULL, to_address clob DEFAULT '' , @@ -1759,7 +1759,7 @@ CREATE TABLE phpbb_users ( user_avatar_width number(4) DEFAULT '0' NOT NULL, user_avatar_height number(4) DEFAULT '0' NOT NULL, user_sig clob DEFAULT '' , - user_sig_bbcode_uid varchar2(5) DEFAULT '' , + user_sig_bbcode_uid varchar2(8) DEFAULT '' , user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , user_from varchar2(300) DEFAULT '' , user_icq varchar2(15) DEFAULT '' , @@ -1772,6 +1772,7 @@ CREATE TABLE phpbb_users ( user_interests clob DEFAULT '' , user_actkey varchar2(32) DEFAULT '' , user_newpasswd varchar2(96) DEFAULT '' , + user_form_salt varchar2(96) DEFAULT '' , CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id), CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean) ) diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 5d4c6f477b..d642227cc9 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -610,7 +610,7 @@ CREATE TABLE phpbb_posts ( post_checksum varchar(32) DEFAULT '' NOT NULL, post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0), bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0), post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0), post_edit_reason varchar(255) DEFAULT '' NOT NULL, @@ -649,7 +649,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0), message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0), bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(5) DEFAULT '' NOT NULL, + bbcode_uid varchar(8) DEFAULT '' NOT NULL, message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0), message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0), to_address varchar(4000) DEFAULT '' NOT NULL, @@ -1205,7 +1205,7 @@ CREATE TABLE phpbb_users ( user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0), user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0), user_sig TEXT DEFAULT '' NOT NULL, - user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL, + user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_from varchar(100) DEFAULT '' NOT NULL, user_icq varchar(15) DEFAULT '' NOT NULL, @@ -1218,6 +1218,7 @@ CREATE TABLE phpbb_users ( user_interests varchar(4000) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, + user_form_salt varchar(32) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 4ea41610f1..64f947783c 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -88,6 +88,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_lifetime', '7200'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_mintime', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_sid_guests', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('forward_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('forwarded_for_check', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2'); @@ -169,6 +172,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_urls', '5' INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_name_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_pass_chars', '6'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_search_author_chars', '3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_time_reg', '5'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_time_terms', '2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0'); @@ -208,7 +213,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC5'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC6'); 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'); @@ -456,7 +461,6 @@ INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1); -INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_profile', 'icon_user_profile.gif', '', 11, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1); INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 546cfb0321..a30406e968 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -428,7 +428,7 @@ CREATE TABLE phpbb_posts ( post_checksum varchar(32) NOT NULL DEFAULT '', post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - bbcode_uid varchar(5) NOT NULL DEFAULT '', + bbcode_uid varchar(8) NOT NULL DEFAULT '', post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1', post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', post_edit_reason text(65535) NOT NULL DEFAULT '', @@ -462,7 +462,7 @@ CREATE TABLE phpbb_privmsgs ( message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0', message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - bbcode_uid varchar(5) NOT NULL DEFAULT '', + bbcode_uid varchar(8) NOT NULL DEFAULT '', message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0', to_address text(65535) NOT NULL DEFAULT '', @@ -912,7 +912,7 @@ CREATE TABLE phpbb_users ( user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', user_sig mediumtext(16777215) NOT NULL DEFAULT '', - user_sig_bbcode_uid varchar(5) NOT NULL DEFAULT '', + user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', user_from varchar(100) NOT NULL DEFAULT '', user_icq varchar(15) NOT NULL DEFAULT '', @@ -924,7 +924,8 @@ CREATE TABLE phpbb_users ( user_occ text(65535) NOT NULL DEFAULT '', user_interests text(65535) NOT NULL DEFAULT '', user_actkey varchar(32) NOT NULL DEFAULT '', - user_newpasswd varchar(32) NOT NULL DEFAULT '' + user_newpasswd varchar(32) NOT NULL DEFAULT '', + user_form_salt varchar(32) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index b9a352960a..6edae1a4cc 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -1,18 +1,23 @@ 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA. If this is disabled the COPPA specific groups will no longer be displayed.', 'MAX_CHARS' => 'Max', 'MIN_CHARS' => 'Min', + 'MIN_TIME_REG' => 'Minimum time for registration', + 'MIN_TIME_REG_EXPLAIN' => 'The registration form cannot be submitted before this time has passed.', + 'MIN_TIME_TERMS' => 'Minimum time for accepting terms', + 'MIN_TIME_TERMS_EXPLAIN' => 'The terms page cannot be skipped before this time has passed.', 'NO_AUTH_PLUGIN' => 'No suitable auth plugin found.', 'PASSWORD_LENGTH' => 'Password length', 'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.', @@ -333,7 +342,7 @@ $lang = array_merge($lang, array( 'SCRIPT_PATH' => 'Script path', 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. /phpBB3.', 'SERVER_NAME' => 'Domain name', - 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.foo.bar).', + 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.example.com).', 'SERVER_PORT' => 'Server port', 'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different.', 'SERVER_PROTOCOL' => 'Server protocol', @@ -364,6 +373,12 @@ $lang = array_merge($lang, array( 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.', 'FORCE_PASS_CHANGE' => 'Force password change', 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Setting this value to 0 disables this behaviour.', + 'FORM_TIME_MAX' => 'Maximum time to submit forms', + 'FORM_TIME_MAX_EXPLAIN' => 'The time a user has to submit a form. Use -1 to disable. Note that a form might become invalid if the session expires, regardless of this setting.', + 'FORM_TIME_MIN' => 'Minimum time to submit forms', + 'FORM_TIME_MIN_EXPLAIN' => 'Submissions faster than this time are ignored by the board. Use 0 to disable.', + 'FORM_SID_GUESTS' => 'Tie forms to guest sessions', + 'FORM_SID_GUESTS_EXPLAIN' => 'If enabled, the form token issued to guests will be session-exclusive. This can cause problems with some ISPs.', 'FORWARDED_FOR_VALID' => 'Validated X_FORWARDED_FOR header', 'FORWARDED_FOR_VALID_EXPLAIN' => 'Sessions will only be continued if the sent X_FORWARDED_FOR header equals the one sent with the previous request. Bans will be checked against IPs in X_FORWARDED_FOR too.', 'IP_VALID' => 'Session IP validation', @@ -424,10 +439,9 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.', - 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.', - 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.', 'JAB_ENABLE' => 'Enable Jabber', 'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.', + 'JAB_GTALK_NOTE' => 'Please note that GTalk will not work because the dns_get_record function could not be found. This function is not available in PHP4, and is not implemented on Windows platforms. It currently does not work on BSD-based systems, including Mac OS.', 'JAB_PACKAGE_SIZE' => 'Jabber package size', 'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.', 'JAB_PASSWORD' => 'Jabber password', diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php index ffc5442482..3b63f2ea2e 100644 --- a/phpBB/language/en/acp/bots.php +++ b/phpBB/language/en/acp/bots.php @@ -1,18 +1,23 @@ 'Confirm forum password', 'FORUM_PASSWORD_CONFIRM_EXPLAIN' => 'Only needs to be set if a forum password is entered.', 'FORUM_PASSWORD_EXPLAIN' => 'Defines a password for this forum, use the permission system in preference.', + 'FORUM_PASSWORD_UNSET' => 'Remove forum password', + 'FORUM_PASSWORD_UNSET_EXPLAIN' => 'Check here if you want to remove the forum password.', + 'FORUM_PASSWORD_OLD' => 'The forum password is using an old encryption and should be changed.', 'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.', 'FORUM_PRUNE_SETTINGS' => 'Forum prune settings', - 'FORUM_RESYNCED' => 'Forum "%s" successfully resynced', + 'FORUM_RESYNCED' => 'Forum “%s†successfully resynced', 'FORUM_RULES_EXPLAIN' => 'Forum rules are displayed at any page within the given forum.', 'FORUM_RULES_LINK' => 'Link to forum rules', 'FORUM_RULES_LINK_EXPLAIN' => 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the forum rules text you specified.', diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index 562e3a89cc..f73bf063a6 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php index 083ba2bce1..a10148942b 100644 --- a/phpBB/language/en/acp/language.php +++ b/phpBB/language/en/acp/language.php @@ -1,18 +1,23 @@ 'Total', 'USERS_NOT_ASSIGNED' => 'No user assigned to this role', - 'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following default groups', - 'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following custom groups', + 'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following pre-defined groups', + 'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following user defined groups', 'VIEW_ASSIGNED_ITEMS' => 'View assigned items', 'VIEW_LOCAL_PERMS' => 'Local permissions', 'VIEW_GLOBAL_PERMS' => 'Global permissions', 'VIEW_PERMISSIONS' => 'View permissions', - 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.', + 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.', + 'WRONG_PERMISSION_SETTING_FORMAT' => 'The permission settings are in a wrong format, phpBB is not able to process them correctly.', )); ?> \ No newline at end of file diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index 6579f23018..d5b4f0015d 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -11,6 +11,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 2f995dc91d..35a3d1b2b6 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -217,7 +222,7 @@ $lang = array_merge($lang, array( // Disallow Usernames $lang = array_merge($lang, array( - 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.', + 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.', 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.', 'ADD_DISALLOW_TITLE' => 'Add a disallowed username', @@ -244,7 +249,7 @@ $lang = array_merge($lang, array( 'NO_REASON' => 'Reason could not be found.', 'NO_REASON_INFO' => 'You have to specify a title and a description for this reason.', - 'NO_REMOVE_DEFAULT_REASON' => 'You are not able to remove the default reason "Other".', + 'NO_REMOVE_DEFAULT_REASON' => 'You are not able to remove the default reason “Otherâ€.', 'REASON_ADD' => 'Add report/denial reason', 'REASON_ADDED' => 'Report/denial reason successfully added.', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 15fe8391cd..ca63c9c639 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php index 6172602f9f..31e14d62a1 100644 --- a/phpBB/language/en/acp/prune.php +++ b/phpBB/language/en/acp/prune.php @@ -1,18 +1,23 @@ 'Custom profile fields', 'USER_DELETED' => 'User deleted successfully.', 'USER_GROUP_ADD' => 'Add user to group', - 'USER_GROUP_NORMAL' => 'Normal groups user is a member of', + 'USER_GROUP_NORMAL' => 'User defined groups user is a member of', 'USER_GROUP_PENDING' => 'Groups user is in pending mode', - 'USER_GROUP_SPECIAL' => 'Special groups user is a member of', + 'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of', 'USER_NO_ATTACHMENTS' => 'There are no attached files to display.', 'USER_OVERVIEW_UPDATED' => 'User details updated.', 'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 9b3ebbfe52..f6ab75fc5b 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -160,6 +165,8 @@ $lang = array_merge($lang, array( 'ENCLOSURE' => 'Enclosure', 'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.', 'ERR_CONNECTING_SERVER' => 'Error connecting to the server.', + 'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.', + 'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.', 'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.', 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.', 'EXPAND_VIEW' => 'Expand view', @@ -176,6 +183,7 @@ $lang = array_merge($lang, array( 'FIND_USERNAME' => 'Find a member', 'FOLDER' => 'Folder', 'FORGOT_PASS' => 'I forgot my password', + 'FORM_INVALID' => 'The submitted form was invalid. Try submitting again.', 'FORUM' => 'Forum', 'FORUMS' => 'Forums', 'FORUMS_MARKED' => 'All forums have been marked read.', @@ -368,6 +376,7 @@ $lang = array_merge($lang, array( 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.', 'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods.', 'NO_TOPIC' => 'The requested topic does not exist.', + 'NO_TOPIC_FORUM' => 'The topic or forum no longer exists.', 'NO_TOPICS' => 'There are no topics or posts in this forum.', 'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.', 'NO_UNREAD_PM' => '0 unread messages', diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt index 0d75f33c18..746d13da7a 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}" {WELCOME_MSG} @@ -7,6 +7,8 @@ Please keep this e-mail for your records. Your account information is as follows ---------------------------- Username: {USERNAME} Password: {PASSWORD} + +Board URL: {U_BOARD} ---------------------------- Your account is currently inactive, the administrator of the board will need to activate it before you can log in. You will receive another e-mail when this has occurred. diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt index ab8363b350..9d43ca4f85 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}" {WELCOME_MSG} @@ -13,7 +13,7 @@ OR mail it to: {MAIL_INFO} ------------------------------ CUT HERE ------------------------------ -Permission to participate at "{SITENAME}" +Permission to participate at "{SITENAME}" - {U_BOARD} Username: {USERNAME} E-mail: {EMAIL_ADDRESS} diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt index f34479a6fe..f079ddb838 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}" {WELCOME_MSG} @@ -13,7 +13,7 @@ OR mail it to: {MAIL_INFO} ------------------------------ CUT HERE ------------------------------ -Permission to participate at "{SITENAME}" +Permission to participate at "{SITENAME}" - {U_BOARD} Username: {USERNAME} Password: {PASSWORD} diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt index 090782091e..fae5a83885 100644 --- a/phpBB/language/en/email/forum_notify.txt +++ b/phpBB/language/en/email/forum_notify.txt @@ -2,7 +2,7 @@ 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 the last unread reply, no more notifications will be sent until you visit the topic. {U_NEWEST_POST} @@ -10,7 +10,7 @@ If you want to view the topic, click the following link: {U_TOPIC} If you want to view the forum, click the following link: -{U_TOPIC} +{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: diff --git a/phpBB/language/en/email/user_reactivate_account.txt b/phpBB/language/en/email/user_reactivate_account.txt index 444933b633..b5639d0b7a 100644 --- a/phpBB/language/en/email/user_reactivate_account.txt +++ b/phpBB/language/en/email/user_reactivate_account.txt @@ -1,6 +1,6 @@ -Subject: Reactivate your account on "{SITENAME}" - {U_BOARD} +Subject: Reactivate your account on "{SITENAME}" -A board administrator forced your account to be reactivated. Your account is currently inactive. +A board administrator requested that your account be reactivated. Your account is currently inactive. Please follow the steps listed here to reactivate your account. Please keep this e-mail for your records. Your account information is as follows: diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt index f0a0034aa5..5635801b80 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}" {WELCOME_MSG} diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt index 52957082fb..6c3cee0b50 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}" {WELCOME_MSG} @@ -7,6 +7,8 @@ Please keep this e-mail for your records. Your account information is as follows ---------------------------- Username: {USERNAME} Password: {PASSWORD} + +Board URL: {U_BOARD} ---------------------------- Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account. diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt index 3cd5e3c2ea..4b6d96ddd8 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}" {WELCOME_MSG} @@ -7,6 +7,8 @@ Please keep this e-mail for your records. Your account information is as follows ---------------------------- Username: {USERNAME} Password: {PASSWORD} + +Board URL: {U_BOARD} ---------------------------- Your account is currently inactive. You cannot use it until you visit the following link: diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php index 9141cc4892..7cee799535 100644 --- a/phpBB/language/en/groups.php +++ b/phpBB/language/en/groups.php @@ -1,18 +1,23 @@ 'Successfully changed default group.', - 'GROUP_AVATAR' => 'Group avatar', + 'GROUP_AVATAR' => 'Group avatar', 'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group “%sâ€?', 'GROUP_CLOSED' => 'Closed', 'GROUP_DESC' => 'Group description', 'GROUP_HIDDEN' => 'Hidden', - 'GROUP_INFORMATION' => 'Usergroup information', + 'GROUP_INFORMATION' => 'Usergroup information', 'GROUP_IS_CLOSED' => 'This is a closed group, new members can only join upon invitation of a group leader.', - 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.', + 'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.', 'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.', 'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.', - 'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.', + 'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.', 'GROUP_JOIN' => 'Join group', 'GROUP_JOIN_CONFIRM' => 'Are you sure you want to join the selected group?', 'GROUP_JOIN_PENDING' => 'Request to join group', @@ -58,7 +63,7 @@ $lang = array_merge($lang, array( 'GROUP_MEMBERS' => 'Group members', 'GROUP_NAME' => 'Group name', 'GROUP_OPEN' => 'Open', - 'GROUP_RANK' => 'Group rank', + 'GROUP_RANK' => 'Group rank', 'GROUP_RESIGN_MEMBERSHIP' => 'Resign group membership', 'GROUP_RESIGN_MEMBERSHIP_CONFIRM' => 'Are you sure you want to resign your membership from the selected group?', 'GROUP_RESIGN_PENDING' => 'Resign a pending group membership', diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 5ffe3ac742..00b00c9e19 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -1,17 +1,21 @@ 'Converting the configuration', 'CONFIG_FILE_UNABLE_WRITE' => 'It was not possible to write the configuration file. Alternative methods for this file to be created are presented below.', 'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.', - 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for "%s" is empty.', + 'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for “%s†is empty.', 'CONFIG_RETRY' => 'Retry', 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail', 'CONTINUE_CONVERT' => 'Continue conversion', @@ -79,15 +84,16 @@ $lang = array_merge($lang, array( 'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.', 'CONVERT_NEW_CONVERSION' => 'New conversion', 'CONVERT_NOT_EXIST' => 'The specified convertor does not exist.', + 'CONVERT_OPTIONS' => 'Options', 'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion process, push the button below to begin.', - 'CONV_ERR_FATAL' => 'Fatal conversion error', + 'CONV_ERR_FATAL' => 'Fatal conversion error', 'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.', 'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.', 'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.', 'CONV_ERROR_GET_CATEGORIES' => 'Unable to get categories.', 'CONV_ERROR_GET_CONFIG' => 'Could not retrieve your board configuration.', - 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read "%s".', + 'CONV_ERROR_COULD_NOT_READ' => 'Unable to access/read “%sâ€.', 'CONV_ERROR_GROUP_ACCESS' => 'Unable to get group authentication information.', 'CONV_ERROR_INCONSISTENT_GROUPS' => 'Inconsistency in groups table detected in add_bots() - you need to add all special groups if you do it manually.', 'CONV_ERROR_INSERT_BOT' => 'Unable to insert bot into users table.', @@ -97,7 +103,7 @@ $lang = array_merge($lang, array( '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 board 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_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_path\'] to use %s.', @@ -106,12 +112,12 @@ $lang = array_merge($lang, array( 'CONV_ERROR_REPLACE_CATEGORY' => 'Unable to insert new forum replacing old category.', 'CONV_ERROR_REPLACE_FORUM' => 'Unable to insert new forum replacing old forum.', 'CONV_ERROR_USER_ACCESS' => 'Unable to get user authentication information.', - 'CONV_ERROR_WRONG_GROUP' => 'Wrong group "%1$s" defined in %2$s.', + 'CONV_ERROR_WRONG_GROUP' => 'Wrong group “%1$s†defined in %2$s.', 'CONV_OPTIONS_BODY' => 'This page collects the data required to access the source board. Enter the database details of your former board; the converter will not change anything in the database given below. The source board should be disabled to allow a consistent conversion.', 'CONV_SAVED_MESSAGES' => 'Saved messages', '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 board. Please check your settings and try again.
» Specified source path was %s.', + 'COULD_NOT_FIND_PATH' => 'Could not find path to your former board. Please check your settings and try again.
» %s was specified as the source path.', 'DBMS' => 'Database type', 'DB_CONFIG' => 'Database configuration', @@ -119,7 +125,7 @@ $lang = array_merge($lang, array( 'DB_ERR_INSERT' => 'Error while processing INSERT query.', 'DB_ERR_LAST' => 'Error while processing query_last.', 'DB_ERR_QUERY_FIRST' => 'Error while executing query_first.', - 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first, %s ("%s").', + 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first, %s (“%sâ€).', 'DB_ERR_SELECT' => 'Error while running SELECT query.', 'DB_HOST' => 'Database server hostname or DSN', 'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs.', @@ -160,7 +166,7 @@ $lang = array_merge($lang, array( 'FILES_REQUIRED_EXPLAIN' => 'Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found†you need to create the relevant file or directory. If you see “Unwritable†you need to change the permissions on the file or directory to allow phpBB to write to it.', 'FILLING_TABLE' => 'Filling table %s', 'FILLING_TABLES' => 'Filling tables', - 'FINAL_STEP' => 'Processing final step', + 'FINAL_STEP' => 'Process final step', 'FORUM_ADDRESS' => 'Board address', 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example http://www.example.com/phpBB2/. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.', 'FORUM_PATH' => 'Board path', @@ -266,7 +272,7 @@ $lang = array_merge($lang, array( 'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases

%s', 'NEXT_STEP' => 'Proceed to next step', 'NOT_FOUND' => 'Cannot find', - 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s ("%s")', + 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s (“%sâ€)', 'NO_CONVERTORS' => 'No convertors are available for use.', 'NO_CONVERT_SPECIFIED' => 'No convertor specified.', 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel', @@ -294,7 +300,7 @@ $lang = array_merge($lang, array( '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. Please note that you may have to manually adjust several things. After conversion, especially check the permissions assigned, rebuild your search index if necessary and also make sure files got copied correctly, for example avatars and smilies.', + 'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process. Please note that you may have to manually do and adjust several things. After conversion, especially check the permissions assigned, rebuild your search index which is not converted and also make sure files got copied correctly, for example avatars and smilies.', 'PROCESS_LAST' => 'Processing last statements', 'REFRESH_PAGE' => 'Refresh page to continue conversion', @@ -350,6 +356,7 @@ $lang = array_merge($lang, array( 'UNWRITABLE' => 'Unwritable', 'UPDATE_TOPICS_POSTED' => 'Generating topics posted information', 'UPDATE_TOPICS_POSTED_ERR' => 'An error occured while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.', + 'VERIFY_OPTIONS' => 'Verifying conversion options', 'VERSION' => 'Version', 'WELCOME_INSTALL' => 'Welcome to phpBB3 Installation', @@ -371,8 +378,9 @@ $lang = array_merge($lang, array( '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.', 'CHECK_UPDATE_DATABASE' => 'Continue update process', - 'COLLECTED_INFORMATION' => 'Information on collected files', + 'COLLECTED_INFORMATION' => 'File information', '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.', + 'COLLECTING_FILE_DIFFS' => 'Collecting file differences', 'COMPLETE_LOGIN_TO_BOARD' => 'You should now login to your board and check if everything is working fine. Do not forget to delete, rename or move your install directory!', 'CONTINUE_UPDATE_NOW' => 'Continue the update process now', 'CURRENT_FILE' => 'Current original file', @@ -406,11 +414,11 @@ $lang = array_merge($lang, array( 'FILES_MODIFIED' => 'Modified files', 'FILES_MODIFIED_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. The updated file will be a merge between your modifications and the new file.', 'FILES_NEW' => 'New files', - 'FILES_NEW_EXPLAIN' => 'The following files currently do not exist within your installation.', + 'FILES_NEW_EXPLAIN' => 'The following files currently do not exist within your installation. These files will be added to your installation.', 'FILES_NEW_CONFLICT' => 'New conflicting files', 'FILES_NEW_CONFLICT_EXPLAIN' => 'The following files are new within the latest version but it has been determined that there is already a file with the same name within the same position. This file will be overwritten by the new file.', 'FILES_NOT_MODIFIED' => 'Not modified files', - 'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files were not modified and represent the original phpBB files from the version you want to update from.', + 'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files are not modified and represent the original phpBB files from the version you want to update from.', 'FILES_UP_TO_DATE' => 'Already updated files', 'FILES_UP_TO_DATE_EXPLAIN' => 'The following files are already up to date and do not need to be updated.', 'FTP_SETTINGS' => 'FTP settings', @@ -439,6 +447,8 @@ $lang = array_merge($lang, array( 'MERGE_MOD_FILE_OPTION' => 'Merge differences and use modified code within conflicting block', 'MERGE_NEW_FILE_OPTION' => 'Merge differences and use new file code within conflicting block', 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.', + 'MERGING_FILES' => 'Merging differences', + 'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.

Please wait until phpBB has completed all operations on changed files.', 'NEW_FILE' => 'New updated file', 'NEW_USERNAME' => 'New username', @@ -453,6 +463,7 @@ $lang = array_merge($lang, array( 'NO_VISIBLE_CHANGES' => 'No visible changes', 'NOTICE' => 'Notice', 'NUM_CONFLICTS' => 'Number of conflicts', + 'NUMBER_OF_FILES_COLLECTED' => 'Currently having differences about %1$d from %2$d files collected.
Please wait until file collection finished.', '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.', @@ -488,6 +499,8 @@ $lang = array_merge($lang, array( 'STATUS_NOT_MODIFIED' => 'Not modified file', 'STATUS_UP_TO_DATE' => 'Already updated file', + 'TOGGLE_DISPLAY' => 'View/Hide file list', + 'UPDATE_COMPLETED' => 'Update completed', 'UPDATE_DATABASE' => 'Update database', 'UPDATE_DATABASE_EXPLAIN' => 'Within the next step the database will be updated.', @@ -556,10 +569,10 @@ $lang = array_merge($lang, array( // Default database schema entries... $lang = array_merge($lang, array( 'CONFIG_BOARD_EMAIL_SIG' => 'Thanks, The Management', - 'CONFIG_SITE_DESC' => 'A _little_ text to describe your forum', + 'CONFIG_SITE_DESC' => 'A short text to describe your forum', 'CONFIG_SITENAME' => 'yourdomain.com', - 'DEFAULT_INSTALL_POST' => 'This is an example post in your phpBB3 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', + 'DEFAULT_INSTALL_POST' => 'This is an example post in your phpBB3 installation. Everything seems to be working. You may delete this post if you like and continue to set up your board. During the installation process your first category and your first forum are assigned an appropriate set of permissions for the predefined usergroups administrators, bots, global moderators, guests, registered users and registered COPPA users. If you also choose to delete your first category and your first forum, do not forget to assign permissions for all these usergroups for all new categories and forums you create. It is recommended to rename your first category and your first forum and copy permissions from these while creating new categories and forums. Have fun!', 'EXT_GROUP_ARCHIVES' => 'Archives', 'EXT_GROUP_DOCUMENTS' => 'Documents', @@ -571,9 +584,9 @@ $lang = array_merge($lang, array( 'EXT_GROUP_REAL_MEDIA' => 'Real Media', 'EXT_GROUP_WINDOWS_MEDIA' => 'Windows Media', - 'FORUMS_FIRST_CATEGORY' => 'My first Category', - 'FORUMS_TEST_FORUM_DESC' => 'This is just a test forum.', - 'FORUMS_TEST_FORUM_TITLE' => 'Test Forum 1', + 'FORUMS_FIRST_CATEGORY' => 'Your first category', + 'FORUMS_TEST_FORUM_DESC' => 'Description of your first forum.', + 'FORUMS_TEST_FORUM_TITLE' => 'Your first forum', 'RANKS_SITE_ADMIN_TITLE' => 'Site Admin', 'REPORT_WAREZ' => 'The post contains links to illegal or pirated software.', diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index dc20fd64e8..2f238ffa37 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -224,7 +229,7 @@ $lang = array_merge($lang, array( 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.', 'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.', - 'ONLY_TOPIC' => 'Only topic "%s"', + 'ONLY_TOPIC' => 'Only topic “%sâ€', 'OTHER_USERS' => 'Other users posting from this IP', 'POSTER' => 'Poster', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index c4a392c81d..a278eb1306 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -1,18 +1,23 @@ 'Bold text: [b]text[/b]', 'BBCODE_C_HELP' => 'Code display: [code]code[/code]', 'BBCODE_E_HELP' => 'List: Add list element', - 'BBCODE_F_HELP' => 'Font size: [size=x-small]small text[/size]', + 'BBCODE_F_HELP' => 'Font size: [size=85]small text[/size]', 'BBCODE_IS_OFF' => '%sBBCode%s is OFF', 'BBCODE_IS_ON' => '%sBBCode%s is ON', 'BBCODE_I_HELP' => 'Italic text: [i]text[/i]', @@ -207,6 +212,7 @@ $lang = array_merge($lang, array( 'USER_CANNOT_FORUM_POST' => 'You are not able to do posting operations on this forum due to the forum type not supporting it.', 'VIEW_MESSAGE' => '%sView your submitted message%s', + 'VIEW_PRIVATE_MESSAGE' => '%sView your submitted private message%s', 'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s.', 'WRONG_SIZE' => 'The image must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted image is %5$d pixels wide and %6$d pixels high.', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index 616d1752c5..8e376b2602 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -1,18 +1,23 @@ 'absence', 'abridgement' => 'abridgment', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 7c397535ca..0a553b9366 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -13,6 +13,11 @@ /** * DO NOT CHANGE */ +if (!defined('IN_PHPBB')) +{ + exit; +} + if (empty($lang) || !is_array($lang)) { $lang = array(); @@ -63,6 +68,7 @@ $lang = array_merge($lang, array( 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.', 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.', 'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.', + 'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation e-mail has been sent to the administrators e-mail addresses.', 'ADD' => 'Add', 'ADD_BCC' => 'Add [BCC]', 'ADD_FOES' => 'Add new foes', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index c981c24eb1..546f91587d 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -1,18 +1,23 @@ load('mcp', 'main', 'quickmod'); - exit; + exit_handler(); break; case 'topic_logs': diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index bcacdc9156..e41728a3d0 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -73,7 +73,7 @@ switch ($mode) case 'leaders': // Display a listing of board admins, moderators include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - + $page_title = $user->lang['THE_TEAM']; $template_html = 'memberlist_leaders.html'; @@ -127,7 +127,7 @@ switch ($mode) // Get group memberships for the admin id ary... $admin_memberships = group_memberships($admin_group_id, $admin_id_ary); - + $admin_user_ids = array(); if (!empty($admin_memberships)) @@ -140,7 +140,7 @@ switch ($mode) } unset($admin_memberships); - $sql = 'SELECT forum_id, forum_name + $sql = 'SELECT forum_id, forum_name FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST; $result = $db->sql_query($sql); @@ -268,6 +268,7 @@ switch ($mode) break; case 'contact': + $page_title = $user->lang['IM_USER']; $template_html = 'memberlist_im.html'; @@ -327,36 +328,46 @@ switch ($mode) switch ($action) { case 'jabber': + add_form_key('memberlist_messaging'); + if ($submit && @extension_loaded('xml') && $config['jab_enable']) { - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); - - $subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']); - $message = utf8_normalize_nfc(request_var('message', '', true)); - - if (empty($message)) + if (check_form_key('memberlist_messaging')) { - trigger_error('EMPTY_MESSAGE_IM'); + + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + + $subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']); + $message = utf8_normalize_nfc(request_var('message', '', true)); + + if (empty($message)) + { + trigger_error('EMPTY_MESSAGE_IM'); + } + + $messenger = new messenger(false); + + $messenger->template('profile_send_im', $row['user_lang']); + $messenger->subject(htmlspecialchars_decode($subject)); + + $messenger->replyto($user->data['user_email']); + $messenger->im($row['user_jabber'], $row['username']); + + $messenger->assign_vars(array( + 'BOARD_CONTACT' => $config['board_contact'], + 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']), + 'TO_USERNAME' => htmlspecialchars_decode($row['username']), + 'MESSAGE' => htmlspecialchars_decode($message)) + ); + + $messenger->send(NOTIFY_IM); + + $s_select = 'S_SENT_JABBER'; + } + else + { + trigger_error('FORM_INVALID'); } - - $messenger = new messenger(false); - - $messenger->template('profile_send_im', $row['user_lang']); - $messenger->subject(htmlspecialchars_decode($subject)); - - $messenger->replyto($user->data['user_email']); - $messenger->im($row['user_jabber'], $row['username']); - - $messenger->assign_vars(array( - 'BOARD_CONTACT' => $config['board_contact'], - 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']), - 'TO_USERNAME' => htmlspecialchars_decode($row['username']), - 'MESSAGE' => htmlspecialchars_decode($message)) - ); - - $messenger->send(NOTIFY_IM); - - $s_select = 'S_SENT_JABBER'; } break; } @@ -364,6 +375,11 @@ switch ($mode) // Send vars to the template $template->assign_vars(array( 'IM_CONTACT' => $row[$sql_field], + 'A_IM_CONTACT' => addslashes($row[$sql_field]), + + 'U_AIM_CONTACT' => ($action == 'aim') ? 'aim:addbuddy?screenname=' . urlencode($row[$sql_field]) : '', + 'U_AIM_MESSAGE' => ($action == 'aim') ? 'aim:goim?screenname=' . urlencode($row[$sql_field]) . '&message=' . urlencode($config['sitename']) : '', + 'USERNAME' => $row['username'], 'CONTACT_NAME' => $row[$sql_field], 'SITENAME' => $config['sitename'], @@ -583,7 +599,7 @@ switch ($mode) $inactive_reason = $user->lang['INACTIVE_REASON_REMIND']; break; } - + $template->assign_vars(array( 'S_USER_INACTIVE' => true, 'USER_INACTIVE_REASON' => $inactive_reason) @@ -602,6 +618,8 @@ switch ($mode) $page_title = $user->lang['SEND_EMAIL']; $template_html = 'memberlist_email.html'; + add_form_key('memberlist_email'); + if (!$config['email_enable']) { trigger_error('EMAIL_DISABLED'); @@ -708,6 +726,10 @@ switch ($mode) if ($submit) { + if (!check_form_key('memberlist_email')) + { + $error[] = 'FORM_INVALID'; + } if ($user_id) { if (!$subject) @@ -829,7 +851,7 @@ switch ($mode) $template->assign_vars(array( 'S_SEND_USER' => true, 'USERNAME' => $row['username'], - + 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'], 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $user_id)) ); @@ -895,10 +917,14 @@ switch ($mode) // then only admins can make use of this (for ACP functionality) $sql_select = $sql_where_data = $sql_from = $sql_where = $order_by = ''; + $form = request_var('form', ''); $field = request_var('field', ''); - $select_single = request_var('select_single', false); + $select_single = request_var('select_single', false); + // We validate form and field here, only id/class allowed + $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form; + $field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field; if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_'))) { $username = request_var('username', '', true); @@ -1154,27 +1180,47 @@ switch ($mode) // Build a relevant pagination_url $params = $sort_params = array(); - foreach (array('_POST', '_GET') as $global_var) + + // We do not use request_var() here directly to save some calls (not all variables are set) + $check_params = array( + 'g' => array('g', 0), + 'sk' => array('sk', $default_key), + 'sd' => array('sd', 'a'), + 'form' => array('form', ''), + 'field' => array('field', ''), + 'select_single' => array('select_single', 0), + 'username' => array('username', '', true), + 'email' => array('email', ''), + 'icq' => array('icq', ''), + 'aim' => array('aim', ''), + 'yahoo' => array('yahoo', ''), + 'msn' => array('msn', ''), + 'jabber' => array('jabber', ''), + 'search_group_id' => array('search_group_id', 0), + 'joined_select' => array('joined_select', 'lt'), + 'active_select' => array('active_select', 'lt'), + 'count_select' => array('count_select', 'eq'), + 'joined' => array('joined', ''), + 'active' => array('active', ''), + 'count' => (request_var('count', '') !== '') ? array('count', 0) : array('count', ''), + 'ipdomain' => array('ip', ''), + 'first_char' => array('first_char', ''), + ); + + foreach ($check_params as $key => $call) { - foreach ($$global_var as $key => $var) + if (!isset($_REQUEST[$key])) { - if ($global_var == '_POST') - { - unset($_GET[$key]); - } + continue; + } - if (in_array($key, array('submit', 'start', 'mode', 'char')) || empty($var)) - { - continue; - } + $param = call_user_func_array('request_var', $call); + $param = urlencode($key) . '=' . ((is_string($param)) ? urlencode($param) : $param); + $params[] = $param; - $param = urlencode($key) . '=' . urlencode(htmlspecialchars($var)); - $params[] = $param; - - if (!in_array($key, array('sk', 'sd'))) - { - $sort_params[] = $param; - } + if ($key != 'sk' && $key != 'sd') + { + $sort_params[] = $param; } } @@ -1309,7 +1355,7 @@ switch ($mode) $id_cache[$row['user_id']] = $row; } $db->sql_freeresult($result); - + // Load custom profile fields if ($config['load_cpf_memberlist']) { @@ -1365,7 +1411,7 @@ switch ($mode) unset($id_cache[$user_id]); } } - + // Generate page $template->assign_vars(array( 'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start), @@ -1405,7 +1451,7 @@ switch ($mode) 'S_MODE_SELECT' => $s_sort_key, 'S_ORDER_SELECT' => $s_sort_dir, 'S_CHAR_OPTIONS' => $s_char_options, - 'S_MODE_ACTION' => $pagination_url . "&form=$form") + 'S_MODE_ACTION' => $pagination_url) ); } @@ -1498,6 +1544,8 @@ function show_profile($data) 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']), 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']), + 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])), + '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, 'RANK_IMG' => $rank_img, @@ -1511,9 +1559,9 @@ function show_profile($data) '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'] : '', + 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($data['user_icq']) : '', 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $user_id) : '', - 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $data['user_yim'] . '&.src=pg' : '', + 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&.src=pg' : '', 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $user_id) : '', 'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '', 'LOCATION' => ($data['user_from']) ? $data['user_from'] : '', diff --git a/phpBB/posting.php b/phpBB/posting.php index 71e0dfc2c7..926b542699 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -45,6 +45,7 @@ $mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var $error = $post_data = array(); $current_time = time(); + // Was cancel pressed? If so then redirect to the appropriate page if ($cancel || ($current_time - $lastclick < 2 && $submit)) { @@ -114,7 +115,7 @@ switch ($mode) { upload_popup(); garbage_collection(); - exit; + exit_handler(); } break; @@ -145,7 +146,7 @@ if (!$post_data) if ($mode == 'popup') { upload_popup($post_data['forum_style']); - exit; + exit_handler(); } $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']); @@ -276,7 +277,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id)) if ($mode == 'delete') { handle_post_delete($forum_id, $topic_id, $post_id, $post_data); - exit; + exit_handler(); } // Handle bump mode... @@ -431,7 +432,7 @@ if ($user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ($mode == $sql = 'SELECT draft_id FROM ' . DRAFTS_TABLE . ' WHERE user_id = ' . $user->data['user_id'] . - (($forum_id) ? ' AND forum_id = ' . (int) $forum_id : '') . + (($forum_id) ? ' AND forum_id = ' . (int) $forum_id : '') . (($topic_id) ? ' AND topic_id = ' . (int) $topic_id : '') . (($draft_id) ? " AND draft_id <> $draft_id" : ''); $result = $db->sql_query_limit($sql, 1); @@ -608,10 +609,10 @@ if ($submit || $preview || $refresh) } // Delete Poll - if ($poll_delete && $mode == 'edit' && sizeof($post_data['poll_options']) && + if ($poll_delete && $mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))) { - if ($submit) + if ($submit && check_form_key('posting')) { $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . " WHERE topic_id = $topic_id"; @@ -673,7 +674,7 @@ if ($submit || $preview || $refresh) $message_md5 = md5($message_parser->message); // Check checksum ... don't re-parse message if the same - $update_message = ($mode != 'edit' || $message_md5 != $post_data['post_checksum'] || $status_switch) ? true : false; + $update_message = ($mode != 'edit' || $message_md5 != $post_data['post_checksum'] || $status_switch || strlen($post_data['bbcode_uid']) < BBCODE_UID_LEN) ? true : false; // Parse message if ($update_message) @@ -762,6 +763,12 @@ if ($submit || $preview || $refresh) } } + // check form + if (!check_form_key('posting', false, '', false, 2)) + { + $error[] = $user->lang['FORM_INVALID']; + } + // Parse subject if (!$preview && !$refresh && !utf8_clean_string($post_data['post_subject']) && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))) { @@ -770,7 +777,7 @@ if ($submit || $preview || $refresh) $post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0; - if ($post_data['poll_option_text'] && + if ($post_data['poll_option_text'] && ($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || $auth->acl_get('m_edit', $forum_id))*/)) && $auth->acl_get('f_poll', $forum_id)) { @@ -1180,7 +1187,7 @@ $bbcode_checked = (isset($post_data['enable_bbcode'])) ? !$post_data['enable_bb $smilies_checked = (isset($post_data['enable_smilies'])) ? !$post_data['enable_smilies'] : (($config['allow_smilies']) ? !$user->optionget('smilies') : 1); $urls_checked = (isset($post_data['enable_urls'])) ? !$post_data['enable_urls'] : 0; $sig_checked = $post_data['enable_sig']; -$lock_topic_checked = (isset($topic_lock)) ? $topic_lock : (($post_data['topic_status'] == ITEM_LOCKED) ? 1 : 0); +$lock_topic_checked = (isset($topic_lock) && $topic_lock) ? $topic_lock : (($post_data['topic_status'] == ITEM_LOCKED) ? 1 : 0); $lock_post_checked = (isset($post_lock)) ? $post_lock : $post_data['post_edit_locked']; // If the user is replying or posting and not already watching this topic but set to always being notified we need to overwrite this setting @@ -1262,6 +1269,8 @@ if ($solved_captcha !== false) } $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"'; +add_form_key('posting'); + // Start assigning vars for main posting page ... $template->assign_vars(array( @@ -1289,7 +1298,7 @@ $template->assign_vars(array( 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_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), + 'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&mode=popup")), 'S_PRIVMSGS' => false, 'S_CLOSE_PROGRESS_WINDOW' => (isset($_POST['add_file'])) ? true : false, diff --git a/phpBB/report.php b/phpBB/report.php index 090dee5d0c..03df91135d 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -1,10 +1,10 @@ add_lang('viewtopic'); + // Grab icons $icons = $cache->obtain_icons(); @@ -590,7 +592,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $forums[$row['forum_id']]['rowset'][$row['topic_id']] = &$rowset[$row['topic_id']]; } $db->sql_freeresult($result); - + // If we have some shadow topics, update the rowset to reflect their topic information if (sizeof($shadow_topic_list)) { @@ -742,7 +744,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true))); // Determine first forum the user is able to read (must not be a category) - $sql = 'SELECT forum_id + $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST; diff --git a/phpBB/styles/prosilver/imageset/en/imageset.cfg b/phpBB/styles/prosilver/imageset/en/imageset.cfg index de0200c9de..a23eb170fb 100644 --- a/phpBB/styles/prosilver/imageset/en/imageset.cfg +++ b/phpBB/styles/prosilver/imageset/en/imageset.cfg @@ -23,8 +23,8 @@ img_icon_post_edit = icon_post_edit.gif*20*42 img_icon_post_quote = icon_post_quote.gif*20*54 img_icon_user_online = icon_user_online.gif*58*58 -img_icon_user_offline = icon_user_offline.gif -img_icon_user_search = icon_user_search.gif +img_icon_user_offline = +img_icon_user_search = img_button_pm_forward = button_pm_forward.gif*25*96 img_button_pm_new = button_pm_new.gif*25*84 diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg index 87c6fc3c93..83b5cdb710 100644 --- a/phpBB/styles/prosilver/imageset/imageset.cfg +++ b/phpBB/styles/prosilver/imageset/imageset.cfg @@ -111,6 +111,6 @@ img_icon_topic_newest = icon_topic_newest.gif*9*11 img_icon_topic_reported = icon_topic_reported.gif*14*16 img_icon_topic_unapproved = icon_topic_unapproved.gif*14*16 -img_icon_user_profile = icon_user_profile.gif*11*11 +img_icon_user_profile = img_icon_user_warn = icon_user_warn.gif*20*20 diff --git a/phpBB/styles/prosilver/template/attachment.html b/phpBB/styles/prosilver/template/attachment.html index 9e68274f0b..f48f49efb4 100644 --- a/phpBB/styles/prosilver/template/attachment.html +++ b/phpBB/styles/prosilver/template/attachment.html @@ -93,7 +93,7 @@

- [ {L_PLAY_QUICKTIME_FILE} ] + [ {L_PLAY_QUICKTIME_FILE} ] {_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]

diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html index 5b783915a4..bc61b0a392 100644 --- a/phpBB/styles/prosilver/template/confirm_body.html +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -1,6 +1,7 @@ +{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index 25a5681b70..838569ebf6 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -21,7 +21,7 @@
-
    +
    • diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index dd6c9b2aa1..6694dfb61b 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -5,9 +5,14 @@ /** * Window popup */ -function popup(url, width, height) +function popup(url, width, height, name) { - window.open(url.replace(/&/g, '&'), '_popup', 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width); + if (!name) + { + name = '_popup'; + } + + window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width); return false; } diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index 1214ebb946..95e9304943 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -16,7 +16,8 @@ -

      {L_LOGIN_LOGOUT}  •  {L_REGISTER}

      + {S_FORM_TOKEN} +

      {L_LOGIN_LOGOUT}  •  {L_REGISTER}

      - + {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html index fb82e4168c..415cee547d 100644 --- a/phpBB/styles/prosilver/template/mcp_logs.html +++ b/phpBB/styles/prosilver/template/mcp_logs.html @@ -79,6 +79,7 @@ + {S_FORM_TOKEN}
      diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html index cde4f95257..59c69795d1 100644 --- a/phpBB/styles/prosilver/template/mcp_move.html +++ b/phpBB/styles/prosilver/template/mcp_move.html @@ -30,7 +30,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html index 19b143c521..dda7ff90d3 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_front.html +++ b/phpBB/styles/prosilver/template/mcp_notes_front.html @@ -11,7 +11,7 @@
      -
      {L_FIND_USERNAME}
      +
      {L_FIND_USERNAME}
@@ -22,7 +22,7 @@   - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html index 480ec47b3a..19f2faacbe 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_user.html +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -116,7 +116,7 @@
{L_MARK_ALL}{L_UNMARK_ALL}
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 65798a89a8..5a3ba7f24c 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -33,7 +33,7 @@ - + {S_FORM_TOKEN} @@ -61,7 +61,7 @@

- + {S_FORM_TOKEN} @@ -118,11 +118,11 @@
- [ {L_FIND_USERNAME} ] + [ {L_FIND_USERNAME} ] - + {S_FORM_TOKEN} @@ -139,7 +139,7 @@ - + {S_FORM_TOKEN} @@ -197,7 +197,7 @@   - + {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index 744b46e380..805d7d7e09 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -90,7 +90,7 @@
{L_MARK_ALL} :: {L_UNMARK_ALL}
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index 89c9276f3d..a515c4f7ed 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -79,7 +79,7 @@
{L_MARK_ALL} :: {L_UNMARK_ALL}
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 4b61c469c8..111030914d 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -3,9 +3,9 @@

{L_TOPIC}: {TOPIC_TITLE}

@@ -96,7 +96,7 @@ onload_functions.push('subPanels()');

- {L_EXPAND_VIEW} + {L_EXPAND_VIEW} {L_TOPIC_REVIEW}: {TOPIC_TITLE}

@@ -163,6 +163,8 @@ onload_functions.push('subPanels()');
{L_MARK_ALL} :: {L_UNMARK_ALL}
+{S_HIDDEN_FIELDS} +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html index 862fad9df7..fb02c4e9de 100644 --- a/phpBB/styles/prosilver/template/mcp_viewlogs.html +++ b/phpBB/styles/prosilver/template/mcp_viewlogs.html @@ -38,7 +38,7 @@ - +{S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html index 77eb1d013d..e861136463 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_front.html +++ b/phpBB/styles/prosilver/template/mcp_warn_front.html @@ -13,7 +13,7 @@
-
{L_FIND_USERNAME}
+
{L_FIND_USERNAME}
@@ -24,7 +24,7 @@   - +{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index df922c015e..250d542808 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -60,7 +60,7 @@
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html index f420a10bf6..1fb0ea0a0a 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_post.html +++ b/phpBB/styles/prosilver/template/mcp_warn_post.html @@ -66,7 +66,7 @@   - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html index 2dcb75fbe2..64ed5b0085 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_user.html +++ b/phpBB/styles/prosilver/template/mcp_warn_user.html @@ -50,7 +50,7 @@   - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/mcp_whois.html b/phpBB/styles/prosilver/template/mcp_whois.html index 2bd065996c..5872bd0b91 100644 --- a/phpBB/styles/prosilver/template/mcp_whois.html +++ b/phpBB/styles/prosilver/template/mcp_whois.html @@ -5,7 +5,9 @@

{L_RETURN_POST}

-
{WHOIS}
+
+
{WHOIS}
+

{L_RETURN_POST}

diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index a76ca2229d..6846432b2e 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -120,7 +120,7 @@ - + diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html index cb5bf8d4ea..ce4eec9ad8 100644 --- a/phpBB/styles/prosilver/template/memberlist_email.html +++ b/phpBB/styles/prosilver/template/memberlist_email.html @@ -1,36 +1,8 @@ - -

{L_SEND_EMAIL_USER} {USERNAME}

- +
@@ -86,7 +58,7 @@ function checkForm(formObj)
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 717273baa3..e6174510b7 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -37,18 +37,18 @@
 
-
{L_IM_ADD_CONTACT}
-
{L_IM_SEND_MESSAGE}
-
{L_IM_DOWNLOAD_APP} | {L_IM_AIM_EXPRESS}
+
{L_IM_ADD_CONTACT}
+
{L_IM_SEND_MESSAGE}
+
{L_IM_DOWNLOAD_APP} | {L_IM_AIM_EXPRESS}
 
-
-
{L_IM_ADD_CONTACT}
-
{L_IM_SEND_MESSAGE}
+
+
{L_IM_ADD_CONTACT}
+
{L_IM_SEND_MESSAGE}
@@ -80,7 +80,78 @@ - +{L_CLOSE_WINDOW} +{S_FORM_TOKEN} + + \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 1061d30628..f79f192983 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -1,7 +1,7 @@ @@ -117,5 +117,5 @@ function insert_single(user) - +{S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index dfcf8a7f38..53f516b193 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -60,11 +60,11 @@
{L_WEBSITE}:
{U_WWW}
{L_PM}:
{L_SEND_PRIVATE_MESSAGE}
-
{L_MSNM}:
{L_SEND_MSNM_MESSAGE}{USER_MSN}
-
{L_YIM}:
{L_SEND_YIM_MESSAGE}{USER_YIM}
-
{L_AIM}:
{L_SEND_AIM_MESSAGE}{USER_AIM}
-
{L_ICQ}:
{L_SEND_ICQ_MESSAGE}{USER_ICQ}
-
{L_JABBER}:
{L_SEND_JABBER_MESSAGE}
{L_JABBER}:
{USER_JABBER}
+
{L_MSNM}:
{L_SEND_MSNM_MESSAGE}{USER_MSN}
+
{L_YIM}:
{L_SEND_YIM_MESSAGE}{USER_YIM}
+
{L_AIM}:
{L_SEND_AIM_MESSAGE}{USER_AIM}
+
{L_ICQ}:
{L_SEND_ICQ_MESSAGE}{USER_ICQ}
+
{L_JABBER}:
{L_SEND_JABBER_MESSAGE}
{L_JABBER}:
{USER_JABBER}
{postrow.PROFILE_FIELD1_NAME}:
{postrow.PROFILE_FIELD1_VALUE}
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 23dfe073fd..4abe2bb2a4 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -6,12 +6,12 @@
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 202b50fe5d..754f92ab0c 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -27,10 +27,10 @@ @@ -64,7 +64,7 @@
@@ -107,7 +107,7 @@ - diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 8a3e582cb2..6c0f325a13 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -31,13 +31,13 @@
-
{L_FIND_USERNAME}
+
{L_FIND_USERNAME}
-

{L_FIND_USERNAME}
+

{L_FIND_USERNAME}
@@ -114,7 +114,7 @@ -
{L_MORE_SMILIES} +
{L_MORE_SMILIES} @@ -160,7 +160,7 @@
{attach_row.FILENAME}
-   +  
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html index b5c5e7dcfd..754d8a5218 100644 --- a/phpBB/styles/prosilver/template/posting_layout.html +++ b/phpBB/styles/prosilver/template/posting_layout.html @@ -77,13 +77,13 @@ - +{S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html index 5c99d6f5b4..7ea1fb063d 100644 --- a/phpBB/styles/prosilver/template/posting_preview.html +++ b/phpBB/styles/prosilver/template/posting_preview.html @@ -10,7 +10,7 @@
-
checked="checked"/> checked="checked" />
+
checked="checked" /> checked="checked" />
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html index 12f5cd3c77..dd0963baf5 100644 --- a/phpBB/styles/prosilver/template/posting_smilies.html +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -1,10 +1,10 @@ diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html index f3aa5d94d0..ad51e4f264 100644 --- a/phpBB/styles/prosilver/template/posting_topic_review.html +++ b/phpBB/styles/prosilver/template/posting_topic_review.html @@ -1,6 +1,6 @@

- {L_EXPAND_VIEW} + {L_EXPAND_VIEW} {L_TOPIC_REVIEW}: {TOPIC_TITLE}

diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html index d67fe90b98..d7caf00743 100644 --- a/phpBB/styles/prosilver/template/report_body.html +++ b/phpBB/styles/prosilver/template/report_body.html @@ -12,7 +12,7 @@
-
+
@@ -45,6 +45,7 @@
+{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index e2b7312e33..4ac03eb5ca 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -1,5 +1,27 @@ + + @@ -19,7 +41,7 @@ {L_COPPA_NO}  {L_COPPA_YES} -   +   @@ -27,6 +49,7 @@ {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index 165cf86032..a263d50d2b 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -20,9 +20,8 @@
  • -
    {L_FILENAME}
    +
    {L_FILENAME}
    {L_DOWNLOADS}
    -
    {L_FILESIZE}
    {L_POST_TIME}
    {L_MARK}
    @@ -33,10 +32,9 @@
  • -
    {attachrow.FILENAME}
    - {L_TOPIC}: {attachrow.TOPIC_TITLE}
    +
    {attachrow.FILENAME} ({attachrow.SIZE})
    + {L_PM}: {L_TOPIC}: {attachrow.TOPIC_TITLE}
    {attachrow.DOWNLOAD_COUNT}
    -
    {attachrow.SIZE}
    {attachrow.POST_TIME}
    @@ -73,7 +71,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html index ce28ae7c4e..9b5821671a 100644 --- a/phpBB/styles/prosilver/template/ucp_footer.html +++ b/phpBB/styles/prosilver/template/ucp_footer.html @@ -6,6 +6,7 @@ +{S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index 84b9aae8f9..e9c67a0f10 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -12,19 +12,6 @@

    {L_GROUP_DETAILS}

    - -

    {L_WARNING}

    @@ -68,7 +55,7 @@

    {L_GROUP_COLOR_EXPLAIN}
    -
        [ {L_COLOUR_SWATCH} ]
    +
        [ {L_COLOUR_SWATCH} ]
    @@ -191,7 +178,7 @@

    {L_USERNAMES_EXPLAIN}
    -
    {L_FIND_USERNAME}
    +
    {L_FIND_USERNAME}
    @@ -234,7 +221,7 @@
    - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html index b40f6d6b18..b6327a9324 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_membership.html +++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html @@ -158,7 +158,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html index 151a3f04d2..4d008564c4 100644 --- a/phpBB/styles/prosilver/template/ucp_header.html +++ b/phpBB/styles/prosilver/template/ucp_header.html @@ -39,9 +39,9 @@ diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 0011e48c92..8613921907 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -69,7 +69,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html index a7a952fa02..a012df0095 100644 --- a/phpBB/styles/prosilver/template/ucp_main_drafts.html +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -65,6 +65,7 @@ +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index a6fae14507..f2d7ddc6f1 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -84,7 +84,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index 3a32beac95..cadb44e914 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -1,6 +1,6 @@

    - {L_EXPAND_VIEW} + {L_EXPAND_VIEW} {L_MESSAGE_HISTORY}: {HISTORY_TITLE}

    diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html index 18ba5216bf..1063d15857 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_footer.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_footer.html @@ -1,2 +1,2 @@ - +{S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html index 02ffe3cee4..3fe24f04ee 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_options.html +++ b/phpBB/styles/prosilver/template/ucp_pm_options.html @@ -49,7 +49,7 @@ -  [ {L_FIND_USERNAME} ] +  [ {L_FIND_USERNAME} ] {L_NO_GROUPS} @@ -125,7 +125,7 @@ - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_pm_popup.html b/phpBB/styles/prosilver/template/ucp_pm_popup.html index 44012a9b65..325362dc4d 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_popup.html +++ b/phpBB/styles/prosilver/template/ucp_pm_popup.html @@ -1,16 +1,16 @@
    diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index b3d161421c..76608ee8cf 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -28,6 +28,7 @@     + {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 2d76586262..4c244782d8 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -5,10 +5,10 @@
    - +
    - {L_VIEW_PREVIOUS_HISTORY} - {L_VIEW_NEXT_HISTORY} + {L_VIEW_PREVIOUS_HISTORY} + {L_VIEW_NEXT_HISTORY}
    @@ -68,7 +68,7 @@
    {RANK_IMG}
     
    {L_POSTS}: {AUTHOR_POSTS}
    -
    {L_JOINED}: {AUTHOR_JOINED}
    +
    {L_JOINED}: {AUTHOR_JOINED}
    {L_LOCATION}: {AUTHOR_FROM}
    @@ -81,7 +81,7 @@
  • {L_ICQ}
  • {L_YIM}
  • {L_AIM}
  • -
  • {L_JABBER}
  • +
  • {L_JABBER}
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index 6ffe6f69c3..a95bd19260 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -87,7 +87,7 @@

{L_BOARD_DATE_FORMAT_EXPLAIN}
- {S_DATEFORMAT_OPTIONS}
@@ -102,12 +102,13 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html index 87f906d245..cc505f9100 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_post.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html @@ -45,7 +45,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html index b33d6f748b..993a0146e9 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_view.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html @@ -27,7 +27,7 @@
- +
@@ -88,7 +88,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_avatar.html b/phpBB/styles/prosilver/template/ucp_profile_avatar.html index e5a8d59677..ae010a6f28 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_avatar.html +++ b/phpBB/styles/prosilver/template/ucp_profile_avatar.html @@ -13,7 +13,7 @@   - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 2a40bcd53e..0266e22881 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -73,7 +73,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html index a7009ecf23..de41b9c440 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html +++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html @@ -57,7 +57,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html index f1015cc820..c3dc11cd0d 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_signature.html +++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html @@ -45,7 +45,7 @@   - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 3b9d88d550..c8af288885 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -1,7 +1,7 @@
@@ -112,12 +131,12 @@
{S_HIDDEN_FIELDS}   - +
- +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html index 5114e4dec8..e54bac40af 100644 --- a/phpBB/styles/prosilver/template/ucp_remind.html +++ b/phpBB/styles/prosilver/template/ucp_remind.html @@ -8,7 +8,7 @@

{L_SEND_PASSWORD}

-
+
@@ -26,6 +26,7 @@
+{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html index a1d3d5c193..aef7e476e0 100644 --- a/phpBB/styles/prosilver/template/ucp_resend.html +++ b/phpBB/styles/prosilver/template/ucp_resend.html @@ -9,7 +9,7 @@

{L_UCP_RESEND}

-
+
@@ -27,6 +27,7 @@
+{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html index e580e3c1c9..e1e3cd05c7 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_foes.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html @@ -24,7 +24,7 @@

{L_ADD_FOES_EXPLAIN}
-
{L_FIND_USERNAME}
+
{L_FIND_USERNAME}
@@ -35,7 +35,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html index ffd60e3bf1..30af33df1a 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_friends.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html @@ -24,7 +24,7 @@

{L_ADD_FRIENDS_EXPLAIN}
-
{L_FIND_USERNAME}
+
{L_FIND_USERNAME}
@@ -35,7 +35,7 @@ {S_HIDDEN_FIELDS}  - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index f5cc564a8e..d91c05d3f2 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -47,7 +47,7 @@
- diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html index 5baa12aa58..a9c6473727 100644 --- a/phpBB/styles/prosilver/template/viewonline_whois.html +++ b/phpBB/styles/prosilver/template/viewonline_whois.html @@ -5,11 +5,12 @@
-
+
{WHOIS}
-
+
+{L_CLOSE_WINDOW} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 970f2fb1a6..c1a8f3b067 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -40,7 +40,7 @@ - + {S_FORM_TOKEN} {S_HIDDEN_FIELDS} @@ -124,12 +124,12 @@ @@ -205,7 +205,7 @@
  • {L_ICQ}
  • {L_YIM}
  • {L_AIM}
  • -
  • {L_JABBER}
  • +
  • {L_JABBER}
  • @@ -258,6 +258,7 @@
    {S_TOPIC_MOD}
    + {S_FORM_TOKEN} diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html index a7d9731ab2..669c58d547 100644 --- a/phpBB/styles/prosilver/template/viewtopic_print.html +++ b/phpBB/styles/prosilver/template/viewtopic_print.html @@ -11,6 +11,7 @@ + {META} {SITENAME} • {PAGE_TITLE} diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 1d08fb22bf..74707ddaea 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -164,12 +164,12 @@ } *:first-child+html dl.details dd { - margin-right: 15em; + margin-right: 30%; float: none; } * html dl.details dd { - margin-right: 15em; + margin-right: 30%; float: none; } @@ -719,8 +719,4 @@ * tweaks.css */ -* html .rtl #search-box { - margin-left: 35px; - margin-right: 0; -} diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index cda2ed9d07..e8b405fefb 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -996,3 +996,7 @@ a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, inpu input.search { background-image: url("{T_THEME_PATH}/images/icon_textbox_search.gif"); } + +input.disabled { + color: #666666; +} diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 1a015ca882..c3fa42115f 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -275,7 +275,7 @@ span.corners-bottom { } span.corners-bottom span { - background-image: none;; + background-image: none; background-position: 100% 100%; } @@ -459,7 +459,7 @@ dl.details { dl.details dt { float: left; clear: left; - width: 15em; + width: 30%; text-align: right; color: #000000; display: block; @@ -471,6 +471,7 @@ dl.details dd { margin-bottom: 5px; color: #828282; float: left; + width: 65%; } /* Pagination diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 12a53e281c..dfc0a38e37 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -156,7 +156,7 @@ dd.time { } dd.extra { - width: 65px; + width: 12%; line-height: 200%; text-align: center; font-size: 1.1em; @@ -579,7 +579,6 @@ dl.file dd { dl.thumbnail img { padding: 3px; border: 1px solid #666666; - display: block; background-color: #FFF; } diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index 1f48d02dae..a280218e75 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -355,6 +355,11 @@ a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, inpu color: #BCBCBC; } +input.disabled { + font-weight: normal; + color: #666666; +} + /* Topic and forum Search */ .search-box { margin-top: 3px; @@ -371,3 +376,9 @@ input.search { background-position: left 1px; padding-left: 17px; } + +.full { width: 95%; } +.medium { width: 50%;} +.narrow { width: 25%;} +.tiny { width: 10%;} + diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css index 20f3f67a38..6d169f58e0 100644 --- a/phpBB/styles/prosilver/theme/tweaks.css +++ b/phpBB/styles/prosilver/theme/tweaks.css @@ -42,11 +42,23 @@ html>body dd label input { vertical-align: text-bottom; } /* Align checkboxes/ra visibility: hidden; }*/ -.clearfix, #tabs, #minitabs, .post, .navbar, fieldset dl, ul.topiclist dl, ul.linklist, dl.polls { +.clearfix, #tabs, #minitabs, fieldset dl, ul.topiclist dl, dl.polls { height: 1%; overflow: hidden; } +/* viewtopic fix */ +* html .post { + height: 25%; + overflow: hidden; +} + +/* navbar fix */ +* html .clearfix, * html .navbar, ul.linklist { + height: 4%; + overflow: hidden; +} + /* Simple fix so forum and topic lists always have a min-height set, even in IE6 From http://www.dustindiaz.com/min-height-fast-hack */ dl.icon { @@ -56,17 +68,17 @@ dl.icon { } * html #search-box { - margin-right: 35px; + width: 25%; } /* Correctly clear floating for details on profile view */ *:first-child+html dl.details dd { - margin-left: 15em; + margin-left: 30%; float: none; } * html dl.details dd { - margin-left: 15em; + margin-left: 30%; float: none; } diff --git a/phpBB/styles/subsilver2/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html index b8071bec06..c3352be251 100644 --- a/phpBB/styles/subsilver2/template/attachment.html +++ b/phpBB/styles/subsilver2/template/attachment.html @@ -90,7 +90,7 @@
    - [ {L_PLAY_QUICKTIME_FILE} ] + [ {L_PLAY_QUICKTIME_FILE} ]{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ] diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html index e45a5d9383..3958743229 100644 --- a/phpBB/styles/subsilver2/template/index_body.html +++ b/phpBB/styles/subsilver2/template/index_body.html @@ -29,7 +29,7 @@ - + @@ -78,7 +78,7 @@
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.POSTS}{memberrow.POSTS}
    {memberrow.LOCATION}
     
    {memberrow.JOINED}
    {user_row.USERNAME_FULL} {L_IP}: {user_row.USER_IP} » {L_WHOIS} + {user_row.USERNAME_FULL} {L_IP}: {user_row.USER_IP} » {L_WHOIS}
    {user_row.USER_BROWSER}
    {user_row.FORUM_LOCATION} {user_row.LASTUPDATE} {L_WHO_IS_ONLINE} {TOTAL_USERS_ONLINE}
    {RECORD_USERS}

    {LOGGED_IN_USER_LIST}

    {L_ONLINE_EXPLAIN}
    {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})
    {RECORD_USERS}

    {LOGGED_IN_USER_LIST}
    {L_USERNAME}:   {L_PASSWORD}:   {L_LOG_ME_IN}  
    - + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html index 2462914756..d88eb6cb1b 100644 --- a/phpBB/styles/subsilver2/template/login_body.html +++ b/phpBB/styles/subsilver2/template/login_body.html @@ -35,7 +35,7 @@ style="width: 50%; text-align: {S_CONTENT_FLOW_END};">{L_USERNAME}: - +
    {L_REGISTER} @@ -44,7 +44,7 @@ style="width: 50%; text-align: {S_CONTENT_FLOW_END};">{L_PASSWORD}: - +
    {L_FORGOT_PASS}
    {L_RESEND_ACTIVATION} @@ -89,6 +89,7 @@ colspan="2" align="center">{S_HIDDEN_FIELDS} +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html index 0ede67154e..c3d57085df 100644 --- a/phpBB/styles/subsilver2/template/login_forum.html +++ b/phpBB/styles/subsilver2/template/login_forum.html @@ -31,7 +31,7 @@ {S_HIDDEN_FIELDS} - + {S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/mcp_approve.html b/phpBB/styles/subsilver2/template/mcp_approve.html index 22b89cff47..2d2013f05c 100644 --- a/phpBB/styles/subsilver2/template/mcp_approve.html +++ b/phpBB/styles/subsilver2/template/mcp_approve.html @@ -35,6 +35,7 @@ + {S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/mcp_ban.html b/phpBB/styles/subsilver2/template/mcp_ban.html index 389f71c6fc..04f90530c9 100644 --- a/phpBB/styles/subsilver2/template/mcp_ban.html +++ b/phpBB/styles/subsilver2/template/mcp_ban.html @@ -1,24 +1,24 @@
    @@ -44,7 +44,7 @@ {L_BAN_CELL}: -
    [ {L_FIND_USERNAME} ] +
    [ {L_FIND_USERNAME} ] @@ -103,7 +103,7 @@ - +{S_FORM_TOKEN}
    \ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html index cf7fe7fee3..956d253aa6 100644 --- a/phpBB/styles/subsilver2/template/mcp_forum.html +++ b/phpBB/styles/subsilver2/template/mcp_forum.html @@ -73,7 +73,7 @@ - +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_front.html b/phpBB/styles/subsilver2/template/mcp_front.html index e42c29471a..122f5283ae 100644 --- a/phpBB/styles/subsilver2/template/mcp_front.html +++ b/phpBB/styles/subsilver2/template/mcp_front.html @@ -38,7 +38,7 @@
      
    - + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_header.html b/phpBB/styles/subsilver2/template/mcp_header.html index 7db7c31d5b..f107732234 100644 --- a/phpBB/styles/subsilver2/template/mcp_header.html +++ b/phpBB/styles/subsilver2/template/mcp_header.html @@ -37,7 +37,7 @@ - diff --git a/phpBB/styles/subsilver2/template/mcp_jumpbox.html b/phpBB/styles/subsilver2/template/mcp_jumpbox.html index 43b20d236d..14856596f0 100644 --- a/phpBB/styles/subsilver2/template/mcp_jumpbox.html +++ b/phpBB/styles/subsilver2/template/mcp_jumpbox.html @@ -11,8 +11,8 @@ - + diff --git a/phpBB/styles/subsilver2/template/mcp_logs.html b/phpBB/styles/subsilver2/template/mcp_logs.html index e163cf35d0..f7c4a99fc1 100644 --- a/phpBB/styles/subsilver2/template/mcp_logs.html +++ b/phpBB/styles/subsilver2/template/mcp_logs.html @@ -35,7 +35,7 @@
    {l_block1.L_TITLE} + {l_block1.L_TITLE}
    - +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html index 6e2356044f..db7a6e7241 100644 --- a/phpBB/styles/subsilver2/template/mcp_move.html +++ b/phpBB/styles/subsilver2/template/mcp_move.html @@ -29,7 +29,7 @@ - + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_notes_front.html b/phpBB/styles/subsilver2/template/mcp_notes_front.html index 663da412f7..17f389f7f3 100644 --- a/phpBB/styles/subsilver2/template/mcp_notes_front.html +++ b/phpBB/styles/subsilver2/template/mcp_notes_front.html @@ -7,14 +7,14 @@ {L_SELECT_USER} - {L_FIND_USERNAME}:
    [ {L_FIND_USERNAME} ] + {L_FIND_USERNAME}:
    [ {L_FIND_USERNAME} ] - +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_notes_user.html b/phpBB/styles/subsilver2/template/mcp_notes_user.html index 895c0d35e6..80ac96edf2 100644 --- a/phpBB/styles/subsilver2/template/mcp_notes_user.html +++ b/phpBB/styles/subsilver2/template/mcp_notes_user.html @@ -114,7 +114,7 @@ - +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_post.html b/phpBB/styles/subsilver2/template/mcp_post.html index 2c1d464d9a..36f7eefe04 100644 --- a/phpBB/styles/subsilver2/template/mcp_post.html +++ b/phpBB/styles/subsilver2/template/mcp_post.html @@ -33,6 +33,7 @@ + {S_FORM_TOKEN}
    @@ -104,7 +105,7 @@ - +{S_FORM_TOKEN} @@ -126,13 +127,13 @@ {L_CHANGE_POSTER} -

    [ {L_FIND_USERNAME} ]
    +

    [ {L_FIND_USERNAME} ]
    {L_MOD_OPTIONS} -
    +
    {S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html index 65c8adbbc8..4def047e51 100644 --- a/phpBB/styles/subsilver2/template/mcp_queue.html +++ b/phpBB/styles/subsilver2/template/mcp_queue.html @@ -34,7 +34,7 @@    - +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_reports.html b/phpBB/styles/subsilver2/template/mcp_reports.html index 3b746c9932..72b26e8751 100644 --- a/phpBB/styles/subsilver2/template/mcp_reports.html +++ b/phpBB/styles/subsilver2/template/mcp_reports.html @@ -43,7 +43,7 @@
    - +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 9bcd302c9b..2b66c8702a 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -146,7 +146,8 @@  
    - +{S_HIDDEN_FIELDS} +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_viewlogs.html b/phpBB/styles/subsilver2/template/mcp_viewlogs.html index 8f5a0753fb..b6431e4d51 100644 --- a/phpBB/styles/subsilver2/template/mcp_viewlogs.html +++ b/phpBB/styles/subsilver2/template/mcp_viewlogs.html @@ -39,7 +39,7 @@
    - +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/mcp_warn_front.html b/phpBB/styles/subsilver2/template/mcp_warn_front.html index b8322fe669..78673b690e 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_front.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_front.html @@ -7,14 +7,14 @@ - +
    {L_SELECT_USER}
    {L_FIND_USERNAME}:
    [ {L_FIND_USERNAME} ]
    {L_FIND_USERNAME}:
    [ {L_FIND_USERNAME} ]
    - +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_warn_list.html b/phpBB/styles/subsilver2/template/mcp_warn_list.html index 9b1d6c13ac..078bbc0b34 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_list.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_list.html @@ -35,7 +35,7 @@ - +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_warn_post.html b/phpBB/styles/subsilver2/template/mcp_warn_post.html index 957e9416d8..f12b1a4ba8 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_post.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_post.html @@ -51,6 +51,7 @@    +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/mcp_warn_user.html b/phpBB/styles/subsilver2/template/mcp_warn_user.html index 96ad4fb1a6..5e8c350935 100644 --- a/phpBB/styles/subsilver2/template/mcp_warn_user.html +++ b/phpBB/styles/subsilver2/template/mcp_warn_user.html @@ -65,6 +65,7 @@    +{S_FORM_TOKEN}

    diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index cbc25a147f..cb7a7b20c7 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -22,6 +22,7 @@ + {S_FORM_TOKEN} @@ -60,7 +61,7 @@  {memberrow.ROW_NUMBER}  - {memberrow.USERNAME_FULL}{L_SELECT} ] + {memberrow.USERNAME_FULL}{L_SELECT} ]  {memberrow.JOINED}  {memberrow.POSTS} {memberrow.RANK_IMG}{memberrow.RANK_TITLE} @@ -88,6 +89,7 @@ {L_SELECT_SORT_METHOD}:   {L_ORDER}   +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html index 9e74ec5335..976ac1ad89 100644 --- a/phpBB/styles/subsilver2/template/memberlist_email.html +++ b/phpBB/styles/subsilver2/template/memberlist_email.html @@ -1,35 +1,8 @@ - -
    -
    + @@ -82,6 +55,8 @@ function checkForm(formObj)
    + + {S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html index 860bec608d..acbe1fec2f 100644 --- a/phpBB/styles/subsilver2/template/memberlist_im.html +++ b/phpBB/styles/subsilver2/template/memberlist_im.html @@ -19,7 +19,7 @@ -
    {L_IM_ADD_CONTACT}
    {L_IM_SEND_MESSAGE}

    {L_IM_DOWNLOAD_APP} | {L_IM_AIM_EXPRESS} +
    {L_IM_ADD_CONTACT}
    {L_IM_SEND_MESSAGE}

    {L_IM_DOWNLOAD_APP} | {L_IM_AIM_EXPRESS}   @@ -31,60 +31,59 @@ - {L_IM_ADD_CONTACT}
    {L_IM_SEND_MESSAGE} + {L_IM_ADD_CONTACT}
    {L_IM_SEND_MESSAGE} @@ -132,6 +131,9 @@ + {L_CLOSE_WINDOW} +{S_FORM_TOKEN} + \ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html index 4d943e348d..f718c568ca 100644 --- a/phpBB/styles/subsilver2/template/memberlist_search.html +++ b/phpBB/styles/subsilver2/template/memberlist_search.html @@ -2,7 +2,7 @@ @@ -133,7 +133,7 @@    - +{S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 98536a5265..cb7346dacf 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -108,23 +108,23 @@ {L_MSNM}: - {MSN_IMG}{USER_MSN} + {MSN_IMG}{USER_MSN} {L_YIM}: - {YIM_IMG}{USER_YIM} + {YIM_IMG}{USER_YIM} {L_AIM}: - {AIM_IMG}{USER_AIM} + {AIM_IMG}{USER_AIM} {L_ICQ}: - {ICQ_IMG}{USER_ICQ} + {ICQ_IMG}{USER_ICQ} {L_JABBER}: - {JABBER_IMG}{USER_JABBER_IMG} + {JABBER_IMG}{USER_JABBER_IMG} diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 4cdd0c993e..3603d8a3e2 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -17,17 +17,22 @@ diff --git a/phpBB/styles/subsilver2/template/posting_attach_body.html b/phpBB/styles/subsilver2/template/posting_attach_body.html index e9de2e7516..8c70e4c831 100644 --- a/phpBB/styles/subsilver2/template/posting_attach_body.html +++ b/phpBB/styles/subsilver2/template/posting_attach_body.html @@ -1,23 +1,24 @@ diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 744fcb4189..a1cd573768 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -192,7 +192,7 @@ - {L_MORE_SMILIES} + {L_MORE_SMILIES} @@ -201,11 +201,10 @@ @@ -215,9 +214,9 @@ @@ -398,7 +397,7 @@ - + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index 61b5bd9da0..b57a273e25 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -1,7 +1,7 @@
    diff --git a/phpBB/styles/subsilver2/template/posting_progress_bar.html b/phpBB/styles/subsilver2/template/posting_progress_bar.html index 9a7daede6d..f9decc506b 100644 --- a/phpBB/styles/subsilver2/template/posting_progress_bar.html +++ b/phpBB/styles/subsilver2/template/posting_progress_bar.html @@ -1,6 +1,6 @@ @@ -37,8 +37,8 @@
    diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html index 01564c9694..a6f35bf2b7 100644 --- a/phpBB/styles/subsilver2/template/posting_smilies.html +++ b/phpBB/styles/subsilver2/template/posting_smilies.html @@ -1,11 +1,10 @@ diff --git a/phpBB/styles/subsilver2/template/report_body.html b/phpBB/styles/subsilver2/template/report_body.html index 83e33b4761..6861d28ce1 100644 --- a/phpBB/styles/subsilver2/template/report_body.html +++ b/phpBB/styles/subsilver2/template/report_body.html @@ -29,6 +29,7 @@
     
    +{S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html index 82cb691c10..e66bfd9f1e 100644 --- a/phpBB/styles/subsilver2/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -61,10 +61,6 @@ {recentsearch.KEYWORDS} {recentsearch.TIME} - - - {L_NO_RECENT_SEARCHES} - diff --git a/phpBB/styles/subsilver2/template/ucp_agreement.html b/phpBB/styles/subsilver2/template/ucp_agreement.html index d01a040a7a..04d978c70e 100644 --- a/phpBB/styles/subsilver2/template/ucp_agreement.html +++ b/phpBB/styles/subsilver2/template/ucp_agreement.html @@ -1,5 +1,31 @@ + +
    @@ -18,7 +44,7 @@
    {L_TERMS_OF_USE}

    -

    +

    @@ -29,6 +55,7 @@ {S_HIDDEN_FIELDS} + {S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html index a6d1dec7a7..e7b84390c7 100644 --- a/phpBB/styles/subsilver2/template/ucp_footer.html +++ b/phpBB/styles/subsilver2/template/ucp_footer.html @@ -1,8 +1,8 @@ - + {S_FORM_TOKEN} - +{S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/ucp_groups_manage.html b/phpBB/styles/subsilver2/template/ucp_groups_manage.html index bce8546920..4a3296d153 100644 --- a/phpBB/styles/subsilver2/template/ucp_groups_manage.html +++ b/phpBB/styles/subsilver2/template/ucp_groups_manage.html @@ -2,19 +2,6 @@ - -

    {L_WARNING}

    @@ -62,7 +49,7 @@
    {L_GROUP_COLOR_EXPLAIN} -   [ {L_COLOUR_SWATCH} ] +   [ {L_COLOUR_SWATCH} ] @@ -216,7 +203,7 @@
    {L_USERNAMES_EXPLAIN} -
    [ {L_FIND_USERNAME} ] +
    [ {L_FIND_USERNAME} ] diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html index d4dafbb71b..d330918270 100644 --- a/phpBB/styles/subsilver2/template/ucp_header.html +++ b/phpBB/styles/subsilver2/template/ucp_header.html @@ -15,7 +15,7 @@ - {L_USERNAME}:
    [ {L_FIND_USERNAME} ] + {L_USERNAME}:
    [ {L_FIND_USERNAME} ] @@ -27,7 +27,7 @@
    - [ {L_FIND_USERNAME} ] + [ {L_FIND_USERNAME} ] @@ -86,7 +86,7 @@ - {l_block1.L_TITLE} + {l_block1.L_TITLE} diff --git a/phpBB/styles/subsilver2/template/ucp_main_drafts.html b/phpBB/styles/subsilver2/template/ucp_main_drafts.html index a8611684b3..14ae52be53 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_drafts.html +++ b/phpBB/styles/subsilver2/template/ucp_main_drafts.html @@ -61,12 +61,11 @@ {L_MESSAGE}:
    {L_EDIT_DRAFT_EXPLAIN} + // ]]> + @@ -78,9 +77,9 @@ diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html index b65ab40129..36965bff5f 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html @@ -1,5 +1,6 @@ + {S_FORM_TOKEN} @@ -24,11 +25,14 @@   + {S_FORM_TOKEN} + {S_FORM_TOKEN} {L_DISPLAY_MESSAGES}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_header.html b/phpBB/styles/subsilver2/template/ucp_pm_message_header.html index 0bbf658600..370fa673dd 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_message_header.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_message_header.html @@ -21,7 +21,7 @@ - {L_VIEW_PREVIOUS_HISTORY} | {L_VIEW_NEXT_HISTORY} | + {L_VIEW_PREVIOUS_HISTORY} | {L_VIEW_NEXT_HISTORY} | {L_VIEW_PREVIOUS_PM} | {L_VIEW_NEXT_PM}  diff --git a/phpBB/styles/subsilver2/template/ucp_pm_options.html b/phpBB/styles/subsilver2/template/ucp_pm_options.html index fe0d8ce199..3ff18d8c15 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_options.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_options.html @@ -42,7 +42,7 @@ -  [ {L_FIND_USERNAME} ] +  [ {L_FIND_USERNAME} ]{L_NO_GROUPS} @@ -187,5 +187,6 @@
    +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/ucp_pm_popup.html b/phpBB/styles/subsilver2/template/ucp_pm_popup.html index ee49eb2a6b..68816b88a8 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_popup.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_popup.html @@ -1,16 +1,16 @@ diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html index 57c05afcc7..36998f18c1 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html @@ -33,6 +33,7 @@
      
    + {S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html index 321bc28a40..b3387681bc 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html @@ -93,7 +93,7 @@ - +
    {INFO_IMG} {DELETE_IMG} {DELETE_IMG}
    @@ -104,7 +104,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index 3dd6e3cfb4..e2266b7d38 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -1,7 +1,7 @@ @@ -82,7 +84,7 @@
    {L_BOARD_DATE_FORMAT}:
    {L_BOARD_DATE_FORMAT_EXPLAIN}
    - {S_DATEFORMAT_OPTIONS}
    style="display:none;">
    diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html index ff0bfe5749..26b0804df1 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html @@ -18,10 +18,10 @@
    @@ -36,9 +36,9 @@ diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html index cfcca28e70..159c663915 100644 --- a/phpBB/styles/subsilver2/template/ucp_register.html +++ b/phpBB/styles/subsilver2/template/ucp_register.html @@ -1,7 +1,7 @@ @@ -22,7 +43,7 @@ - + @@ -102,10 +123,10 @@ - +
    {ERROR}{ERROR}
    {S_HIDDEN_FIELDS}  {S_HIDDEN_FIELDS}  
    - +{S_FORM_TOKEN} \ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/ucp_remind.html b/phpBB/styles/subsilver2/template/ucp_remind.html index cf724c3f42..b14fbe8305 100644 --- a/phpBB/styles/subsilver2/template/ucp_remind.html +++ b/phpBB/styles/subsilver2/template/ucp_remind.html @@ -20,7 +20,7 @@
    {S_HIDDEN_FIELDS}  
    - +{S_FORM_TOKEN}
    diff --git a/phpBB/styles/subsilver2/template/ucp_resend.html b/phpBB/styles/subsilver2/template/ucp_resend.html index 08b6c6c22a..d9881ce679 100644 --- a/phpBB/styles/subsilver2/template/ucp_resend.html +++ b/phpBB/styles/subsilver2/template/ucp_resend.html @@ -20,6 +20,7 @@ {S_HIDDEN_FIELDS}   +{S_FORM_TOKEN} diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_foes.html b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html index 406be35658..3de5737b53 100644 --- a/phpBB/styles/subsilver2/template/ucp_zebra_foes.html +++ b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html @@ -17,7 +17,7 @@ {L_NO_FOES} - {L_ADD_FOES}:
    {L_ADD_FOES_EXPLAIN} [ {L_FIND_USERNAME} ] + {L_ADD_FOES}:
    {L_ADD_FOES_EXPLAIN} [ {L_FIND_USERNAME} ]
    diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_friends.html b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html index 147e3f070b..2abea04b8f 100644 --- a/phpBB/styles/subsilver2/template/ucp_zebra_friends.html +++ b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html @@ -17,7 +17,7 @@ {L_NO_FRIENDS} - {L_ADD_FRIENDS}:
    {L_ADD_FRIENDS_EXPLAIN} [ {L_FIND_USERNAME} ] + {L_ADD_FRIENDS}:
    {L_ADD_FRIENDS_EXPLAIN} [ {L_FIND_USERNAME} ]
    diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index b4c58834b2..b6c9e8d437 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -148,6 +148,7 @@ +
    @@ -235,6 +236,7 @@
    + diff --git a/phpBB/styles/subsilver2/template/viewonline_body.html b/phpBB/styles/subsilver2/template/viewonline_body.html index ce3b9a77c6..1fcab016b6 100644 --- a/phpBB/styles/subsilver2/template/viewonline_body.html +++ b/phpBB/styles/subsilver2/template/viewonline_body.html @@ -21,7 +21,7 @@ - diff --git a/phpBB/styles/subsilver2/template/viewonline_whois.html b/phpBB/styles/subsilver2/template/viewonline_whois.html index d10fa2ac0f..033d848ac4 100644 --- a/phpBB/styles/subsilver2/template/viewonline_whois.html +++ b/phpBB/styles/subsilver2/template/viewonline_whois.html @@ -5,7 +5,7 @@ - +

    {user_row.USERNAME_FULL}

    {L_IP}: {user_row.USER_IP} » {L_WHOIS}

    +

    {user_row.USERNAME_FULL}

    {L_IP}: {user_row.USER_IP} » {L_WHOIS}

    {user_row.USER_BROWSER}

     {user_row.LASTUPDATE}

    {user_row.FORUM_LOCATION}

    {L_WHOIS}
    {WHOIS}
    {WHOIS}

    {L_CLOSE_WINDOW}
    diff --git a/phpBB/ucp.php b/phpBB/ucp.php index 0df248dd2d..1d182a713a 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -1,10 +1,10 @@ load('ucp', 'confirm'); - exit; + exit_handler(); break; case 'login': diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index db6b1118e3..46a5ccf5e7 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -1,10 +1,10 @@ acl_get('a_') && $session_id) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); @@ -64,14 +64,7 @@ if ($mode == 'whois') if ($row = $db->sql_fetchrow($result)) { - $whois = user_ipwhois($row['session_ip']); - - $whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1\2\3', $whois); - $whois = preg_replace('#(\s)(http:/{2}[^\s]*)(\s)#', '\1\2\3', $whois); - - $template->assign_vars(array( - 'WHOIS' => trim($whois)) - ); + $template->assign_var('WHOIS', user_ipwhois($row['session_ip'])); } $db->sql_freeresult($result); @@ -113,7 +106,7 @@ if (!$show_guests) FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = ' . ANONYMOUS . ' AND session_time >= ' . (time() - ($config['load_online_time'] * 60)) . - ')'; + ')'; break; default: @@ -132,7 +125,7 @@ if (!$show_guests) $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s WHERE u.user_id = s.session_user_id - AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . + AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) . ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . ' ORDER BY ' . $order_by; $result = $db->sql_query($sql); @@ -250,7 +243,7 @@ while ($row = $db->sql_fetchrow($result)) case 'viewtopic': $location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']); break; - + case 'viewforum': $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']); break; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 0aa06721eb..9d2a6b61c0 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1,10 +1,10 @@ sql_fetchrow($result)) 'www' => $row['user_website'], 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', - 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg' : '', + 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '', 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? 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') : '', ); @@ -1090,7 +1090,6 @@ while ($row = $db->sql_fetchrow($result)) } } $db->sql_freeresult($result); -unset($today); // Load custom profile fields if ($config['load_cpf_viewtopic'])