diff --git a/.travis.yml b/.travis.yml index 82f7d27e35..0ddd98b5d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: - - 5.3.2 + - 5.3.3 + - 5.3 - 5.4 env: @@ -8,14 +9,13 @@ env: - DB=postgres before_script: - - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" - - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" + - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" + - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi" + - pyrus install --force phpunit/DbUnit - phpenv rehash - cd phpBB - - curl -s http://getcomposer.org/installer | php - - php composer.phar install + - php ../composer.phar install --dev - cd ../ script: diff --git a/README.md b/README.md index a7feb8db40..1fc670422f 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,7 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies. cd phpBB - curl -s http://getcomposer.org/installer | php - php composer.phar install + php ../composer.phar install ## CONTRIBUTE diff --git a/build/build.xml b/build/build.xml index 1646c10a08..1b8d42a660 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ - - - + + + @@ -45,13 +45,7 @@ - - @@ -169,13 +163,7 @@ checkreturn="true" /> - - diff --git a/composer.phar b/composer.phar new file mode 100755 index 0000000000..8b6eddbf21 Binary files /dev/null and b/composer.phar differ diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index 52969670ca..b156d276df 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -12,6 +12,13 @@ # ln -s ../../git-tools/hooks/commit-msg \\ # .git/hooks/commit-msg # +# You can configure whether invalid commit messages abort commits: +# +# git config phpbb.hooks.commit-msg.fatal true (abort) +# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort) +# +# The default is to warn only. +# # Warning/error messages use color by default if the output is a terminal # ("output" here is normally standard error when you run git commit). # To force or disable the use of color: @@ -21,6 +28,15 @@ config_ns="phpbb.hooks.commit-msg"; +if [ "$(git config --bool $config_ns.fatal)" = "true" ] +then + fatal=1; + severity=Error; +else + fatal=0; + severity=Warning; +fi + debug_level=$(git config --int $config_ns.debug || echo 0); # Error codes @@ -47,9 +63,19 @@ debug() quit() { - # Now we always exit with success, since git will trash - # entered commit message if commit-msg hook exits with a failure. - exit 0 + if [ $1 -eq 0 ] || [ $1 -eq $ERR_UNKNOWN ] + then + # success + exit 0; + elif [ $fatal -eq 0 ] + then + # problems found but fatal is false + complain 'Please run `git commit --amend` and fix the problems mentioned.' 1>&2 + exit 0; + else + complain "Aborting commit." 1>&2 + exit $1; + fi } use_color() @@ -170,7 +196,7 @@ do # Don't be too strict. # Commits may be temporary, intended to be squashed later. # Just issue a warning here. - complain "Warning: heading should be a sentence beginning with a capital letter." 1>&2 + complain "$severity: heading should be a sentence beginning with a capital letter." 1>&2 complain "You entered:" 1>&2 complain "$line" 1>&2 fi diff --git a/phpBB/adm/images/phpbb_logo.gif b/phpBB/adm/images/phpbb_logo.gif deleted file mode 100644 index 239993182b..0000000000 Binary files a/phpBB/adm/images/phpbb_logo.gif and /dev/null differ diff --git a/phpBB/adm/images/phpbb_logo.png b/phpBB/adm/images/phpbb_logo.png new file mode 100644 index 0000000000..c3f9248ed7 Binary files /dev/null and b/phpBB/adm/images/phpbb_logo.png differ diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 91894e5aec..e20bbe4bec 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -51,8 +51,8 @@ $module_id = request_var('i', ''); $mode = request_var('mode', ''); // Set custom style for admin area -$style->set_ext_dir_prefix('adm/'); -$style->set_custom_style('admin', $phpbb_admin_path . 'style', ''); +$phpbb_style->set_ext_dir_prefix('adm/'); +$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', ''); $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets'); $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index c2f8b34792..bdec9eb3cb 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -378,11 +378,17 @@
{L_TITLE} - + + {L_NUMBER_FILES}: {TOTAL_FILES} • {L_TOTAL_SIZE}: {TOTAL_SIZE} + + • + + + {S_ON_PAGE} + + diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index ed94fa985e..6e52880131 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -239,11 +239,11 @@
- + + +
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index a8864d42f7..b9af20d5a2 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -255,7 +255,11 @@ -
{PAGINATION}
+

   

diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html index 0889eaf400..ad5871f291 100644 --- a/phpBB/adm/style/acp_inactive.html +++ b/phpBB/adm/style/acp_inactive.html @@ -10,11 +10,11 @@
- + + + diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index f1c770d33b..16638a5a72 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -12,11 +12,11 @@ {L_SEARCH_KEYWORDS}:   - + + +
 

diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index a8794176a9..837629255b 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -157,11 +157,11 @@ - + + +
@@ -196,11 +196,11 @@
- + + +
diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html index aa92353807..1dad7f1927 100644 --- a/phpBB/adm/style/acp_users_feedback.html +++ b/phpBB/adm/style/acp_users_feedback.html @@ -1,10 +1,10 @@ - + + +
@@ -44,11 +44,11 @@
- + + +
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index 1f10e7f66e..ffdb4d472c 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -131,19 +131,24 @@ -
-
- {L_DELETE_USER} -
-

{L_DELETE_USER_EXPLAIN}
-
-
-

- - - {S_FORM_TOKEN} -

-
- +
+
+ {L_DELETE_USER} +
+

{L_DELETE_USER_EXPLAIN}
+
+ +
+ + {L_USER_NO_POSTS_TO_DELETE} + +
+

+ + + {S_FORM_TOKEN} +

+
+ diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html index a519447b2f..9439f0cf03 100644 --- a/phpBB/adm/style/acp_users_prefs.html +++ b/phpBB/adm/style/acp_users_prefs.html @@ -52,15 +52,7 @@
-
-
-
-
-
-
-
-
-
+

{L_BOARD_DATE_FORMAT_EXPLAIN}
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 7afcc3d23b..08613de0dd 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1,4 +1,4 @@ -/* phpBB 3.0 Admin Style Sheet +/* phpBB 3.1 Admin Style Sheet ------------------------------------------------------------------------ Original author: subBlue ( http://www.subblue.com/ ) Copyright 2007 phpBB Group ( http://www.phpbb.com/ ) @@ -146,15 +146,15 @@ li { #page-header { clear: both; text-align: right; - background: url("../images/phpbb_logo.gif") top left no-repeat; - height: 49px; + background: url("../images/phpbb_logo.png") top left no-repeat; + height: 54px; font-size: 0.85em; margin-bottom: 10px; } .rtl #page-header { text-align: left; - background: url("../images/phpbb_logo.gif") top right no-repeat; + background: url("../images/phpbb_logo.png") top right no-repeat; } #page-header h1 { diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js index fd2f7a2122..12541cb057 100644 --- a/phpBB/adm/style/ajax.js +++ b/phpBB/adm/style/ajax.js @@ -28,7 +28,8 @@ phpbb.add_ajax_callback('forum_down', function() { phpbb.ajaxify({ selector: el.parents('span').siblings('.up').children('a'), - callback: 'forum_up' + callback: 'forum_up', + overlay: false }); } @@ -43,7 +44,8 @@ phpbb.add_ajax_callback('forum_down', function() { phpbb.ajaxify({ selector: tr.prev().find('.down').children('a'), - callback: 'forum_down' + callback: 'forum_down', + overlay: false }); } }); @@ -61,7 +63,8 @@ phpbb.add_ajax_callback('forum_up', function() { phpbb.ajaxify({ selector: el.parents('span').siblings('.down').children('a'), - callback: 'forum_down' + callback: 'forum_down', + overlay: false }); } @@ -76,7 +79,8 @@ phpbb.add_ajax_callback('forum_up', function() { phpbb.ajaxify({ selector: tr.next().find('.up').children('a'), - callback: 'forum_up' + callback: 'forum_up', + overlay: false }); } }); diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index 39c73d5652..b5d25e82f2 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -11,12 +11,12 @@ // - - + + {SCRIPTS} diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index be5ac29131..f79c0318b5 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -5,7 +5,7 @@ {META} {PAGE_TITLE} - + - + diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index 84ff665acc..d4cbcb6cbe 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -5,7 +5,7 @@ {META} {PAGE_TITLE} - + '; diff --git a/phpBB/includes/ucp/info/ucp_profile.php b/phpBB/includes/ucp/info/ucp_profile.php index 09c0318de9..968538a178 100644 --- a/phpBB/includes/ucp/info/ucp_profile.php +++ b/phpBB/includes/ucp/info/ucp_profile.php @@ -23,6 +23,7 @@ class ucp_profile_info 'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => '', 'cat' => array('UCP_PROFILE')), 'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => 'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)', 'cat' => array('UCP_PROFILE')), 'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')), + 'autologin_keys'=> array('title' => 'UCP_PROFILE_AUTOLOGIN_KEYS', 'auth' => '', 'cat' => array('UCP_PROFILE')), ), ); } diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index 836185f105..e4c351709b 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -170,9 +170,11 @@ class ucp_attachments } $db->sql_freeresult($result); + $base_url = $this->u_action . "&sk=$sort_key&sd=$sort_dir"; + phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start); + $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), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start), 'TOTAL_ATTACHMENTS' => $num_attachments, 'L_TITLE' => $user->lang['UCP_ATTACHMENTS'], diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index a7c6479759..aa9510b63b 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -844,11 +844,13 @@ class ucp_groups $s_action_options .= ''; } + $base_url = $this->u_action . "&action=$action&g=$group_id"; + phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start); + $template->assign_vars(array( 'S_LIST' => true, 'S_ACTION_OPTIONS' => $s_action_options, - 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start), + 'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $total_members, $config['topics_per_page'], $start), 'U_ACTION' => $this->u_action . "&g=$group_id", 'S_UCP_ACTION' => $this->u_action . "&g=$group_id", diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 00b7b55f27..f21ea2471b 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -670,9 +670,10 @@ class ucp_main if ($topics_count) { + phpbb_generate_template_pagination($template, $this->u_action, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start); + $template->assign_vars(array( - 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $this->u_action, $topics_count, $config['topics_per_page'], $start), 'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $topics_count), )); } @@ -813,7 +814,6 @@ class ucp_main 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, - 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id")), 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), @@ -837,6 +837,8 @@ class ucp_main 'U_VIEW_TOPIC' => $view_topic_url, 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), )); + + phpbb_generate_template_pagination($template, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); } } } diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index bde5d1dfcf..bf7334b307 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -327,10 +327,23 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit trigger_error('RULE_ALREADY_DEFINED'); } + // Prevent users from flooding the rules table + $sql = 'SELECT COUNT(rule_id) AS num_rules + FROM ' . PRIVMSGS_RULES_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id']; + $result = $db->sql_query($sql); + $num_rules = (int) $db->sql_fetchfield('num_rules'); + $db->sql_freeresult($result); + + if ($num_rules >= 5000) + { + trigger_error('RULE_LIMIT_REACHED'); + } + $sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary); $db->sql_query($sql); - // Update users message rules + // Set the user_message_rules bit $sql = 'UPDATE ' . USERS_TABLE . ' SET user_message_rules = 1 WHERE user_id = ' . $user->data['user_id']; @@ -377,7 +390,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - // Update users message rules + // Unset the user_message_rules bit if (!$row) { $sql = 'UPDATE ' . USERS_TABLE . ' diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 8b1cd419f4..dc77587452 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -451,9 +451,11 @@ function get_pm_from($folder_id, $folder, $user_id) $sql_limit_time = ''; } + $base_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=view&action=view_folder&f=$folder_id&$u_sort_param"); + phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $pm_count, $config['topics_per_page'], $start); + $template->assign_vars(array( - 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=view&action=view_folder&f=$folder_id&$u_sort_param"), $pm_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($pm_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $pm_count, $config['topics_per_page'], $start), 'TOTAL_MESSAGES' => $user->lang('VIEW_PM_MESSAGES', (int) $pm_count), 'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'), diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 0c9f20f266..2228bc7931 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -41,9 +41,8 @@ class ucp_prefs 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), 'lang' => basename(request_var('lang', $user->data['user_lang'])), 'style' => request_var('style', (int) $user->data['user_style']), - 'tz' => request_var('tz', (float) $user->data['user_timezone']), + 'tz' => request_var('tz', $user->data['user_timezone']), - 'dst' => request_var('dst', (bool) $user->data['user_dst']), 'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']), 'massemail' => request_var('massemail', (bool) $user->data['user_allow_massemail']), 'hideonline' => request_var('hideonline', (bool) !$user->data['user_allow_viewonline']), @@ -72,7 +71,7 @@ class ucp_prefs $error = validate_data($data, array( 'dateformat' => array('string', false, 1, 30), 'lang' => array('language_iso_name'), - 'tz' => array('num', false, -14, 14), + 'tz' => array('timezone'), )); if (!check_form_key('ucp_prefs_personal')) @@ -93,7 +92,6 @@ class ucp_prefs 'user_notify_pm' => $data['notifypm'], 'user_options' => $user->data['user_options'], - 'user_dst' => $data['dst'], 'user_dateformat' => $data['dateformat'], 'user_lang' => $data['lang'], 'user_timezone' => $data['tz'], @@ -133,6 +131,7 @@ class ucp_prefs } $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . ''; + $timezone_selects = phpbb_timezone_select($user, $data['tz'], true); $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', @@ -145,7 +144,6 @@ class ucp_prefs 'S_HIDE_ONLINE' => $data['hideonline'], 'S_NOTIFY_PM' => $data['notifypm'], 'S_POPUP_PM' => $data['popuppm'], - 'S_DST' => $data['dst'], 'DATE_FORMAT' => $data['dateformat'], 'A_DATE_FORMAT' => addslashes($data['dateformat']), @@ -156,7 +154,8 @@ class ucp_prefs 'S_LANG_OPTIONS' => language_select($data['lang']), 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']), - 'S_TZ_OPTIONS' => tz_select($data['tz'], true), + 'S_TZ_OPTIONS' => $timezone_selects['tz_select'], + 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'], 'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false, 'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false) ); diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 9d81503f0a..2ac82fb52f 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -618,6 +618,60 @@ class ucp_profile } break; + + case 'autologin_keys': + + add_form_key('ucp_autologin_keys'); + + if ($submit) + { + $keys = request_var('keys', array('')); + + if (!check_form_key('ucp_autologin_keys')) + { + $error[] = 'FORM_INVALID'; + } + + if (!sizeof($error)) + { + if (!empty($keys)) + { + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id'] . ' + AND ' . $db->sql_in_set('key_id', $keys) ; + + $db->sql_query($sql); + + meta_refresh(3, $this->u_action); + $message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + trigger_error($message); + } + } + + // Replace "error" strings with their real, localised form + $error = array_map(array($user, 'lang'), $error); + } + + $sql = 'SELECT key_id, last_ip, last_login + FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id']; + + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $template->assign_block_vars('sessions', array( + 'errors' => $error, + + 'KEY' => $row['key_id'], + 'IP' => $row['last_ip'], + 'LOGIN_TIME' => $user->format_date($row['last_login']), + )); + } + + $db->sql_freeresult($result); + + break; } $template->assign_vars(array( diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 5d85029e62..6ce53a79ab 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -100,7 +100,7 @@ class ucp_register 'username' => utf8_normalize_nfc(request_var('username', '', true)), 'email' => strtolower(request_var('email', '')), 'lang' => $user->lang_name, - 'tz' => request_var('tz', (float) $config['board_timezone']), + 'tz' => request_var('tz', $config['board_timezone']), )); } @@ -120,7 +120,10 @@ class ucp_register if ($coppa === false && $config['coppa_enable']) { $now = getdate(); - $coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']); + $coppa_birthday = $user->create_datetime() + ->setDate($now['year'] - 13, $now['mon'], $now['mday'] - 1) + ->setTime(0, 0, 0) + ->format($user->lang['DATE_FORMAT'], true); unset($now); $template->assign_vars(array( @@ -163,7 +166,6 @@ class ucp_register $captcha->init(CONFIRM_REG); } - $is_dst = $config['board_dst']; $timezone = $config['board_timezone']; $data = array( @@ -172,7 +174,7 @@ class ucp_register 'password_confirm' => request_var('password_confirm', '', true), 'email' => strtolower(request_var('email', '')), 'lang' => basename(request_var('lang', $user->lang_name)), - 'tz' => request_var('tz', (float) $timezone), + 'tz' => request_var('tz', $timezone), ); // Check and initialize some variables if needed @@ -189,7 +191,7 @@ class ucp_register 'email' => array( array('string', false, 6, 60), array('email')), - 'tz' => array('num', false, -14, 14), + 'tz' => array('timezone'), 'lang' => array('language_iso_name'), )); @@ -279,8 +281,7 @@ class ucp_register 'user_password' => phpbb_hash($data['new_password']), 'user_email' => $data['email'], 'group_id' => (int) $group_id, - 'user_timezone' => (float) $data['tz'], - 'user_dst' => $is_dst, + 'user_timezone' => $data['tz'], 'user_lang' => $data['lang'], 'user_type' => $user_type, 'user_actkey' => $user_actkey, @@ -441,6 +442,7 @@ class ucp_register break; } + $timezone_selects = phpbb_timezone_select($user, $data['tz'], true); $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', 'USERNAME' => $data['username'], @@ -453,7 +455,8 @@ class ucp_register 'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])), 'S_LANG_OPTIONS' => language_select($data['lang']), - 'S_TZ_OPTIONS' => tz_select($data['tz']), + 'S_TZ_OPTIONS' => $timezone_selects['tz_select'], + 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'], 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false, 'S_REGISTRATION' => true, 'S_COPPA' => $coppa, diff --git a/phpBB/includes/update_helpers.php b/phpBB/includes/update_helpers.php new file mode 100644 index 0000000000..8e8e9670b0 --- /dev/null +++ b/phpBB/includes/update_helpers.php @@ -0,0 +1,112 @@ +data['user_id'] != ANONYMOUS) { $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']); $this->date_format = $this->data['user_dateformat']; - $this->timezone = $this->data['user_timezone'] * 3600; - $this->dst = $this->data['user_dst'] * 3600; + $user_timezone = $this->data['user_timezone']; } else { $this->lang_name = basename($config['default_lang']); $this->date_format = $config['default_dateformat']; - $this->timezone = $config['board_timezone'] * 3600; - $this->dst = $config['board_dst'] * 3600; + $user_timezone = $config['board_timezone']; /** * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language @@ -126,6 +127,16 @@ class phpbb_user extends phpbb_session */ } + try + { + $this->timezone = new DateTimeZone($user_timezone); + } + catch (Exception $e) + { + // If the timezone the user has selected is invalid, we fall back to UTC. + $this->timezone = new DateTimeZone('UTC'); + } + // We include common language file here to not load it every time a custom language file is included $lang = &$this->lang; @@ -159,11 +170,11 @@ class phpbb_user extends phpbb_session FROM ' . STYLES_TABLE . " s WHERE s.style_id = $style_id"; $result = $db->sql_query($sql, 3600); - $this->theme = $db->sql_fetchrow($result); + $this->style = $db->sql_fetchrow($result); $db->sql_freeresult($result); // User has wrong style - if (!$this->theme && $style_id == $this->data['user_style']) + if (!$this->style && $style_id == $this->data['user_style']) { $style_id = $this->data['user_style'] = $config['default_style']; @@ -176,20 +187,17 @@ class phpbb_user extends phpbb_session FROM ' . STYLES_TABLE . " s WHERE s.style_id = $style_id"; $result = $db->sql_query($sql, 3600); - $this->theme = $db->sql_fetchrow($result); + $this->style = $db->sql_fetchrow($result); $db->sql_freeresult($result); } - if (!$this->theme) + if (!$this->style) { trigger_error('Could not get style data', E_USER_ERROR); } // Now parse the cfg file and cache it - $parsed_items = $cache->obtain_cfg_items($this->theme); - - // We are only interested in the theme configuration for now - $parsed_items = $parsed_items['theme']; + $parsed_items = $cache->obtain_cfg_items($this->style); $check_for = array( 'pagination_sep' => (string) ', ' @@ -197,16 +205,16 @@ class phpbb_user extends phpbb_session foreach ($check_for as $key => $default_value) { - $this->theme[$key] = (isset($parsed_items[$key])) ? $parsed_items[$key] : $default_value; - settype($this->theme[$key], gettype($default_value)); + $this->style[$key] = (isset($parsed_items[$key])) ? $parsed_items[$key] : $default_value; + settype($this->style[$key], gettype($default_value)); if (is_string($default_value)) { - $this->theme[$key] = htmlspecialchars($this->theme[$key]); + $this->style[$key] = htmlspecialchars($this->style[$key]); } } - $style->set_style(); + $phpbb_style->set_style(); $this->img_lang = $this->lang_name; @@ -615,70 +623,46 @@ class phpbb_user extends phpbb_session */ function format_date($gmepoch, $format = false, $forcedate = false) { - static $midnight; - static $date_cache; + static $utc; - $format = (!$format) ? $this->date_format : $format; - $now = time(); - $delta = $now - $gmepoch; - - if (!isset($date_cache[$format])) + if (!isset($utc)) { - // Is the user requesting a friendly date format (i.e. 'Today 12:42')? - $date_cache[$format] = array( - 'is_short' => strpos($format, '|'), - 'format_short' => substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1), - 'format_long' => str_replace('|', '', $format), - 'lang' => $this->lang['datetime'], - ); - - // Short representation of month in format? Some languages use different terms for the long and short format of May - if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false)) - { - $date_cache[$format]['lang']['May'] = $this->lang['datetime']['May_short']; - } + $utc = new DateTimeZone('UTC'); } - // Zone offset - $zone_offset = $this->timezone + $this->dst; + $time = new phpbb_datetime($this, "@$gmepoch", $utc); + $time->setTimezone($this->timezone); - // Show date < 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future - // A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago' - if ($delta < 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO'])) - { - return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60))); - } + return $time->format($format, $forcedate); + } - if (!$midnight) - { - list($d, $m, $y) = explode(' ', gmdate('j n Y', time() + $zone_offset)); - $midnight = gmmktime(0, 0, 0, $m, $d, $y) - $zone_offset; - } + /** + * Create a phpbb_datetime object in the context of the current user + * + * @since 3.1 + * @param string $time String in a format accepted by strtotime(). + * @param DateTimeZone $timezone Time zone of the time. + * @return phpbb_datetime Date time object linked to the current users locale + */ + public function create_datetime($time = 'now', DateTimeZone $timezone = null) + { + $timezone = $timezone ?: $this->timezone; + return new phpbb_datetime($this, $time, $timezone); + } - if ($date_cache[$format]['is_short'] !== false && !$forcedate && !($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800)) - { - $day = false; - - if ($gmepoch > $midnight + 86400) - { - $day = 'TOMORROW'; - } - else if ($gmepoch > $midnight) - { - $day = 'TODAY'; - } - else if ($gmepoch > $midnight - 86400) - { - $day = 'YESTERDAY'; - } - - if ($day !== false) - { - return str_replace('||', $this->lang['datetime'][$day], strtr(@gmdate($date_cache[$format]['format_short'], $gmepoch + $zone_offset), $date_cache[$format]['lang'])); - } - } - - return strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']); + /** + * Get the UNIX timestamp for a datetime in the users timezone, so we can store it in the database. + * + * @param string $format Format of the entered date/time + * @param string $time Date/time with the timezone applied + * @param DateTimeZone $timezone Timezone of the date/time, falls back to timezone of current user + * @return int Returns the unix timestamp + */ + public function get_timestamp_from_format($format, $time, DateTimeZone $timezone = null) + { + $timezone = $timezone ?: $this->timezone; + $date = DateTime::createFromFormat($format, $time, $timezone); + return ($date !== false) ? $date->format('U') : false; } /** diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index 9dc0634e5b..c402e15032 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -1933,7 +1933,7 @@ function utf8_wordwrap($string, $width = 75, $break = "\n", $cut = false) * UTF8-safe basename() function * * basename() has some limitations and is dependent on the locale setting -* according to the PHP manual. Therefore we provide our own locale independant +* according to the PHP manual. Therefore we provide our own locale independent * basename function. * * @param string $filename The filename basename() should be applied to diff --git a/phpBB/index.php b/phpBB/index.php index 9a57105d57..a477a876ad 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -110,11 +110,12 @@ $legend = implode(', ', $legend); $birthday_list = array(); if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) { - $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); + $time = $user->create_datetime(); + $now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset()); // Display birthdays of 29th february on 28th february in non-leap-years $leap_year_birthdays = ''; - if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L')) + if ($now['mday'] == 28 && $now['mon'] == 2 && !$time->format('L')) { $leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'"; } diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index aea6074637..0b6daeef47 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -13,7 +13,7 @@ if (!defined('IN_PHPBB')) } /** -* Helper functions for phpBB 2.0.x to phpBB 3.0.x conversion +* Helper functions for phpBB 2.0.x to phpBB 3.1.x conversion */ /** diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index be39b12d12..6e99fd56a0 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -189,6 +189,12 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); +// Update asset_version +if (isset($config['assets_version'])) +{ + set_config('assets_version', $config['assets_version'] + 1); +} + // phpbb_db_tools will be taken from new files (under install/update/new) // if possible, falling back to the board's copy. $db_tools = new phpbb_db_tools($db, true); @@ -254,7 +260,7 @@ if ($has_global && !$ga_forum_id) array('UINT', NULL, 'auto_increment'), 'attempt_ip' => array('VCHAR:40', ''), @@ -1066,7 +1072,7 @@ function database_update_info() // No changes from 3.0.10 to 3.0.11-RC1 '3.0.10' => array(), - /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.11-RC1 */ + /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.12-RC1 */ // Changes from 3.1.0-dev to 3.1.0-A1 '3.1.0-dev' => array( @@ -1103,21 +1109,10 @@ function database_update_info() GROUPS_TABLE => array( 'group_legend' => array('UINT', 0), ), + USERS_TABLE => array( + 'user_timezone' => array('VCHAR:100', ''), + ), ), - 'drop_columns' => array( - STYLES_TABLE => array( - 'imageset_id', - 'template_id', - 'theme_id', - ), - ), - 'drop_tables' => array( - STYLES_IMAGESET_TABLE, - STYLES_IMAGESET_DATA_TABLE, - STYLES_TEMPLATE_TABLE, - STYLES_TEMPLATE_DATA_TABLE, - STYLES_THEME_TABLE, - ), ), ); } @@ -1129,7 +1124,9 @@ function database_update_info() *****************************************************************************/ function change_database_data(&$no_updates, $version) { - global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx; + global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $db_tools; + + $update_helpers = new phpbb_update_helpers(); switch ($version) { @@ -1976,7 +1973,7 @@ function change_database_data(&$no_updates, $version) 'user_email' => '', 'user_lang' => $config['default_lang'], 'user_style' => $config['default_style'], - 'user_timezone' => 0, + 'user_timezone' => 'UTC', 'user_dateformat' => $config['default_dateformat'], 'user_allow_massemail' => 0, ); @@ -2172,6 +2169,44 @@ function change_database_data(&$no_updates, $version) _sql($sql, $errored, $error_ary); } + // Delete orphan private messages + $batch_size = 500; + + $sql_array = array( + 'SELECT' => 'p.msg_id', + 'FROM' => array( + PRIVMSGS_TABLE => 'p', + ), + 'LEFT_JOIN' => array( + array( + 'FROM' => array(PRIVMSGS_TO_TABLE => 't'), + 'ON' => 'p.msg_id = t.msg_id', + ), + ), + 'WHERE' => 't.user_id IS NULL', + ); + $sql = $db->sql_build_query('SELECT', $sql_array); + + do + { + $result = $db->sql_query_limit($sql, $batch_size); + + $delete_pms = array(); + while ($row = $db->sql_fetchrow($result)) + { + $delete_pms[] = (int) $row['msg_id']; + } + $db->sql_freeresult($result); + + if (!empty($delete_pms)) + { + $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . ' + WHERE ' . $db->sql_in_set('msg_id', $delete_pms); + _sql($sql, $errored, $error_ary); + } + } + while (sizeof($delete_pms) == $batch_size); + $no_updates = false; break; @@ -2215,6 +2250,21 @@ function change_database_data(&$no_updates, $version) set_config('search_type', 'phpbb_search_' . $config['search_type']); } + if (!isset($config['fulltext_postgres_ts_name'])) + { + set_config('fulltext_postgres_ts_name', 'simple'); + } + + if (!isset($config['fulltext_postgres_min_word_len'])) + { + set_config('fulltext_postgres_min_word_len', 4); + } + + if (!isset($config['fulltext_postgres_max_word_len'])) + { + set_config('fulltext_postgres_max_word_len', 254); + } + if (!isset($config['load_jquery_cdn'])) { set_config('load_jquery_cdn', 0); @@ -2306,13 +2356,6 @@ function change_database_data(&$no_updates, $version) 'auth' => 'acl_a_styles', 'cat' => 'ACP_STYLE_MANAGEMENT', ), - 'edit' => array( - 'base' => 'acp_styles', - 'class' => 'acp', - 'title' => 'ACP_STYLES_EDIT', - 'auth' => 'acl_a_styles', - 'cat' => 'ACP_STYLE_MANAGEMENT', - ), 'cache' => array( 'base' => 'acp_styles', 'class' => 'acp', @@ -2320,12 +2363,19 @@ function change_database_data(&$no_updates, $version) 'auth' => 'acl_a_styles', 'cat' => 'ACP_STYLE_MANAGEMENT', ), + 'autologin_keys' => array( + 'base' => 'ucp_profile', + 'class' => 'ucp', + 'title' => 'UCP_PROFILE_AUTOLOGIN_KEYS', + 'auth' => '', + 'cat' => 'UCP_PROFILE', + ), ); _add_modules($modules_to_install); $sql = 'DELETE FROM ' . MODULES_TABLE . " - WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')"; + WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')"; _sql($sql, $errored, $error_ary); // Localise Global Announcements @@ -2415,15 +2465,179 @@ function change_database_data(&$no_updates, $version) { set_config('teampage_memberships', '1'); } - - // Clear styles table and add prosilver entry - _sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary); - $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '')"; - _sql($sql, $errored, $error_ary); + // Check if styles table was already updated + if ($db_tools->sql_table_exists(STYLES_THEME_TABLE)) + { + // Get list of valid 3.1 styles + $available_styles = array('prosilver'); + + $iterator = new DirectoryIterator($phpbb_root_path . 'styles'); + $skip_dirs = array('.', '..', 'prosilver'); + foreach ($iterator as $fileinfo) + { + if ($fileinfo->isDir() && !in_array($fileinfo->getFilename(), $skip_dirs) && file_exists($fileinfo->getPathname() . '/style.cfg')) + { + $style_cfg = parse_cfg_file($fileinfo->getPathname() . '/style.cfg'); + if (isset($style_cfg['phpbb_version']) && version_compare($style_cfg['phpbb_version'], '3.1.0-dev', '>=')) + { + // 3.1 style + $available_styles[] = $fileinfo->getFilename(); + } + } + } + + // Get all installed styles + if ($db_tools->sql_table_exists(STYLES_IMAGESET_TABLE)) + { + $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id, i.imageset_path + FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i + WHERE t.template_id = s.template_id + AND c.theme_id = s.theme_id + AND i.imageset_id = s.imageset_id"; + } + else + { + $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id + FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . " c + WHERE t.template_id = s.template_id + AND c.theme_id = s.theme_id"; + } + $result = $db->sql_query($sql); + + $styles = array(); + while ($row = $db->sql_fetchrow($result)) + { + $styles[] = $row; + } + $db->sql_freeresult($result); + + // Decide which styles to keep, all others will be deleted + $valid_styles = array(); + foreach ($styles as $style_row) + { + if ( + // Delete styles with parent style (not supported yet) + $style_row['template_inherits_id'] == 0 && + // Check if components match + $style_row['template_path'] == $style_row['theme_path'] && (!isset($style_row['imageset_path']) || $style_row['template_path'] == $style_row['imageset_path']) && + // Check if components are valid + in_array($style_row['template_path'], $available_styles) + ) + { + // Valid style. Keep it + $sql_ary = array( + 'style_path' => $style_row['template_path'], + 'bbcode_bitfield' => $style_row['bbcode_bitfield'], + 'style_parent_id' => 0, + 'style_parent_tree' => '', + ); + _sql('UPDATE ' . STYLES_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE style_id = ' . $style_row['style_id'], $errored, $error_ary); + $valid_styles[] = (int) $style_row['style_id']; + } + } + + // Remove old styles tables + $changes = array( + 'drop_columns' => array( + STYLES_TABLE => array( + 'imageset_id', + 'template_id', + 'theme_id', + ), + ), + + 'drop_tables' => array( + STYLES_IMAGESET_TABLE, + STYLES_IMAGESET_DATA_TABLE, + STYLES_TEMPLATE_TABLE, + STYLES_TEMPLATE_DATA_TABLE, + STYLES_THEME_TABLE, + ) + ); + $statements = $db_tools->perform_schema_changes($changes); + + foreach ($statements as $sql) + { + _sql($sql, $errored, $error_ary); + } + + // Remove old entries from styles table + if (!sizeof($valid_styles)) + { + // No valid styles: remove everything and add prosilver + _sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary); + + $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '')"; + _sql($sql, $errored, $error_ary); + + $sql = 'SELECT style_id + FROM ' . $table . " + WHERE style_name = 'prosilver'"; + $result = _sql($sql, $errored, $error_ary); + $default_style = $db->sql_fetchfield($result); + $db->sql_freeresult($result); + + set_config('default_style', $default_style); + + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0'; + _sql($sql, $errored, $error_ary); + } + else + { + // There are valid styles in styles table. Remove styles that are outdated + _sql('DELETE FROM ' . STYLES_TABLE . ' WHERE ' . $db->sql_in_set('style_id', $valid_styles, true), $errored, $error_ary); + + // Change default style + if (!in_array($config['default_style'], $valid_styles)) + { + set_config('default_style', $valid_styles[0]); + } + + // Reset styles for users + _sql('UPDATE ' . USERS_TABLE . ' SET user_style = 0 WHERE ' . $db->sql_in_set('user_style', $valid_styles, true), $errored, $error_ary); + } + } + + // Create config value for displaying last subject on forum list + if (!isset($config['display_last_subject'])) + { + $config->set('display_last_subject', '1'); + } $no_updates = false; + if (!isset($config['assets_version'])) + { + $config->set('assets_version', '1'); + } + + // If the column exists, we did not yet update the users timezone + if ($db_tools->sql_column_exists(USERS_TABLE, 'user_dst')) + { + // Update user timezones + $sql = 'SELECT user_dst, user_timezone + FROM ' . USERS_TABLE . ' + GROUP BY user_timezone, user_dst'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_timezone = '" . $db->sql_escape($update_helpers->convert_phpbb30_timezone($row['user_timezone'], $row['user_dst'])) . "' + WHERE user_timezone = '" . $db->sql_escape($row['user_timezone']) . "' + AND user_dst = " . (int) $row['user_dst']; + _sql($sql, $errored, $error_ary); + } + $db->sql_freeresult($result); + + // Update board default timezone + set_config('board_timezone', $update_helpers->convert_phpbb30_timezone($config['board_timezone'], $config['board_dst'])); + + // After we have calculated the timezones we can delete user_dst column from user table. + $db_tools->sql_column_remove(USERS_TABLE, 'user_dst'); + } + break; } } diff --git a/phpBB/install/index.php b/phpBB/install/index.php index dd84e2d519..88745b8bb9 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -207,10 +207,10 @@ $config = new phpbb_config(array( $phpbb_style_resource_locator = new phpbb_style_resource_locator(); $phpbb_style_path_provider = new phpbb_style_path_provider(); -$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider); -$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); -$style->set_ext_dir_prefix('adm/'); -$style->set_custom_style('admin', '../adm/style', ''); +$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator); +$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); +$phpbb_style->set_ext_dir_prefix('adm/'); +$phpbb_style->set_custom_style('admin', '../adm/style', ''); $template->assign_var('T_ASSETS_PATH', '../assets'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 7558fde944..40dee7b3d7 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -52,11 +52,13 @@ class install_install extends module function main($mode, $sub) { - global $lang, $template, $language, $phpbb_root_path; + global $lang, $template, $language, $phpbb_root_path, $cache; switch ($sub) { case 'intro': + $cache->purge(); + $this->page_title = $lang['SUB_INTRO']; $template->assign_vars(array( @@ -104,6 +106,7 @@ class install_install extends module $this->add_language($mode, $sub); $this->add_bots($mode, $sub); $this->email_admin($mode, $sub); + $this->disable_avatars_if_unwritable(); // Remove the lock file @unlink($phpbb_root_path . 'cache/install_lock'); @@ -128,7 +131,7 @@ class install_install extends module 'BODY' => $lang['REQUIREMENTS_EXPLAIN'], )); - $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,); + $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false, 'json' => false,); // Test for basic PHP settings $template->assign_block_vars('checks', array( @@ -165,25 +168,28 @@ class install_install extends module 'S_LEGEND' => false, )); - // Check for register_globals being enabled - if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') + // Don't check for register_globals on 5.4+ + if (version_compare($php_version, '5.4.0-dev') < 0) { - $result = '' . $lang['NO'] . ''; + // Check for register_globals being enabled + if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') + { + $result = '' . $lang['NO'] . ''; + } + else + { + $result = '' . $lang['YES'] . ''; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_REGISTER_GLOBALS'], + 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); } - else - { - $result = '' . $lang['YES'] . ''; - } - - $template->assign_block_vars('checks', array( - 'TITLE' => $lang['PHP_REGISTER_GLOBALS'], - 'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'], - 'RESULT' => $result, - - 'S_EXPLAIN' => true, - 'S_LEGEND' => false, - )); - // Check for url_fopen if (@ini_get('allow_url_fopen') == '1' || strtolower(@ini_get('allow_url_fopen')) == 'on') @@ -244,6 +250,26 @@ class install_install extends module 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); + + // Check for php json support + if (@extension_loaded('json')) + { + $passed['json'] = true; + $result = '' . $lang['YES'] . ''; + } + else + { + $result = '' . $lang['NO'] . ''; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_JSON_SUPPORT'], + 'TITLE_EXPLAIN' => $lang['PHP_JSON_SUPPORT_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); /** * Better not enabling and adding to the loaded extensions due to the specific requirements needed @@ -1152,7 +1178,7 @@ class install_install extends module $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); - $sql_query = remove_comments($sql_query); + $sql_query = phpbb_remove_comments($sql_query); $sql_query = split_sql_file($sql_query, $delimiter); @@ -1190,7 +1216,7 @@ class install_install extends module // Change language strings... $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query); - $sql_query = remove_comments($sql_query); + $sql_query = phpbb_remove_comments($sql_query); $sql_query = split_sql_file($sql_query, ';'); foreach ($sql_query as $sql) @@ -1769,7 +1795,7 @@ class install_install extends module 'user_email' => '', 'user_lang' => $data['default_lang'], 'user_style' => 1, - 'user_timezone' => 0, + 'user_timezone' => 'UTC', 'user_dateformat' => $lang['default_dateformat'], 'user_allow_massemail' => 0, ); @@ -1851,6 +1877,21 @@ class install_install extends module )); } + /** + * Check if the avatar directory is writable and disable avatars + * if it isn't writable. + */ + function disable_avatars_if_unwritable() + { + global $phpbb_root_path; + + if (!phpbb_is_writable($phpbb_root_path . 'images/avatars/upload/')) + { + set_config('allow_avatar', 0); + set_config('allow_avatar_upload', 0); + } + } + /** * Generate a list of available mail server authentication methods */ diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index dcf01e5cc8..c2feaa086a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -131,7 +131,7 @@ class install_update extends module } // Set custom template again. ;) - $style->set_custom_style('admin', '../adm/style', ''); + $phpbb_style->set_custom_style('admin', '../adm/style', ''); $template->assign_vars(array( 'S_USER_LANG' => $user->lang['USER_LANG'], diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 51565ef2d4..155ac2a2d4 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1242,8 +1242,7 @@ CREATE TABLE phpbb_users ( user_inactive_time INTEGER DEFAULT 0 NOT NULL, user_posts INTEGER DEFAULT 0 NOT NULL, user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL, - user_dst INTEGER DEFAULT 0 NOT NULL, + user_timezone VARCHAR(100) CHARACTER SET NONE DEFAULT 'UTC' NOT NULL, user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE, user_style INTEGER DEFAULT 0 NOT NULL, user_rank INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 2c78dd009f..3051f17bfa 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1526,8 +1526,7 @@ CREATE TABLE [phpbb_users] ( [user_inactive_time] [int] DEFAULT (0) NOT NULL , [user_posts] [int] DEFAULT (0) NOT NULL , [user_lang] [varchar] (30) DEFAULT ('') NOT NULL , - [user_timezone] [float] DEFAULT (0) NOT NULL , - [user_dst] [int] DEFAULT (0) NOT NULL , + [user_timezone] [varchar] (100) DEFAULT ('UTC') NOT NULL , [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL , [user_style] [int] DEFAULT (0) NOT NULL , [user_rank] [int] DEFAULT (0) NOT NULL , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index d19f1930d0..d3c287112d 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -890,8 +890,7 @@ CREATE TABLE phpbb_users ( user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_lang varbinary(30) DEFAULT '' NOT NULL, - user_timezone decimal(5,2) DEFAULT '0' NOT NULL, - user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_timezone varbinary(100) DEFAULT 'UTC' NOT NULL, user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 3fd8d4f1d1..d7822436b1 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -890,8 +890,7 @@ CREATE TABLE phpbb_users ( user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_lang varchar(30) DEFAULT '' NOT NULL, - user_timezone decimal(5,2) DEFAULT '0' NOT NULL, - user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_timezone varchar(100) DEFAULT 'UTC' NOT NULL, user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 8a0f3e56b1..96ead064a7 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1638,8 +1638,7 @@ CREATE TABLE phpbb_users ( user_inactive_time number(11) DEFAULT '0' NOT NULL, user_posts number(8) DEFAULT '0' NOT NULL, user_lang varchar2(30) DEFAULT '' , - user_timezone number(5, 2) DEFAULT '0' NOT NULL, - user_dst number(1) DEFAULT '0' NOT NULL, + user_timezone varchar2(100) DEFAULT 'UTC' NOT NULL, user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL, user_style number(8) DEFAULT '0' NOT NULL, user_rank number(8) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index c624024362..bb0563954d 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1140,8 +1140,7 @@ CREATE TABLE phpbb_users ( user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0), user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0), user_lang varchar(30) DEFAULT '' NOT NULL, - user_timezone decimal(5,2) DEFAULT '0' NOT NULL, - user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0), + user_timezone varchar(100) DEFAULT 'UTC' NOT NULL, user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 43b09c97f7..0bb1858c11 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -8,10 +8,10 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_attachments', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote_upload', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1'); @@ -54,12 +54,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'php INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email', 'address@yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', 'UTC'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd'); @@ -88,6 +87,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('dbms_version', '') INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat', 'D M d, Y g:i a'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_edited', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_subject', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_order', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0'); @@ -99,7 +99,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_http_auth', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_post', '15'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_topic', '10'); @@ -124,6 +124,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_co INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'simple'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index bd002c93ed..2504586e6c 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -864,8 +864,7 @@ CREATE TABLE phpbb_users ( user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0', user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0', user_lang varchar(30) NOT NULL DEFAULT '', - user_timezone decimal(5,2) NOT NULL DEFAULT '0', - user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0', + user_timezone varchar(100) NOT NULL DEFAULT 'UTC', user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i', user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index e43bd1d3b0..c7d68d29c2 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -56,7 +56,7 @@ $lang = array_merge($lang, array( 'ATTACH_EXT_GROUPS_URL' => 'Extension groups', 'ATTACH_ID' => 'ID', 'ATTACH_MAX_FILESIZE' => 'Maximum file size', - 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited.', + 'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file. If this value is 0, the uploadable filesize is only limited by your PHP configuration.', 'ATTACH_MAX_PM_FILESIZE' => 'Maximum file size messaging', 'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited, attached to a private message.', 'ATTACH_ORPHAN_URL' => 'Orphan attachments', diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php index 77e8a93f3c..2dc0489030 100644 --- a/phpBB/language/en/acp/ban.php +++ b/phpBB/language/en/acp/ban.php @@ -40,7 +40,7 @@ $lang = array_merge($lang, array( '30_MINS' => '30 minutes', '6_HOURS' => '6 hours', - 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or e-mail address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select Until -> for the ban length and enter a date in YYYY-MM-DD format.', + 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or email address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select Until -> for the ban length and enter a date in YYYY-MM-DD format.', 'BAN_EXCLUDE' => 'Exclude from banning', 'BAN_LENGTH' => 'Length of ban', @@ -50,12 +50,12 @@ $lang = array_merge($lang, array( 'BANNED_UNTIL_DATE' => 'until %s', // Example: "until Mon 13.Jul.2009, 14:44" 'BANNED_UNTIL_DURATION' => '%1$s (until %2$s)', // Example: "7 days (until Tue 14.Jul.2009, 14:44)" - 'EMAIL_BAN' => 'Ban one or more e-mail addresses', - 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered e-mail address from all current bans.', - 'EMAIL_BAN_EXPLAIN' => 'To specify more than one e-mail address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.', - 'EMAIL_NO_BANNED' => 'No banned e-mail addresses', - 'EMAIL_UNBAN' => 'Un-ban or un-exclude e-mails', - 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple e-mail addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded e-mail addresses are emphasised.', + 'EMAIL_BAN' => 'Ban one or more email addresses', + 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered email address from all current bans.', + 'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.', + 'EMAIL_NO_BANNED' => 'No banned email addresses', + 'EMAIL_UNBAN' => 'Un-ban or un-exclude emails', + 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded email addresses are emphasised.', 'IP_BAN' => 'Ban one or more IPs', 'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.', diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 0bb99b5449..0754884473 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -44,11 +44,12 @@ $lang = array_merge($lang, array( 'DEFAULT_STYLE' => 'Default style', 'DISABLE_BOARD' => 'Disable board', 'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.', + 'DISPLAY_LAST_SUBJECT' => 'Display subject of last added post on forum list', + 'DISPLAY_LAST_SUBJECT_EXPLAIN' => 'The subject of the last added post will be displayed in the forum list with a hyperlink to the post. Subjects from password protected forums and forums in which user doesn’t have read access are not shown.', 'OVERRIDE_STYLE' => 'Override user style', 'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s style with the default.', 'SITE_DESC' => 'Site description', 'SITE_NAME' => 'Site name', - 'SYSTEM_DST' => 'Enable Summer Time/DST', 'SYSTEM_TIMEZONE' => 'Guest timezone', 'SYSTEM_TIMEZONE_EXPLAIN' => 'Timezone to use for displaying times to users who are not logged in (guests, bots). Logged in users set their timezone during registration and can change it in their user control panel.', 'WARNINGS_EXPIRE' => 'Warning duration', @@ -107,7 +108,7 @@ $lang = array_merge($lang, array( 'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions', 'MAX_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.', 'MAX_FILESIZE' => 'Maximum avatar file size', - 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files.', + 'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files. If this value is 0, the uploaded filesize is only limited by your PHP configuration.', 'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions', 'MIN_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.', )); @@ -207,7 +208,7 @@ $lang = array_merge($lang, array( 'ACP_REGISTER_SETTINGS_EXPLAIN' => 'Here you are able to define registration and profile related settings.', 'ACC_ACTIVATION' => 'Account activation', - 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations. “Board-wide e-mail” must be enabled in order to use user or admin activation.', + 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations. “Board-wide email” must be enabled in order to use user or admin activation.', 'NEW_MEMBER_POST_LIMIT' => 'New member post limit', 'NEW_MEMBER_POST_LIMIT_EXPLAIN' => 'New members are within the Newly Registered Users group until they reach this number of posts. You can use this group to keep them from using the PM system or to review their posts. A value of 0 disables this feature.', 'NEW_MEMBER_GROUP_DEFAULT' => 'Set Newly Registered Users group to default', @@ -216,10 +217,10 @@ $lang = array_merge($lang, array( 'ACC_ADMIN' => 'By admin', 'ACC_DISABLE' => 'Disable registration', 'ACC_NONE' => 'No activation (immediate access)', - 'ACC_USER' => 'By user (e-mail verification)', + 'ACC_USER' => 'By user (email verification)', // 'ACC_USER_ADMIN' => 'User + Admin', - 'ALLOW_EMAIL_REUSE' => 'Allow e-mail address re-use', - 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same e-mail address.', + 'ALLOW_EMAIL_REUSE' => 'Allow email address re-use', + 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.', 'COPPA' => 'COPPA', 'COPPA_FAX' => 'COPPA fax number', 'COPPA_MAIL' => 'COPPA mailing address', @@ -390,10 +391,10 @@ $lang = array_merge($lang, array( 'LDAP_DN' => 'LDAP base dn', 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US.', - 'LDAP_EMAIL' => 'LDAP e-mail attribute', - 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry e-mail attribute (if one exists) in order to automatically set the e-mail address for new users. Leaving this empty results in empty e-mail address for users who log in for the first time.', + 'LDAP_EMAIL' => 'LDAP email attribute', + 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry email attribute (if one exists) in order to automatically set the email address for new users. Leaving this empty results in empty email address for users who log in for the first time.', 'LDAP_INCORRECT_USER_PASSWORD' => 'Binding to LDAP server failed with specified user/password.', - 'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.', + 'LDAP_NO_EMAIL' => 'The specified email attribute does not exist.', 'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.', 'LDAP_PASSWORD' => 'LDAP password', 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding, otherwise fill in the password for the above user. Required for Active Directory Servers.
Warning: This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.', @@ -411,7 +412,7 @@ $lang = array_merge($lang, array( // Server Settings $lang = array_merge($lang, array( - 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in e-mails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.', + 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependent settings. Please ensure the data you enter is accurate, errors will result in emails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.', 'ENABLE_GZIP' => 'Enable GZip compression', 'ENABLE_GZIP_EXPLAIN' => 'Generated content will be compressed prior to sending it to the user. This can reduce network traffic but will also increase CPU usage on both server and client side. Requires zlib PHP extension to be loaded.', @@ -454,8 +455,8 @@ $lang = array_merge($lang, array( 'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: spamcop.net and www.spamhaus.org. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.', 'CLASS_B' => 'A.B', 'CLASS_C' => 'A.B.C', - 'EMAIL_CHECK_MX' => 'Check e-mail domain for valid MX record', - 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.', + 'EMAIL_CHECK_MX' => 'Check email domain for valid MX record', + 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the email 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', @@ -492,24 +493,24 @@ $lang = array_merge($lang, array( // Email Settings $lang = array_merge($lang, array( - 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends e-mails to your users. Please ensure the e-mail address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) e-mail service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.', + 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.', - 'ADMIN_EMAIL' => 'Return e-mail address', - 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all e-mails, the technical contact e-mail address. It will always be used as the Return-Path and Sender address in e-mails.', - 'BOARD_EMAIL_FORM' => 'Users send e-mail via board', - 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users e-mail address users are able to send e-mails via the board.', - 'BOARD_HIDE_EMAILS' => 'Hide e-mail addresses', - 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps e-mail addresses completely private.', - 'CONTACT_EMAIL' => 'Contact e-mail address', - 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the From and Reply-To address in e-mails.', - 'EMAIL_FUNCTION_NAME' => 'E-mail function name', - 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The e-mail function used to send mails through PHP.', - 'EMAIL_PACKAGE_SIZE' => 'E-mail package size', - 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum e-mails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification e-mails.', - 'EMAIL_SIG' => 'E-mail signature', - 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all e-mails the board sends.', - 'ENABLE_EMAIL' => 'Enable board-wide e-mails', - 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no e-mails will be sent by the board at all. Note the user and admin account activation settings require this setting to be enabled. If currently using “user” or “admin” activation in the activation settings, disabling this setting will require no activation of new accounts.', + 'ADMIN_EMAIL' => 'Return email address', + 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails, the technical contact email address. It will always be used as the Return-Path and Sender address in emails.', + 'BOARD_EMAIL_FORM' => 'Users send email via board', + 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.', + 'BOARD_HIDE_EMAILS' => 'Hide email addresses', + 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.', + 'CONTACT_EMAIL' => 'Contact email address', + 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the From and Reply-To address in emails.', + 'EMAIL_FUNCTION_NAME' => 'Email function name', + 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.', + 'EMAIL_PACKAGE_SIZE' => 'Email package size', + 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum emails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification emails.', + 'EMAIL_SIG' => 'Email signature', + 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.', + 'ENABLE_EMAIL' => 'Enable board-wide emails', + 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all. Note the user and admin account activation settings require this setting to be enabled. If currently using “user” or “admin” activation in the activation settings, disabling this setting will require no activation of new accounts.', 'SMTP_AUTH_METHOD' => 'Authentication method for SMTP', 'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.', 'SMTP_CRAM_MD5' => 'CRAM-MD5', @@ -525,8 +526,8 @@ $lang = array_merge($lang, array( 'SMTP_SETTINGS' => 'SMTP settings', 'SMTP_USERNAME' => 'SMTP username', 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.', - 'USE_SMTP' => 'Use SMTP server for e-mail', - 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send e-mail via a named server instead of the local mail function.', + 'USE_SMTP' => 'Use SMTP server for email', + 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.', )); // Jabber settings diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 6012c59483..5cebcc89d7 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -47,7 +47,7 @@ $lang = array_merge($lang, array( 'ACP_BACKUP' => 'Backup', 'ACP_BAN' => 'Banning', - 'ACP_BAN_EMAILS' => 'Ban e-mails', + 'ACP_BAN_EMAILS' => 'Ban emails', 'ACP_BAN_IPS' => 'Ban IPs', 'ACP_BAN_USERNAMES' => 'Ban usernames', 'ACP_BBCODES' => 'BBCodes', @@ -79,7 +79,7 @@ $lang = array_merge($lang, array( 'ACP_DISALLOW' => 'Disallow', 'ACP_DISALLOW_USERNAMES' => 'Disallow usernames', - 'ACP_EMAIL_SETTINGS' => 'E-mail settings', + 'ACP_EMAIL_SETTINGS' => 'Email settings', 'ACP_EXTENSION_GROUPS' => 'Manage extension groups', 'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions', @@ -123,7 +123,7 @@ $lang = array_merge($lang, array( 'ACP_MANAGE_RANKS' => 'Manage ranks', 'ACP_MANAGE_REASONS' => 'Manage report/denial reasons', 'ACP_MANAGE_USERS' => 'Manage users', - 'ACP_MASS_EMAIL' => 'Mass e-mail', + 'ACP_MASS_EMAIL' => 'Mass email', 'ACP_MESSAGES' => 'Messages', 'ACP_MESSAGE_SETTINGS' => 'Private message settings', 'ACP_MODULE_MANAGEMENT' => 'Module management', @@ -265,7 +265,7 @@ $lang = array_merge($lang, array( 'NOTIFY' => 'Notification', 'NO_ADMIN' => 'You are not authorised to administer this board.', - 'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.', + 'NO_EMAILS_DEFINED' => 'No valid email addresses found.', 'NO_FILES_TO_DELETE' => 'Attachments you selected for deletion do not exist.', 'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.', @@ -314,7 +314,7 @@ $lang = array_merge($lang, array( // Logs $lang = array_merge($lang, array( 'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', - 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of e-mails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', + 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', 'ACP_MOD_LOGS_EXPLAIN' => 'This lists all actions done on forums, topics and posts as well as actions carried out on users by moderators, including banning. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.', 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users (reports, warnings and user notes).', 'ALL_ENTRIES' => 'All entries', @@ -401,6 +401,8 @@ $lang = array_merge($lang, array( 'STATISTIC' => 'Statistic', 'STATISTIC_RESYNC_OPTIONS' => 'Resynchronise or reset statistics', + 'TIMEZONE_INVALID' => 'The timezone you selected is invalid.', + 'TIMEZONE_SELECTED' => '(currently selected)', 'TOPICS_PER_DAY' => 'Topics per day', 'UPLOAD_DIR_SIZE' => 'Size of posted attachments', @@ -426,8 +428,8 @@ $lang = array_merge($lang, array( 'INACTIVE_REASON_REMIND' => 'Forced user account reactivation', 'INACTIVE_REASON_UNKNOWN' => 'Unknown', 'INACTIVE_USERS' => 'Inactive users', - 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an e-mail) these users if you wish.', - 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. Accounts are inactive either because account activation was enabled in user registration settings and these users’ accounts have not yet been activated, or because these accounts have been deactivated. A full list is available by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.', + 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.', + 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. Accounts are inactive either because account activation was enabled in user registration settings and these users’ accounts have not yet been activated, or because these accounts have been deactivated. A full list is available by following the link below from where you can activate, delete or remind (by sending an email) these users if you wish.', 'NO_INACTIVE_USERS' => 'No inactive users', @@ -497,13 +499,13 @@ $lang = array_merge($lang, array( 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason “%1$s
» %2$s', 'LOG_BAN_EXCLUDE_IP' => 'Excluded IP from ban for reason “%1$s
» %2$s', - 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded e-mail from ban for reason “%1$s
» %2$s', + 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason “%1$s
» %2$s', 'LOG_BAN_USER' => 'Banned user for reason “%1$s
» %2$s', 'LOG_BAN_IP' => 'Banned IP for reason “%1$s
» %2$s', - 'LOG_BAN_EMAIL' => 'Banned e-mail for reason “%1$s
» %2$s', + 'LOG_BAN_EMAIL' => 'Banned email for reason “%1$s
» %2$s', 'LOG_UNBAN_USER' => 'Unbanned user
» %s', 'LOG_UNBAN_IP' => 'Unbanned IP
» %s', - 'LOG_UNBAN_EMAIL' => 'Unbanned e-mail
» %s', + 'LOG_UNBAN_EMAIL' => 'Unbanned email
» %s', 'LOG_BBCODE_ADD' => 'Added new BBCode
» %s', 'LOG_BBCODE_EDIT' => 'Edited BBCode
» %s', @@ -523,7 +525,7 @@ $lang = array_merge($lang, array( 'LOG_CONFIG_AUTH' => 'Altered authentication settings', 'LOG_CONFIG_AVATAR' => 'Altered avatar settings', 'LOG_CONFIG_COOKIE' => 'Altered cookie settings', - 'LOG_CONFIG_EMAIL' => 'Altered e-mail settings', + 'LOG_CONFIG_EMAIL' => 'Altered email settings', 'LOG_CONFIG_FEATURES' => 'Altered board features', 'LOG_CONFIG_LOAD' => 'Altered load settings', 'LOG_CONFIG_MESSAGE' => 'Altered private message settings', @@ -576,7 +578,7 @@ $lang = array_merge($lang, array( 'LOG_DOWNLOAD_REMOVE_IP' => 'Removed IP/hostname from download list
» %s', 'LOG_ERROR_JABBER' => 'Jabber error
» %s', - 'LOG_ERROR_EMAIL' => 'E-mail error
» %s', + 'LOG_ERROR_EMAIL' => 'Email error
» %s', 'LOG_FORUM_ADD' => 'Created new forum
» %s', 'LOG_FORUM_COPIED_PERMISSIONS' => 'Copied forum permissions from %1$s
» %2$s', @@ -612,7 +614,7 @@ $lang = array_merge($lang, array( 'LOG_INACTIVE_ACTIVATE' => 'Activated inactive users
» %s', 'LOG_INACTIVE_DELETE' => 'Deleted inactive users
» %s', - 'LOG_INACTIVE_REMIND' => 'Sent reminder e-mails to inactive users
» %s', + 'LOG_INACTIVE_REMIND' => 'Sent reminder emails to inactive users
» %s', 'LOG_INSTALL_CONVERTED' => 'Converted from %1$s to phpBB %2$s', 'LOG_INSTALL_INSTALLED' => 'Installed phpBB %s', @@ -629,7 +631,7 @@ $lang = array_merge($lang, array( 'LOG_LANGUAGE_FILE_REPLACED' => 'Replaced language file
» %s', 'LOG_LANGUAGE_FILE_SUBMITTED' => 'Submitted language file and placed in store folder
» %s', - 'LOG_MASS_EMAIL' => 'Sent mass e-mail
» %s', + 'LOG_MASS_EMAIL' => 'Sent mass email
» %s', 'LOG_MCP_CHANGE_POSTER' => 'Changed poster in topic “%1$s”
» from %2$s to %3$s', @@ -723,7 +725,7 @@ $lang = array_merge($lang, array( 'LOG_USER_ACTIVE' => 'User activated
» %s', 'LOG_USER_BAN_USER' => 'Banned User via user management for reason “%1$s
» %2$s', 'LOG_USER_BAN_IP' => 'Banned IP via user management for reason “%1$s
» %2$s', - 'LOG_USER_BAN_EMAIL' => 'Banned e-mail via user management for reason “%1$s
» %2$s', + 'LOG_USER_BAN_EMAIL' => 'Banned email via user management for reason “%1$s
» %2$s', 'LOG_USER_DELETED' => 'Deleted user
» %s', 'LOG_USER_DEL_ATTACH' => 'Removed all attachments made by the user
» %s', 'LOG_USER_DEL_AVATAR' => 'Removed user avatar
» %s', @@ -736,7 +738,7 @@ $lang = array_merge($lang, array( 'LOG_USER_REACTIVATE' => 'Forced user account reactivation
» %s', 'LOG_USER_REMOVED_NR' => 'Removed newly registered flag from user
» %s', - 'LOG_USER_UPDATE_EMAIL' => 'User “%1$s” changed e-mail
» from “%2$s” to “%3$s”', + 'LOG_USER_UPDATE_EMAIL' => 'User “%1$s” changed email
» from “%2$s” to “%3$s”', 'LOG_USER_UPDATE_NAME' => 'Changed username
» from “%1$s” to “%2$s”', 'LOG_USER_USER_UPDATE' => 'Updated user details
» %s', diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php index c39b8743e7..aacb35b9bb 100644 --- a/phpBB/language/en/acp/email.php +++ b/phpBB/language/en/acp/email.php @@ -36,12 +36,12 @@ if (empty($lang) || !is_array($lang)) // Email settings $lang = array_merge($lang, array( - 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can e-mail a message to either all of your users or all users of a specific group having the option to receive mass e-mails enabled. To achieve this an e-mail will be sent out to the administrative e-mail address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an e-mail, for more recipients more e-mails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.', + 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group having the option to receive mass emails enabled. To achieve this an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an email, for more recipients more emails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.', 'ALL_USERS' => 'All users', 'COMPOSE' => 'Compose', - 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the e-mail. Please check the %sError log%s for detailed error messages.', + 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the email. Please check the %sError log%s for detailed error messages.', 'EMAIL_SENT' => 'This message has been sent.', 'EMAIL_SENT_QUEUE' => 'This message has been queued for sending.', @@ -53,7 +53,7 @@ $lang = array_merge($lang, array( 'SEND_TO_USERS_EXPLAIN' => 'Entering names here will override any group selected above. Enter each username on a new line.', 'MAIL_BANNED' => 'Mail banned users', - 'MAIL_BANNED_EXPLAIN' => 'When sending a mass e-mail to a group you can select here whether banned users will also receive the e-mail.', + 'MAIL_BANNED_EXPLAIN' => 'When sending a mass email to a group you can select here whether banned users will also receive the email.', 'MAIL_HIGH_PRIORITY' => 'High', 'MAIL_LOW_PRIORITY' => 'Low', 'MAIL_NORMAL_PRIORITY' => 'Normal', diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php index 6bac0a815b..154551bd6e 100644 --- a/phpBB/language/en/acp/language.php +++ b/phpBB/language/en/acp/language.php @@ -38,7 +38,7 @@ $lang = array_merge($lang, array( 'ACP_FILES' => 'Admin language files', 'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs. The default language pack is marked with an asterisk (*).', - 'EMAIL_FILES' => 'E-mail templates', + 'EMAIL_FILES' => 'Email templates', 'FILE_CONTENTS' => 'File contents', 'FILE_FROM_STORAGE' => 'File from storage folder', diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php index 2a8d857197..cf5ad33bab 100644 --- a/phpBB/language/en/acp/permissions.php +++ b/phpBB/language/en/acp/permissions.php @@ -202,7 +202,7 @@ $lang = array_merge($lang, array( 'ROLE_DESCRIPTION_MOD_SIMPLE' => 'Can only use basic topic actions. Cannot send warnings or use moderation queue.', 'ROLE_DESCRIPTION_MOD_STANDARD' => 'Can use most moderating tools, but cannot ban users or change the post author.', 'ROLE_DESCRIPTION_USER_FULL' => 'Can use all available forum features for users, including changing the user name or ignoring the flood limit.
Not recommended.', - 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, e-mails, or instant messages are not allowed.', + 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, emails, or instant messages are not allowed.', 'ROLE_DESCRIPTION_USER_NOAVATAR' => 'Has a limited feature set and is not allowed to use the Avatar feature.', 'ROLE_DESCRIPTION_USER_NOPM' => 'Has a limited feature set, and is not allowed to use Private Messages.', 'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index f8cb35ed6a..17649693fa 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -99,7 +99,7 @@ $lang = array_merge($lang, array( 'acl_u_viewprofile' => array('lang' => 'Can view profiles, memberlist and online list', 'cat' => 'profile'), 'acl_u_chgname' => array('lang' => 'Can change username', 'cat' => 'profile'), 'acl_u_chgpasswd' => array('lang' => 'Can change password', 'cat' => 'profile'), - 'acl_u_chgemail' => array('lang' => 'Can change e-mail address', 'cat' => 'profile'), + 'acl_u_chgemail' => array('lang' => 'Can change email address', 'cat' => 'profile'), 'acl_u_chgavatar' => array('lang' => 'Can change avatar', 'cat' => 'profile'), 'acl_u_chggrp' => array('lang' => 'Can change default usergroup', 'cat' => 'profile'), @@ -116,7 +116,7 @@ $lang = array_merge($lang, array( 'acl_u_pm_edit' => array('lang' => 'Can edit own private messages', 'cat' => 'pm'), 'acl_u_pm_delete' => array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'), 'acl_u_pm_forward' => array('lang' => 'Can forward private messages', 'cat' => 'pm'), - 'acl_u_pm_emailpm' => array('lang' => 'Can e-mail private messages', 'cat' => 'pm'), + 'acl_u_pm_emailpm' => array('lang' => 'Can email private messages', 'cat' => 'pm'), 'acl_u_pm_printpm' => array('lang' => 'Can print private messages', 'cat' => 'pm'), 'acl_u_pm_attach' => array('lang' => 'Can attach files in private messages', 'cat' => 'pm'), 'acl_u_pm_download' => array('lang' => 'Can download files in private messages', 'cat' => 'pm'), @@ -125,7 +125,7 @@ $lang = array_merge($lang, array( 'acl_u_pm_img' => array('lang' => 'Can use [img] BBCode tag in private messages', 'cat' => 'pm'), 'acl_u_pm_flash' => array('lang' => 'Can use [flash] BBCode tag in private messages', 'cat' => 'pm'), - 'acl_u_sendemail' => array('lang' => 'Can send e-mails', 'cat' => 'misc'), + 'acl_u_sendemail' => array('lang' => 'Can send emails', 'cat' => 'misc'), 'acl_u_sendim' => array('lang' => 'Can send instant messages', 'cat' => 'misc'), 'acl_u_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'), 'acl_u_hideonline' => array('lang' => 'Can hide online status', 'cat' => 'misc'), @@ -162,7 +162,7 @@ $lang = array_merge($lang, array( 'acl_f_report' => array('lang' => 'Can report posts', 'cat' => 'actions'), 'acl_f_subscribe' => array('lang' => 'Can subscribe forum', 'cat' => 'actions'), 'acl_f_print' => array('lang' => 'Can print topics', 'cat' => 'actions'), - 'acl_f_email' => array('lang' => 'Can e-mail topics', 'cat' => 'actions'), + 'acl_f_email' => array('lang' => 'Can email topics', 'cat' => 'actions'), 'acl_f_search' => array('lang' => 'Can search the forum', 'cat' => 'misc'), 'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'), @@ -230,7 +230,7 @@ $lang = array_merge($lang, array( 'acl_a_clearlogs' => array('lang' => 'Can clear logs', 'cat' => 'misc'), 'acl_a_modules' => array('lang' => 'Can manage modules', 'cat' => 'misc'), 'acl_a_language' => array('lang' => 'Can manage language packs', 'cat' => 'misc'), - 'acl_a_email' => array('lang' => 'Can send mass e-mail', 'cat' => 'misc'), + 'acl_a_email' => array('lang' => 'Can send mass email', 'cat' => 'misc'), 'acl_a_bots' => array('lang' => 'Can manage bots', 'cat' => 'misc'), 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'), 'acl_a_backup' => array('lang' => 'Can backup/restore database', 'cat' => 'misc'), diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 76d4869990..89e171744f 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -81,7 +81,7 @@ $lang = array_merge($lang, array( 'INTTEXT' => 'Unicode letter characters, numbers, spaces, commas, dots, minus, plus, hyphen, underscore and whitespaces.', 'IDENTIFIER' => 'Characters from the latin alphabet (A-Z), numbers, hyphen and underscore', 'NUMBER' => 'Any series of digits', - 'EMAIL' => 'A valid e-mail address', + 'EMAIL' => 'A valid email address', 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.', 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol.', 'COLOR' => 'A HTML colour, can be either in the numeric form #FF1234 or a CSS colour keyword such as fuchsia or InactiveBorder' diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index 3dc89570bf..cd319c66a9 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -51,16 +51,24 @@ $lang = array_merge($lang, array( 'DELETING_INDEX_IN_PROGRESS' => 'Deleting the index in progress', 'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.', - 'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.', + 'FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE' => 'The MySQL fulltext backend can only be used with MySQL4 and above.', 'FULLTEXT_MYSQL_NOT_MYISAM' => 'MySQL fulltext indexes can only be used with MyISAM tables.', 'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts', - 'FULLTEXT_MYSQL_MBSTRING' => 'Support for non-latin UTF-8 characters using mbstring:', - 'FULLTEXT_MYSQL_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:', - 'FULLTEXT_MYSQL_MBSTRING_EXPLAIN' => 'If PCRE does not have unicode character properties, the search backend will try to use mbstring’s regular expression engine.', - 'FULLTEXT_MYSQL_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.', 'FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.', 'FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.', + 'FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.', + 'FULLTEXT_POSTGRES_TS_NOT_USABLE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL 8.3 and above.', + 'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts', + 'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version', + 'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:', + 'FULLTEXT_POSTGRES_MIN_WORD_LEN' => 'Minimum word length for keywords', + 'FULLTEXT_POSTGRES_MAX_WORD_LEN' => 'Maximum word length for keywords', + 'FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN' => 'This search backend requires PostgreSQL version 8.3 and above.', + 'FULLTEXT_POSTGRES_TS_NAME_EXPLAIN' => 'The Text search configuration profile used to determine the parser and dictionary.', + 'FULLTEXT_POSTGRES_MIN_WORD_LEN_EXPLAIN' => 'Words with at least this many characters will be included in the query to the database.', + 'FULLTEXT_POSTGRES_MAX_WORD_LEN_EXPLAIN' => 'Words with no more than this many characters will be included in the query to the database.', + 'GENERAL_SEARCH_SETTINGS' => 'General search settings', 'GO_TO_SEARCH_INDEX' => 'Go to search index page', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index f5bab1d76f..e7954ff148 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -183,7 +183,7 @@ $lang = array_merge($lang, array( 'IMG_ICON_BACK_TOP' => 'Top', 'IMG_ICON_CONTACT_AIM' => 'AIM', - 'IMG_ICON_CONTACT_EMAIL' => 'Send e-mail', + 'IMG_ICON_CONTACT_EMAIL' => 'Send email', 'IMG_ICON_CONTACT_ICQ' => 'ICQ', 'IMG_ICON_CONTACT_JABBER' => 'Jabber', 'IMG_ICON_CONTACT_MSNM' => 'WLM', @@ -255,7 +255,7 @@ $lang = array_merge($lang, array( 'NO_UNIT' => 'None', 'ONLY_STYLE' => 'This is the only remaining style, you cannot delete it.', - + 'PARENT_STYLE_NOT_FOUND' => 'Parent style was not found. This style may not work correctly. Please uninstall it.', 'PURGED_CACHE' => 'Cache was purged.', diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php index 852f68bcd7..45cf36469b 100644 --- a/phpBB/language/en/acp/users.php +++ b/phpBB/language/en/acp/users.php @@ -54,7 +54,7 @@ $lang = array_merge($lang, array( 'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.', 'CANNOT_SET_FOUNDER_IGNORED' => 'You are not able to promote ignored users to be founders.', 'CANNOT_SET_FOUNDER_INACTIVE' => 'You need to activate users before you promote them to founders, only activated users are able to be promoted.', - 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users e-mail address.', + 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users email address.', 'DELETE_POSTS' => 'Delete posts', 'DELETE_USER' => 'Delete user', @@ -93,8 +93,8 @@ $lang = array_merge($lang, array( 'USER_ADMIN_ACTIVATE' => 'Activate account', 'USER_ADMIN_ACTIVATED' => 'User activated successfully.', 'USER_ADMIN_AVATAR_REMOVED' => 'Successfully removed avatar from user account.', - 'USER_ADMIN_BAN_EMAIL' => 'Ban by e-mail', - 'USER_ADMIN_BAN_EMAIL_REASON' => 'E-mail address banned via user management', + 'USER_ADMIN_BAN_EMAIL' => 'Ban by email', + 'USER_ADMIN_BAN_EMAIL_REASON' => 'Email address banned via user management', 'USER_ADMIN_BAN_IP' => 'Ban by IP', 'USER_ADMIN_BAN_IP_REASON' => 'IP banned via user management', 'USER_ADMIN_BAN_NAME_REASON' => 'Username banned via user management', @@ -123,6 +123,7 @@ $lang = array_merge($lang, array( 'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of', 'USER_LIFTED_NR' => 'Successfully removed the user’s newly registered status.', 'USER_NO_ATTACHMENTS' => 'There are no attached files to display.', + 'USER_NO_POSTS_TO_DELETE' => 'The user has no posts to retain or delete.', 'USER_OUTBOX_EMPTIED' => 'Successfully emptied user’s private message outbox.', 'USER_OUTBOX_EMPTY' => 'The user’s private message outbox was already empty.', 'USER_OVERVIEW_UPDATED' => 'User details updated.', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 12f8edad9e..d0afb846b4 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -42,6 +42,7 @@ $lang = array_merge($lang, array( 'TRANSLATION_INFO' => '', 'DIRECTION' => 'ltr', 'DATE_FORMAT' => '|d M Y|', // 01 Jan 2007 (with Relative days enabled) + 'DATETIME_FORMAT' => '|d M Y, H:i|', // 01 Jan 2007, 13:37 (with Relative days enabled) 'USER_LANG' => 'en-gb', // You can define different rules for the determination of plural forms here. @@ -74,7 +75,7 @@ $lang = array_merge($lang, array( 'ALL_FORUMS' => 'All forums', 'ALL_MESSAGES' => 'All messages', 'ALL_POSTS' => 'All posts', - 'ALL_TIMES' => 'All times are %1$s %2$s', + 'ALL_TIMES' => 'All times are %1$s', 'ALL_TOPICS' => 'All Topics', 'AND' => 'And', 'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.', @@ -101,7 +102,7 @@ $lang = array_merge($lang, array( 'BACK_TO_TOP' => 'Top', 'BACK_TO_PREV' => 'Back to previous page', - 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your e-mail address.', + 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your email address.', 'BAN_TRIGGERED_BY_IP' => 'A ban has been issued on your IP address.', 'BAN_TRIGGERED_BY_USER' => 'A ban has been issued on your username.', 'BBCODE_GUIDE' => 'BBCode guide', @@ -169,9 +170,10 @@ $lang = array_merge($lang, array( ), 'EDIT_POST' => 'Edit post', - 'EMAIL' => 'E-mail', // Short form for EMAIL_ADDRESS - 'EMAIL_ADDRESS' => 'E-mail address', - 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at Line %1$s. Response: %2$s.', + 'ELLIPSIS' => '…', + 'EMAIL' => 'Email', // Short form for EMAIL_ADDRESS + 'EMAIL_ADDRESS' => 'Email address', + 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending email at Line %1$s. Response: %2$s.', 'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.', 'EMPTY_MESSAGE_SUBJECT' => 'You must specify a subject when composing a new message.', 'ENABLED' => 'Enabled', @@ -296,7 +298,7 @@ $lang = array_merge($lang, array( 'INFORMATION' => 'Information', 'INTERESTS' => 'Interests', 'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge.', - 'INVALID_EMAIL_LOG' => '%s possibly an invalid e-mail address?', + 'INVALID_EMAIL_LOG' => '%s possibly an invalid email address?', 'INVALID_PLURAL_RULE' => 'The chosen plural rule is invalid. Valid values are integers between 0 and 15.', 'IP' => 'IP', 'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see %2$s.', @@ -391,9 +393,9 @@ $lang = array_merge($lang, array( 'NO_AUTH_OPERATION' => 'You do not have the necessary permissions to complete this operation.', 'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %1$s : %2$s', 'NO_BIRTHDAYS' => 'No birthdays today', - 'NO_EMAIL_MESSAGE' => 'E-mail message was blank.', + 'NO_EMAIL_MESSAGE' => 'Email message was blank.', 'NO_EMAIL_RESPONSE_CODE' => 'Could not get mail server response codes.', - 'NO_EMAIL_SUBJECT' => 'No e-mail subject specified.', + 'NO_EMAIL_SUBJECT' => 'No email subject specified.', 'NO_FORUM' => 'The forum you selected does not exist.', 'NO_FORUMS' => 'This board has no forums.', 'NO_GROUP' => 'The requested usergroup does not exist.', @@ -492,6 +494,7 @@ $lang = array_merge($lang, array( 'PRIVATE_MESSAGING' => 'Private messaging', 'PROFILE' => 'User Control Panel', + 'RANK' => 'Rank', 'READING_FORUM' => 'Viewing topics in %s', 'READING_GLOBAL_ANNOUNCE' => 'Reading global announcement', 'READING_LINK' => 'Following forum link %s', @@ -521,7 +524,7 @@ $lang = array_merge($lang, array( 'REPORT_BY' => 'Report by', 'REPORT_POST' => 'Report this post', 'REPORTING_POST' => 'Reporting post', - 'RESEND_ACTIVATION' => 'Resend activation e-mail', + 'RESEND_ACTIVATION' => 'Resend activation email', 'RESET' => 'Reset', 'RESTORE_PERMISSIONS' => 'Restore permissions', 'RETURN_INDEX' => '%sReturn to the index page%s', @@ -571,8 +574,8 @@ $lang = array_merge($lang, array( 'SELECT_ALL_CODE' => 'Select all', 'SELECT_DESTINATION_FORUM' => 'Please select a destination forum', 'SELECT_FORUM' => 'Select a forum', - 'SEND_EMAIL' => 'E-mail', // Used for submit buttons - 'SEND_EMAIL_USER' => 'E-mail', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> E-mail UserX + 'SEND_EMAIL' => 'Email', // Used for submit buttons + 'SEND_EMAIL_USER' => 'Email', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> Email UserX 'SEND_PRIVATE_MESSAGE' => 'Send private message', 'SETTINGS' => 'Settings', 'SIGNATURE' => 'Signature', @@ -604,7 +607,7 @@ $lang = array_merge($lang, array( 'THE_TEAM' => 'The team', 'TIME' => 'Time', 'TIMEOUT_PROCESSING_REQ' => 'Request timed out.', - + 'TOO_LARGE' => 'The value you entered is too large.', 'TOO_LARGE_MAX_RECIPIENTS' => 'The value of Maximum number of allowed recipients per private message setting you entered is too large.', @@ -623,7 +626,7 @@ $lang = array_merge($lang, array( 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.', 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.', - 'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.', + 'TOO_LONG_EMAIL' => 'The email address you entered is too long.', 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.', 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.', @@ -644,10 +647,10 @@ $lang = array_merge($lang, array( 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.', 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.', - 'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.', + 'TOO_SHORT_EMAIL' => 'The email address you entered is too short.', 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.', - + 'TOO_SMALL' => 'The value you entered is too small.', 'TOO_SMALL_MAX_RECIPIENTS' => 'The value of Maximum number of allowed recipients per private message setting you entered is too small.', @@ -833,93 +836,6 @@ $lang = array_merge($lang, array( 'Dec' => 'Dec', ), - 'tz' => array( - '-12' => 'UTC - 12 hours', - '-11' => 'UTC - 11 hours', - '-10' => 'UTC - 10 hours', - '-9.5' => 'UTC - 9:30 hours', - '-9' => 'UTC - 9 hours', - '-8' => 'UTC - 8 hours', - '-7' => 'UTC - 7 hours', - '-6' => 'UTC - 6 hours', - '-5' => 'UTC - 5 hours', - '-4.5' => 'UTC - 4:30 hours', - '-4' => 'UTC - 4 hours', - '-3.5' => 'UTC - 3:30 hours', - '-3' => 'UTC - 3 hours', - '-2' => 'UTC - 2 hours', - '-1' => 'UTC - 1 hour', - '0' => 'UTC', - '1' => 'UTC + 1 hour', - '2' => 'UTC + 2 hours', - '3' => 'UTC + 3 hours', - '3.5' => 'UTC + 3:30 hours', - '4' => 'UTC + 4 hours', - '4.5' => 'UTC + 4:30 hours', - '5' => 'UTC + 5 hours', - '5.5' => 'UTC + 5:30 hours', - '5.75' => 'UTC + 5:45 hours', - '6' => 'UTC + 6 hours', - '6.5' => 'UTC + 6:30 hours', - '7' => 'UTC + 7 hours', - '8' => 'UTC + 8 hours', - '8.75' => 'UTC + 8:45 hours', - '9' => 'UTC + 9 hours', - '9.5' => 'UTC + 9:30 hours', - '10' => 'UTC + 10 hours', - '10.5' => 'UTC + 10:30 hours', - '11' => 'UTC + 11 hours', - '11.5' => 'UTC + 11:30 hours', - '12' => 'UTC + 12 hours', - '12.75' => 'UTC + 12:45 hours', - '13' => 'UTC + 13 hours', - '14' => 'UTC + 14 hours', - 'dst' => '[ DST ]', - ), - - 'tz_zones' => array( - '-12' => '[UTC - 12] Baker Island Time', - '-11' => '[UTC - 11] Niue Time, Samoa Standard Time', - '-10' => '[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time', - '-9.5' => '[UTC - 9:30] Marquesas Islands Time', - '-9' => '[UTC - 9] Alaska Standard Time, Gambier Island Time', - '-8' => '[UTC - 8] Pacific Standard Time', - '-7' => '[UTC - 7] Mountain Standard Time', - '-6' => '[UTC - 6] Central Standard Time', - '-5' => '[UTC - 5] Eastern Standard Time', - '-4.5' => '[UTC - 4:30] Venezuelan Standard Time', - '-4' => '[UTC - 4] Atlantic Standard Time', - '-3.5' => '[UTC - 3:30] Newfoundland Standard Time', - '-3' => '[UTC - 3] Amazon Standard Time, Central Greenland Time', - '-2' => '[UTC - 2] Fernando de Noronha Time, South Georgia & the South Sandwich Islands Time', - '-1' => '[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time', - '0' => '[UTC] Western European Time, Greenwich Mean Time', - '1' => '[UTC + 1] Central European Time, West African Time', - '2' => '[UTC + 2] Eastern European Time, Central African Time', - '3' => '[UTC + 3] Moscow Standard Time, Eastern African Time', - '3.5' => '[UTC + 3:30] Iran Standard Time', - '4' => '[UTC + 4] Gulf Standard Time, Samara Standard Time', - '4.5' => '[UTC + 4:30] Afghanistan Time', - '5' => '[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time', - '5.5' => '[UTC + 5:30] Indian Standard Time, Sri Lanka Time', - '5.75' => '[UTC + 5:45] Nepal Time', - '6' => '[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time', - '6.5' => '[UTC + 6:30] Cocos Islands Time, Myanmar Time', - '7' => '[UTC + 7] Indochina Time, Krasnoyarsk Standard Time', - '8' => '[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time', - '8.75' => '[UTC + 8:45] Southeastern Western Australia Standard Time', - '9' => '[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time', - '9.5' => '[UTC + 9:30] Australian Central Standard Time', - '10' => '[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time', - '10.5' => '[UTC + 10:30] Lord Howe Standard Time', - '11' => '[UTC + 11] Solomon Island Time, Magadan Standard Time', - '11.5' => '[UTC + 11:30] Norfolk Island Time', - '12' => '[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time', - '12.75' => '[UTC + 12:45] Chatham Islands Time', - '13' => '[UTC + 13] Tonga Time, Phoenix Islands Time', - '14' => '[UTC + 14] Line Island Time', - ), - // The value is only an example and will get replaced by the current time on view 'dateformats' => array( 'd M Y, H:i' => '01 Jan 2007, 13:37', diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt index 6687404527..b778496258 100644 --- a/phpBB/language/en/email/admin_send_email.txt +++ b/phpBB/language/en/email/admin_send_email.txt @@ -1,9 +1,9 @@ -The following is an e-mail sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {CONTACT_EMAIL} -Include this full e-mail (particularly the headers). +Include this full email (particularly the headers). Message sent to you follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt index 30b3aae852..8605956318 100644 --- a/phpBB/language/en/email/admin_welcome_inactive.txt +++ b/phpBB/language/en/email/admin_welcome_inactive.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" {WELCOME_MSG} -Please keep this e-mail for your records. Your account information is as follows: +Please keep this email for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt index c3e4af576d..915534a13e 100644 --- a/phpBB/language/en/email/coppa_resend_inactive.txt +++ b/phpBB/language/en/email/coppa_resend_inactive.txt @@ -16,7 +16,7 @@ OR mail it to: Permission to participate at "{SITENAME}" - {U_BOARD} Username: {USERNAME} -E-mail: {EMAIL_ADDRESS} +Email: {EMAIL_ADDRESS} I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt index c3e4af576d..915534a13e 100644 --- a/phpBB/language/en/email/coppa_welcome_inactive.txt +++ b/phpBB/language/en/email/coppa_welcome_inactive.txt @@ -16,7 +16,7 @@ OR mail it to: Permission to participate at "{SITENAME}" - {U_BOARD} Username: {USERNAME} -E-mail: {EMAIL_ADDRESS} +Email: {EMAIL_ADDRESS} I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION. I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD. diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt index 0d0ac7fc28..725b52f0cc 100644 --- a/phpBB/language/en/email/email_notify.txt +++ b/phpBB/language/en/email/email_notify.txt @@ -1,8 +1,8 @@ -Subject: "{SITENAME}" - E-mail a friend +Subject: "{SITENAME}" - Email a friend Hello {TO_USERNAME}, -This e-mail was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic: +This email was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic: {TOPIC_NAME} @@ -10,7 +10,7 @@ You can find it at: {U_TOPIC} -A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this e-mail please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address. +A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this email please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address. ---------- diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt index 2aa03a7f33..9ec93484e1 100644 --- a/phpBB/language/en/email/installed.txt +++ b/phpBB/language/en/email/installed.txt @@ -4,7 +4,7 @@ Congratulations, You have successfully installed phpBB on your server. -This e-mail contains important information regarding your installation and should be kept for reference. Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account. +This email contains important information regarding your installation and should be kept for reference. Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account. ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt index 9fb19e7eb1..3e63777c9f 100644 --- a/phpBB/language/en/email/profile_send_email.txt +++ b/phpBB/language/en/email/profile_send_email.txt @@ -1,11 +1,11 @@ Hello {TO_USERNAME}, -The following is an e-mail sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: +The following is an email sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address: {BOARD_CONTACT} -Include this full e-mail (particularly the headers). Please note that the reply address to this e-mail has been set to that of {FROM_USERNAME}. +Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}. Message sent to you follows ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/phpBB/language/en/email/user_reactivate_account.txt b/phpBB/language/en/email/user_reactivate_account.txt index 4ef7dd899a..7e25018f4d 100644 --- a/phpBB/language/en/email/user_reactivate_account.txt +++ b/phpBB/language/en/email/user_reactivate_account.txt @@ -3,7 +3,7 @@ Subject: Reactivate your account on "{SITENAME}" 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: +Please keep this email for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt index 4638d6df63..7879b914b9 100644 --- a/phpBB/language/en/email/user_resend_inactive.txt +++ b/phpBB/language/en/email/user_resend_inactive.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" {WELCOME_MSG} -Please keep this e-mail for your records. Your account information is as follows: +Please keep this email for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt index 2648769dfd..aaead86afc 100644 --- a/phpBB/language/en/email/user_welcome.txt +++ b/phpBB/language/en/email/user_welcome.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" {WELCOME_MSG} -Please keep this e-mail for your records. Your account information is as follows: +Please keep this email for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt index 1b72b1c5a8..5cbb3af3de 100644 --- a/phpBB/language/en/email/user_welcome_inactive.txt +++ b/phpBB/language/en/email/user_welcome_inactive.txt @@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}" {WELCOME_MSG} -Please keep this e-mail for your records. Your account information is as follows: +Please keep this email for your records. Your account information is as follows: ---------------------------- Username: {USERNAME} diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 7b2672ad94..e0cda9df04 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -88,7 +88,7 @@ $help = array( ), array( 0 => 'Linking to another site', - 1 => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.
  • The first of these uses the [url=][/url] tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:

    [url=http://www.phpbb.com/]Visit phpBB![/url]

    This would generate the following link, Visit phpBB! Please notice that the link opens in the same window or a new window depending on the users browser preferences.
  • If you want the URL itself displayed as the link you can do this by simply using:

    [url]http://www.phpbb.com/[/url]

    This would generate the following link, http://www.phpbb.com/
  • Additionally, phpBB features something called Magic Links, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to www.phpbb.com being output when you view the message.
  • The same thing applies equally to e-mail addresses, you can either specify an address explicitly for example:

    [email]no.one@domain.adr[/email]

    which will output no.one@domain.adr or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.
As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care.' + 1 => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.
  • The first of these uses the [url=][/url] tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:

    [url=http://www.phpbb.com/]Visit phpBB![/url]

    This would generate the following link, Visit phpBB! Please notice that the link opens in the same window or a new window depending on the users browser preferences.
  • If you want the URL itself displayed as the link you can do this by simply using:

    [url]http://www.phpbb.com/[/url]

    This would generate the following link, http://www.phpbb.com/
  • Additionally, phpBB features something called Magic Links, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to www.phpbb.com being output when you view the message.
  • The same thing applies equally to email addresses, you can either specify an address explicitly for example:

    [email]no.one@domain.adr[/email]

    which will output no.one@domain.adr or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.
As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care.' ), array( 0 => '--', diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index b14f155f3a..5c99f81c06 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -55,7 +55,7 @@ $help = array( ), array( 0 => 'I registered but cannot login!', - 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an e-mail, follow the instructions. If you did not receive an e-mail, you may have provided an incorrect e-mail address or the e-mail may have been picked up by a spam filer. If you are sure the e-mail address you provided is correct, try contacting an administrator.' + 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an email, follow the instructions. If you did not receive an email, you may have provided an incorrect email address or the email may have been picked up by a spam filer. If you are sure the email address you provided is correct, try contacting an administrator.' ), array( 0 => 'I registered in the past but cannot login any more?!', @@ -87,7 +87,7 @@ $help = array( ), array( 0 => 'I changed the timezone and the time is still wrong!', - 1 => 'If you are sure you have set the timezone and Summer Time/DST correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.' + 1 => 'If you are sure you have set the timezone correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.' ), array( 0 => 'My language is not in the list!', @@ -102,8 +102,8 @@ $help = array( 1 => 'Ranks, which appear below your username, indicate the number of posts you have made or identify certain users, e.g. moderators and administrators. In general, you cannot directly change the wording of any board ranks as they are set by the board administrator. Please do not abuse the board by posting unnecessarily just to increase your rank. Most boards will not tolerate this and the moderator or administrator will simply lower your post count.' ), array( - 0 => 'When I click the e-mail link for a user it asks me to login?', - 1 => 'Only registered users can send e-mail to other users via the built-in e-mail form, and only if the administrator has enabled this feature. This is to prevent malicious use of the e-mail system by anonymous users.' + 0 => 'When I click the email link for a user it asks me to login?', + 1 => 'Only registered users can send email to other users via the built-in email form, and only if the administrator has enabled this feature. This is to prevent malicious use of the email system by anonymous users.' ), array( 0 => '--', @@ -255,8 +255,8 @@ $help = array( 1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.' ), array( - 0 => 'I have received a spamming or abusive e-mail from someone on this board!', - 1 => 'We are sorry to hear that. The e-mail form feature of this board includes safeguards to try and track users who send such posts, so e-mail the board administrator with a full copy of the e-mail you received. It is very important that this includes the headers that contain the details of the user that sent the e-mail. The board administrator can then take action.' + 0 => 'I have received a spamming or abusive email from someone on this board!', + 1 => 'We are sorry to hear that. The email form feature of this board includes safeguards to try and track users who send such posts, so email the board administrator with a full copy of the email you received. It is very important that this includes the headers that contain the details of the user that sent the email. The board administrator can then take action.' ), array( 0 => '--', @@ -336,6 +336,6 @@ $help = array( ), array( 0 => 'Who do I contact about abusive and/or legal matters related to this board?', - 1 => 'Any of the administrators listed on the “The team” page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has absolutely no jurisdiction and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpBB.com website or the discrete software of phpBB itself. If you do e-mail phpBB Group about any third party use of this software then you should expect a terse response or no response at all.' + 1 => 'Any of the administrators listed on the “The team” page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has absolutely no jurisdiction and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpBB.com website or the discrete software of phpBB itself. If you do email phpBB Group about any third party use of this software then you should expect a terse response or no response at all.' ) ); diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index ca6045a921..68623a6c25 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -240,8 +240,8 @@ $lang = array_merge($lang, array( 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.', 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding.', 'INST_ERR_DB_NO_NAME' => 'No database name specified.', - 'INST_ERR_EMAIL_INVALID' => 'The e-mail address you entered is invalid.', - 'INST_ERR_EMAIL_MISMATCH' => 'The e-mails you entered did not match.', + 'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid.', + 'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.', 'INST_ERR_FATAL' => 'Fatal installation error', 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occurred. This may be because the specified user does not have appropriate permissions to CREATE TABLES or INSERT data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.', 'INST_ERR_FTP_PATH' => 'Could not change to the given directory, please check the path.', @@ -292,6 +292,8 @@ $lang = array_merge($lang, array( 'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.', 'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available', 'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'Required - In order for phpBB to function correctly, the getimagesize function needs to be available.', + 'PHP_JSON_SUPPORT' => 'PHP JSON support', + 'PHP_JSON_SUPPORT_EXPLAIN' => 'Required - In order for phpBB to function correctly, the PHP JSON extension needs to be available.', 'PHP_OPTIONAL_MODULE' => 'Optional modules', 'PHP_OPTIONAL_MODULE_EXPLAIN' => 'Optional - These modules or applications are optional. However, if they are available they will enable extra features.', 'PHP_SUPPORTED_DB' => 'Supported databases', diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 3ee619ea16..eaa2d7e3a5 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -144,7 +144,7 @@ $lang = array_merge($lang, array( 'MCP_ADD' => 'Add a warning', 'MCP_BAN' => 'Banning', - 'MCP_BAN_EMAILS' => 'Ban e-mails', + 'MCP_BAN_EMAILS' => 'Ban emails', 'MCP_BAN_IPS' => 'Ban IPs', 'MCP_BAN_USERNAMES' => 'Ban Usernames', diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index c3ab27871e..ec21e8e904 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -46,25 +46,25 @@ $lang = array_merge($lang, array( 'BEFORE' => 'Before', - 'CC_EMAIL' => 'Send a copy of this e-mail to yourself.', + 'CC_EMAIL' => 'Send a copy of this email to yourself.', 'CONTACT_USER' => 'Contact', 'DEST_LANG' => 'Language', 'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.', - 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.', - 'EMAIL_DISABLED' => 'Sorry but all e-mail related functions have been disabled.', - 'EMAIL_SENT' => 'The e-mail has been sent.', - 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your e-mail address.', - 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid e-mail address for the recipient.', + 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your email address.', + 'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.', + 'EMAIL_SENT' => 'The email has been sent.', + 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your email address.', + 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid email address for the recipient.', 'EMPTY_MESSAGE_EMAIL' => 'You must enter a message to be emailed.', 'EMPTY_MESSAGE_IM' => 'You must enter a message to be send.', 'EMPTY_NAME_EMAIL' => 'You must enter the real name of the recipient.', - 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the e-mail.', + 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the email.', 'EQUAL_TO' => 'Equal to', 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format YYYY-MM-DD, e.g. 2004-02-29. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.', - 'FLOOD_EMAIL_LIMIT' => 'You cannot send another e-mail at this time. Please try again later.', + 'FLOOD_EMAIL_LIMIT' => 'You cannot send another email at this time. Please try again later.', 'GROUP_LEADER' => 'Group leader', @@ -103,7 +103,7 @@ $lang = array_merge($lang, array( 'MORE_THAN' => 'More than', - 'NO_EMAIL' => 'You are not permitted to send e-mail to this user.', + 'NO_EMAIL' => 'You are not permitted to send email to this user.', 'NO_VIEW_USERS' => 'You are not authorised to view the member list or profiles.', 'ORDER' => 'Order', @@ -111,7 +111,6 @@ $lang = array_merge($lang, array( 'POST_IP' => 'Posted from IP/domain', - 'RANK' => 'Rank', 'REAL_NAME' => 'Recipient name', 'RECIPIENT' => 'Recipient', 'REMOVE_FOE' => 'Remove foe', @@ -126,7 +125,7 @@ $lang = array_merge($lang, array( 'SEND_MESSAGE' => 'Message', 'SEND_MSNM_MESSAGE' => 'Send WLM message', 'SEND_YIM_MESSAGE' => 'Send YIM message', - 'SORT_EMAIL' => 'E-mail', + 'SORT_EMAIL' => 'Email', 'SORT_LAST_ACTIVE' => 'Last active', 'SORT_POST_COUNT' => 'Post count', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index 5b6fdce0e7..d09b4303cd 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -72,6 +72,7 @@ $lang = array_merge($lang, array( 'WORDS_IN_NO_POST' => 'No posts were found because the words %s are not contained in any post.', 'POST_CHARACTERS' => 'characters of posts', + 'PHRASE_SEARCH_DISABLED' => 'Searching by exact phrase is not supported on this board.', 'RECENT_SEARCHES' => 'Recent searches', 'RESULT_DAYS' => 'Limit results to previous', @@ -81,6 +82,7 @@ $lang = array_merge($lang, array( 'SEARCHED_FOR' => 'Search term used', 'SEARCHED_TOPIC' => 'Searched topic', + 'SEARCHED_QUERY' => 'Searched query', 'SEARCH_ALL_TERMS' => 'Search for all terms or use query as entered', 'SEARCH_ANY_TERMS' => 'Search for any terms', 'SEARCH_AUTHOR' => 'Search for author', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index aa1e9c27ce..512a4a5c24 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -49,9 +49,9 @@ $lang = array_merge($lang, array(
We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).

- Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid e-mail address (hereinafter “your e-mail”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your e-mail address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.
+ Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid email address (hereinafter “your email”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your email address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.

- Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your e-mail, then the phpBB software will generate a new password to reclaim your account.
+ Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.
', )); @@ -61,13 +61,13 @@ $lang = array_merge($lang, array( 'ACCOUNT_ACTIVE_ADMIN' => 'The account has now been activated.', 'ACCOUNT_ACTIVE_PROFILE' => 'Your account has now been successfully reactivated.', 'ACCOUNT_ADDED' => 'Thank you for registering, your account has been created. You may now login with your username and password.', - 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your e-mail for details.', - 'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on e-mail changes. An activation key has been sent to the new e-mail address you provided. Please check your e-mail for further information.', - 'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on e-mail changes. An e-mail has been sent to them and you will be informed when your account has been reactivated.', - '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.', + 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.', + 'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on email changes. An activation key has been sent to the new email address you provided. Please check your email for further information.', + 'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on email changes. An email has been sent to them and you will be informed when your account has been reactivated.', + 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information.', + 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An email has been sent to them and you will be informed when your account has been activated.', + 'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address.', + 'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation email has been sent to the administrators email addresses.', 'ADD' => 'Add', 'ADD_BCC' => 'Add [BCC]', 'ADD_FOES' => 'Add new foes', @@ -79,7 +79,7 @@ $lang = array_merge($lang, array( 'ADD_RULE' => 'Add rule', 'ADD_TO' => 'Add [To]', 'ADD_USERS_UCP_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Please enter each username on a separate line.', - 'ADMIN_EMAIL' => 'Administrators can e-mail me information', + 'ADMIN_EMAIL' => 'Administrators can email me information', 'AGREE' => 'I agree to these terms', 'ALLOW_PM' => 'Allow users to send you private messages', 'ALLOW_PM_EXPLAIN' => 'Note that administrators and moderators will always be able to send you messages.', @@ -87,6 +87,7 @@ $lang = array_merge($lang, array( 'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.', 'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.', 'ATTACHMENT_DELETED' => 'Attachment successfully deleted.', + 'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected persistent login keys were successfully deleted.', 'AVATAR_CATEGORY' => 'Category', 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.', 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', @@ -102,7 +103,6 @@ $lang = array_merge($lang, array( 'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.', 'BOARD_DATE_FORMAT' => 'My date format', 'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP date() function.', - 'BOARD_DST' => 'Summer Time/DST is in effect', 'BOARD_LANGUAGE' => 'My language', 'BOARD_STYLE' => 'My board style', 'BOARD_TIMEZONE' => 'My timezone', @@ -134,7 +134,8 @@ $lang = array_merge($lang, array( 'CREATE_FOLDER' => 'Add folder…', 'CURRENT_IMAGE' => 'Current image', 'CURRENT_PASSWORD' => 'Current password', - 'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your e-mail address or username.', + 'CURRENT_PASSWORD_EXPLAIN' => 'You must enter your current password if you wish to alter your email address or username.', + 'CURRENT_CHANGE_PASSWORD_EXPLAIN' => 'To change your password, your email address, or your username, you must enter your current password.', 'CUR_PASSWORD_EMPTY' => 'You did not enter your current password.', 'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.', 'CUSTOM_DATEFORMAT' => 'Custom…', @@ -164,17 +165,17 @@ $lang = array_merge($lang, array( 'DEMOTE_SELECTED' => 'Demote selected', 'DISABLE_CENSORS' => 'Enable word censoring', 'DISPLAY_GALLERY' => 'Display gallery', - 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered e-mail domain has no valid MX record.', + 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered email domain has no valid MX record.', 'DOWNLOADS' => 'Downloads', 'DRAFTS_DELETED' => 'All selected drafts were successfully deleted.', 'DRAFTS_EXPLAIN' => 'Here you can view, edit and delete your saved drafts.', 'DRAFT_UPDATED' => 'Draft successfully updated.', 'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll information.', - 'EMAIL_BANNED_EMAIL' => 'The e-mail address you entered is not allowed to be used.', - 'EMAIL_INVALID_EMAIL' => 'The e-mail address you entered is invalid.', - 'EMAIL_REMIND' => 'This must be the e-mail address associated with your account. If you have not changed this via your user control panel then it is the e-mail address you registered your account with.', - 'EMAIL_TAKEN_EMAIL' => 'The entered e-mail address is already in use.', + 'EMAIL_BANNED_EMAIL' => 'The email address you entered is not allowed to be used.', + 'EMAIL_INVALID_EMAIL' => 'The email address you entered is invalid.', + 'EMAIL_REMIND' => 'This must be the email address associated with your account. If you have not changed this via your user control panel then it is the email address you registered your account with.', + 'EMAIL_TAKEN_EMAIL' => 'The entered email address is already in use.', 'EMPTY_DRAFT' => 'You must enter a message to submit your changes.', 'EMPTY_DRAFT_TITLE' => 'You must enter a draft title.', 'EXPORT_AS_XML' => 'Export as XML', @@ -255,6 +256,8 @@ $lang = array_merge($lang, array( 'LINK_REMOTE_SIZE' => 'Avatar dimensions', 'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.', 'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.', + 'LOGIN_KEY' => 'Login Key', + 'LOGIN_TIME' => 'Login Time', 'LOGIN_REDIRECT' => 'You have been successfully logged in.', 'LOGOUT_FAILED' => 'You were not logged out, as the request did not match your session. Please contact the board administrator if you continue to experience problems.', 'LOGOUT_REDIRECT' => 'You have been successfully logged out.', @@ -286,7 +289,7 @@ $lang = array_merge($lang, array( 'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.', 'NOTIFY_METHOD' => 'Notification method', 'NOTIFY_METHOD_BOTH' => 'Both', - 'NOTIFY_METHOD_EMAIL' => 'E-mail only', + 'NOTIFY_METHOD_EMAIL' => 'Email only', 'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.', 'NOTIFY_METHOD_IM' => 'Jabber only', 'NOTIFY_ON_PM' => 'Notify me on new private messages', @@ -324,7 +327,7 @@ $lang = array_merge($lang, array( 'NO_BOOKMARKS' => 'You have no bookmarks.', 'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.', 'NO_EDIT_READ_MESSAGE' => 'Private message cannot be edited because it has already been read.', - 'NO_EMAIL_USER' => 'The e-mail/username information submitted could not be found.', + 'NO_EMAIL_USER' => 'The email/username information submitted could not be found.', 'NO_FOES' => 'No foes currently defined', 'NO_FRIENDS' => 'No friends currently defined', 'NO_FRIENDS_OFFLINE' => 'No friends offline', @@ -350,7 +353,7 @@ $lang = array_merge($lang, array( 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$s and %2$s long, must contain letters in mixed case, must contain numbers and must contain symbols.', 'PASSWORD' => 'Password', 'PASSWORD_ACTIVATED' => 'Your new password has been activated.', - 'PASSWORD_UPDATED' => 'A new password was sent to your registered e-mail address.', + 'PASSWORD_UPDATED' => 'A new password was sent to your registered email address.', 'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.', 'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from %s, you are now able to browse the board with this user’s permissions.
Please note that admin permissions were not transferred. You are able to revert to your permission set at any time.', 'PM_DISABLED' => 'Private messaging has been disabled on this board.', @@ -376,6 +379,8 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys automatically log you in when you visit the board. If you logout, the persistent login key is deleted only on the computer you are using to logout. Here you can see persistent login keys created on other computers you used to access this site.', + 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', 'RECIPIENTS' => 'Recipients', @@ -398,6 +403,7 @@ $lang = array_merge($lang, array( 'RULE_ADDED' => 'Rule successfully added.', 'RULE_ALREADY_DEFINED' => 'This rule was defined previously.', 'RULE_DELETED' => 'Rule successfully removed.', + 'RULE_LIMIT_REACHED' => 'You cannot add more PM rules. You have reached the maximum number of rules.', 'RULE_NOT_DEFINED' => 'Rule not correctly specified.', 'RULE_REMOVED_MESSAGES' => array( 1 => '%d private message was removed due to private message filters.', @@ -408,10 +414,12 @@ $lang = array_merge($lang, array( 'SEARCH_YOUR_POSTS' => 'Show your posts', 'SEND_PASSWORD' => 'Send password', 'SENT_AT' => 'Sent', // Used before dates in private messages - 'SHOW_EMAIL' => 'Users can contact me by e-mail', + 'SHOW_EMAIL' => 'Users can contact me by email', 'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit.', 'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts', 'SIGNATURE_TOO_LONG' => 'Your signature is too long.', + 'SELECT_CURRENT_TIME' => 'Select current time', + 'SELECT_TIMEZONE' => 'Select timezone', 'SORT' => 'Sort', 'SORT_COMMENT' => 'File comment', 'SORT_DOWNLOADS' => 'Downloads', @@ -421,18 +429,20 @@ $lang = array_merge($lang, array( 'SORT_SIZE' => 'File size', 'TIMEZONE' => 'Timezone', + 'TIMEZONE_DATE_SUGGESTION' => 'Suggestion: %s', + 'TIMEZONE_INVALID' => 'The timezone you selected is invalid.', 'TO' => 'To', 'TOO_MANY_RECIPIENTS' => 'You tried to send a private message to too many recipients.', 'TOO_MANY_REGISTERS' => 'You have exceeded the maximum number of registration attempts for this session. Please try again later.', 'UCP' => 'User Control Panel', 'UCP_ACTIVATE' => 'Activate account', - 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. The administrator will review your account and if approved you will receive an e-mail at the address you specified.', + 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.', 'UCP_AIM' => 'AOL Instant Messenger', 'UCP_ATTACHMENTS' => 'Attachments', 'UCP_COPPA_BEFORE' => 'Before %s', 'UCP_COPPA_ON_AFTER' => 'On or after %s', - 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. You will receive an e-mail at the address you provide that contains an account activation link.', + 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.', 'UCP_ICQ' => 'ICQ number', 'UCP_JABBER' => 'Jabber address', @@ -465,6 +475,7 @@ $lang = array_merge($lang, array( 'UCP_PROFILE_PROFILE_INFO' => 'Edit profile', 'UCP_PROFILE_REG_DETAILS' => 'Edit account settings', 'UCP_PROFILE_SIGNATURE' => 'Edit signature', + 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Edit persistent login keys', 'UCP_USERGROUPS' => 'Usergroups', 'UCP_USERGROUPS_MEMBER' => 'Edit memberships', @@ -472,7 +483,7 @@ $lang = array_merge($lang, array( 'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.', 'UCP_REMIND' => 'Send password', - 'UCP_RESEND' => 'Send activation e-mail', + 'UCP_RESEND' => 'Send activation email', 'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.', 'UCP_YIM' => 'Yahoo Messenger', 'UCP_ZEBRA' => 'Friends & Foes', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 184f88ed3c..278c064fe7 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -57,13 +57,13 @@ $lang = array_merge($lang, array( 1 => 'Last edited by %2$s on %3$s, edited %1$d time in total.', 2 => 'Last edited by %2$s on %3$s, edited %1$d times in total.', ), - 'EMAIL_TOPIC' => 'E-mail friend', + 'EMAIL_TOPIC' => 'Email friend', 'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore.', 'FILE_NOT_FOUND_404' => 'The file %s does not exist.', 'FORK_TOPIC' => 'Copy topic', 'FULL_EDITOR' => 'Full Editor & Preview', - + 'LINKAGE_FORBIDDEN' => 'You are not authorised to view, download or link from/to this site.', 'LOGIN_NOTIFY_TOPIC' => 'You have been notified about this topic, please login to view it.', 'LOGIN_VIEWTOPIC' => 'The board requires you to be registered and logged in to view this topic.', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index ed87b6c448..4f9a8cdff3 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1572,10 +1572,11 @@ switch ($mode) } } + phpbb_generate_template_pagination($template, $pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start); + // Generate page $template->assign_vars(array( - 'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $pagination_url, $total_users, $config['topics_per_page'], $start), 'TOTAL_USERS' => $user->lang('LIST_USERS', (int) $total_users), 'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']), @@ -1674,7 +1675,8 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f if ($bday_year) { - $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); + $now = $user->create_datetime(); + $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset()); $diff = $now['mon'] - $bday_month; if ($diff == 0) diff --git a/phpBB/search.php b/phpBB/search.php index 2b463aec9c..efbf2f4dfe 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -596,13 +596,25 @@ if ($keywords || $author || $author_id || $search_id || $submit) $u_search .= ($search_fields != 'all') ? '&sf=' . $search_fields : ''; $u_search .= ($return_chars != 300) ? '&ch=' . $return_chars : ''; + // Check if search backend supports phrase search or not + $phrase_search_disabled = ''; + if (strpos(html_entity_decode($keywords), '"') !== false && method_exists($search, 'supports_phrase_search')) + { + $phrase_search_disabled = $search->supports_phrase_search() ? false : true; + } + + phpbb_generate_template_pagination($template, $u_search, 'pagination', 'start', $total_match_count, $per_page, $start); + $template->assign_vars(array( 'SEARCH_TITLE' => $l_search_title, 'SEARCH_MATCHES' => $l_search_matches, - 'SEARCH_WORDS' => $search->search_query, + 'SEARCH_WORDS' => $keywords, + 'SEARCHED_QUERY' => $search->search_query, 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '', - 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start), - 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $u_search, $total_match_count, $per_page, $start), + + 'PHRASE_SEARCH_DISABLED' => $phrase_search_disabled, + 'TOTAL_MATCHES' => $total_match_count, 'SEARCH_IN_RESULTS' => ($search_id) ? false : true, @@ -888,7 +900,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'TOPIC_TYPE' => $topic_type, 'TOPIC_IMG_STYLE' => $folder_img, @@ -992,6 +1003,11 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '') )); + + if ($show_results == 'topics') + { + phpbb_generate_template_pagination($template, $view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); + } } if ($topic_id && ($topic_id == $result_topic_id)) diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg index a80f1ed537..633079e4a6 100644 --- a/phpBB/styles/prosilver/style.cfg +++ b/phpBB/styles/prosilver/style.cfg @@ -18,7 +18,8 @@ # General Information about this style name = prosilver copyright = © phpBB Group, 2007 -version = 3.1.0-dev +style_version = 3.1.0-dev +phpbb_version = 3.1.0-dev # Defining a different template bitfield # template_bitfield = lNg= diff --git a/phpBB/styles/prosilver/template/captcha_default.html b/phpBB/styles/prosilver/template/captcha_default.html index bccf231251..007cff644f 100644 --- a/phpBB/styles/prosilver/template/captcha_default.html +++ b/phpBB/styles/prosilver/template/captcha_default.html @@ -1,6 +1,6 @@
-
+

{L_CONFIRMATION}

{L_CONFIRM_EXPLAIN}

@@ -19,6 +19,6 @@
- + diff --git a/phpBB/styles/prosilver/template/captcha_qa.html b/phpBB/styles/prosilver/template/captcha_qa.html index 0b18ada3bb..7986b1faa2 100644 --- a/phpBB/styles/prosilver/template/captcha_qa.html +++ b/phpBB/styles/prosilver/template/captcha_qa.html @@ -1,6 +1,6 @@
-
+

{L_CONFIRMATION}

@@ -16,6 +16,6 @@
-
+
diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html index 51a1615bd5..087a5b9405 100644 --- a/phpBB/styles/prosilver/template/captcha_recaptcha.html +++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html @@ -1,6 +1,6 @@
-
+

{L_CONFIRMATION}

{L_CONFIRM_EXPLAIN}

@@ -45,6 +45,6 @@ -
+
diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html index 5b783915a4..cddbdee391 100644 --- a/phpBB/styles/prosilver/template/confirm_body.html +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -2,7 +2,7 @@
-
+

{MESSAGE_TITLE}

{MESSAGE_TEXT}

@@ -13,7 +13,7 @@ -
+
diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index dea3bb414e..c3c54876e3 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -2,16 +2,16 @@
-
+

{L_LOAD_DRAFT}

{L_LOAD_DRAFT_EXPLAIN}

-
+
-
+
  • @@ -39,6 +39,6 @@
-
+
diff --git a/phpBB/styles/prosilver/template/faq_body.html b/phpBB/styles/prosilver/template/faq_body.html index 36d677a505..46f738aa3a 100644 --- a/phpBB/styles/prosilver/template/faq_body.html +++ b/phpBB/styles/prosilver/template/faq_body.html @@ -4,7 +4,7 @@ @@ -30,7 +30,7 @@
-
+

{faq_block.BLOCK_TITLE}

@@ -44,7 +44,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html index d6596203e5..723c2ffeda 100644 --- a/phpBB/styles/prosilver/template/forumlist_body.html +++ b/phpBB/styles/prosilver/template/forumlist_body.html @@ -3,13 +3,13 @@ - +
-
+
  • @@ -35,7 +35,12 @@
    {forumrow.L_MODERATOR_STR}: {forumrow.MODERATORS} -
    {forumrow.L_SUBFORUM_STR} {forumrow.SUBFORUMS} + +
    {forumrow.L_SUBFORUM_STR} + + {forumrow.subforum.SUBFORUM_NAME}, + +
    {L_REDIRECTS}: {forumrow.CLICKS}
    @@ -44,7 +49,11 @@
    {forumrow.POSTS} {L_POSTS}
    {UNAPPROVED_IMG} - {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL} + {L_LAST_POST} + + {forumrow.LAST_POST_SUBJECT_TRUNCATED}
    + + {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL} {LAST_POST_IMG}
    {forumrow.LAST_POST_TIME}{L_NO_POSTS}
     
    @@ -55,14 +64,14 @@
-
+
-
+
{L_NO_FORUMS} -
+
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html index 03615398c1..d8b9b01779 100644 --- a/phpBB/styles/prosilver/template/login_body.html +++ b/phpBB/styles/prosilver/template/login_body.html @@ -8,7 +8,7 @@
-
+

{LOGIN_EXPLAIN}{L_LOGIN}

@@ -45,13 +45,13 @@
-
+
-
+

{L_REGISTER}

@@ -61,7 +61,7 @@

{L_REGISTER}

-
+
diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html index 569638411c..13669a78bb 100644 --- a/phpBB/styles/prosilver/template/login_forum.html +++ b/phpBB/styles/prosilver/template/login_forum.html @@ -5,7 +5,7 @@ {S_FORM_TOKEN}
-
+

{L_LOGIN_FORUM}

@@ -27,7 +27,7 @@ {S_LOGIN_REDIRECT} -
+
diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html index 1010ac6e6f..8b7f7c8c6d 100644 --- a/phpBB/styles/prosilver/template/mcp_approve.html +++ b/phpBB/styles/prosilver/template/mcp_approve.html @@ -3,7 +3,7 @@
{S_FORM_TOKEN} -
+
@@ -45,7 +45,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html index f8cdc1a687..adcd86d057 100644 --- a/phpBB/styles/prosilver/template/mcp_ban.html +++ b/phpBB/styles/prosilver/template/mcp_ban.html @@ -36,7 +36,7 @@

{L_TITLE}

-
+

{L_TITLE}

{L_EXPLAIN}

@@ -72,7 +72,7 @@ -
+
@@ -82,7 +82,7 @@
-
+

{L_UNBAN_TITLE}

{L_UNBAN_EXPLAIN}

@@ -107,7 +107,7 @@ -
+
@@ -119,7 +119,7 @@

{L_NO_BAN_CELL}

- + diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index 49d4601dfa..811aace154 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -8,13 +8,17 @@
-
+
- + @@ -42,7 +46,20 @@ {REPORTED_IMG}  [ {L_DELETE_SHADOW_TOPIC} ]
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{topicrow.REPLIES} {L_REPLIES}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
{topicrow.LAST_POST_TIME}
@@ -72,16 +89,33 @@
- + -
+
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index e9635e528c..69e0b02a4e 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -7,7 +7,7 @@
-
+

{L_LATEST_UNAPPROVED}

{L_UNAPPROVED_TOTAL}

@@ -42,7 +42,7 @@ -
+
{S_FORM_TOKEN}
@@ -59,7 +59,7 @@
-
+

{L_LATEST_REPORTED}

{L_REPORTS_TOTAL}

@@ -92,13 +92,13 @@ -
+
-
+

{L_LATEST_REPORTED_PMS}

{L_PM_REPORTS_TOTAL}

@@ -131,13 +131,13 @@ -
+
-
+

{L_LATEST_LOGS}

@@ -170,7 +170,7 @@
- + diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html index 13cc7e12cf..7b9e4c13cb 100644 --- a/phpBB/styles/prosilver/template/mcp_header.html +++ b/phpBB/styles/prosilver/template/mcp_header.html @@ -19,7 +19,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html index 713ab7d9da..0d7f357d5b 100644 --- a/phpBB/styles/prosilver/template/mcp_logs.html +++ b/phpBB/styles/prosilver/template/mcp_logs.html @@ -5,15 +5,19 @@
-
+
@@ -62,12 +66,16 @@ {S_FORM_TOKEN} -
+
@@ -80,7 +88,7 @@ {S_FORM_TOKEN} -
+
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html index 03a5c475db..4611412a9e 100644 --- a/phpBB/styles/prosilver/template/mcp_move.html +++ b/phpBB/styles/prosilver/template/mcp_move.html @@ -3,7 +3,7 @@
-
+

{MESSAGE_TITLE}

@@ -30,7 +30,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html index 38970198e7..3da66ccb2e 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_front.html +++ b/phpBB/styles/prosilver/template/mcp_notes_front.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+
@@ -15,7 +15,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html index 129f2ca839..d0d79f4664 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_user.html +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{USERNAME_FULL}

@@ -25,11 +25,11 @@
-
+
-
+

{L_ADD_FEEDBACK}

{L_ADD_FEEDBACK_EXPLAIN}

@@ -38,7 +38,7 @@
- +
@@ -48,15 +48,19 @@
-
+
@@ -102,12 +106,16 @@ -
+
diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 496d9ffd0f..752fbdd078 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -8,7 +8,7 @@
-
+

{L_REPORT_REASON}: {REPORT_REASON_TITLE}

@@ -25,7 +25,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
@@ -115,12 +115,12 @@
-
+
-
+

{L_MOD_OPTIONS}

@@ -159,18 +159,18 @@ -
+
-
+

{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}{RETURN_REPORTS} | {L_VIEW_POST} | {L_VIEW_TOPIC} | {L_VIEW_FORUM}{RETURN_TOPIC}

-
+
@@ -179,7 +179,7 @@
-
+
@@ -216,13 +216,13 @@
- +
-
+

{L_MCP_POST_REPORTS}

@@ -231,13 +231,13 @@

{reports.REASON_TITLE}: {reports.REASON_DESC}
{reports.REPORT_TEXT}

-
+
-
+

{L_THIS_POST_IP}: {POST_IPADDR}{POST_IP} ({POST_IP}{L_LOOKUP_IP}) @@ -289,7 +289,7 @@

{L_LOOKUP_ALL}

-
+
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index f86678ebe4..93483ae02a 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -11,15 +11,19 @@

{L_TITLE}

-
+

{L_EXPLAIN}

    @@ -73,15 +77,19 @@

    {L_NO_TOPICS_QUEUE}{L_NO_POSTS_QUEUE}

    -
+
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html index 5f06fc091e..aa67414713 100644 --- a/phpBB/styles/prosilver/template/mcp_reports.html +++ b/phpBB/styles/prosilver/template/mcp_reports.html @@ -13,15 +13,19 @@

{L_TITLE}

-
+

{L_EXPLAIN}

    @@ -74,8 +78,12 @@
    @@ -83,7 +91,7 @@

    {L_NO_REPORTS}

    -
+
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 5f240b73fc..a6938ee2fb 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -22,16 +22,15 @@ onload_functions.push('subPanels()');
@@ -41,7 +40,7 @@ onload_functions.push('subPanels()');
-
+
@@ -68,7 +67,7 @@ onload_functions.push('subPanels()');
-
+
@@ -91,11 +90,11 @@ onload_functions.push('subPanels()');
-
+
-
+

{L_EXPAND_VIEW} @@ -105,7 +104,7 @@ onload_functions.push('subPanels()');
-
+
@@ -133,23 +132,27 @@ onload_functions.push('subPanels()');
-
+

- + -

+
diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html index 2f7d939b16..df3497eb25 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_front.html +++ b/phpBB/styles/prosilver/template/mcp_warn_front.html @@ -5,7 +5,7 @@

{L_WARN_USER}

-
+

{L_SELECT_USER}

@@ -17,7 +17,7 @@
-
+
@@ -28,7 +28,7 @@
-
+

{L_MOST_WARNINGS}

@@ -58,11 +58,11 @@

{L_NO_WARNINGS}

-
+
-
+

{L_LATEST_WARNINGS}

@@ -91,7 +91,7 @@

{L_NO_WARNINGS}

-
+
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index 5e43903f11..fca377a823 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -5,15 +5,32 @@

{L_WARNED_USERS}

-
+

{L_WARNED_USERS_EXPLAIN}

@@ -48,15 +65,19 @@

{L_NO_WARNINGS}

-
+
{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html index fd8c60d25a..540abb9473 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_post.html +++ b/phpBB/styles/prosilver/template/mcp_warn_post.html @@ -5,7 +5,7 @@

{L_MCP_WARN_POST}

-
+

{USERNAME}{USERNAME}

@@ -25,11 +25,11 @@
-
+
-
+

{L_POST_DETAILS}

@@ -41,11 +41,11 @@
-
+
-
+

{L_ADD_WARNING}

{L_ADD_WARNING_EXPLAIN}

@@ -61,7 +61,7 @@
- +
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html index 6c326c8bc6..5e99c8d7e1 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_user.html +++ b/phpBB/styles/prosilver/template/mcp_warn_user.html @@ -5,7 +5,7 @@

{L_WARN_USER}

-
+

{USERNAME_FULL}

@@ -25,11 +25,11 @@
-
+
-
+

{L_ADD_WARNING}

{L_ADD_WARNING_EXPLAIN}

@@ -45,7 +45,7 @@
- +
diff --git a/phpBB/styles/prosilver/template/mcp_whois.html b/phpBB/styles/prosilver/template/mcp_whois.html index 0da9b6187e..88d3269a71 100644 --- a/phpBB/styles/prosilver/template/mcp_whois.html +++ b/phpBB/styles/prosilver/template/mcp_whois.html @@ -2,7 +2,7 @@

{L_WHOIS}

-
+

{L_RETURN_POST}

@@ -10,7 +10,7 @@

{L_RETURN_POST}

-
+
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 504d1b80ef..545d5000c4 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -28,7 +28,7 @@

{PAGE_TITLE}: {SEARCH_WORDS}

-
+
-
+
-
+
@@ -77,11 +82,11 @@
-
+
-
+
@@ -121,7 +126,7 @@
-
+
@@ -150,7 +155,14 @@
diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html index 9759abb859..97bea144e8 100644 --- a/phpBB/styles/prosilver/template/memberlist_email.html +++ b/phpBB/styles/prosilver/template/memberlist_email.html @@ -5,7 +5,7 @@
-
+

{ERROR_MESSAGE}

@@ -46,17 +46,17 @@
- +
-
+
-
+
{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 88c57eb8c5..ccef778ebb 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -6,7 +6,7 @@
-
+

{L_SEND_IM_EXPLAIN}

@@ -79,7 +79,7 @@ {S_FORM_TOKEN} -
+
diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html index bce1a69619..d0daa564c1 100644 --- a/phpBB/styles/prosilver/template/memberlist_leaders.html +++ b/phpBB/styles/prosilver/template/memberlist_leaders.html @@ -6,7 +6,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html index 9df648f644..2ea32fc774 100644 --- a/phpBB/styles/prosilver/template/memberlist_search.html +++ b/phpBB/styles/prosilver/template/memberlist_search.html @@ -44,7 +44,7 @@ function insert_single(user)
-
+

{L_FIND_USERNAME_EXPLAIN}

@@ -118,7 +118,7 @@ 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 d8bb92a731..b50e3a84ad 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -4,7 +4,7 @@
-
+
@@ -49,11 +49,11 @@
-
+
-
+

{L_CONTACT_USER} {USERNAME}

@@ -94,18 +94,18 @@
-
+
-
+

{L_SIGNATURE}

{SIGNATURE}
-
+
diff --git a/phpBB/styles/prosilver/template/message_body.html b/phpBB/styles/prosilver/template/message_body.html index 3a970769b7..fb6dfce35f 100644 --- a/phpBB/styles/prosilver/template/message_body.html +++ b/phpBB/styles/prosilver/template/message_body.html @@ -5,11 +5,11 @@
-
+

{MESSAGE_TITLE}

{MESSAGE_TEXT}

{L_RETURN_TO_SEARCH_ADV}

-
+
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index c84b327b71..b473e7022c 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -3,20 +3,20 @@
-
+

{L_POSTED_ATTACHMENTS}

@@ -177,13 +177,13 @@
-
+
-
+
{S_HIDDEN_ADDRESS_FIELD} {S_HIDDEN_FIELDS} @@ -194,7 +194,7 @@
-
+
@@ -210,7 +210,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html index b81c8162d7..a5cb3fc154 100644 --- a/phpBB/styles/prosilver/template/posting_layout.html +++ b/phpBB/styles/prosilver/template/posting_layout.html @@ -8,7 +8,7 @@
-
+
{L_FORUM_RULES} @@ -17,7 +17,7 @@ {FORUM_RULES} -
+
@@ -25,12 +25,12 @@
-
+

{L_INFORMATION}

{L_DRAFT_LOADED}

-
+
@@ -40,7 +40,7 @@
-
+

{L_SELECT_DESTINATION_FORUM}

{L_UNGLOBALISE_EXPLAIN}

@@ -55,21 +55,21 @@
-
+
-
+

{L_POST_A}

{S_FORM_TOKEN} -
+
diff --git a/phpBB/styles/prosilver/template/posting_pm_layout.html b/phpBB/styles/prosilver/template/posting_pm_layout.html index ebeb90b6d3..5421cc2cbd 100644 --- a/phpBB/styles/prosilver/template/posting_pm_layout.html +++ b/phpBB/styles/prosilver/template/posting_pm_layout.html @@ -2,12 +2,12 @@
-
+

{L_INFORMATION}

{L_DRAFT_LOADED_PM}

-
+
@@ -18,12 +18,12 @@

{L_TITLE}

-
+
-
+
diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html index ba0014ce57..3f64c5d5b5 100644 --- a/phpBB/styles/prosilver/template/posting_poll_body.html +++ b/phpBB/styles/prosilver/template/posting_poll_body.html @@ -1,5 +1,5 @@
-
+

{L_ADD_POLL_EXPLAIN}

@@ -52,5 +52,5 @@
-
+
diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html index 82227c23b0..16fc4ba233 100644 --- a/phpBB/styles/prosilver/template/posting_preview.html +++ b/phpBB/styles/prosilver/template/posting_preview.html @@ -1,5 +1,5 @@
-
+
@@ -16,11 +16,11 @@
-
+
-
+
@@ -41,7 +41,7 @@
{PREVIEW_SIGNATURE}
-
+

diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html index 540f116de4..2771c9829a 100644 --- a/phpBB/styles/prosilver/template/posting_review.html +++ b/phpBB/styles/prosilver/template/posting_review.html @@ -5,11 +5,11 @@
-
+
{post_review_row.L_IGNORE_POST}
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html index 9f7e25406e..01b74c710c 100644 --- a/phpBB/styles/prosilver/template/posting_smilies.html +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -10,14 +10,18 @@

{L_SMILIES}

-
+
{smiley.SMILEY_CODE} -
+
-
{PAGINATION}
-{L_CLOSE_WINDOW} + +{L_CLOSE_WINDOW} diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html index 1c4b67044d..5e7b36c526 100644 --- a/phpBB/styles/prosilver/template/posting_topic_review.html +++ b/phpBB/styles/prosilver/template/posting_topic_review.html @@ -14,11 +14,11 @@
-
+
{topic_review_row.L_IGNORE_POST}
-
+
@@ -45,7 +45,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html index a08b5dc3cc..5fcdf0f5d4 100644 --- a/phpBB/styles/prosilver/template/quickreply_editor.html +++ b/phpBB/styles/prosilver/template/quickreply_editor.html @@ -1,11 +1,11 @@
-
+

{L_QUICKREPLY}

-
+
@@ -17,6 +17,6 @@    
-
+
diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html index ec1a1e5820..3e876afe85 100644 --- a/phpBB/styles/prosilver/template/report_body.html +++ b/phpBB/styles/prosilver/template/report_body.html @@ -4,7 +4,7 @@
-
+

{L_REPORT_POST_EXPLAIN}{L_REPORT_MESSAGE_EXPLAIN}

@@ -30,11 +30,11 @@
-
+
-
+
@@ -44,7 +44,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index 4b1d30d77d..a8baafa5f1 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -11,7 +11,7 @@
-
+

{L_SEARCH_QUERY}

@@ -27,11 +27,11 @@
-
+
-
+

{L_SEARCH_OPTIONS}

@@ -81,25 +81,25 @@ -
+
-
+
{S_HIDDEN_FIELDS} 
-
+
-
+
@@ -121,7 +121,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index 942d154d44..063cc8c8ea 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -1,7 +1,9 @@

{SEARCH_TITLE}{SEARCH_MATCHES}: {SEARCH_WORDS}

+

{L_SEARCHED_QUERY}: {SEARCHED_QUERY}

{L_IGNORED_TERMS}: {IGNORED_WORDS}

+

{L_PHRASE_SEARCH_DISABLED}

{L_RETURN_TO}: {SEARCH_TOPIC}

@@ -9,7 +11,7 @@

{L_RETURN_TO_SEARCH_ADV}

- +
@@ -24,7 +26,13 @@
@@ -36,7 +44,7 @@
-
+
-
+
-
+
{L_NO_SEARCH_RESULTS} -
+
@@ -85,7 +106,7 @@
-
+
@@ -114,18 +135,18 @@ -
+
-
+
{L_NO_SEARCH_RESULTS} -
+
- +
@@ -142,10 +163,29 @@
- + diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 64dd2ff96b..897e50ced7 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -7,7 +7,7 @@
- + {SCRIPTS} diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index f0dcbed5a4..5440d66520 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -40,18 +40,18 @@ // ]]> - + - + - + diff --git a/phpBB/styles/prosilver/template/timezone.js b/phpBB/styles/prosilver/template/timezone.js new file mode 100644 index 0000000000..da0a2b0bfd --- /dev/null +++ b/phpBB/styles/prosilver/template/timezone.js @@ -0,0 +1,19 @@ +(function($) { // Avoid conflicts with other libraries + +$('#tz_date').change(function() { + phpbb.timezone_switch_date(false); +}); + +$('#tz_select_date_suggest').click(function(){ + phpbb.timezone_preselect_select(true); +}); + +$(document).ready( + phpbb.timezone_enable_date_selection +); + +$(document).ready( + phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == 'true') +); + +})(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/styles/prosilver/template/timezone_option.html b/phpBB/styles/prosilver/template/timezone_option.html new file mode 100644 index 0000000000..94e2bbdfbd --- /dev/null +++ b/phpBB/styles/prosilver/template/timezone_option.html @@ -0,0 +1,20 @@ +
+
+ + + +
+ + + +
+
diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index 3825abc08f..4109b6ef34 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -31,16 +31,16 @@
-
+

{SITENAME} - {L_REGISTRATION}

{L_COPPA_BIRTHDAY}{L_TERMS_OF_USE}

-
+
-
+
{L_COPPA_NO}  {L_COPPA_YES} @@ -51,21 +51,21 @@ {S_HIDDEN_FIELDS} {S_FORM_TOKEN}
-
+
-
+

{SITENAME} - {AGREEMENT_TITLE}

{AGREEMENT_TEXT}


{L_BACK}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index 5a15339b8a..2160d8fcf7 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -5,15 +5,19 @@

{L_TITLE}

-
+

{L_ATTACHMENTS_EXPLAIN}

@@ -55,15 +59,19 @@

{L_UCP_NO_ATTACHMENTS}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html index 7012c42f3b..9801e065a5 100644 --- a/phpBB/styles/prosilver/template/ucp_avatar_options.html +++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html @@ -1,6 +1,6 @@
-
+

{L_AVATAR_FEATURES_DISABLED}

@@ -43,11 +43,11 @@ -
+
-
+

{L_AVATAR_GALLERY}

@@ -66,5 +66,5 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index a6f8e1d793..892a5d12b4 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -5,7 +5,7 @@
-
+

{L_GROUPS_EXPLAIN}

@@ -45,11 +45,11 @@ -
+
-
+

{L_GROUP_SETTINGS_SAVE}

@@ -63,7 +63,7 @@
-
+
@@ -159,11 +159,15 @@ -
+
@@ -173,7 +177,7 @@
-
+

{L_ADD_USERS}

@@ -194,7 +198,7 @@ -
+
@@ -230,7 +234,7 @@

{L_NO_LEADERS}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html index 26ee6d8a52..5cb238082a 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_membership.html +++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html @@ -5,7 +5,7 @@
-
+

{L_GROUPS_EXPLAIN}

@@ -66,12 +66,12 @@ -
+
-
+
  • @@ -93,17 +93,17 @@
    {pending.GROUP_DESC}
    {pending.GROUP_STATUS} -
    disabled="diabled" />
    +
    disabled="disabled" />
-
+
-
+
  • @@ -130,7 +130,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html index 4d008564c4..c5d58b8eaa 100644 --- a/phpBB/styles/prosilver/template/ucp_header.html +++ b/phpBB/styles/prosilver/template/ucp_header.html @@ -15,7 +15,7 @@
-
+
@@ -63,7 +63,7 @@
-
+
{L_FRIENDS}
@@ -77,13 +77,13 @@
-
+
-
+
{L_MESSAGE_COLOURS}
@@ -92,7 +92,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html index 50310f3b79..8707a749c1 100644 --- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html +++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{L_BOOKMARKS_EXPLAIN}

@@ -36,7 +36,20 @@ {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {REPORTED_IMG}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} @@ -50,8 +63,12 @@ @@ -60,7 +77,7 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html index 2fc9e3e1fc..2155abeda3 100644 --- a/phpBB/styles/prosilver/template/ucp_main_drafts.html +++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html @@ -5,14 +5,14 @@

{L_TITLE}

-
+

{L_DRAFTS_EXPLAIN}

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

{L_NO_SAVED_DRAFTS}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html index 20afd119cc..04767b6c01 100644 --- a/phpBB/styles/prosilver/template/ucp_main_front.html +++ b/phpBB/styles/prosilver/template/ucp_main_front.html @@ -3,7 +3,7 @@

{L_TITLE}

-
+

{L_UCP_WELCOME}

@@ -16,7 +16,20 @@
style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"> {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} @@ -39,7 +52,7 @@
{L_YOUR_WARNINGS}:
{WARNING_IMG} [{WARNINGS}]
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html index 2711c9486f..11957aa90d 100644 --- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html +++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html @@ -4,7 +4,7 @@

{L_TITLE}

-
+

{L_WATCHED_EXPLAIN}

@@ -56,7 +56,20 @@ {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {REPORTED_IMG}
- {topicrow.PAGINATION} + + + {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME}
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} @@ -69,15 +82,19 @@

{L_NO_WATCHED_TOPICS}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index 9051eb2ee0..d7fcbb9e54 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -12,7 +12,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html index ae66dd0a36..c02a34f83d 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html +++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html @@ -3,7 +3,7 @@
-
+

{FOLDER_STATUS}

@@ -20,8 +20,12 @@ diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html index c2a2e58c97..dde8ee639b 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_options.html +++ b/phpBB/styles/prosilver/template/ucp_pm_options.html @@ -5,7 +5,7 @@
-
+

{ERROR_MESSAGE}

{NOTIFICATION_MESSAGE}

@@ -123,7 +123,7 @@ -
+
{S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/ucp_pm_popup.html b/phpBB/styles/prosilver/template/ucp_pm_popup.html index 1a9a4d015e..4cc39ee450 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_popup.html +++ b/phpBB/styles/prosilver/template/ucp_pm_popup.html @@ -14,12 +14,12 @@ function jump_to_inbox(url)
-
+

{L_LOGIN_CHECK_PM}{MESSAGE}

{CLICK_TO_VIEW}

{L_CLOSE_WINDOW}

-
+
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index dac03c3505..195b212da3 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -8,7 +8,7 @@

{L_EXPORT_AS_CSV}

-
+

{L_OPTIONS}

@@ -20,7 +20,7 @@
-
+
@@ -103,14 +103,18 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 5411fda572..2e7a7c4ac9 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -2,7 +2,7 @@ - + @@ -15,7 +15,7 @@
-
+
@@ -96,7 +96,7 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html index bafb64dbc8..43e7de2e12 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -17,10 +17,9 @@
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html index 635f321469..29c01e03b9 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{ERROR}

@@ -73,17 +73,7 @@
-
-
-
-
-
-
-
- - -
-
+

{L_BOARD_DATE_FORMAT_EXPLAIN}
@@ -95,7 +85,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html index ee3ae3f34e..0ca51ed7d6 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_post.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html @@ -4,7 +4,7 @@

{L_TITLE}

-
+

{ERROR}

@@ -38,7 +38,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html index 125a62e12a..2e47c2e054 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_view.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{ERROR}

@@ -81,7 +81,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html new file mode 100644 index 0000000000..a6c19508e2 --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -0,0 +1,53 @@ + + + + +

{L_TITLE}

+
+
+ +
+ +

+ + {errors}
+ +

+ + +

{L_PROFILE_AUTOLOGIN_KEYS}


+ + + + + + + + + + + + + + + + + + + + + +
{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
{sessions.IP}{sessions.LOGIN_TIME}
{L_PROFILE_NO_AUTOLOGIN_KEYS}
+
+
+
+ + +
+ {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} +
+ + + + diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 0f53c82e76..b6f6a8988d 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{L_PROFILE_INFO_NOTICE}

@@ -66,7 +66,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html index 9d4a9e3463..5c0639fce7 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html +++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html @@ -4,7 +4,7 @@

{L_TITLE}

-
+

{L_FORCE_PASSWORD_EXPLAIN}

@@ -31,24 +31,24 @@
-
+
-
+
-

{L_CURRENT_PASSWORD_EXPLAIN}
+

{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}{L_CURRENT_PASSWORD_EXPLAIN}
-
+
- {S_HIDDEN_FIELDS}  + {S_HIDDEN_FIELDS}  {S_FORM_TOKEN}
diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html index cf5a6c3229..574f61ed9f 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_signature.html +++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html @@ -6,17 +6,17 @@
-
+

{L_SIGNATURE_PREVIEW}

{SIGNATURE_PREVIEW}
-
+
-
+

{L_SIGNATURE_EXPLAIN}

@@ -36,7 +36,7 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 30ed37eecc..994356efe6 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -21,7 +21,7 @@
-
+

{SITENAME} - {L_REGISTRATION}

@@ -53,10 +53,8 @@
-
-
-
-
+ +
{L_ITEMS_REQUIRED}
@@ -72,7 +70,7 @@
- + @@ -83,17 +81,17 @@
-
+

{L_COPPA_COMPLIANCE}

{L_COPPA_EXPLAIN}

-
+
-
+
{S_HIDDEN_FIELDS} @@ -102,8 +100,11 @@ {S_FORM_TOKEN}
-
+
+ + + diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html index afc23b3f21..d480258209 100644 --- a/phpBB/styles/prosilver/template/ucp_remind.html +++ b/phpBB/styles/prosilver/template/ucp_remind.html @@ -3,7 +3,7 @@
-
+

{L_SEND_PASSWORD}

@@ -25,7 +25,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html index 0481c2a601..36e112863c 100644 --- a/phpBB/styles/prosilver/template/ucp_resend.html +++ b/phpBB/styles/prosilver/template/ucp_resend.html @@ -4,7 +4,7 @@
-
+

{L_UCP_RESEND}

@@ -25,7 +25,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html index 8a2c9cbff5..7aceac74c3 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_foes.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{L_FOES_EXPLAIN}

@@ -28,7 +28,7 @@ -
+
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html index 928ec1a881..8908e4ba69 100644 --- a/phpBB/styles/prosilver/template/ucp_zebra_friends.html +++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html @@ -5,7 +5,7 @@

{L_TITLE}

-
+

{L_FRIENDS_EXPLAIN}

@@ -28,7 +28,7 @@
- +
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index d17203efa0..373a172918 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -12,7 +12,7 @@
-
+
{L_FORUM_RULES} @@ -21,7 +21,7 @@ {FORUM_RULES} -
+
@@ -34,7 +34,7 @@ - +
style="margin-top: 2em;"> @@ -55,11 +55,14 @@
- + @@ -70,9 +73,9 @@
-
+
{L_NO_READ_ACCESS} -
+
@@ -80,7 +83,7 @@
-
+

{L_LOGIN_LOGOUT}  •  {L_REGISTER}

@@ -104,7 +107,7 @@
- + @@ -117,13 +120,13 @@ - +
-
+
-
+
-
+
{L_NO_TOPICS} -
+
@@ -193,13 +209,16 @@ - + diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html index 3f1f0e64bf..9156090407 100644 --- a/phpBB/styles/prosilver/template/viewonline_body.html +++ b/phpBB/styles/prosilver/template/viewonline_body.html @@ -4,11 +4,17 @@

{TOTAL_GUEST_USERS_ONLINE}{L_SWITCH_GUEST_DISPLAY}

-
+
@@ -38,7 +44,7 @@
-
+
@@ -50,7 +56,13 @@

{L_LEGEND}: {LEGEND}

diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html index 88a41a1a3f..8abd933efa 100644 --- a/phpBB/styles/prosilver/template/viewonline_whois.html +++ b/phpBB/styles/prosilver/template/viewonline_whois.html @@ -3,13 +3,13 @@

{L_WHOIS}

-
+
{WHOIS}
-
+
{L_CLOSE_WINDOW} diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 3c551b3d52..cfbf0969d9 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -12,7 +12,7 @@
-
+
{L_FORUM_RULES} @@ -21,7 +21,7 @@ {FORUM_RULES} -
+
@@ -45,10 +45,14 @@ - + @@ -59,7 +63,7 @@
-
+

{POLL_QUESTION}

@@ -98,7 +102,7 @@
-
+
{S_FORM_TOKEN} {S_HIDDEN_FIELDS}
@@ -111,7 +115,7 @@
-
+
@@ -221,7 +225,7 @@ -
+

@@ -252,10 +256,24 @@
- + @@ -263,7 +281,7 @@ - +
+ {L_SPLIT_FORUM} diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 4f686cf5e4..24c6f8105c 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -9,7 +9,7 @@ - + {SCRIPTS} diff --git a/phpBB/styles/subsilver2/template/pagination.html b/phpBB/styles/subsilver2/template/pagination.html index a36eb88d8f..f78bb554fc 100644 --- a/phpBB/styles/subsilver2/template/pagination.html +++ b/phpBB/styles/subsilver2/template/pagination.html @@ -1 +1,11 @@ -{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT} + + {L_GOTO_PAGE} + + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + {L_ELLIPSIS} + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + + + diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 0b44446abd..ae7d2f88d6 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -127,7 +127,7 @@ - +
{L_NO_TOPIC_ICON}{L_NO_PM_ICON} {L_NO_TOPIC_ICON}{L_NO_PM_ICON}
@@ -173,7 +173,7 @@ {L_SUBJECT}: - + {L_MESSAGE_BODY}:
{L_MESSAGE_BODY_EXPLAIN} 

diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index a9105b5eec..cfe69dee56 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -16,6 +16,7 @@ q: '{LA_BBCODE_Q_HELP}', c: '{LA_BBCODE_C_HELP}', l: '{LA_BBCODE_L_HELP}', + e: '{LA_BBCODE_LISTITEM_HELP}', o: '{LA_BBCODE_O_HELP}', p: '{LA_BBCODE_P_HELP}', w: '{LA_BBCODE_W_HELP}', diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html index 691ba239b2..30a80e26ab 100644 --- a/phpBB/styles/subsilver2/template/posting_smilies.html +++ b/phpBB/styles/subsilver2/template/posting_smilies.html @@ -16,7 +16,20 @@ {L_SMILIES} - {smiley.SMILEY_CODE}
{PAGINATION}
{L_CLOSE_WINDOW} + {smiley.SMILEY_CODE}
+ + {L_GOTO_PAGE} + + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + {L_ELLIPSIS} + {pagination.PAGE_NUMBER} + {pagination.PAGE_NUMBER} + + +
+ + {L_CLOSE_WINDOW} diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html index 4c3f7a3d0b..7a68a8f605 100644 --- a/phpBB/styles/subsilver2/template/quickreply_editor.html +++ b/phpBB/styles/subsilver2/template/quickreply_editor.html @@ -6,7 +6,7 @@ {L_SUBJECT}: - + {L_MESSAGE}: diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index d8a1879ca7..a143a186d7 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -42,8 +42,17 @@ {REPORTED_IMG}  - -

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

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {searchresults.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {searchresults.pagination.PAGE_NUMBER} + + + ]

{L_IN} {searchresults.FORUM_TITLE}

diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html index 771765ee12..6082b71891 100644 --- a/phpBB/styles/subsilver2/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -6,7 +6,7 @@ - + {SCRIPTS} diff --git a/phpBB/styles/subsilver2/template/timezone.js b/phpBB/styles/subsilver2/template/timezone.js new file mode 100644 index 0000000000..da0a2b0bfd --- /dev/null +++ b/phpBB/styles/subsilver2/template/timezone.js @@ -0,0 +1,19 @@ +(function($) { // Avoid conflicts with other libraries + +$('#tz_date').change(function() { + phpbb.timezone_switch_date(false); +}); + +$('#tz_select_date_suggest').click(function(){ + phpbb.timezone_preselect_select(true); +}); + +$(document).ready( + phpbb.timezone_enable_date_selection +); + +$(document).ready( + phpbb.timezone_preselect_select($('#tz_select_date_suggest').attr('data-is-registration') == 'true') +); + +})(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/styles/subsilver2/template/timezone_option.html b/phpBB/styles/subsilver2/template/timezone_option.html new file mode 100644 index 0000000000..3f1e14b33d --- /dev/null +++ b/phpBB/styles/subsilver2/template/timezone_option.html @@ -0,0 +1,20 @@ + + {L_BOARD_TIMEZONE}: + + + + + + + + + diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html index ea64dcb299..1566a15929 100644 --- a/phpBB/styles/subsilver2/template/ucp_header.html +++ b/phpBB/styles/subsilver2/template/ucp_header.html @@ -26,7 +26,7 @@ {L_USERNAMES}: -
+
[ {L_FIND_USERNAME} ] @@ -41,7 +41,7 @@ -
  
  
+
  
  
diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html index 2fa8f6ac2e..ba19c45eab 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html +++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html @@ -43,8 +43,17 @@

{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}

{L_GLOBAL_ANNOUNCEMENT}{L_FORUM}: {topicrow.FORUM_NAME} - -

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

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html index 42a452549b..13d2935757 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html +++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html @@ -52,8 +52,17 @@

{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TITLE}

{L_GLOBAL_ANNOUNCEMENT}{L_FORUM}: {topicrow.FORUM_NAME} - -

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

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html index 8e4b04fc10..bf0e67d68b 100644 --- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html +++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html @@ -71,16 +71,7 @@ - - {L_BOARD_TIMEZONE}: - - - - - - {L_BOARD_DST}: - checked="checked" /> {L_YES}   checked="checked" /> {L_NO} - + {L_BOARD_DATE_FORMAT}:
{L_BOARD_DATE_FORMAT_EXPLAIN} diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html new file mode 100644 index 0000000000..1dab9acb9c --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_TITLE}
+ + {errors}
+ +
{L_PROFILE_AUTOLOGIN_KEYS}
{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
{sessions.IP}{sessions.LOGIN_TIME}
{L_PROFILE_NO_AUTOLOGIN_KEYS}
+ {S_HIDDEN_FIELDS} + {S_FORM_TOKEN} +
+ + diff --git a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html index 96e2e26683..71b34499d1 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html @@ -36,7 +36,7 @@ {L_CONFIRM_CHANGES} - {L_CURRENT_PASSWORD}:
{L_CURRENT_PASSWORD_EXPLAIN} + {L_CURRENT_PASSWORD}:
{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}{L_CURRENT_PASSWORD_EXPLAIN} diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html index 0c3533292d..095c97ed49 100644 --- a/phpBB/styles/subsilver2/template/ucp_register.html +++ b/phpBB/styles/subsilver2/template/ucp_register.html @@ -53,10 +53,9 @@ {L_LANGUAGE}: - - {L_TIMEZONE}: - - + + + {L_ITEMS_REQUIRED} diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index f132185716..7f241ce874 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -48,8 +48,17 @@ {REPORTED_IMG}  - -

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

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

{topicrow.TOPIC_AUTHOR_FULL}

@@ -154,7 +163,7 @@ - +
@@ -199,8 +208,17 @@ {REPORTED_IMG}  - -

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

+ +

[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: + + + {topicrow.pagination.PAGE_NUMBER} + {L_ELLIPSIS} + + {topicrow.pagination.PAGE_NUMBER} + + + ]

{L_IN} {topicrow.FORUM_NAME}

diff --git a/phpBB/styles/subsilver2/template/viewonline_body.html b/phpBB/styles/subsilver2/template/viewonline_body.html index 1c8734d06a..b05a9470e0 100644 --- a/phpBB/styles/subsilver2/template/viewonline_body.html +++ b/phpBB/styles/subsilver2/template/viewonline_body.html @@ -8,7 +8,7 @@ - +
{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT}
@@ -39,7 +39,7 @@ - +
{L_GOTO_PAGE} {L_PREVIOUS}  {PAGINATION}  {L_NEXT}
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 2c5351b926..a4e2dd886a 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -52,8 +52,8 @@   - {L_WATCH_TOPIC} | - {L_BOOKMARK_TOPIC} | + {S_WATCH_TOPIC_TITLE} | + {S_BOOKMARK_TOPIC} | {L_PRINT_TOPIC} | {L_EMAIL_TOPIC} | {L_BUMP_TOPIC} diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 76d5c8ccff..22dc00716a 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -208,7 +208,9 @@ if (!$config['use_system_cron']) // Forum rules and subscription info $s_watching_forum = array( 'link' => '', + 'link_toggle' => '', 'title' => '', + 'title_toggle' => '', 'is_watching' => false, ); @@ -322,8 +324,10 @@ $template->assign_vars(array( 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_TOPIC_ICONS' => ($s_display_active && sizeof($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false), - 'S_WATCH_FORUM_LINK' => $s_watching_forum['link'], + 'U_WATCH_FORUM_LINK' => $s_watching_forum['link'], + 'U_WATCH_FORUM_TOGGLE' => $s_watching_forum['link_toggle'], 'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'], + 'S_WATCH_FORUM_TOGGLE' => $s_watching_forum['title_toggle'], 'S_WATCHING_FORUM' => $s_watching_forum['is_watching'], 'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . (($start == 0) ? '' : "&start=$start")), 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false, @@ -590,9 +594,11 @@ if ($s_display_active) // otherwise the number is different from the one on the forum list $total_topic_count = $topics_count - sizeof($global_announce_forums); +$base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')); +phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start); + $template->assign_vars(array( - 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start), - 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $topics_count, $config['topics_per_page'], $start), 'TOTAL_TOPICS' => ($s_display_active) ? false : $user->lang('VIEW_FORUM_TOPICS', (int) $total_topic_count), )); @@ -702,7 +708,6 @@ if (sizeof($topic_list)) 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']), - 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url), 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], 'TOPIC_TITLE' => censor_text($row['topic_title']), @@ -744,6 +749,8 @@ if (sizeof($topic_list)) 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test) ); + phpbb_generate_template_pagination($template, $view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); + $s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0; if ($unread_topic) diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 08ca7f7a04..48362a9d67 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -342,8 +342,6 @@ while ($row = $db->sql_fetchrow($result)) $db->sql_freeresult($result); unset($prev_id, $prev_ip); -$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&sk=$sort_key&sd=$sort_dir"), $counter, $config['topics_per_page'], $start); - $order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend'; // Grab group details for legend display if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) @@ -386,13 +384,16 @@ $db->sql_freeresult($result); // Refreshing the page every 60 seconds... meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&sk=$sort_key&sd=$sort_dir&start=$start")); +$base_url = append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&sk=$sort_key&sd=$sort_dir"); +phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $counter, $config['topics_per_page'], $start); + // Send data to template $template->assign_vars(array( 'TOTAL_REGISTERED_USERS_ONLINE' => $user->lang('REG_USERS_ONLINE', (int) $logged_visible_online, $user->lang('HIDDEN_USERS_ONLINE', (int) $logged_hidden_online)), 'TOTAL_GUEST_USERS_ONLINE' => $user->lang('GUEST_USERS_ONLINE', (int) $guest_counter), 'LEGEND' => $legend, 'PAGINATION' => $pagination, - 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $counter, $config['topics_per_page'], $start), 'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&sg=' . ((int) $show_guests)), 'U_SORT_UPDATED' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=b&sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&sg=' . ((int) $show_guests)), diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index a43edee5da..349f53cbe2 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -449,7 +449,9 @@ $viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&a // Are we watching this topic? $s_watching_topic = array( 'link' => '', + 'link_toggle' => '', 'title' => '', + 'title_toggle' => '', 'is_watching' => false, ); @@ -543,9 +545,6 @@ foreach($quickmod_array as $option => $qm_ary) } } -// If we've got a hightlight set pass it on to pagination. -$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start); - // Navigation links generate_forum_nav($topic_data); @@ -583,6 +582,10 @@ if (!empty($_EXTRA_URL)) } } +// If we've got a hightlight set pass it on to pagination. +$base_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')); +phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_posts, $config['posts_per_page'], $start); + // Send vars to template $template->assign_vars(array( 'FORUM_ID' => $forum_id, @@ -596,8 +599,7 @@ $template->assign_vars(array( 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), 'TOPIC_AUTHOR' => get_username_string('username', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), - 'PAGINATION' => $pagination, - 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start), + 'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $total_posts, $config['posts_per_page'], $start), 'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total_posts), 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=topic_view&f=$forum_id&t=$topic_id" . (($start == 0) ? '' : "&start=$start") . ((strlen($u_sort_param)) ? "&$u_sort_param" : ''), true, $user->session_id) : '', 'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '', @@ -649,13 +651,15 @@ $template->assign_vars(array( 'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&view=print' : '', 'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&t=$topic_id") : '', - 'U_WATCH_TOPIC' => $s_watching_topic['link'], - 'L_WATCH_TOPIC' => $s_watching_topic['title'], + 'U_WATCH_TOPIC' => $s_watching_topic['link'], + 'U_WATCH_TOPIC_TOGGLE' => $s_watching_topic['link_toggle'], + 'S_WATCH_TOPIC_TITLE' => $s_watching_topic['title'], + 'S_WATCH_TOPIC_TOGGLE' => $s_watching_topic['title_toggle'], 'S_WATCHING_TOPIC' => $s_watching_topic['is_watching'], 'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&bookmark=1&hash=' . generate_link_hash("topic_$topic_id") : '', - 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], - 'L_BOOKMARK_TOPIC_REAL' => $user->lang['BOOKMARK_TOPIC'], + 'S_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], + 'S_BOOKMARK_TOGGLE' => (!$user->data['is_registered'] || !$config['allow_bookmarks'] || !$topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'], 'S_BOOKMARKED_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? true : false, 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&f=$forum_id") : '', @@ -986,7 +990,8 @@ $sql_ary = array( $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); -$now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); +$now = $user->create_datetime(); +$now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset()); // Posts are stored in the $rowset array while $attach_list, $user_cache // and the global bbcode_bitfield are built @@ -1099,7 +1104,7 @@ while ($row = $db->sql_fetchrow($result)) { $user_sig = ''; - // We add the signature to every posters entry because enable_sig is post dependant + // We add the signature to every posters entry because enable_sig is post dependent if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs')) { $user_sig = $row['user_sig']; @@ -1629,7 +1634,8 @@ else $all_marked_read = true; } -// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link +// If there are absolutely no more unread posts in this forum +// and unread posts shown, we can safely show the #unread link if ($all_marked_read) { if ($post_unread) diff --git a/tests/RUNNING_TESTS.txt b/tests/RUNNING_TESTS.txt index 59197acc0f..7c2a7c3fce 100644 --- a/tests/RUNNING_TESTS.txt +++ b/tests/RUNNING_TESTS.txt @@ -21,12 +21,13 @@ the following PHP extensions must be installed and enabled to run unit tests: Database Tests -------------- + By default all tests requiring a database connection will use sqlite. If you do not have sqlite installed the tests will be skipped. If you wish to run the tests on a different database you have to create a test_config.php file within -your tests directory following the same format as phpBB's config.php. An example -for mysqli can be found below. More information on configuration options can be -found on the wiki (see below). +your tests directory following the same format as phpBB's config.php. An +example for mysqli can be found below. More information on configuration +options can be found on the wiki (see below). register(); $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', $phpbb_root_path . 'ext/', ".php"); $phpbb_class_loader_ext->register(); $phpbb_class_loader = new phpbb_class_loader('phpbb_', $phpbb_root_path . 'includes/', ".php"); diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php index 80f0b38095..76af4dde37 100644 --- a/tests/class_loader/class_loader_test.php +++ b/tests/class_loader/class_loader_test.php @@ -7,8 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; - class phpbb_class_loader_test extends PHPUnit_Framework_TestCase { public function setUp() diff --git a/tests/config/db_test.php b/tests/config/db_test.php index a9a53541a5..0b8f73d53a 100644 --- a/tests/config/db_test.php +++ b/tests/config/db_test.php @@ -7,8 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; - class phpbb_config_db_test extends phpbb_database_test_case { private $cache; diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php index 8ed33b06e2..3c541be2a6 100644 --- a/tests/cron/manager_test.php +++ b/tests/cron/manager_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/extension_manager.php'; require_once dirname(__FILE__) . '/includes/cron/task/core/dummy_task.php'; require_once dirname(__FILE__) . '/includes/cron/task/core/second_dummy_task.php'; require_once dirname(__FILE__) . '/ext/testext/cron/dummy_task.php'; diff --git a/tests/cron/task_provider_test.php b/tests/cron/task_provider_test.php index 4458d811a5..ec853bb3ba 100644 --- a/tests/cron/task_provider_test.php +++ b/tests/cron/task_provider_test.php @@ -7,10 +7,6 @@ * */ -require_once dirname(__FILE__) . '/includes/cron/task/core/dummy_task.php'; -require_once dirname(__FILE__) . '/includes/cron/task/core/second_dummy_task.php'; -require_once dirname(__FILE__) . '/ext/testext/cron/dummy_task.php'; - class phpbb_cron_task_provider_test extends PHPUnit_Framework_TestCase { public function setUp() diff --git a/tests/datetime/from_format_test.php b/tests/datetime/from_format_test.php new file mode 100644 index 0000000000..c28925272e --- /dev/null +++ b/tests/datetime/from_format_test.php @@ -0,0 +1,57 @@ +timezone = new DateTimeZone($timezone); + $user->lang['datetime'] = array( + 'TODAY' => 'Today', + 'TOMORROW' => 'Tomorrow', + 'YESTERDAY' => 'Yesterday', + 'AGO' => array( + 0 => 'less than a minute ago', + 1 => '%d minute ago', + 2 => '%d minutes ago', + ), + ); + + $timestamp = $user->get_timestamp_from_format($format, $expected, new DateTimeZone($timezone)); + $this->assertEquals($expected, $user->format_date($timestamp, $format, true)); + } +} diff --git a/tests/dbal/auto_increment_test.php b/tests/dbal/auto_increment_test.php new file mode 100644 index 0000000000..e87fc1c6bd --- /dev/null +++ b/tests/dbal/auto_increment_test.php @@ -0,0 +1,100 @@ +createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml'); + } + + protected function setUp() + { + parent::setUp(); + + $this->db = $this->new_dbal(); + $this->tools = new phpbb_db_tools($this->db); + + $this->table_data = array( + 'COLUMNS' => array( + 'c_id' => array('UINT', NULL, 'auto_increment'), + 'c_uint' => array('UINT', 4), + ), + 'PRIMARY_KEY' => 'c_id', + ); + $this->tools->sql_create_table('prefix_table_name', $this->table_data); + $this->table_exists = true; + } + + protected function tearDown() + { + if ($this->table_exists) + { + $this->tools->sql_table_drop('prefix_table_name'); + } + + parent::tearDown(); + } + + static protected function get_default_values() + { + return array( + 'c_uint' => 0, + ); + } + + public function test_auto_increment() + { + $sql = 'DELETE FROM prefix_table_name'; + $result = $this->db->sql_query($sql); + + $row1 = array_merge(self::get_default_values(), array( + 'c_uint' => 1, + )); + $row2 = array_merge(self::get_default_values(), array( + 'c_uint' => 2, + )); + + $sql = 'INSERT INTO prefix_table_name ' . $this->db->sql_build_array('INSERT', $row1); + $result = $this->db->sql_query($sql); + $id1 = $this->db->sql_nextid(); + + $sql = 'INSERT INTO prefix_table_name ' . $this->db->sql_build_array('INSERT', $row2); + $result = $this->db->sql_query($sql); + $id2 = $this->db->sql_nextid(); + + $this->assertGreaterThan($id1, $id2, 'Auto increment should increase the id value'); + + $sql = "SELECT * + FROM prefix_table_name WHERE c_id = $id1"; + $result = $this->db->sql_query($sql); + $row_actual = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + + $row1['c_id'] = $id1; + $this->assertEquals($row1, $row_actual); + + $sql = "SELECT * + FROM prefix_table_name WHERE c_id = $id2"; + $result = $this->db->sql_query($sql); + $row_actual = $this->db->sql_fetchrow($result); + $this->db->sql_freeresult($result); + + $row2['c_id'] = $id2; + $this->assertEquals($row2, $row_actual); + } +} diff --git a/tests/dbal/case_test.php b/tests/dbal/case_test.php new file mode 100644 index 0000000000..57a1729a39 --- /dev/null +++ b/tests/dbal/case_test.php @@ -0,0 +1,69 @@ +createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml'); + } + + public function test_case_int() + { + $db = $this->new_dbal(); + + $sql = 'SELECT ' . $db->sql_case('1 = 1', '1', '2') . ' AS test_num + FROM phpbb_config'; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals(1, (int) $db->sql_fetchfield('test_num')); + + $sql = 'SELECT ' . $db->sql_case('1 = 0', '1', '2') . ' AS test_num + FROM phpbb_config'; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals(2, (int) $db->sql_fetchfield('test_num')); + } + + public function test_case_string() + { + $db = $this->new_dbal(); + + $sql = 'SELECT ' . $db->sql_case('1 = 1', "'foo'", "'bar'") . ' AS test_string + FROM phpbb_config'; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals('foo', $db->sql_fetchfield('test_string')); + + $sql = 'SELECT ' . $db->sql_case('1 = 0', "'foo'", "'bar'") . ' AS test_string + FROM phpbb_config'; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals('bar', $db->sql_fetchfield('test_string')); + } + + public function test_case_column() + { + $db = $this->new_dbal(); + + $sql = 'SELECT ' . $db->sql_case("config_name = 'config1'", 'config_name', 'config_value') . " AS test_string + FROM phpbb_config + WHERE config_name = 'config1'"; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals('config1', $db->sql_fetchfield('test_string')); + + $sql = 'SELECT ' . $db->sql_case("config_name = 'config1'", 'config_name', 'config_value') . " AS test_string + FROM phpbb_config + WHERE config_value = 'bar'"; + $result = $db->sql_query_limit($sql, 1); + + $this->assertEquals('bar', $db->sql_fetchfield('test_string')); + } +} diff --git a/tests/dbal/concatenate_test.php b/tests/dbal/concatenate_test.php new file mode 100644 index 0000000000..0891fa58a0 --- /dev/null +++ b/tests/dbal/concatenate_test.php @@ -0,0 +1,64 @@ +createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml'); + } + + public function test_concatenate_string() + { + $db = $this->new_dbal(); + + $sql = 'SELECT config_name, ' . $db->sql_concatenate('config_name', "'" . $db->sql_escape('append') . "'") . ' AS string + FROM phpbb_config'; + $result = $db->sql_query($sql); + + $db->sql_return_on_error(false); + + $this->assertEquals(array( + array( + 'config_name' => 'config1', + 'string' => 'config1append', + ), + array( + 'config_name' => 'config2', + 'string' => 'config2append', + ), + ), + $db->sql_fetchrowset($result) + ); + } + + public function test_concatenate_statement() + { + $db = $this->new_dbal(); + + $sql = 'SELECT config_name, ' . $db->sql_concatenate('config_name', 'config_value') . ' AS string + FROM phpbb_config'; + $result = $db->sql_query($sql); + + $db->sql_return_on_error(false); + + $this->assertEquals(array( + array( + 'config_name' => 'config1', + 'string' => 'config1foo', + ), + array( + 'config_name' => 'config2', + 'string' => 'config2bar', + ), + ), + $db->sql_fetchrowset($result) + ); + } +} diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index fbde636b58..c20e46011f 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -106,7 +106,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case 'c_bool' => 0, 'c_vchar' => '', 'c_vchar_size' => '', - 'c_char_size' => '', + 'c_char_size' => 'abcd', 'c_xstext' => '', 'c_stext' => '', 'c_text' => '', @@ -165,6 +165,11 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case */ public function test_created_column($column_name, $column_value) { + if ($column_name === 'c_varbinary' && stripos(get_class($this->db), 'mysql') === false) + { + $this->markTestIncomplete('Binary handling is not implemented properly on non-MySQL DBMSes.'); + } + $row_insert = self::get_default_values(); $row_insert[$column_name] = $column_value; @@ -189,51 +194,6 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->assertEquals($row_expect[$column_name], $row_actual[$column_name], "Column $column_name of type $type should have equal return and input value."); } - public function test_auto_increment() - { - $sql = 'DELETE FROM prefix_table_name'; - $result = $this->db->sql_query($sql); - - $row1 = array_merge(self::get_default_values(), array( - 'c_uint' => 1, - 'c_vchar' => '1', // these values are necessary to avoid unique index issues - 'c_vchar_size' => '1', - )); - $row2 = array_merge(self::get_default_values(), array( - 'c_uint' => 2, - 'c_vchar' => '2', - 'c_vchar_size' => '2', - )); - - $sql = 'INSERT INTO prefix_table_name ' . $this->db->sql_build_array('INSERT', $row1); - $result = $this->db->sql_query($sql); - $id1 = $this->db->sql_nextid(); - - $sql = 'INSERT INTO prefix_table_name ' . $this->db->sql_build_array('INSERT', $row2); - $result = $this->db->sql_query($sql); - $id2 = $this->db->sql_nextid(); - - $this->assertGreaterThan($id1, $id2, 'Auto increment should increase the id value'); - - $sql = "SELECT * - FROM prefix_table_name WHERE c_id = $id1"; - $result = $this->db->sql_query($sql); - $row_actual = $this->db->sql_fetchrow($result); - $this->db->sql_freeresult($result); - - $row1['c_id'] = $id1; - $this->assertEquals($row1, $row_actual); - - $sql = "SELECT * - FROM prefix_table_name WHERE c_id = $id2"; - $result = $this->db->sql_query($sql); - $row_actual = $this->db->sql_fetchrow($result); - $this->db->sql_freeresult($result); - - $row2['c_id'] = $id2; - $this->assertEquals($row2, $row_actual); - } - public function test_list_columns() { $this->assertEquals( @@ -354,9 +314,20 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'i_simple')); } + public function test_unique_index_exists() + { + $this->assertTrue($this->tools->sql_unique_index_exists('prefix_table_name', 'i_uniq')); + } + public function test_create_index_against_index_exists() { $this->tools->sql_create_index('prefix_table_name', 'fookey', array('c_timestamp', 'c_decimal')); $this->assertTrue($this->tools->sql_index_exists('prefix_table_name', 'fookey')); } + + public function test_create_unique_index_against_unique_index_exists() + { + $this->tools->sql_create_unique_index('prefix_table_name', 'i_uniq_ts_id', array('c_timestamp', 'c_id')); + $this->assertTrue($this->tools->sql_unique_index_exists('prefix_table_name', 'i_uniq_ts_id')); + } } diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php index e16c0c20ee..84d454742f 100644 --- a/tests/dbal/order_lower_test.php +++ b/tests/dbal/order_lower_test.php @@ -14,7 +14,7 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/styles.xml'); } - public function test_cross_join() + public function test_order_lower() { $db = $this->new_dbal(); diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php index cc213f09bc..bd524100a2 100644 --- a/tests/dbal/select_test.php +++ b/tests/dbal/select_test.php @@ -125,7 +125,33 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $this->assertEquals($expected, $ary); } - public function query_limit_data() + public static function fetchfield_seek_data() + { + return array( + array(1, 'foobar'), + array(0, 'barfoo'), + array(2, 'bertie'), + ); + } + + /** + * @dataProvider fetchfield_seek_data + */ + public function test_fetchfield_seek($rownum, $expected) + { + $db = $this->new_dbal(); + + $result = $db->sql_query('SELECT username_clean + FROM phpbb_users + ORDER BY user_id ASC'); + + $field = $db->sql_fetchfield('username_clean', $rownum, $result); + $db->sql_freeresult($result); + + $this->assertEquals($expected, $field); + } + + public static function query_limit_data() { return array( array(0, 0, array(array('username_clean' => 'barfoo'), @@ -349,7 +375,9 @@ class phpbb_dbal_select_test extends phpbb_database_test_case { $db = $this->new_dbal(); - $sql = 'SELECT * FROM (SELECT 1) AS TBL WHERE 1 = 0'; + $sql = 'SELECT user_id + FROM phpbb_users + WHERE 1 = 0'; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); diff --git a/tests/download/http_byte_range_test.php b/tests/download/http_byte_range_test.php index b93c1b630c..23b9169fe3 100644 --- a/tests/download/http_byte_range_test.php +++ b/tests/download/http_byte_range_test.php @@ -8,7 +8,6 @@ */ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_download.php'; -require_once dirname(__FILE__) . '/../mock/request.php'; class phpbb_download_http_byte_range_test extends phpbb_test_case { diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php index f7e9bd57bb..622f404786 100644 --- a/tests/extension/finder_test.php +++ b/tests/extension/finder_test.php @@ -7,9 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; -require_once dirname(__FILE__) . '/../mock/extension_manager.php'; - class phpbb_extension_finder_test extends phpbb_test_case { protected $extension_manager; diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index 0a689916c7..45bed247ae 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; require_once dirname(__FILE__) . '/ext/bar/ext.php'; require_once dirname(__FILE__) . '/ext/foo/ext.php'; require_once dirname(__FILE__) . '/ext/vendor/moo/ext.php'; diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php new file mode 100644 index 0000000000..e955dcb4df --- /dev/null +++ b/tests/functional/auth_test.php @@ -0,0 +1,40 @@ +login(); + + // check for logout link + $crawler = $this->request('GET', 'index.php'); + $this->assertContains($this->lang('LOGOUT_USER', 'admin'), $crawler->filter('.navbar')->text()); + } + + /** + * @depends test_login + */ + public function test_logout() + { + $this->login(); + $this->add_lang('ucp'); + + // logout + $crawler = $this->request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout'); + $this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text()); + + // look for a register link, which should be visible only when logged out + $crawler = $this->request('GET', 'index.php'); + $this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text()); + } +} diff --git a/tests/functional/browse_test.php b/tests/functional/browse_test.php index 723cf93232..26c18c4c1f 100644 --- a/tests/functional/browse_test.php +++ b/tests/functional/browse_test.php @@ -23,4 +23,10 @@ class phpbb_functional_browse_test extends phpbb_functional_test_case $crawler = $this->request('GET', 'viewforum.php?f=2'); $this->assertGreaterThan(0, $crawler->filter('.topiclist')->count()); } + + public function test_viewtopic() + { + $crawler = $this->request('GET', 'viewtopic.php?t=1'); + $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); + } } diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 4ee0e68718..e9409d9d3f 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -65,15 +65,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c } } - public static function tearDownAfterClass() - { - $phpbb_root_path = self::$config['phpbb_functional_path']; - - // @todo delete the fixtures from the $phpbb_root_path board - // Note that it might be best to find a public domain function - // and port it into here instead of writing it from scratch - } - public function setUp() { parent::setUp(); diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php new file mode 100644 index 0000000000..f7267fa659 --- /dev/null +++ b/tests/functional/fileupload_form_test.php @@ -0,0 +1,69 @@ +path = __DIR__ . '/fixtures/files/'; + $this->add_lang('posting'); + $this->login(); + } + + private function upload_file($filename, $mimetype) + { + $file = array( + 'tmp_name' => $this->path . $filename, + 'name' => $filename, + 'type' => $mimetype, + 'size' => filesize($this->path . $filename), + 'error' => UPLOAD_ERR_OK, + ); + + $crawler = $this->client->request( + 'POST', + 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid, + array('add_file' => $this->lang('ADD_FILE')), + array('fileupload' => $file) + ); + + return $crawler; + } + + public function test_empty_file() + { + $crawler = $this->upload_file('empty.png', 'image/png'); + $this->assertEquals($this->lang('ATTACHED_IMAGE_NOT_IMAGE'), $crawler->filter('div#message p')->text()); + } + + public function test_invalid_extension() + { + $crawler = $this->upload_file('illegal-extension.bif', 'application/octet-stream'); + $this->assertEquals($this->lang('DISALLOWED_EXTENSION', 'bif'), $crawler->filter('p.error')->text()); + } + + public function test_too_large() + { + $this->markTestIncomplete('Functional tests use an admin account which ignores maximum upload size.'); + $crawler = $this->upload_file('too-large.png', 'image/png'); + $this->assertEquals($this->lang('WRONG_FILESIZE', '256', 'KiB'), $crawler->filter('p.error')->text()); + } + + public function test_valid_file() + { + $crawler = $this->upload_file('valid.jpg', 'image/jpeg'); + $this->assertContains($this->lang('POSTED_ATTACHMENTS'), $crawler->filter('#postform h3')->eq(1)->text()); + } +} diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php new file mode 100644 index 0000000000..0deb79acf6 --- /dev/null +++ b/tests/functional/fileupload_remote_test.php @@ -0,0 +1,72 @@ +lang = new phpbb_mock_lang(); + } + + public function tearDown() + { + global $config, $user; + $user = null; + $config = array(); + } + + public function test_invalid_extension() + { + $upload = new fileupload('', array('jpg'), 100); + $file = $upload->remote_upload('http://example.com/image.gif'); + $this->assertEquals('URL_INVALID', $file->error[0]); + } + + public function test_non_existant() + { + $upload = new fileupload('', array('jpg'), 100); + $file = $upload->remote_upload('http://example.com/image.jpg'); + $this->assertEquals('EMPTY_REMOTE_DATA', $file->error[0]); + } + + public function test_successful_upload() + { + $upload = new fileupload('', array('gif'), 1000); + $file = $upload->remote_upload($this->root_url . 'styles/prosilver/theme/images/forum_read.gif'); + $this->assertEquals(0, sizeof($file->error)); + $this->assertTrue(file_exists($file->filename)); + } + + public function test_too_large() + { + $upload = new fileupload('', array('gif'), 100); + $file = $upload->remote_upload($this->root_url . 'styles/prosilver/theme/images/forum_read.gif'); + $this->assertEquals('WRONG_FILESIZE', $file->error[0]); + } +} diff --git a/tests/functional/fixtures/files/empty.png b/tests/functional/fixtures/files/empty.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/functional/fixtures/files/illegal-extension.bif b/tests/functional/fixtures/files/illegal-extension.bif new file mode 100644 index 0000000000..3cd5038e38 Binary files /dev/null and b/tests/functional/fixtures/files/illegal-extension.bif differ diff --git a/tests/functional/fixtures/files/too-large.png b/tests/functional/fixtures/files/too-large.png new file mode 100644 index 0000000000..ed4b0abd80 Binary files /dev/null and b/tests/functional/fixtures/files/too-large.png differ diff --git a/tests/functional/fixtures/files/valid.jpg b/tests/functional/fixtures/files/valid.jpg new file mode 100644 index 0000000000..95a87ddbdf Binary files /dev/null and b/tests/functional/fixtures/files/valid.jpg differ diff --git a/tests/functional/lang_test.php b/tests/functional/lang_test.php new file mode 100644 index 0000000000..053806a431 --- /dev/null +++ b/tests/functional/lang_test.php @@ -0,0 +1,45 @@ +assertEquals('Board index', $this->lang('FORUM_INDEX')); + } + + /** + * @expectedException RuntimeException + */ + public function test_lang_missing() + { + $this->assertEquals('Your account has now been activated. Thank you for registering.', $this->lang('ACCOUNT_ACTIVE')); + } + + public function test_add_lang() + { + $this->add_lang('ucp'); + + // Test a language string present only in the UCP language file + $this->assertEquals('Your account has now been activated. Thank you for registering.', $this->lang('ACCOUNT_ACTIVE')); + } + + public function test_add_langs() + { + $this->add_lang(array('groups', 'memberlist')); + + // Test a language string from each UCP and memberlist + $this->assertEquals('The selected group is already your default group.', $this->lang('ALREADY_DEFAULT_GROUP')); + $this->assertEquals('Profile', $this->lang('ABOUT_USER')); + } +} diff --git a/tests/functions_acp/build_cfg_template_test.php b/tests/functions_acp/build_cfg_template_test.php index bb479ffac9..12121f6678 100644 --- a/tests/functions_acp/build_cfg_template_test.php +++ b/tests/functions_acp/build_cfg_template_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/lang.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case diff --git a/tests/functions_acp/build_select_test.php b/tests/functions_acp/build_select_test.php index 782acae1fa..aca49b7655 100644 --- a/tests/functions_acp/build_select_test.php +++ b/tests/functions_acp/build_select_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/lang.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_built_select_test extends phpbb_test_case diff --git a/tests/functions_acp/h_radio_test.php b/tests/functions_acp/h_radio_test.php index 02b2444a9e..a61f2e8975 100644 --- a/tests/functions_acp/h_radio_test.php +++ b/tests/functions_acp/h_radio_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/lang.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_h_radio_test extends phpbb_test_case diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php index 55441561a6..7cd7fa3892 100644 --- a/tests/functions_acp/validate_config_vars_test.php +++ b/tests/functions_acp/validate_config_vars_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/lang.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case diff --git a/tests/functions_acp/validate_range_test.php b/tests/functions_acp/validate_range_test.php index 34ce848e76..8606158251 100644 --- a/tests/functions_acp/validate_range_test.php +++ b/tests/functions_acp/validate_range_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/lang.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php'; diff --git a/tests/mock/filespec.php b/tests/mock/filespec.php new file mode 100644 index 0000000000..9d2a5c84de --- /dev/null +++ b/tests/mock/filespec.php @@ -0,0 +1,32 @@ +$property; + } +} diff --git a/tests/mock/fileupload.php b/tests/mock/fileupload.php new file mode 100644 index 0000000000..409036ba63 --- /dev/null +++ b/tests/mock/fileupload.php @@ -0,0 +1,52 @@ + array('gif'), + IMAGETYPE_JPEG => array('jpg', 'jpeg'), + IMAGETYPE_PNG => array('png'), + IMAGETYPE_SWF => array('swf'), + IMAGETYPE_PSD => array('psd'), + IMAGETYPE_BMP => array('bmp'), + IMAGETYPE_TIFF_II => array('tif', 'tiff'), + IMAGETYPE_TIFF_MM => array('tif', 'tiff'), + IMAGETYPE_JPC => array('jpg', 'jpeg'), + IMAGETYPE_JP2 => array('jpg', 'jpeg'), + IMAGETYPE_JPX => array('jpg', 'jpeg'), + IMAGETYPE_JB2 => array('jpg', 'jpeg'), + IMAGETYPE_SWC => array('swc'), + IMAGETYPE_IFF => array('iff'), + IMAGETYPE_WBMP => array('wbmp'), + IMAGETYPE_XBM => array('xbm'), + ); + } +} diff --git a/tests/mock_user.php b/tests/mock/user.php similarity index 100% rename from tests/mock_user.php rename to tests/mock/user.php diff --git a/tests/regex/email_test.php b/tests/regex/email_test.php index 17f93259c3..b4ea5b23aa 100644 --- a/tests/regex/email_test.php +++ b/tests/regex/email_test.php @@ -28,6 +28,8 @@ class phpbb_regex_email_test extends phpbb_test_case array('alice_foo@bar.phpbb.com'), array('alice+tag@foo.phpbb.com'), array('alice&tag@foo.phpbb.com'), + array('alice@phpbb.australia'), + array('alice@phpbb.topZlevelZdomainZnamesZcanZbeZupZtoZsixtyZthreeZcharactersZlong'), //array('"John Doe"@example.com'), //array('Alice@[192.168.2.1]'), // IPv4 @@ -96,6 +98,7 @@ class phpbb_regex_email_test extends phpbb_test_case array('! "#$%(),/;<>[]`|@invalidCharsInLocal.org'), array('invalidCharsInDomain@! "#$%(),/;<>_[]`|.org'), array('local@SecondLevelDomainNamesAreInvalidIfTheyAreLongerThan64Charactersss.org'), + array('alice@phpbb.topZlevelZdomainZnamesZcanZbeZupZtoZsixtyZthreeZcharactersZlongZ'), ); } diff --git a/tests/security/base.php b/tests/security/base.php index 82e4dda9d0..08878ad60d 100644 --- a/tests/security/base.php +++ b/tests/security/base.php @@ -7,8 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/request.php'; - abstract class phpbb_security_test_base extends phpbb_test_case { /** diff --git a/tests/session/continue_test.php b/tests/session/continue_test.php index c4f7f8d75b..ad78d92299 100644 --- a/tests/session/continue_test.php +++ b/tests/session/continue_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; require_once dirname(__FILE__) . '/testable_factory.php'; class phpbb_session_continue_test extends phpbb_database_test_case diff --git a/tests/session/init_test.php b/tests/session/init_test.php index 2ce6c4a4ac..830de34ed0 100644 --- a/tests/session/init_test.php +++ b/tests/session/init_test.php @@ -7,7 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/cache.php'; require_once dirname(__FILE__) . '/testable_factory.php'; class phpbb_session_init_test extends phpbb_database_test_case diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php index a042085908..cb85a01c5c 100644 --- a/tests/session/testable_factory.php +++ b/tests/session/testable_factory.php @@ -7,9 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../mock/request.php'; -require_once dirname(__FILE__) . '/../mock/session_testable.php'; - /** * This class exists to setup an instance of phpbb's session class for testing. * diff --git a/tests/template/invalid_constructs_test.php b/tests/template/invalid_constructs_test.php new file mode 100644 index 0000000000..19d192b8b6 --- /dev/null +++ b/tests/template/invalid_constructs_test.php @@ -0,0 +1,87 @@ +template->cachepath . str_replace('/', '.', $file) . '.php'; + + $this->assertFileNotExists($cache_file); + + $expected = file_get_contents(dirname(__FILE__) . '/templates/' . $expected); + // apparently the template engine does not put + // the trailing newline into compiled templates + $expected = trim($expected); + $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file); + } + + /** + * @dataProvider template_data_error + */ + public function test_template_error($description, $file, $vars, $block_vars, $destroy, $error, $expected) + { + $cache_file = $this->template->cachepath . str_replace('/', '.', $file) . '.php'; + + $this->assertFileNotExists($cache_file); + + $expected = file_get_contents(dirname(__FILE__) . '/templates/' . $expected); + // apparently the template engine does not put + // the trailing newline into compiled templates + $expected = trim($expected); + $this->setExpectedTriggerError($error, $expected); + $this->run_template($file, $vars, $block_vars, $destroy, '', $cache_file); + } +} diff --git a/tests/template/parent_templates/parent_and_child.js b/tests/template/parent_templates/parent_and_child.js new file mode 100644 index 0000000000..6d9bb163bf --- /dev/null +++ b/tests/template/parent_templates/parent_and_child.js @@ -0,0 +1 @@ +// JavaScript file in a parent style. diff --git a/tests/template/parent_templates/parent_only.js b/tests/template/parent_templates/parent_only.js new file mode 100644 index 0000000000..9c3007d83f --- /dev/null +++ b/tests/template/parent_templates/parent_only.js @@ -0,0 +1 @@ +// JavaScript file only in parent style. diff --git a/tests/template/renderer_eval_test.php b/tests/template/renderer_eval_test.php index 9b4f74c824..7ebb8b9bda 100644 --- a/tests/template/renderer_eval_test.php +++ b/tests/template/renderer_eval_test.php @@ -13,8 +13,8 @@ class phpbb_template_renderer_eval_test extends phpbb_test_case { $compiled_code = ''; $valid_code = ''; - $context = new phpbb_style_template_context(); - $template = new phpbb_style_template_renderer_eval($compiled_code, NULL); + $context = new phpbb_template_context(); + $template = new phpbb_template_renderer_eval($compiled_code, NULL); ob_start(); try { diff --git a/tests/template/template_compile_test.php b/tests/template/template_compile_test.php index e2264fb1b7..0cfcd6ceb5 100644 --- a/tests/template/template_compile_test.php +++ b/tests/template/template_compile_test.php @@ -16,7 +16,7 @@ class phpbb_template_template_compile_test extends phpbb_test_case protected function setUp() { - $this->template_compile = new phpbb_style_template_compile(false, null, ''); + $this->template_compile = new phpbb_template_compile(false, null, ''); $this->template_path = dirname(__FILE__) . '/templates'; } diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php index fa23837553..a8f9a9037f 100644 --- a/tests/template/template_includejs_test.php +++ b/tests/template/template_includejs_test.php @@ -14,18 +14,17 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes public function test_includejs_compilation() { // Reset the engine state - $this->setup_engine(); + $this->setup_engine(array('assets_version' => 1)); // Prepare correct result - $dir = dirname(__FILE__); $scripts = array( - '', - '', - '' + '', + '', + '' ); // Run test $cache_file = $this->template->cachepath . 'includejs.html.php'; - $this->run_template('includejs.html', array('PARENT' => 'parent_only.html'), array(), array(), implode('', $scripts), $cache_file); + $this->run_template('includejs.html', array('PARENT' => 'parent_only.js'), array(), array(), implode('', $scripts), $cache_file); } } diff --git a/tests/template/template_locate_test.php b/tests/template/template_locate_test.php index d6e2e82a47..be9ae06809 100644 --- a/tests/template/template_locate_test.php +++ b/tests/template/template_locate_test.php @@ -17,21 +17,21 @@ class phpbb_template_template_locate_test extends phpbb_template_template_test_c // First element of the array is test name - keep them distinct array( 'simple inheritance - only parent template exists', - dirname(__FILE__) . '/parent_templates/parent_only.html', + $this->test_path . '/parent_templates/parent_only.html', 'parent_only.html', false, true, ), array( 'simple inheritance - only child template exists', - dirname(__FILE__) . '/templates/child_only.html', + $this->test_path . '/templates/child_only.html', 'child_only.html', false, true, ), array( 'simple inheritance - both parent and child templates exist', - dirname(__FILE__) . '/templates/parent_and_child.html', + $this->test_path . '/templates/parent_and_child.html', 'parent_and_child.html', false, true, diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 739bbe9387..f8677ed913 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -277,7 +277,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case $this->template->set_filenames(array('test' => $filename)); $this->assertFileNotExists($this->template_path . '/' . $filename, 'Testing missing file, file cannot exist'); - $expecting = sprintf('style resource locator: File for handle test does not exist. Could not find: %s', realpath($this->template_path . '/../') . '/templates/' . $filename); + $expecting = sprintf('style resource locator: File for handle test does not exist. Could not find: %s', $this->test_path . '/templates/' . $filename); $this->setExpectedTriggerError(E_USER_ERROR, $expecting); $this->display('test'); diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index a87e531a07..6f76cb049d 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -8,7 +8,6 @@ */ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; -require_once dirname(__FILE__) . '/../mock/extension_manager.php'; class phpbb_template_template_test_case extends phpbb_test_case { @@ -18,6 +17,8 @@ class phpbb_template_template_test_case extends phpbb_test_case protected $style_resource_locator; protected $style_provider; + protected $test_path = 'tests/template'; + // Keep the contents of the cache for debugging? const PRESERVE_CACHE = true; @@ -63,10 +64,10 @@ class phpbb_template_template_test_case extends phpbb_test_case $defaults = $this->config_defaults(); $config = new phpbb_config(array_merge($defaults, $new_config)); - $this->template_path = dirname(__FILE__) . '/templates'; + $this->template_path = $this->test_path . '/templates'; $this->style_resource_locator = new phpbb_style_resource_locator(); $this->style_provider = new phpbb_style_path_provider(); - $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider); + $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template); $this->style->set_custom_style('tests', $this->template_path, ''); } diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php index e76d9436cf..05ccb7ee55 100644 --- a/tests/template/template_test_case_with_tree.php +++ b/tests/template/template_test_case_with_tree.php @@ -18,11 +18,11 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat $defaults = $this->config_defaults(); $config = new phpbb_config(array_merge($defaults, $new_config)); - $this->template_path = dirname(__FILE__) . '/templates'; - $this->parent_template_path = dirname(__FILE__) . '/parent_templates'; + $this->template_path = $this->test_path . '/templates'; + $this->parent_template_path = $this->test_path . '/parent_templates'; $this->style_resource_locator = new phpbb_style_resource_locator(); $this->style_provider = new phpbb_style_path_provider(); - $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider); + $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template); $this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), ''); } diff --git a/tests/template/templates/child_only.js b/tests/template/templates/child_only.js new file mode 100644 index 0000000000..542b26526c --- /dev/null +++ b/tests/template/templates/child_only.js @@ -0,0 +1 @@ +// JavaScript file only in a child style. diff --git a/tests/template/templates/includejs.html b/tests/template/templates/includejs.html index 186fc30b43..8a2587d76b 100644 --- a/tests/template/templates/includejs.html +++ b/tests/template/templates/includejs.html @@ -1,5 +1,5 @@ - + - + {SCRIPTS} \ No newline at end of file diff --git a/tests/template/templates/invalid/endif_without_if.html b/tests/template/templates/invalid/endif_without_if.html new file mode 100644 index 0000000000..e371ffd150 --- /dev/null +++ b/tests/template/templates/invalid/endif_without_if.html @@ -0,0 +1 @@ + diff --git a/tests/template/templates/invalid/include_nonexistent_file.html b/tests/template/templates/invalid/include_nonexistent_file.html new file mode 100644 index 0000000000..617d2fdaaa --- /dev/null +++ b/tests/template/templates/invalid/include_nonexistent_file.html @@ -0,0 +1 @@ + diff --git a/tests/template/templates/invalid/output/endif_without_if.html b/tests/template/templates/invalid/output/endif_without_if.html new file mode 100644 index 0000000000..5f2239c964 --- /dev/null +++ b/tests/template/templates/invalid/output/endif_without_if.html @@ -0,0 +1 @@ +Parse error (fatal, destroys php runtime). diff --git a/tests/template/templates/invalid/output/include_nonexistent_file.html b/tests/template/templates/invalid/output/include_nonexistent_file.html new file mode 100644 index 0000000000..8a118d2713 --- /dev/null +++ b/tests/template/templates/invalid/output/include_nonexistent_file.html @@ -0,0 +1 @@ +style resource locator: File for handle nonexistent.html does not exist. Could not find: diff --git a/tests/template/templates/invalid/output/unknown_tag.html b/tests/template/templates/invalid/output/unknown_tag.html new file mode 100644 index 0000000000..1489e5e31a --- /dev/null +++ b/tests/template/templates/invalid/output/unknown_tag.html @@ -0,0 +1 @@ + diff --git a/tests/template/templates/invalid/unknown_tag.html b/tests/template/templates/invalid/unknown_tag.html new file mode 100644 index 0000000000..1489e5e31a --- /dev/null +++ b/tests/template/templates/invalid/unknown_tag.html @@ -0,0 +1 @@ + diff --git a/tests/template/templates/parent_and_child.js b/tests/template/templates/parent_and_child.js new file mode 100644 index 0000000000..d544d94d83 --- /dev/null +++ b/tests/template/templates/parent_and_child.js @@ -0,0 +1 @@ +// JavaScript file in a child style. diff --git a/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php b/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php new file mode 100644 index 0000000000..ec59fa3886 --- /dev/null +++ b/tests/test_framework/phpbb_database_connection_odbc_pdo_wrapper.php @@ -0,0 +1,37 @@ +driver = $dbms; + $this->version = (double) $version; + + parent::__construct($dsn, $user, $pass); + } +} diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index e742b543b0..bb86df0ef0 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -28,6 +28,28 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test ); } + public function createXMLDataSet($path) + { + $db_config = $this->get_database_config(); + + // Firebird requires table and column names to be uppercase + if ($db_config['dbms'] == 'firebird') + { + $xml_data = file_get_contents($path); + $xml_data = preg_replace_callback('/(?:())/', 'phpbb_database_test_case::to_upper', $xml_data); + $xml_data = preg_replace_callback('/(?:())([a-z_]+)(?:(<\/column>))/', 'phpbb_database_test_case::to_upper', $xml_data); + + $new_fixture = tmpfile(); + fwrite($new_fixture, $xml_data); + fseek($new_fixture, 0); + + $meta_data = stream_get_meta_data($new_fixture); + $path = $meta_data['uri']; + } + + return parent::createXMLDataSet($path); + } + public function get_test_case_helpers() { if (!$this->test_case_helpers) @@ -106,4 +128,17 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test { return new phpbb_database_test_connection_manager($config); } + + /** + * Converts a match in the middle of a string to uppercase. + * This is necessary for transforming the fixture information for Firebird tests + * + * @param $matches The array of matches from a regular expression + * + * @return string The string with the specified match converted to uppercase + */ + public static function to_upper($matches) + { + return $matches[1] . strtoupper($matches[2]) . $matches[3]; + } } diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php index c734c90a1a..25e0972f42 100644 --- a/tests/test_framework/phpbb_database_test_connection_manager.php +++ b/tests/test_framework/phpbb_database_test_connection_manager.php @@ -8,6 +8,7 @@ */ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_install.php'; +require_once dirname(__FILE__) . '/phpbb_database_connection_odbc_pdo_wrapper.php'; class phpbb_database_test_connection_manager { @@ -62,6 +63,13 @@ class phpbb_database_test_connection_manager // e.g. Driver={SQL Server Native Client 10.0};Server=(local)\SQLExpress; $dsn .= $this->config['dbhost']; + // Primarily for MSSQL Native/Azure as ODBC needs it in $dbhost, attached to the Server param + if ($this->config['dbport']) + { + $port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':'; + $dsn .= $port_delimiter . $this->config['dbport']; + } + if ($use_db) { $dsn .= ';Database=' . $this->config['dbname']; @@ -80,12 +88,52 @@ class phpbb_database_test_connection_manager { $dsn .= ';dbname=' . $this->config['dbname']; } + else if ($this->dbms['PDO'] == 'pgsql') + { + // Postgres always connects to a + // database. If the database is not + // specified here, but the username + // is specified, then connection + // will be to the database named + // as the username. + // + // For greater compatibility, connect + // instead to postgres database which + // should always exist: + // http://www.postgresql.org/docs/9.0/static/manage-ag-templatedbs.html + $dsn .= ';dbname=postgres'; + } break; } + // These require different connection strings on the phpBB side than they do in PDO + // so you must provide a DSN string for ODBC separately + if (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird')) + { + $dsn = 'odbc:' . $this->config['custom_dsn']; + } + try { - $this->pdo = new PDO($dsn, $this->config['dbuser'], $this->config['dbpasswd']); + switch ($this->config['dbms']) + { + case 'mssql': + case 'mssql_odbc': + $this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('mssql', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']); + break; + + case 'firebird': + if (!empty($this->config['custom_dsn'])) + { + $this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']); + break; + } + // Fall through if they're using the firebird PDO driver and not the generic ODBC driver + + default: + $this->pdo = new PDO($dsn, $this->config['dbuser'], $this->config['dbpasswd']); + break; + } } catch (PDOException $e) { @@ -93,8 +141,7 @@ class phpbb_database_test_connection_manager throw new Exception("Unable do connect to $cleaned_dsn using PDO with error: {$e->getMessage()}"); } - // good for debug - // $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } /** @@ -125,12 +172,41 @@ class phpbb_database_test_connection_manager } break; + case 'firebird': + $this->connect(); + // Drop all of the tables + foreach ($this->get_tables() as $table) + { + $this->pdo->exec('DROP TABLE ' . $table); + } + $this->purge_extras(); + break; + + case 'oracle': + $this->connect(); + // Drop all of the tables + foreach ($this->get_tables() as $table) + { + $this->pdo->exec('DROP TABLE ' . $table . ' CASCADE CONSTRAINTS'); + } + $this->purge_extras(); + break; + default: $this->connect(false); try { $this->pdo->exec('DROP DATABASE ' . $this->config['dbname']); + + try + { + $this->pdo->exec('CREATE DATABASE ' . $this->config['dbname']); + } + catch (PDOException $e) + { + throw new Exception("Unable to re-create database: {$e->getMessage()}"); + } } catch (PDOException $e) { @@ -139,9 +215,8 @@ class phpbb_database_test_connection_manager { $this->pdo->exec('DROP TABLE ' . $table); } + $this->purge_extras(); } - - $this->pdo->exec('CREATE DATABASE ' . $this->config['dbname']); break; } } @@ -243,7 +318,7 @@ class phpbb_database_test_connection_manager $filename = $directory . $schema . '_schema.sql'; $queries = file_get_contents($filename); - $sql = remove_comments($queries); + $sql = phpbb_remove_comments($queries); $sql = split_sql_file($sql, $this->dbms['DELIM']); @@ -317,4 +392,44 @@ class phpbb_database_test_connection_manager throw new Exception($message); } } + + /** + * Removes extra objects from a database. This is for cases where dropping the database fails. + */ + public function purge_extras() + { + $this->ensure_connected(__METHOD__); + $queries = array(); + + switch ($this->config['dbms']) + { + case 'firebird': + $sql = 'SELECT RDB$GENERATOR_NAME + FROM RDB$GENERATORS + WHERE RDB$SYSTEM_FLAG = 0'; + $result = $this->pdo->query($sql); + + while ($row = $result->fetch(PDO::FETCH_NUM)) + { + $queries[] = 'DROP GENERATOR ' . current($row); + } + break; + + case 'oracle': + $sql = 'SELECT sequence_name + FROM USER_SEQUENCES'; + $result = $this->pdo->query($sql); + + while ($row = $result->fetch(PDO::FETCH_NUM)) + { + $queries[] = 'DROP SEQUENCE ' . current($row); + } + break; + } + + foreach ($queries as $query) + { + $this->pdo->exec($query); + } + } } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 69c62af297..c042d75811 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -6,6 +6,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ +use Symfony\Component\BrowserKit\CookieJar; require_once __DIR__ . '/../../phpBB/includes/functions_install.php'; @@ -18,19 +19,21 @@ class phpbb_functional_test_case extends phpbb_test_case protected $db = null; protected $extension_manager = null; + /** + * Session ID for current test's session (each test makes its own) + * @var string + */ + protected $sid; + + /** + * Language array used by phpBB + * @var array + */ + protected $lang = array(); + static protected $config = array(); static protected $already_installed = false; - static public function setUpBeforeClass() - { - if (!extension_loaded('phar')) - { - self::markTestSkipped('phar extension is not loaded'); - } - - require_once 'phar://' . __DIR__ . '/../../vendor/goutte.phar'; - } - public function setUp() { if (!isset(self::$config['phpbb_functional_url'])) @@ -38,8 +41,16 @@ class phpbb_functional_test_case extends phpbb_test_case $this->markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.'); } - $this->client = new Goutte\Client(); + $this->cookieJar = new CookieJar; + $this->client = new Goutte\Client(array(), null, $this->cookieJar); + // Reset the curl handle because it is 0 at this point and not a valid + // resource + $this->client->getClient()->getCurlMulti()->reset(true); $this->root_url = self::$config['phpbb_functional_url']; + // Clear the language array so that things + // that were added in other tests are gone + $this->lang = array(); + $this->add_lang('common'); } public function request($method, $path) @@ -219,4 +230,63 @@ class phpbb_functional_test_case extends phpbb_test_case $db_conn_mgr = new phpbb_database_test_connection_manager($config); $db_conn_mgr->recreate_db(); } + + protected function login() + { + $this->add_lang('ucp'); + + $crawler = $this->request('GET', 'ucp.php'); + $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), $crawler->filter('html')->text()); + + $form = $crawler->selectButton($this->lang('LOGIN'))->form(); + $login = $this->client->submit($form, array('username' => 'admin', 'password' => 'admin')); + + $cookies = $this->cookieJar->all(); + + // The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie + foreach ($cookies as $cookie); + { + if (substr($cookie->getName(), -4) == '_sid') + { + $this->sid = $cookie->getValue(); + } + } + } + + protected function add_lang($lang_file) + { + if (is_array($lang_file)) + { + foreach ($lang_file as $file) + { + $this->add_lang($file); + } + } + + $lang_path = __DIR__ . "/../../phpBB/language/en/$lang_file.php"; + + $lang = array(); + + if (file_exists($lang_path)) + { + include($lang_path); + } + + $this->lang = array_merge($this->lang, $lang); + } + + protected function lang() + { + $args = func_get_args(); + $key = $args[0]; + + if (empty($this->lang[$key])) + { + throw new RuntimeException('Language key "' . $key . '" could not be found.'); + } + + $args[0] = $this->lang[$key]; + + return call_user_func_array('sprintf', $args); + } } diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 9c91778cb0..46feef550a 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -63,9 +63,19 @@ class phpbb_test_case_helpers )); } - if (file_exists(dirname(__FILE__) . '/../test_config.php')) + if (isset($_SERVER['PHPBB_TEST_CONFIG'])) { - include(dirname(__FILE__) . '/../test_config.php'); + // Could be an absolute path + $test_config = $_SERVER['PHPBB_TEST_CONFIG']; + } + else + { + $test_config = dirname(__FILE__) . '/../test_config.php'; + } + + if (file_exists($test_config)) + { + include($test_config); $config = array_merge($config, array( 'dbms' => $dbms, @@ -74,6 +84,7 @@ class phpbb_test_case_helpers 'dbname' => $dbname, 'dbuser' => $dbuser, 'dbpasswd' => $dbpasswd, + 'custom_dsn' => isset($custom_dsn) ? $custom_dsn : '', )); if (isset($phpbb_functional_url)) @@ -90,7 +101,8 @@ class phpbb_test_case_helpers 'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '', 'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '', 'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '', - 'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '' + 'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '', + 'custom_dsn' => isset($_SERVER['PHPBB_TEST_CUSTOM_DSN']) ? $_SERVER['PHPBB_TEST_CUSTOM_DSN'] : '', )); } diff --git a/tests/text_processing/censor_text_test.php b/tests/text_processing/censor_text_test.php index 8fcdb7ef85..043d8eb27d 100644 --- a/tests/text_processing/censor_text_test.php +++ b/tests/text_processing/censor_text_test.php @@ -9,8 +9,6 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; -require_once dirname(__FILE__) . '/../mock_user.php'; -require_once dirname(__FILE__) . '/../mock/cache.php'; class phpbb_text_processing_censor_text_test extends phpbb_test_case { @@ -19,7 +17,7 @@ class phpbb_text_processing_censor_text_test extends phpbb_test_case global $cache, $user; $cache = new phpbb_mock_cache; $user = new phpbb_mock_user; - + $user->optionset('viewcensors', false); return array( @@ -61,7 +59,7 @@ class phpbb_text_processing_censor_text_test extends phpbb_test_case array('badword1 badword2 badword3 badword4', 'replacement1 replacement2 replacement3 replacement4'), array('badword1 badword2 badword3 badword4d', 'replacement1 replacement2 replacement3 badword4d'), array('abadword1 badword2 badword3 badword4', 'replacement1 replacement2 replacement3 replacement4'), - + array("new\nline\ntest", "new\nline\ntest"), array("tab\ttest\t", "tab\ttest\t"), array('öäü', 'öäü'), diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php new file mode 100644 index 0000000000..c7ff2e78e0 --- /dev/null +++ b/tests/upload/filespec_test.php @@ -0,0 +1,275 @@ +lang = new phpbb_mock_lang(); + + $this->config = &$config; + $this->path = __DIR__ . '/fixture/'; + + // Create copies of the files for use in testing move_file + $iterator = new DirectoryIterator($this->path); + foreach ($iterator as $fileinfo) + { + if ($fileinfo->isDot() || $fileinfo->isDir()) + { + continue; + } + + copy($fileinfo->getPathname(), $this->path . 'copies/' . $fileinfo->getFilename() . '_copy'); + if ($fileinfo->getFilename() === 'txt') + { + copy($fileinfo->getPathname(), $this->path . 'copies/' . $fileinfo->getFilename() . '_copy_2'); + } + } + } + + private function get_filespec($override = array()) + { + // Initialise a blank filespec object for use with trivial methods + $upload_ary = array( + 'name' => '', + 'type' => '', + 'size' => '', + 'tmp_name' => '', + 'error' => '', + ); + + return new filespec(array_merge($upload_ary, $override), null); + } + + protected function tearDown() + { + global $user; + $this->config = array(); + $user = null; + + $iterator = new DirectoryIterator($this->path . 'copies'); + foreach ($iterator as $fileinfo) + { + $name = $fileinfo->getFilename(); + if ($name[0] !== '.') + { + unlink($fileinfo->getPathname()); + } + } + } + + public function additional_checks_variables() + { + // False here just indicates the file is too large and fails the + // filespec::additional_checks method because of it. All other code + // paths in that method are covered elsewhere. + return array( + array('gif', true), + array('jpg', false), + array('png', true), + array('tif', false), + array('txt', false), + ); + } + + /** + * @dataProvider additional_checks_variables + */ + public function test_additional_checks($filename, $expected) + { + $upload = new phpbb_mock_fileupload(); + $filespec = $this->get_filespec(); + $filespec->upload = $upload; + $filespec->file_moved = true; + $filespec->filesize = $filespec->get_filesize($this->path . $filename); + + $this->assertEquals($expected, $filespec->additional_checks()); + } + + public function check_content_variables() + { + // False here indicates that a file is non-binary and contains + // disallowed content that makes IE report the mimetype incorrectly. + return array( + array('gif', true), + array('jpg', true), + array('png', true), + array('tif', true), + array('txt', false), + ); + } + + /** + * @dataProvider check_content_variables + */ + public function test_check_content($filename, $expected) + { + $disallowed_content = explode('|', $this->config['mime_triggers']); + $filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename)); + $this->assertEquals($expected, $filespec->check_content($disallowed_content)); + } + + public function clean_filename_variables() + { + $chunks = str_split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\'\\" /:*?<>|[];(){},#+=-_`', 8); + return array( + array($chunks[0] . $chunks[7]), + array($chunks[1] . $chunks[8]), + array($chunks[2] . $chunks[9]), + array($chunks[3] . $chunks[4]), + array($chunks[5] . $chunks[6]), + ); + } + + /** + * @dataProvider clean_filename_variables + */ + public function test_clean_filename_real($filename) + { + $bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|'); + $filespec = $this->get_filespec(array('name' => $filename)); + $filespec->clean_filename('real', self::PREFIX); + $name = $filespec->realname; + + $this->assertEquals(0, preg_match('/%(\w{2})/', $name)); + foreach ($bad_chars as $char) + { + $this->assertFalse(strpos($name, $char)); + } + } + + public function test_clean_filename_unique() + { + $filenames = array(); + for ($tests = 0; $tests < self::TEST_COUNT; $tests++) + { + $filespec = $this->get_filespec(); + $filespec->clean_filename('unique', self::PREFIX); + $name = $filespec->realname; + + $this->assertEquals(strlen($name), 32 + strlen(self::PREFIX)); + $this->assertRegExp('#^[A-Za-z0-9]+$#', substr($name, strlen(self::PREFIX))); + $this->assertFalse(isset($filenames[$name])); + $filenames[$name] = true; + } + } + + public function get_extension_variables() + { + return array( + array('file.png', 'png'), + array('file.phpbb.gif', 'gif'), + array('file..', ''), + array('.file..jpg.webp', 'webp'), + ); + } + + /** + * @dataProvider get_extension_variables + */ + public function test_get_extension($filename, $expected) + { + $filespec = $this->get_filespec(); + $this->assertEquals($expected, $filespec->get_extension($filename)); + } + + public function is_image_variables() + { + return array( + array('gif', 'image/gif', true), + array('jpg', 'image/jpg', true), + array('png', 'image/png', true), + array('tif', 'image/tif', true), + array('txt', 'text/plain', false), + ); + } + + /** + * @dataProvider is_image_variables + */ + public function test_is_image($filename, $mimetype, $expected) + { + $filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename, 'type' => $mimetype)); + $this->assertEquals($expected, $filespec->is_image()); + } + + public function move_file_variables() + { + return array( + array('gif_copy', 'gif_moved', 'image/gif', 'gif', false, true), + array('non_existant', 'still_non_existant', 'text/plain', 'txt', 'GENERAL_UPLOAD_ERROR', false), + array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', false, true), + array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true), + array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true), + array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true), + ); + } + + /** + * @dataProvider move_file_variables + */ + public function test_move_file($tmp_name, $realname, $mime_type, $extension, $error, $expected) + { + // Global $phpbb_root_path and $phpEx are required by phpbb_chmod + global $phpbb_root_path, $phpEx; + $phpbb_root_path = ''; + $phpEx = 'php'; + + $upload = new phpbb_mock_fileupload(); + $upload->max_filesize = self::UPLOAD_MAX_FILESIZE; + + $filespec = $this->get_filespec(array( + 'tmp_name' => $this->path . 'copies/' . $tmp_name, + 'name' => $realname, + 'type' => $mime_type, + )); + $filespec->extension = $extension; + $filespec->upload = $upload; + $filespec->local = true; + + $this->assertEquals($expected, $filespec->move_file($this->path . 'copies')); + $this->assertEquals($filespec->file_moved, file_exists($this->path . 'copies/' . $realname)); + if ($error) + { + $this->assertEquals($error, $filespec->error[0]); + } + + $phpEx = ''; + } +} diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php new file mode 100644 index 0000000000..076855ab56 --- /dev/null +++ b/tests/upload/fileupload_test.php @@ -0,0 +1,115 @@ +lang = new phpbb_mock_lang(); + $this->path = __DIR__ . '/fixture/'; + } + + private function gen_valid_filespec() + { + $filespec = new phpbb_mock_filespec(); + $filespec->filesize = 1; + $filespec->extension = 'jpg'; + $filespec->realname = 'valid'; + $filespec->width = 2; + $filespec->height = 2; + + return $filespec; + } + + protected function tearDown() + { + // Clear globals + global $config, $user; + $config = array(); + $user = null; + } + + public function test_common_checks_invalid_extension() + { + $upload = new fileupload('', array('png'), 100); + $file = $this->gen_valid_filespec(); + $upload->common_checks($file); + $this->assertEquals('DISALLOWED_EXTENSION', $file->error[0]); + } + + public function test_common_checks_invalid_filename() + { + $upload = new fileupload('', array('jpg'), 100); + $file = $this->gen_valid_filespec(); + $file->realname = 'invalid?'; + $upload->common_checks($file); + $this->assertEquals('INVALID_FILENAME', $file->error[0]); + } + + public function test_common_checks_too_large() + { + $upload = new fileupload('', array('jpg'), 100); + $file = $this->gen_valid_filespec(); + $file->filesize = 1000; + $upload->common_checks($file); + $this->assertEquals('WRONG_FILESIZE', $file->error[0]); + } + + public function test_common_checks_valid_file() + { + $upload = new fileupload('', array('jpg'), 1000); + $file = $this->gen_valid_filespec(); + $upload->common_checks($file); + $this->assertEquals(0, sizeof($file->error)); + } + + public function test_local_upload() + { + $upload = new fileupload('', array('jpg'), 1000); + + copy($this->path . 'jpg', $this->path . 'jpg.jpg'); + $file = $upload->local_upload($this->path . 'jpg.jpg'); + $this->assertEquals(0, sizeof($file->error)); + unlink($this->path . 'jpg.jpg'); + } + + public function test_valid_dimensions() + { + $upload = new fileupload('', false, false, 1, 1, 100, 100); + + $file1 = $this->gen_valid_filespec(); + $file2 = $this->gen_valid_filespec(); + $file2->height = 101; + $file3 = $this->gen_valid_filespec(); + $file3->width = 0; + + $this->assertTrue($upload->valid_dimensions($file1)); + $this->assertFalse($upload->valid_dimensions($file2)); + $this->assertFalse($upload->valid_dimensions($file3)); + } +} diff --git a/tests/upload/fixture/copies/.gitkeep b/tests/upload/fixture/copies/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/upload/fixture/gif b/tests/upload/fixture/gif new file mode 100644 index 0000000000..b636f4b8df Binary files /dev/null and b/tests/upload/fixture/gif differ diff --git a/tests/upload/fixture/jpg b/tests/upload/fixture/jpg new file mode 100644 index 0000000000..3cd5038e38 Binary files /dev/null and b/tests/upload/fixture/jpg differ diff --git a/tests/upload/fixture/png b/tests/upload/fixture/png new file mode 100644 index 0000000000..5514ad40e9 Binary files /dev/null and b/tests/upload/fixture/png differ diff --git a/tests/upload/fixture/tif b/tests/upload/fixture/tif new file mode 100644 index 0000000000..248b50f9cb Binary files /dev/null and b/tests/upload/fixture/tif differ diff --git a/tests/upload/fixture/txt b/tests/upload/fixture/txt new file mode 100644 index 0000000000..a78c858f5c --- /dev/null +++ b/tests/upload/fixture/txt @@ -0,0 +1,2 @@ +mime trigger +The HTML tags should remain uppercase so that case-insensitivity can be checked. diff --git a/tests/wrapper/phpbb_php_ini_fake.php b/tests/wrapper/phpbb_php_ini_fake.php new file mode 100644 index 0000000000..49bc5936e5 --- /dev/null +++ b/tests/wrapper/phpbb_php_ini_fake.php @@ -0,0 +1,16 @@ +php_ini = new phpbb_php_ini_fake; + } + + public function test_get_string() + { + $this->assertSame(false, $this->php_ini->get_string(false)); + $this->assertSame('phpbb', $this->php_ini->get_string(' phpbb ')); + } + + public function test_get_bool() + { + $this->assertSame(true, $this->php_ini->get_bool('ON')); + $this->assertSame(true, $this->php_ini->get_bool('on')); + $this->assertSame(true, $this->php_ini->get_bool('1')); + + $this->assertSame(false, $this->php_ini->get_bool('OFF')); + $this->assertSame(false, $this->php_ini->get_bool('off')); + $this->assertSame(false, $this->php_ini->get_bool('0')); + $this->assertSame(false, $this->php_ini->get_bool('')); + } + + public function test_get_int() + { + $this->assertSame(1234, $this->php_ini->get_int('1234')); + $this->assertSame(-12345, $this->php_ini->get_int('-12345')); + $this->assertSame(false, $this->php_ini->get_int('phpBB')); + } + + public function test_get_float() + { + $this->assertSame(1234.0, $this->php_ini->get_float('1234')); + $this->assertSame(-12345.0, $this->php_ini->get_float('-12345')); + $this->assertSame(false, $this->php_ini->get_float('phpBB')); + } + + public function test_get_bytes_invalid() + { + $this->assertSame(false, $this->php_ini->get_bytes(false)); + $this->assertSame(false, $this->php_ini->get_bytes('phpBB')); + $this->assertSame(false, $this->php_ini->get_bytes('k')); + $this->assertSame(false, $this->php_ini->get_bytes('-k')); + $this->assertSame(false, $this->php_ini->get_bytes('M')); + $this->assertSame(false, $this->php_ini->get_bytes('-M')); + } + + /** + * @dataProvider get_bytes_data + */ + public function test_get_bytes($expected, $value) + { + $actual = $this->php_ini->get_bytes($value); + + $this->assertTrue(is_float($actual) || is_int($actual)); + $this->assertEquals($expected, $actual); + } + + static public function get_bytes_data() + { + return array( + array(32 * pow(2, 20), '32m'), + array(- 32 * pow(2, 20), '-32m'), + array(8 * pow(2, 30), '8G'), + array(- 8 * pow(2, 30), '-8G'), + array(1234, '1234'), + array(-12345, '-12345'), + ); + } +} diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml index 36845a7f71..e54b2bb77b 100644 --- a/travis/phpunit-mysql-travis.xml +++ b/travis/phpunit-mysql-travis.xml @@ -13,6 +13,10 @@ ../tests/ + tests/functional + + + ../tests/functional diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml index 461a53bcb1..55ba996548 100644 --- a/travis/phpunit-postgres-travis.xml +++ b/travis/phpunit-postgres-travis.xml @@ -13,6 +13,10 @@ ../tests/ + tests/functional + + + ../tests/functional diff --git a/vendor/goutte.phar b/vendor/goutte.phar deleted file mode 100644 index 20b7166a67..0000000000 Binary files a/vendor/goutte.phar and /dev/null differ