diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 836d2556f8..f99a2f8a73 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -15,7 +15,7 @@ define('ADMIN_START', true); define('NEED_SID', true); // Include files -$phpbb_root_path = './../'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'common.' . $phpEx); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); @@ -27,12 +27,6 @@ $auth->acl($user->data); $user->setup('acp/common'); // End session management -// Did user forget to login? Give 'em a chance to here ... -if ($user->data['user_id'] == ANONYMOUS) -{ - login_box('', $user->lang['LOGIN_ADMIN'], $user->lang['LOGIN_ADMIN_SUCCESS'], true); -} - // Have they authenticated (again) as an admin for this session? if (!isset($user->data['session_admin']) || !$user->data['session_admin']) { @@ -43,7 +37,7 @@ if (!isset($user->data['session_admin']) || !$user->data['session_admin']) // check specific permissions but this is a catchall if (!$auth->acl_get('a_')) { - trigger_error($user->lang['NO_ADMIN']); + trigger_error('NO_ADMIN'); } // We define the admin variables now, because the user is now able to use the admin related features... @@ -147,6 +141,8 @@ function adm_page_header($page_title) 'S_USER_LANG' => $user->lang['USER_LANG'], 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_ENCODING' => 'UTF-8', + 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right', + 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left', )); // application/xhtml+xml not used because of IE diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index cee60b4185..36d8f24f32 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -3,7 +3,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index cbafa554b1..334d245edf 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -71,14 +71,19 @@  

+ + +

{L_UNBAN_TITLE}

{L_UNBAN_EXPLAIN}

+
+
{L_UNBAN_TITLE} diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index 4370b5e225..8d9827b672 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_ACP_BBCODES}

diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html index 5ab0e079d4..c7501ce088 100644 --- a/phpBB/adm/style/acp_board.html +++ b/phpBB/adm/style/acp_board.html @@ -37,12 +37,12 @@ {auth_tpl.TPL} -
-
- {L_SUBMIT} -   - +

+   + +

+
diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html index a80c6db331..2f65a0fbec 100644 --- a/phpBB/adm/style/acp_bots.html +++ b/phpBB/adm/style/acp_bots.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

@@ -85,11 +85,11 @@ -
+
-
+

{L_MARK_ALL}{L_UNMARK_ALL}

diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index eaa7d3bf7a..1aef98c36b 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -95,7 +95,7 @@ //--> - « {L_BACK} + « {L_BACK}

{L_TITLE} :: {FORUM_NAME}

@@ -120,8 +120,8 @@
-
-
+
+
@@ -316,7 +316,7 @@ - « {L_BACK} + « {L_BACK}

{L_FORUM_DELETE}

@@ -431,7 +431,7 @@ {forums.FOLDER_IMAGE} -
{forums.FORUM_IMAGE}
+
{forums.FORUM_IMAGE}
{forums.FORUM_NAME}{forums.FORUM_NAME}
{forums.FORUM_DESCRIPTION}

{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS} diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 3bdeaeaad0..a659207f9e 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_ACP_GROUPS_MANAGE}

@@ -160,7 +160,7 @@ - « {L_BACK} + « {L_BACK}

{L_GROUP_MEMBERS} :: {GROUP_NAME}

diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 81f56cc299..9c488c9f90 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -41,7 +41,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

@@ -137,7 +137,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index d15f722e98..c016251d38 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_SELECT_DOWNLOAD_FORMAT}

@@ -26,7 +26,7 @@ - « {L_BACK} + « {L_BACK}

{L_LANGUAGE_PACK_DETAILS}

@@ -107,12 +107,12 @@
-
+
-
+
 
@@ -166,7 +166,7 @@ - « {L_BACK} + « {L_BACK}

{L_UPLOAD_SETTINGS}

diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 19696c014a..e18c4882c5 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -72,8 +72,8 @@
-   -
+   +

{L_MARK_ALL}{L_UNMARK_ALL}

diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 80c7f09d6e..bad15bef30 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -77,14 +77,17 @@ {L_GZIP_COMPRESSION}: {GZIP_COMPRESSION} - -   -   + {L_BOARD_VERSION}: + {BOARD_VERSION} + {L_NUMBER_ORPHAN}: {TOTAL_ORPHAN} - + +   +   + diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index d241119fb6..3fafd1288b 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -55,7 +55,7 @@ //--> - « {L_BACK} + « {L_BACK}

{L_TITLE} :: {MODULENAME}

@@ -177,7 +177,7 @@ -
+
@@ -188,7 +188,7 @@ -
+
@@ -198,7 +198,7 @@ -
 
+
 

diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index 83256ff78d..e16d7598ab 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -22,7 +22,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html index 862ba6e8d2..5eb9c2eab3 100644 --- a/phpBB/adm/style/acp_permissions.html +++ b/phpBB/adm/style/acp_permissions.html @@ -108,7 +108,7 @@ -
+
@@ -138,7 +138,7 @@

{L_USERNAMES_EXPLAIN}

-
+
@@ -153,7 +153,7 @@ -
+
@@ -198,7 +198,7 @@ -
+

{L_USERS}

@@ -239,7 +239,7 @@
-
+

{L_USERGROUPS}

@@ -305,14 +305,14 @@
-
+
» {L_PERMISSION_TYPE}
-
+
{S_HIDDEN_FIELDS} {L_SELECT_TYPE}: @@ -340,7 +340,7 @@

-
+
diff --git a/phpBB/adm/style/acp_php_info.html b/phpBB/adm/style/acp_php_info.html index e1d4731c64..de065c4896 100644 --- a/phpBB/adm/style/acp_php_info.html +++ b/phpBB/adm/style/acp_php_info.html @@ -6,7 +6,7 @@

{L_ACP_PHP_INFO_EXPLAIN}

-
+
{PHPINFO}
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html index e14e622080..bd9f0cc9a0 100644 --- a/phpBB/adm/style/acp_profile.html +++ b/phpBB/adm/style/acp_profile.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

@@ -123,11 +123,11 @@
-
+
-
+
{S_HIDDEN_FIELDS}
@@ -146,11 +146,11 @@
-
+
-
+
{S_HIDDEN_FIELDS}
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index ad8d987a02..8d8f913b53 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -44,7 +44,7 @@

{L_LOOK_UP_FORUMS_EXPLAIN}

-
+
@@ -57,7 +57,7 @@ - « {L_BACK} + « {L_BACK}

{L_ACP_PRUNE_FORUMS}

diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index a8d496e257..bfb805f3d8 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK} - « {L_BACK} + « {L_BACK}

{L_EDIT}

@@ -280,7 +280,7 @@ //--> - « {L_BACK} + « {L_BACK}

{L_TEMPLATE_CACHE}

@@ -328,7 +328,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

@@ -455,7 +455,7 @@ - « {L_BACK} + « {L_BACK}

{L_TITLE}

diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 307ddb75e4..a7ac71abed 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -28,7 +28,7 @@ - « {L_BACK} + « {L_BACK}

{L_USER_ADMIN}

@@ -52,7 +52,7 @@ - « {L_BACK} + « {L_BACK}

{L_USER_ADMIN} :: {MANAGED_USERNAME}

@@ -207,7 +207,7 @@ -
+ diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html index 0f64888170..e1d4076e4d 100644 --- a/phpBB/adm/style/acp_users_feedback.html +++ b/phpBB/adm/style/acp_users_feedback.html @@ -52,8 +52,8 @@
-   - +   +

{L_MARK_ALL}{L_UNMARK_ALL}

diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index fa85669595..055a616f70 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -4,7 +4,7 @@ - « {L_BACK} + « {L_BACK}

{L_ACP_WORDS}

diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index b127462814..4d30bb0b91 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1322,11 +1322,23 @@ fieldset.permissions .permissions-switch { float: left; } +fieldset.permissions .padding { +} + .permissions-switch a { text-decoration: underline; font-size: 0.90em; } +.permissions-reset { + margin-top: -6px; + padding-bottom: 10px; +} + +.permissions-reset a { + font-size: .8em; +} + /* Tabbed menu */ .permissions-category { line-height: normal; @@ -1602,3 +1614,16 @@ fieldset.permissions .permissions-switch { margin: 0; padding: 0; } + +/* Classes for additional tasks +---------------------------------------- */ + +.phpinfo { + overflow: auto; + width: 99%; + direction: ltr; +} + +.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 { + text-align: left; +} diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index e73324dc1f..2ec3581ef4 100755 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -18,7 +18,7 @@ // -->
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index 6b361ec3f1..34d00241cb 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -2,20 +2,30 @@ -

{L_NOTICE}

-

{ERROR_MSG}

+
+

{L_NOTICE}

+

{ERROR_MSG}

+
+ + +
+

{L_NOTICE}

+

{WARNING_MSG}

+
+ +

{L_UPDATE_INSTALLATION}

@@ -68,6 +78,12 @@
{LATEST_VERSION}
+ +
+
+
{PACKAGE_VERSION}
+
+
@@ -185,28 +201,52 @@
{L_NUM_CONFLICTS}: {files.NUM_CONFLICTS} -
[ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
+
 [ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
+ + + +
+
+
[ {files.L_SHOW_DIFF} ]{L_BINARY_FILE}
+
+
+
+
[{L_SHOW_DIFF_FINAL}] 
+
+
+
+
[{L_SHOW_DIFF_FINAL}] 
+
+ +
+ +
+ {files.L_STATUS} + + + +
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}] 
+
[{L_SHOW_DIFF_FINAL}] 
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
-
[{L_SHOW_DIFF_FINAL}]
+
[{L_SHOW_DIFF_FINAL}]
@@ -218,7 +258,7 @@ - + diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html index 54242d94b4..ce1a241abe 100644 --- a/phpBB/adm/style/install_update_diff.html +++ b/phpBB/adm/style/install_update_diff.html @@ -42,11 +42,16 @@ function resize_panel() width: 99%; } +#diff_content { + padding: 30px 10px 10px; +} + div#codepanel { overflow: auto; width: 100%; height: 350px; + display: inline-block; } div#codepanel { @@ -230,11 +235,11 @@ table.hrdiff caption span {
-
+
-
{L_NUM_CONFLICTS}: {NUM_CONFLICTS}
+
{L_NUM_CONFLICTS}: {NUM_CONFLICTS}
{DIFF_CONTENT}
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 1185df44bb..d5316aae08 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -19,7 +19,7 @@
+ +

+ +

+ +sql_in_set('user_id', array_values($found_names)); + $result = $db->sql_query($sql); + + $found_names = array(); + while ($row = $db->sql_fetchrow($result)) + { + $clean_name = utf8_new_clean_string($row['username']); + + if ($clean_name != $row['username_clean']) + { + $user_id = (int) $row['user_id']; + $found_names[$user_id] = $clean_name; + + // impossible unique clean name + $sql = 'UPDATE ' . USERS_TABLE . " + SET username_clean = ' {$user_id}' + WHERE user_id = {$user_id}"; + $db->sql_query($sql); + } + } + $db->sql_freeresult($result); + + foreach ($found_names as $user_id => $clean_name) + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET username_clean = \'' . $db->sql_escape($clean_name) . '\' + WHERE user_id = ' . $user_id; + $db->sql_query($sql); + } + } + unset($found_names); + unset($colliding_users); +} + +if ($exit) +{ +?> + +
+
+ +
+
+
+ + + + + + + +



@@ -651,13 +1139,15 @@ if (version_compare($current_version, '3.0.RC2', '<=')) { continue; } + $new_code = str_replace('&', '&', $code); $new_code = str_replace('<', '<', $new_code); $new_code = str_replace('>', '>', $new_code); $new_code = utf8_htmlspecialchars($new_code); + $sql = 'UPDATE ' . SMILIES_TABLE . ' SET code = \'' . $db->sql_escape($new_code) . '\' - WHERE smiley_id = ' . (int)$id; + WHERE smiley_id = ' . (int) $id; $db->sql_query($sql); } @@ -672,6 +1162,97 @@ if (version_compare($current_version, '3.0.RC2', '<=')) $no_updates = false; } +if (version_compare($current_version, '3.0.RC3', '<=')) +{ + if ($map_dbms === 'postgres') + { + $sql = "SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));'; + _sql($sql, $errored, $error_ary); + } + + // we check for: + // ath_opt_id + // ath_op_id + // ACL_ROLES_DATA_TABLE_ath_opt_id + // we want ACL_ROLES_DATA_TABLE_ath_op_id + + $table_index_fix = array( + ACL_ROLES_DATA_TABLE => array( + 'ath_opt_id' => 'ath_op_id', + 'ath_op_id' => 'ath_op_id', + ACL_ROLES_DATA_TABLE . '_ath_opt_id' => 'ath_op_id' + ), + STYLES_IMAGESET_DATA_TABLE => array( + 'i_id' => 'i_d', + 'i_d' => 'i_d', + STYLES_IMAGESET_DATA_TABLE . '_i_id' => 'i_d' + ) + ); + + // we need to create some indicies... + $needed_creation = array(); + + foreach ($table_index_fix as $table_name => $index_info) + { + $index_list = sql_list_fake($map_dbms, $table_name); + foreach ($index_info as $bad_index => $good_index) + { + if (in_array($bad_index, $index_list)) + { + // mysql is actually OK, it won't get a hand in this crud + switch ($map_dbms) + { + // last version, mssql had issues with index removal + case 'mssql': + $sql = 'DROP INDEX ' . $table_name . '.' . $bad_index; + _sql($sql, $errored, $error_ary); + break; + + // last version, firebird, oracle, postgresql and sqlite all got bad index names + // we got kinda lucky, tho: they all support the same syntax + case 'firebird': + case 'oracle': + case 'postgres': + case 'sqlite': + $sql = 'DROP INDEX ' . $bad_index; + _sql($sql, $errored, $error_ary); + break; + } + + // If the good index already exist we do not need to create it again... + if (($map_dbms == 'mysql_40' || $map_dbms == 'mysql_41') && $bad_index == $good_index) + { + } + else + { + $needed_creation[$table_name][$good_index] = 1; + } + } + } + } + + $new_index_defs = array('ath_op_id' => array('auth_option_id'), 'i_d' => array('imageset_id')); + + foreach ($needed_creation as $bad_table => $index_repair_list) + { + foreach ($index_repair_list as $new_index => $garbage) + { + sql_create_index($map_dbms, $new_index, $bad_table, $new_index_defs[$new_index]); + $no_updates = false; + } + } + + // Make sure empty smiley codes do not exist + $sql = 'DELETE FROM ' . SMILIES_TABLE . " + WHERE code = ''"; + _sql($sql, $errored, $error_ary); + + set_config('allow_birthdays', '1'); + set_config('cron_lock', '0', true); + + $no_updates = false; +} + _write_result($no_updates, $errored, $error_ary); $error_ary = array(); @@ -750,13 +1331,13 @@ else } // Add database update to log - -$user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version); // Now we purge the session table as well as all cache files $cache->purge(); +exit; + ?> @@ -848,18 +1429,142 @@ function column_exists($dbms, $table, $column_name) { global $db; - $db->sql_return_on_error(true); + switch ($dbms) + { + case 'mysql_40': + case 'mysql_41': + $sql = "SHOW COLUMNS + FROM $table"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + // lower case just in case + if (strtolower($row['Field']) == $column_name) + { + $db->sql_freeresult($result); + return true; + } + } + $db->sql_freeresult($result); + return false; + break; - $sql = "SELECT $column_name FROM $table"; - $result = $db->sql_query_limit($sql, 1); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + // PostgreSQL has a way of doing this in a much simpler way but would + // not allow us to support all versions of PostgreSQL + case 'postgres': + $sql = "SELECT a.attname + FROM pg_class c, pg_attribute a + WHERE c.relname = '{$table}' + AND a.attnum > 0 + AND a.attrelid = c.oid"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + // lower case just in case + if (strtolower($row['attname']) == $column_name) + { + $db->sql_freeresult($result); + return true; + } + } + $db->sql_freeresult($result); + return false; + break; - $error = ($db->sql_error_triggered) ? true : false; + // same deal with PostgreSQL, we must perform more complex operations than + // we technically could + case 'mssql': + $sql = "SELECT c.name + FROM syscolumns c + LEFT JOIN sysobjects o (ON c.id = o.id) + WHERE o.name = '{$table}'"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + // lower case just in case + if (strtolower($row['name']) == $column_name) + { + $db->sql_freeresult($result); + return true; + } + } + $db->sql_freeresult($result); + return false; + break; - $db->sql_return_on_error(false); + case 'oracle': + $sql = "SELECT column_name + FROM user_tab_columns + WHERE table_name = '{$table}'"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + // lower case just in case + if (strtolower($row['column_name']) == $column_name) + { + $db->sql_freeresult($result); + return true; + } + } + $db->sql_freeresult($result); + return false; + break; - return (!$error) ? true : false; + case 'firebird': + $sql = "SELECT RDB\$FIELD_NAME as FNAME + FROM RDB\$RELATION_FIELDS + WHERE RDB\$RELATION_NAME = '{$table}'"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + // lower case just in case + if (strtolower($row['fname']) == $column_name) + { + $db->sql_freeresult($result); + return true; + } + } + $db->sql_freeresult($result); + return false; + break; + + // ugh, SQLite + case 'sqlite': + $sql = "SELECT sql + FROM sqlite_master + WHERE type = 'table' + AND name = '{$table}'"; + $result = $db->sql_query($sql); + + if (!$result) + { + return false; + } + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + preg_match('#\((.*)\)#s', $row['sql'], $matches); + + $cols = trim($matches[1]); + $col_array = preg_split('/,(?![\s\w]+\))/m', $cols); + + foreach ($col_array as $declaration) + { + $entities = preg_split('#\s+#', trim($declaration)); + if ($entities[0] == 'PRIMARY') + { + continue; + } + + if (strtolower($entities[0]) == $column_name) + { + return true; + } + } + return false; + break; + } } /** @@ -926,6 +1631,8 @@ function prepare_column_data($dbms, $column_data) $sql = ''; + $return_array = array(); + switch ($dbms) { case 'firebird': @@ -949,7 +1656,8 @@ function prepare_column_data($dbms, $column_data) case 'mssql': $sql .= " {$column_type} "; - if (!is_null($column_data[1])) + // we do not support MSSQL DEFAULTs for the near future + /*if (!is_null($column_data[1])) { // For hexadecimal values do not use single quotes if (strpos($column_data[1], '0x') === 0) @@ -960,7 +1668,7 @@ function prepare_column_data($dbms, $column_data) { $sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') '; } - } + }*/ $sql .= 'NOT NULL'; break; @@ -1000,14 +1708,23 @@ function prepare_column_data($dbms, $column_data) break; case 'postgres': + $return_array['column_type'] = $column_type; + $return_array['null'] = 'NOT NULL'; + + if (!is_null($column_data[1])) + { + $return_array['default'] = $column_data[1]; + } + $sql .= " {$column_type} "; + $sql .= 'NOT NULL '; $sql .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : ''; - $sql .= 'NOT NULL'; // Unsigned? Then add a CHECK contraint if (in_array($orig_column_type, $unsigned_types)) { + $return_array['constraint'] = "CHECK ({$column_name} >= 0)"; $sql .= " CHECK ({$column_name} >= 0)"; } break; @@ -1029,9 +1746,9 @@ function prepare_column_data($dbms, $column_data) break; } - return array( - 'column_type_sql' => $sql, - ); + $return_array['column_type_sql'] = $sql; + + return $return_array; } /** @@ -1238,7 +1955,7 @@ function sql_index_drop($dbms, $index_name, $table_name) switch ($dbms) { case 'mssql': - $sql = 'DROP INDEX ' . $table_name . '\.' . $index_name . ' ON ' . $table_name; + $sql = 'DROP INDEX ' . $table_name . '.' . $index_name; _sql($sql, $errored, $error_ary); break; @@ -1350,10 +2067,14 @@ function sql_create_unique_index($dbms, $index_name, $table_name, $column) { case 'firebird': case 'postgres': - case 'mysql_40': - case 'mysql_41': case 'oracle': case 'sqlite': + $sql = 'CREATE UNIQUE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; + _sql($sql, $errored, $error_ary); + break; + + case 'mysql_40': + case 'mysql_41': $sql = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; _sql($sql, $errored, $error_ary); break; @@ -1374,10 +2095,14 @@ function sql_create_index($dbms, $index_name, $table_name, $column) { case 'firebird': case 'postgres': - case 'mysql_40': - case 'mysql_41': case 'oracle': case 'sqlite': + $sql = 'CREATE INDEX ' . $table_name . '_' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; + _sql($sql, $errored, $error_ary); + break; + + case 'mysql_40': + case 'mysql_41': $sql = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; _sql($sql, $errored, $error_ary); break; @@ -1418,11 +2143,11 @@ function sql_list_index($dbms, $table_name) switch ($dbms) { case 'firebird': - $sql = "SELECT LOWER(RDB$INDEX_NAME) as index_name - FROM RDB$INDICES - WHERE RDB$RELATION_NAME = " . strtoupper($table_name) . " - AND RDB$UNIQUE_FLAG IS NULL - AND RDB$FOREIGN_KEY IS NULL"; + $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name + FROM RDB\$INDICES + WHERE RDB\$RELATION_NAME = " . strtoupper($table_name) . " + AND RDB\$UNIQUE_FLAG IS NULL + AND RDB\$FOREIGN_KEY IS NULL"; $col = 'index_name'; break; @@ -1440,8 +2165,7 @@ function sql_list_index($dbms, $table_name) case 'mysql_40': case 'mysql_41': $sql = 'SHOW KEYS - FROM ' . $table_name .' - WHERE Non_unique = 1'; + FROM ' . $table_name; $col = 'Key_name'; break; @@ -1461,6 +2185,105 @@ function sql_list_index($dbms, $table_name) $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { + if (($dbms == 'mysql_40' || $dbms == 'mysql_41') && !$row['Non_unique']) + { + continue; + } + + switch ($dbms) + { + case 'firebird': + case 'oracle': + case 'postgres': + case 'sqlite': + $row[$col] = substr($row[$col], strlen($table_name) + 1); + break; + } + + $index_array[] = $row[$col]; + } + $db->sql_freeresult($result); + } + + return array_map('strtolower', $index_array); +} + +// This is totally fake, never use it +// it exists only to mend bad update functions introduced +// * UNIQUE indices +// * PRIMARY keys +function sql_list_fake($dbms, $table_name) +{ + global $dbms_type_map, $db; + global $errored, $error_ary; + + $index_array = array(); + + if ($dbms == 'mssql') + { + $sql = "EXEC sp_statistics '$table_name'"; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + if ($row['TYPE'] == 3) + { + $index_array[] = $row['INDEX_NAME']; + } + } + $db->sql_freeresult($result); + } + else + { + switch ($dbms) + { + case 'firebird': + $sql = "SELECT LOWER(RDB\$INDEX_NAME) as index_name + FROM RDB\$INDICES + WHERE RDB\$RELATION_NAME = " . strtoupper($table_name) . " + AND RDB\$UNIQUE_FLAG IS NULL + AND RDB\$FOREIGN_KEY IS NULL"; + $col = 'index_name'; + break; + + case 'postgres': + $sql = "SELECT ic.relname as index_name + FROM pg_class bc, pg_class ic, pg_index i + WHERE (bc.oid = i.indrelid) + AND (ic.oid = i.indexrelid) + AND (bc.relname = '" . $table_name . "') + AND (i.indisunique != 't') + AND (i.indisprimary != 't')"; + $col = 'index_name'; + break; + + case 'mysql_40': + case 'mysql_41': + $sql = 'SHOW KEYS + FROM ' . $table_name; + $col = 'Key_name'; + break; + + case 'oracle': + $sql = "SELECT index_name + FROM user_indexes + WHERE table_name = '" . $table_name . "' + AND generated = 'N'"; + break; + + case 'sqlite': + $sql = "PRAGMA index_info('" . $table_name . "');"; + $col = 'name'; + break; + } + + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + if (($dbms == 'mysql_40' || $dbms == 'mysql_41') && !$row['Non_unique']) + { + continue; + } + $index_array[] = $row[$col]; } $db->sql_freeresult($result); @@ -1504,16 +2327,62 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) break; case 'postgres': - $default_pos = strpos($column_data['column_type_sql'], ' DEFAULT'); + $sql = 'ALTER TABLE ' . $table_name . ' '; - if ($default_pos === false) + $sql_array = array(); + $sql_array[] = 'ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type']; + + if ($column_data['null'] == 'NOT NULL') { - $sql = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' TYPE ' . $column_data['column_type_sql']; + $sql_array[] = 'ALTER COLUMN ' . $column_name . ' SET NOT NULL'; } else { - $sql = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' TYPE ' . substr($column_data['column_type_sql'], 0, $default_pos) . ', ALTER COLUMN ' . $column_name . ' SET ' . substr($column_data['column_type_sql'], $default_pos + 1); + $sql_array[] = 'ALTER COLUMN ' . $column_name . ' DROP NOT NULL'; } + + if (isset($column_data['default'])) + { + $sql_array[] = 'ALTER COLUMN ' . $column_name . " SET DEFAULT '" . $column_data['default'] . "'"; + } + + // we don't want to double up on constraints if we change different number data types + if (isset($column_data['constraint'])) + { + $constraint_sql = "SELECT consrc as constraint_data + FROM pg_constraint, pg_class bc + WHERE conrelid = bc.oid + AND bc.relname = '{$table_name}' + AND NOT EXISTS ( + SELECT * + FROM pg_constraint as c, pg_inherits as i + WHERE i.inhrelid = pg_constraint.conrelid + AND c.conname = pg_constraint.conname + AND c.consrc = pg_constraint.consrc + AND c.conrelid = i.inhparent + )"; + + $constraint_exists = false; + + $result = $db->sql_query($constraint_sql); + while ($row = $db->sql_fetchrow($result)) + { + if (trim($row['constraint_data']) == trim($column_data['constraint'])) + { + $constraint_exists = true; + break; + } + } + $db->sql_freeresult($result); + + if (!$constraint_exists) + { + $sql_array[] = "ADD '" . $column_data['constraint'] . "'"; + } + } + + $sql .= implode(', ', $sql_array); + _sql($sql, $errored, $error_ary); break; @@ -1570,4 +2439,38 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data) } } +function utf8_new_clean_string($text) +{ + static $homographs = array(); + static $utf8_case_fold_nfkc = ''; + if (empty($homographs)) + { + global $phpbb_root_path, $phpEx; + if (!function_exists('utf8_case_fold_nfkc') || !file_exists($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx)) + { + if (!file_exists($phpbb_root_path . 'install/data/confusables.' . $phpEx)) + { + global $lang; + trigger_error(sprintf($lang['UPDATE_REQUIRES_FILE'], $phpbb_root_path . 'install/data/confusables.' . $phpEx), E_USER_ERROR); + } + $homographs = include($phpbb_root_path . 'install/data/confusables.' . $phpEx); + $utf8_case_fold_nfkc = 'utf8_new_case_fold_nfkc'; + } + else + { + $homographs = include($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx); + $utf8_case_fold_nfkc = 'utf8_case_fold_nfkc'; + } + } + + $text = $utf8_case_fold_nfkc($text); + $text = strtr($text, $homographs); + // Other control characters + $text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text); + + // we can use trim here as all the other space characters should have been turned + // into normal ASCII spaces by now + return trim($text); +} + ?> \ No newline at end of file diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 101ea8e0c6..7b0f120577 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -15,7 +15,7 @@ define('IN_PHPBB', true); define('IN_INSTALL', true); /**#@-*/ -$phpbb_root_path = './../'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); // Report all errors, except notices @@ -105,14 +105,14 @@ else // Try to override some limits - maybe it helps some... @set_time_limit(0); $mem_limit = @ini_get('memory_limit'); -if (!empty($mem_limit )) +if (!empty($mem_limit)) { $unit = strtolower(substr($mem_limit, -1, 1)); - $mem_limit = (int)$mem_limit; + $mem_limit = (int) $mem_limit; if ($unit == 'k') { $mem_limit = floor($mem_limit/1024); - } + } else if ($unit == 'g') { $mem_limit *= 1024; @@ -127,7 +127,7 @@ else { $mem_limit = '128M'; } -@ini_set('memory_limit', $mem_limit ); +@ini_set('memory_limit', $mem_limit); // Include essential scripts require($phpbb_root_path . 'includes/functions.' . $phpEx); @@ -225,6 +225,9 @@ $config = array( $template->set_custom_template('../adm/style', 'admin'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); +// the acp template is never stored in the database +$user->theme['template_storedb'] = false; + $install = new module(); $install->create('install', "index.$phpEx", $mode, $sub); @@ -721,7 +724,7 @@ class module { $path = $phpbb_root_path . 'language/' . $file; - if (is_file($path) || is_link($path) || $file == '.' || $file == '..' || $file == 'CVS') + if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS') { continue; } diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 4d7055d763..0f2486d874 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -463,6 +463,7 @@ class install_convert extends module $prefixes = array(); $tables_existing = get_tables($src_db); + $tables_existing = array_map('strtolower', $tables_existing); foreach ($tables_existing as $table_name) { compare_table($tables, $table_name, $prefixes); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 7fd4c881c6..4dd7e73db5 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -8,6 +8,11 @@ * */ +/** +* @todo: check for those functions being 'available'? Though not able to check with function_exists, we need to create test cases +* ini_get(), glob, getimagesize, fsockopen, readfile +*/ + /** */ if (!defined('IN_INSTALL')) @@ -57,7 +62,7 @@ class install_install extends module switch ($sub) { - case 'intro' : + case 'intro': $this->page_title = $lang['SUB_INTRO']; $template->assign_vars(array( @@ -70,27 +75,27 @@ class install_install extends module break; - case 'requirements' : + case 'requirements': $this->check_server_requirements($mode, $sub); break; - case 'database' : + case 'database': $this->obtain_database_settings($mode, $sub); break; - case 'administrator' : + case 'administrator': $this->obtain_admin_settings($mode, $sub); break; - case 'config_file' : + case 'config_file': $this->create_config_file($mode, $sub); break; - case 'advanced' : + case 'advanced': $this->obtain_advanced_settings($mode, $sub); break; @@ -99,7 +104,7 @@ class install_install extends module $this->load_schema($mode, $sub); break; - case 'final' : + case 'final': $this->build_search_index($mode, $sub); $this->add_modules($mode, $sub); $this->add_language($mode, $sub); @@ -535,10 +540,7 @@ class install_install extends module $this->page_title = $lang['STAGE_DATABASE']; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); $connect_test = false; $error = array(); @@ -547,15 +549,14 @@ class install_install extends module // Has the user opted to test the connection? if (isset($_POST['testdb'])) { - if (!isset($available_dbms[$dbms]) || !$available_dbms[$dbms]['AVAILABLE']) + if (!isset($available_dbms[$data['dbms']]) || !$available_dbms[$data['dbms']]['AVAILABLE']) { $error['db'][] = $lang['INST_ERR_NO_DB']; $connect_test = false; } else { - $dbpasswd = htmlspecialchars_decode($dbpasswd); - $connect_test = connect_check_db(true, $error, $available_dbms[$dbms], $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport); + $connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport']); } $template->assign_block_vars('checks', array( @@ -603,7 +604,7 @@ class install_install extends module $available_dbms = &$available_dbms_temp; // And now for the main part of this page - $table_prefix = (!empty($table_prefix) ? $table_prefix : 'phpbb_'); + $data['table_prefix'] = (!empty($data['table_prefix']) ? $data['table_prefix'] : 'phpbb_'); foreach ($this->db_config_options as $config_key => $vars) { @@ -630,15 +631,15 @@ class install_install extends module 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', - 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options), + 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } } // And finally where do we want to go next (well today is taken isn't it :P) - $s_hidden_fields = ($img_imagick) ? '' : ''; - $s_hidden_fields .= ''; + $s_hidden_fields = ($data['img_imagick']) ? '' : ''; + $s_hidden_fields .= ''; if ($connect_test) { foreach ($this->db_config_options as $config_key => $vars) @@ -647,7 +648,7 @@ class install_install extends module { continue; } - $s_hidden_fields .= ''; + $s_hidden_fields .= ''; } } @@ -673,69 +674,63 @@ class install_install extends module $this->page_title = $lang['STAGE_ADMINISTRATOR']; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); - if ($dbms == '') + if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } - $s_hidden_fields = ($img_imagick) ? '' : ''; + $s_hidden_fields = ($data['img_imagick']) ? '' : ''; $passed = false; - $default_lang = ($default_lang !== '') ? $default_lang : $language; - - $board_email1 = strtolower($board_email1); - $board_email2 = strtolower($board_email2); + $data['default_lang'] = ($data['default_lang'] !== '') ? $data['default_lang'] : $data['language']; if (isset($_POST['check'])) { $error = array(); // Check the entered email address and password - if ($admin_name == '' || $admin_pass1 == '' || $admin_pass2 == '' || $board_email1 == '' || $board_email2 == '') + if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '') { $error[] = $lang['INST_ERR_MISSING_DATA']; } - if ($admin_pass1 != $admin_pass2 && $admin_pass1 != '') + if ($data['admin_pass1'] != $data['admin_pass2'] && $data['admin_pass1'] != '') { $error[] = $lang['INST_ERR_PASSWORD_MISMATCH']; } // Test against the default username rules - if ($admin_name != '' && utf8_strlen($admin_name) < 3) + if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) < 3) { $error[] = $lang['INST_ERR_USER_TOO_SHORT']; } - if ($admin_name != '' && utf8_strlen($admin_name) > 20) + if ($data['admin_name'] != '' && utf8_strlen($data['admin_name']) > 20) { $error[] = $lang['INST_ERR_USER_TOO_LONG']; } // Test against the default password rules - if ($admin_pass1 != '' && utf8_strlen($admin_pass1) < 6) + if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) < 6) { $error[] = $lang['INST_ERR_PASSWORD_TOO_SHORT']; } - if ($admin_pass1 != '' && utf8_strlen($admin_pass1) > 30) + if ($data['admin_pass1'] != '' && utf8_strlen($data['admin_pass1']) > 30) { $error[] = $lang['INST_ERR_PASSWORD_TOO_LONG']; } - if ($board_email1 != $board_email2 && $board_email1 != '') + if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '') { $error[] = $lang['INST_ERR_EMAIL_MISMATCH']; } - if ($board_email1 != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $board_email1)) + if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1'])) { $error[] = $lang['INST_ERR_EMAIL_INVALID']; } @@ -796,7 +791,7 @@ class install_install extends module 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', - 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options), + 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } @@ -809,12 +804,12 @@ class install_install extends module { continue; } - $s_hidden_fields .= ''; + $s_hidden_fields .= ''; } } - $s_hidden_fields .= ($img_imagick) ? '' : ''; - $s_hidden_fields .= ''; + $s_hidden_fields .= ($data['img_imagick']) ? '' : ''; + $s_hidden_fields .= ''; foreach ($this->db_config_options as $config_key => $vars) { @@ -822,7 +817,7 @@ class install_install extends module { continue; } - $s_hidden_fields .= ''; + $s_hidden_fields .= ''; } $submit = $lang['NEXT_STEP']; @@ -847,26 +842,23 @@ class install_install extends module $this->page_title = $lang['STAGE_CONFIG_FILE']; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); - if ($dbms == '') + if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } - $s_hidden_fields = ($img_imagick) ? '' : ''; - $s_hidden_fields .= ''; + $s_hidden_fields = ($data['img_imagick']) ? '' : ''; + $s_hidden_fields .= ''; $written = false; // Create a list of any PHP modules we wish to have loaded $load_extensions = array(); - $available_dbms = get_available_dbms($dbms); - $check_exts = array_merge(array($available_dbms[$dbms]['MODULE']), $this->php_dlls_other); + $available_dbms = get_available_dbms($data['dbms']); + $check_exts = array_merge(array($available_dbms[$data['dbms']]['MODULE']), $this->php_dlls_other); foreach ($check_exts as $dll) { @@ -892,19 +884,18 @@ class install_install extends module @chmod($phpbb_root_path . 'cache/install_lock', 0666); - $dbpasswd = htmlspecialchars_decode($dbpasswd); $load_extensions = implode(',', $load_extensions); // Time to convert the data provided into a config file $config_data = "'; + $s_hidden_fields .= ''; } if (!$written) @@ -1011,28 +1002,25 @@ class install_install extends module $this->page_title = $lang['STAGE_ADVANCED']; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); - if ($dbms == '') + if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } - $s_hidden_fields = ($img_imagick) ? '' : ''; - $s_hidden_fields .= ''; + $s_hidden_fields = ($data['img_imagick']) ? '' : ''; + $s_hidden_fields .= ''; - $email_enable = ($email_enable !== '') ? $email_enable : true; - $server_name = ($server_name !== '') ? $server_name : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); - $server_port = ($server_port !== '') ? $server_port : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT')); - $server_protocol = ($server_protocol !== '') ? $server_protocol : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'); - $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false); + $data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true; + $data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); + $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT')); + $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'); + $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false); - if ($script_path === '') + if ($data['script_path'] === '') { $name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF'); if (!$name) @@ -1042,7 +1030,7 @@ class install_install extends module // Replace backslashes and doubled slashes (could happen on some proxy setups) $name = str_replace(array('\\', '//', '/install'), '/', $name); - $script_path = trim(dirname($name)); + $data['script_path'] = trim(dirname($name)); } foreach ($this->advanced_config_options as $config_key => $vars) @@ -1070,7 +1058,7 @@ class install_install extends module 'S_EXPLAIN' => $vars['explain'], 'S_LEGEND' => false, 'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '', - 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options), + 'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $data[$config_key], $options), ) ); } @@ -1082,7 +1070,7 @@ class install_install extends module { continue; } - $s_hidden_fields .= ''; + $s_hidden_fields .= ''; } $submit = $lang['NEXT_STEP']; @@ -1108,19 +1096,16 @@ class install_install extends module $s_hidden_fields = ''; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); - if ($dbms == '') + if ($data['dbms'] == '') { // Someone's been silly and tried calling this page direct // So we send them back to the start to do it again properly $this->p_master->redirect("index.$phpEx?mode=install"); } - $cookie_domain = ($server_name != '') ? $server_name : (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); + $cookie_domain = ($data['server_name'] != '') ? $data['server_name'] : (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'); // Try to come up with the best solution for cookie domain... if (strpos($cookie_domain, 'www.') === 0) @@ -1129,45 +1114,43 @@ class install_install extends module } // If we get here and the extension isn't loaded it should be safe to just go ahead and load it - $available_dbms = get_available_dbms($dbms); - - $dbpasswd = htmlspecialchars_decode($dbpasswd); + $available_dbms = get_available_dbms($data['dbms']); // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$dbms]['DRIVER']; + $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); + $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. $db->sql_return_on_error(true); // If mysql is chosen, we need to adjust the schema filename slightly to reflect the correct version. ;) - if ($dbms == 'mysql') + if ($data['dbms'] == 'mysql') { if (version_compare($db->mysql_version, '4.1.3', '>=')) { - $available_dbms[$dbms]['SCHEMA'] .= '_41'; + $available_dbms[$data['dbms']]['SCHEMA'] .= '_41'; } else { - $available_dbms[$dbms]['SCHEMA'] .= '_40'; + $available_dbms[$data['dbms']]['SCHEMA'] .= '_40'; } } // Ok we have the db info go ahead and read in the relevant schema // and work on building the table - $dbms_schema = 'schemas/' . $available_dbms[$dbms]['SCHEMA'] . '_schema.sql'; + $dbms_schema = 'schemas/' . $available_dbms[$data['dbms']]['SCHEMA'] . '_schema.sql'; // How should we treat this schema? - $remove_remarks = $available_dbms[$dbms]['COMMENTS']; - $delimiter = $available_dbms[$dbms]['DELIM']; + $remove_remarks = $available_dbms[$data['dbms']]['COMMENTS']; + $delimiter = $available_dbms[$data['dbms']]['DELIM']; $sql_query = @file_get_contents($dbms_schema); - $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); + $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); $remove_remarks($sql_query); @@ -1188,7 +1171,7 @@ class install_install extends module $sql_query = file_get_contents('schemas/schema_data.sql'); // Deal with any special comments - switch ($dbms) + switch ($data['dbms']) { case 'mssql': case 'mssql_odbc': @@ -1201,7 +1184,7 @@ class install_install extends module } // Change prefix - $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); + $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); // Change language strings... $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query); @@ -1225,139 +1208,139 @@ class install_install extends module $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; - if ($script_path !== '/') + if ($data['script_path'] !== '/') { // Adjust destination path (no trailing slash) - if (substr($script_path, -1) == '/') + if (substr($data['script_path'], -1) == '/') { - $script_path = substr($script_path, 0, -1); + $data['script_path'] = substr($data['script_path'], 0, -1); } - $script_path = str_replace(array('../', './'), '', $script_path); + $data['script_path'] = str_replace(array('../', './'), '', $data['script_path']); - if ($script_path[0] != '/') + if ($data['script_path'][0] != '/') { - $script_path = '/' . $script_path; + $data['script_path'] = '/' . $data['script_path']; } } // Set default config and post data, this applies to all DB's $sql_ary = array( - 'INSERT INTO ' . $table_prefix . "config (config_name, config_value) + 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value) VALUES ('board_startdate', '$current_time')", - 'INSERT INTO ' . $table_prefix . "config (config_name, config_value) - VALUES ('default_lang', '" . $db->sql_escape($default_lang) . "')", + 'INSERT INTO ' . $data['table_prefix'] . "config (config_name, config_value) + VALUES ('default_lang', '" . $db->sql_escape($data['default_lang']) . "')", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($img_imagick) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['img_imagick']) . "' WHERE config_name = 'img_imagick'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($server_name) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['server_name']) . "' WHERE config_name = 'server_name'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($server_port) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['server_port']) . "' WHERE config_name = 'server_port'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($board_email1) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['board_email1']) . "' WHERE config_name = 'board_email'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($board_email1) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['board_email1']) . "' WHERE config_name = 'board_contact'", - 'UPDATE ' . $table_prefix . "config + 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($cookie_domain) . "' WHERE config_name = 'cookie_domain'", - 'UPDATE ' . $table_prefix . "config + 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($lang['default_dateformat']) . "' WHERE config_name = 'default_dateformat'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($email_enable) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['email_enable']) . "' WHERE config_name = 'email_enable'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($smtp_delivery) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['smtp_delivery']) . "' WHERE config_name = 'smtp_delivery'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($smtp_host) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['smtp_host']) . "' WHERE config_name = 'smtp_host'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($smtp_auth) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['smtp_auth']) . "' WHERE config_name = 'smtp_auth_method'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($smtp_user) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['smtp_user']) . "' WHERE config_name = 'smtp_username'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($smtp_pass) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['smtp_pass']) . "' WHERE config_name = 'smtp_password'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($cookie_secure) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['cookie_secure']) . "' WHERE config_name = 'cookie_secure'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($force_server_vars) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['force_server_vars']) . "' WHERE config_name = 'force_server_vars'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($script_path) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['script_path']) . "' WHERE config_name = 'script_path'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($server_protocol) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['server_protocol']) . "' WHERE config_name = 'server_protocol'", - 'UPDATE ' . $table_prefix . "config - SET config_value = '" . $db->sql_escape($admin_name) . "' + 'UPDATE ' . $data['table_prefix'] . "config + SET config_value = '" . $db->sql_escape($data['admin_name']) . "' WHERE config_name = 'newest_username'", - 'UPDATE ' . $table_prefix . "config + 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . md5(mt_rand()) . "' WHERE config_name = 'avatar_salt'", - 'UPDATE ' . $table_prefix . "users - SET username = '" . $db->sql_escape($admin_name) . "', user_password='" . $db->sql_escape(md5($admin_pass1)) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($default_lang) . "', user_email='" . $db->sql_escape($board_email1) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . (crc32($board_email1) . strlen($board_email1)) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($admin_name)) . "' + 'UPDATE ' . $data['table_prefix'] . "users + SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . (crc32($data['board_email1']) . strlen($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "' WHERE username = 'Admin'", - 'UPDATE ' . $table_prefix . "moderator_cache - SET username = '" . $db->sql_escape($admin_name) . "' + 'UPDATE ' . $data['table_prefix'] . "moderator_cache + SET username = '" . $db->sql_escape($data['admin_name']) . "' WHERE username = 'Admin'", - 'UPDATE ' . $table_prefix . "forums - SET forum_last_poster_name = '" . $db->sql_escape($admin_name) . "' + 'UPDATE ' . $data['table_prefix'] . "forums + SET forum_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "' WHERE forum_last_poster_name = 'Admin'", - 'UPDATE ' . $table_prefix . "topics - SET topic_first_poster_name = '" . $db->sql_escape($admin_name) . "', topic_last_poster_name = '" . $db->sql_escape($admin_name) . "' + 'UPDATE ' . $data['table_prefix'] . "topics + SET topic_first_poster_name = '" . $db->sql_escape($data['admin_name']) . "', topic_last_poster_name = '" . $db->sql_escape($data['admin_name']) . "' WHERE topic_first_poster_name = 'Admin' OR topic_last_poster_name = 'Admin'", - 'UPDATE ' . $table_prefix . "users + 'UPDATE ' . $data['table_prefix'] . "users SET user_regdate = $current_time", - 'UPDATE ' . $table_prefix . "posts + 'UPDATE ' . $data['table_prefix'] . "posts SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'", - 'UPDATE ' . $table_prefix . "topics + 'UPDATE ' . $data['table_prefix'] . "topics SET topic_time = $current_time, topic_last_post_time = $current_time", - 'UPDATE ' . $table_prefix . "forums + 'UPDATE ' . $data['table_prefix'] . "forums SET forum_last_post_time = $current_time", ); if (@extension_loaded('gd') || can_load_dll('gd')) { - $sql_ary[] = 'UPDATE ' . $table_prefix . "config + $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '1' WHERE config_name = 'captcha_gd'"; } @@ -1369,7 +1352,7 @@ class install_install extends module $rand_str = substr($rand_str, 0, 5); $cookie_name .= strtolower($rand_str); - $sql_ary[] = 'UPDATE ' . $table_prefix . "config + $sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config SET config_value = '" . $db->sql_escape($cookie_name) . "' WHERE config_name = 'cookie_name'"; @@ -1384,11 +1367,6 @@ class install_install extends module } } - foreach ($this->request_vars as $var) - { - $s_hidden_fields .= ''; - } - $submit = $lang['NEXT_STEP']; $url = $this->p_master->module_url . "?mode=$mode&sub=final"; @@ -1396,7 +1374,7 @@ class install_install extends module $template->assign_vars(array( 'BODY' => $lang['STAGE_CREATE_TABLE_EXPLAIN'], 'L_SUBMIT' => $submit, - 'S_HIDDEN' => $s_hidden_fields, + 'S_HIDDEN' => build_hidden_fields($data), 'U_ACTION' => $url, )); } @@ -1409,23 +1387,19 @@ class install_install extends module global $db, $lang, $phpbb_root_path, $phpEx, $config; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } - - $dbpasswd = htmlspecialchars_decode($dbpasswd); + $data = $this->get_submitted_data(); + $table_prefix = $data['table_prefix']; // If we get here and the extension isn't loaded it should be safe to just go ahead and load it - $available_dbms = get_available_dbms($dbms); + $available_dbms = get_available_dbms($data['dbms']); // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $available_dbms[$dbms]['DRIVER'] . '.' . $phpEx); + include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx); // Instantiate the database - $sql_db = 'dbal_' . $available_dbms[$dbms]['DRIVER']; + $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER']; $db = new $sql_db(); - $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false); + $db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. $db->sql_return_on_error(true); @@ -1466,7 +1440,6 @@ class install_install extends module { global $db, $lang, $phpbb_root_path, $phpEx; - include_once($phpbb_root_path . 'includes/constants.' . $phpEx); include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); $_module = &new acp_modules(); @@ -1550,10 +1523,11 @@ class install_install extends module { continue; } + $module_data = array( 'module_basename' => $module_basename, 'module_enabled' => 1, - 'module_display' => (isset($row['display'])) ? $row['display'] : 1, + 'module_display' => (isset($row['display'])) ? (int) $row['display'] : 1, 'parent_id' => (int) $categories[$cat_name]['id'], 'module_class' => $module_class, 'module_langname' => $row['title'], @@ -1655,8 +1629,8 @@ class install_install extends module $module_data = array( 'module_basename' => $row['module_basename'], - 'module_enabled' => $row['module_enabled'], - 'module_display' => $row['module_display'], + 'module_enabled' => (int) $row['module_enabled'], + 'module_display' => (int) $row['module_display'], 'parent_id' => (int) $row2['module_id'], 'module_class' => $row['module_class'], 'module_langname' => $row['module_langname'], @@ -1698,7 +1672,12 @@ class install_install extends module { $path = $phpbb_root_path . 'language/' . $file; - if (is_dir($path) && !is_link($path) && file_exists($path . '/iso.txt')) + if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS') + { + continue; + } + + if (is_dir($path) && file_exists($path . '/iso.txt')) { $lang_file = file("{$phpbb_root_path}language/$path/iso.txt"); @@ -1759,12 +1738,12 @@ class install_install extends module if (in_array($image_name, $valid_localized)) { $sql_ary[] = array( - 'image_name' => $image_name, - 'image_filename' => $image_filename, - 'image_height' => $image_height, - 'image_width' => $image_width, - 'imageset_id' => $imageset_row['imageset_id'], - 'image_lang' => $lang_pack['lang_iso'], + 'image_name' => (string) $image_name, + 'image_filename' => (string) $image_filename, + 'image_height' => (int) $image_height, + 'image_width' => (int) $image_width, + 'imageset_id' => (int) $imageset_row['imageset_id'], + 'image_lang' => (string) $lang_pack['lang_iso'], ); } } @@ -1796,10 +1775,7 @@ class install_install extends module global $db, $lang, $phpbb_root_path, $phpEx, $config; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } + $data = $this->get_submitted_data(); // Fill the config array - it is needed by those functions we call $sql = 'SELECT * @@ -1841,7 +1817,7 @@ class install_install extends module 'user_password' => '', 'user_colour' => '9E8DA7', 'user_email' => '', - 'user_lang' => $default_lang, + 'user_lang' => $data['default_lang'], 'user_style' => 1, 'user_timezone' => 0, 'user_dateformat' => $lang['default_dateformat'], @@ -1859,10 +1835,10 @@ class install_install extends module $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'bot_active' => 1, - 'bot_name' => $bot_name, - 'user_id' => $user_id, - 'bot_agent' => $bot_ary[0], - 'bot_ip' => $bot_ary[1], + 'bot_name' => (string) $bot_name, + 'user_id' => (int) $user_id, + 'bot_agent' => (string) $bot_ary[0], + 'bot_ip' => (string) $bot_ary[1], )); $result = $db->sql_query($sql); @@ -1879,13 +1855,7 @@ class install_install extends module $this->page_title = $lang['STAGE_FINAL']; // Obtain any submitted data - foreach ($this->request_vars as $var) - { - $$var = (in_array($var, array('admin_name', 'dbpasswd', 'admin_pass1', 'admin_pass2'))) ? request_var($var, '', true) : request_var($var, ''); - } - - // Load the basic configuration data - include_once($phpbb_root_path . 'includes/constants.' . $phpEx); + $data = $this->get_submitted_data(); $sql = 'SELECT * FROM ' . CONFIG_TABLE; @@ -1899,7 +1869,7 @@ class install_install extends module $db->sql_freeresult($result); $user->session_begin(); - $auth->login($admin_name, $admin_pass1, false, true, true); + $auth->login($data['admin_name'], $data['admin_pass1'], false, true, true); // OK, Now that we've reached this point we can be confident that everything // is installed and working......I hope :) @@ -1912,9 +1882,9 @@ class install_install extends module $messenger = new messenger(false); - $messenger->template('installed', $language); + $messenger->template('installed', $data['language']); - $messenger->to($board_email1, $admin_name); + $messenger->to($data['board_email1'], $data['admin_name']); $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); @@ -1922,8 +1892,8 @@ class install_install extends module $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); $messenger->assign_vars(array( - 'USERNAME' => htmlspecialchars_decode($admin_name), - 'PASSWORD' => htmlspecialchars_decode($admin_pass1)) + 'USERNAME' => htmlspecialchars_decode($data['admin_name']), + 'PASSWORD' => htmlspecialchars_decode($data['admin_pass1'])) ); $messenger->send(NOTIFY_EMAIL); @@ -1934,7 +1904,7 @@ class install_install extends module $template->assign_vars(array( 'TITLE' => $lang['INSTALL_CONGRATS'], - 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $language), '../docs/README.html'), + 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx), )); @@ -1958,12 +1928,44 @@ class install_install extends module return $s_smtp_auth_options; } - /** - * The variables that we will be passing between pages - * Used to retrieve data quickly on each page + * Get submitted data */ - var $request_vars = array('language', 'dbms', 'dbhost', 'dbport', 'dbuser', 'dbpasswd', 'dbname', 'table_prefix', 'default_lang', 'admin_name', 'admin_pass1', 'admin_pass2', 'board_email1', 'board_email2', 'img_imagick', 'ftp_path', 'ftp_user', 'ftp_pass', 'email_enable', 'smtp_delivery', 'smtp_host', 'smtp_auth', 'smtp_user', 'smtp_pass', 'cookie_secure', 'force_server_vars', 'server_protocol', 'server_name', 'server_port', 'script_path'); + function get_submitted_data() + { + return array( + 'language' => basename(request_var('language', '')), + 'dbms' => request_var('dbms', ''), + 'dbhost' => request_var('dbhost', ''), + 'dbport' => request_var('dbport', ''), + 'dbuser' => request_var('dbuser', ''), + 'dbpasswd' => htmlspecialchars_decode(request_var('dbpasswd', '', true)), + 'dbname' => request_var('dbname', ''), + 'table_prefix' => request_var('table_prefix', ''), + 'default_lang' => basename(request_var('default_lang', '')), + 'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)), + 'admin_pass1' => request_var('admin_pass1', '', true), + 'admin_pass2' => request_var('admin_pass2', '', true), + 'board_email1' => strtolower(request_var('board_email1', '')), + 'board_email2' => strtolower(request_var('board_email2', '')), + 'img_imagick' => request_var('img_imagick', ''), + 'ftp_path' => request_var('ftp_path', ''), + 'ftp_user' => request_var('ftp_user', ''), + 'ftp_pass' => request_var('ftp_pass', ''), + 'email_enable' => request_var('email_enable', ''), + 'smtp_delivery' => request_var('smtp_delivery', ''), + 'smtp_host' => request_var('smtp_host', ''), + 'smtp_auth' => request_var('smtp_auth', ''), + 'smtp_user' => request_var('smtp_user', ''), + 'smtp_pass' => request_var('smtp_pass', ''), + 'cookie_secure' => request_var('cookie_secure', ''), + 'force_server_vars' => request_var('force_server_vars', ''), + 'server_protocol' => request_var('server_protocol', ''), + 'server_name' => request_var('server_name', ''), + 'server_port' => request_var('server_port', ''), + 'script_path' => request_var('script_path', ''), + ); + } /** * The information below will be used to build the input fields presented to the user diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index bf1912076f..7b0e405a0f 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -58,6 +58,7 @@ class install_update extends module var $new_location; var $latest_version; var $current_version; + var $unequal_version; // Set to false var $test_update = false; @@ -73,6 +74,7 @@ class install_update extends module $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; + $this->unequal_version = false; $this->old_location = $phpbb_root_path . 'install/update/old/'; $this->new_location = $phpbb_root_path . 'install/update/new/'; @@ -82,7 +84,7 @@ class install_update extends module require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); - // Special options for conflicts + // Special options for conflicts/modified files define('MERGE_NO_MERGE_NEW', 1); define('MERGE_NO_MERGE_MOD', 2); define('MERGE_NEW_FILE', 3); @@ -126,6 +128,9 @@ class install_update extends module // Set custom template again. ;) $template->set_custom_template('../adm/style', 'admin'); + // still, the acp template is never stored in the database + $user->theme['template_storedb'] = false; + // Get current and latest version if (($latest_version = $cache->get('_version_info')) === false) { @@ -170,12 +175,12 @@ class install_update extends module // Check if the update files stored are for the latest version... if ($this->latest_version != $this->update_info['version']['to']) { - $template->assign_vars(array( - 'S_ERROR' => true, - 'ERROR_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version)) - ); + $this->unequal_version = true; - return; + $template->assign_vars(array( + 'S_WARNING' => true, + 'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version)) + ); } if ($this->test_update === false) @@ -239,6 +244,12 @@ class install_update extends module 'CURRENT_VERSION' => $this->current_version) ); + // Print out version the update package updates to + if ($this->unequal_version) + { + $template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']); + } + break; case 'update_db': @@ -251,7 +262,7 @@ class install_update extends module { include_once($phpbb_root_path . 'install/database_update.' . $phpEx); - if ($updates_to_version === $this->latest_version) + if ($updates_to_version === $this->update_info['version']['to']) { $valid = true; } @@ -269,7 +280,7 @@ class install_update extends module // Redirect the user to the database update script with some explanations... $template->assign_vars(array( 'S_DB_UPDATE' => true, - 'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->latest_version) ? true : false, + 'S_DB_UPDATE_FINISHED' => ($config['version'] == $this->update_info['version']['to']) ? true : false, 'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']), 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=update_db"), 'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&sub=file_check"), @@ -430,14 +441,19 @@ class install_update extends module else if (!$recache) { $last_change = $theme['theme_mtime']; + $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme"); - foreach (glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT) as $file) + if ($dir) { - if ($last_change < @filemtime($file)) + while (($entry = readdir($dir)) !== false) { - $recache = true; - break; + if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}")) + { + $recache = true; + break; + } } + closedir($dir); } } @@ -476,11 +492,23 @@ class install_update extends module $this->page_title = 'STAGE_UPDATE_FILES'; $s_hidden_fields = ''; - foreach (request_var('conflict', array('' => 0)) as $filename => $merge_option) + $conflicts = request_var('conflict', array('' => 0)); + $modified = request_var('modified', array('' => 0)); + + foreach ($conflicts as $filename => $merge_option) { $s_hidden_fields .= ''; } + foreach ($modified as $filename => $merge_option) + { + if (!$merge_option) + { + continue; + } + $s_hidden_fields .= ''; + } + $no_update = request_var('no_update', array(0 => '')); foreach ($no_update as $index => $filename) @@ -609,6 +637,11 @@ class install_update extends module { $this->page_title = 'SELECT_FTP_SETTINGS'; + if (!class_exists($method)) + { + trigger_error('Method does not exist.', E_USER_ERROR); + } + $requested_data = call_user_func(array($method, 'data')); foreach ($requested_data as $data => $default) { @@ -645,6 +678,7 @@ class install_update extends module $update_list = $cache->get('_update_list'); $conflicts = request_var('conflict', array('' => 0)); + $modified = request_var('modified', array('' => 0)); if ($update_list === false) { @@ -672,6 +706,28 @@ class install_update extends module $conflicts = $new_conflicts; } + // Build list for modifications + if (sizeof($modified)) + { + $modified_filenames = array(); + foreach ($update_list['modified'] as $files) + { + $modified_filenames[] = $files['filename']; + } + + $new_modified = array(); + foreach ($modified as $filename => $diff_method) + { + if (in_array($filename, $modified_filenames)) + { + $new_modified[$filename] = $diff_method; + } + } + + $modified = $new_modified; + } + + // Check number of conflicting files, they need to be equal. For modified files the number can differ if (sizeof($update_list['conflict']) != sizeof($conflicts)) { trigger_error($user->lang['MERGE_SELECT_ERROR'], E_USER_ERROR); @@ -729,10 +785,25 @@ class install_update extends module case 'modified': - $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); + $option = (isset($modified[$file_struct['filename']])) ? $modified[$file_struct['filename']] : 0; - $contents = implode("\n", $diff->merged_output()); - unset($diff); + switch ($option) + { + case MERGE_NO_MERGE_NEW: + $contents = file_get_contents($this->new_location . $original_filename); + break; + + case MERGE_NO_MERGE_MOD: + $contents = file_get_contents($phpbb_root_path . $file_struct['filename']); + break; + + default: + $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); + + $contents = implode("\n", $diff->merged_output()); + unset($diff); + break; + } if ($update_mode == 'download') { @@ -921,7 +992,25 @@ class install_update extends module break; case 'modified': - $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $original_file, $this->new_location . $file); + $option = request_var('op', 0); + + switch ($option) + { + case MERGE_NO_MERGE_NEW: + case MERGE_NO_MERGE_MOD: + + $diff = $this->return_diff(array(), ($option == MERGE_NO_MERGE_NEW) ? $this->new_location . $original_file : $phpbb_root_path . $file); + + $template->assign_var('S_DIFF_NEW_FILE', true); + $diff_mode = 'inline'; + $this->page_title = 'VIEWING_FILE_CONTENTS'; + + break; + + default: + $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $original_file, $this->new_location . $file); + break; + } break; case 'not_modified': @@ -1234,6 +1323,7 @@ class install_update extends module switch ($mode) { case 'version_info': + global $phpbb_root_path, $phpEx; $info = get_remote_file('www.phpbb.com', '/updatecheck', '30x.txt', $errstr, $errno); if ($info !== false) diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index b0aed4d177..e2dc0718e7 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varbinary(5) DEFAULT '' NOT NULL, forum_link blob NOT NULL, forum_password varbinary(120) DEFAULT '' NOT NULL, - forum_style tinyint(4) DEFAULT '0' NOT NULL, + forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, forum_image varbinary(255) DEFAULT '' NOT NULL, forum_rules blob NOT NULL, forum_rules_link blob NOT NULL, @@ -303,9 +303,9 @@ CREATE TABLE phpbb_groups ( group_desc_uid varbinary(5) DEFAULT '' NOT NULL, group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_avatar varbinary(255) DEFAULT '' NOT NULL, - group_avatar_type tinyint(4) DEFAULT '0' NOT NULL, - group_avatar_width tinyint(4) DEFAULT '0' NOT NULL, - group_avatar_height tinyint(4) DEFAULT '0' NOT NULL, + group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, + group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_colour varbinary(6) DEFAULT '' NOT NULL, group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -713,13 +713,13 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( - style_id tinyint(4) NOT NULL auto_increment, + style_id smallint(4) UNSIGNED NOT NULL auto_increment, style_name blob NOT NULL, style_copyright blob NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id tinyint(4) DEFAULT '0' NOT NULL, - theme_id tinyint(4) DEFAULT '0' NOT NULL, - imageset_id tinyint(4) DEFAULT '0' NOT NULL, + template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name(255)), KEY template_id (template_id), @@ -730,7 +730,7 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( - template_id tinyint(4) NOT NULL auto_increment, + template_id smallint(4) UNSIGNED NOT NULL auto_increment, template_name blob NOT NULL, template_copyright blob NOT NULL, template_path varbinary(100) DEFAULT '' NOT NULL, @@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template ( # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( - template_id tinyint(4) NOT NULL auto_increment, + template_id smallint(4) UNSIGNED NOT NULL auto_increment, template_filename varbinary(100) DEFAULT '' NOT NULL, template_included blob NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -755,7 +755,7 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( - theme_id tinyint(4) NOT NULL auto_increment, + theme_id smallint(4) UNSIGNED NOT NULL auto_increment, theme_name blob NOT NULL, theme_copyright blob NOT NULL, theme_path varbinary(100) DEFAULT '' NOT NULL, @@ -769,7 +769,7 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( - imageset_id tinyint(4) NOT NULL auto_increment, + imageset_id smallint(4) UNSIGNED NOT NULL auto_increment, imageset_name blob NOT NULL, imageset_copyright blob NOT NULL, imageset_path varbinary(100) DEFAULT '' NOT NULL, @@ -786,7 +786,7 @@ CREATE TABLE phpbb_styles_imageset_data ( image_lang varbinary(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id tinyint(4) DEFAULT '0' NOT NULL, + imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ); @@ -914,7 +914,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, - user_style tinyint(4) DEFAULT '0' NOT NULL, + user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 7fee7f696d..022c3ecbfe 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar(5) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style tinyint(4) DEFAULT '0' NOT NULL, + forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules text NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, @@ -303,9 +303,9 @@ CREATE TABLE phpbb_groups ( group_desc_uid varchar(5) DEFAULT '' NOT NULL, group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_avatar varchar(255) DEFAULT '' NOT NULL, - group_avatar_type tinyint(4) DEFAULT '0' NOT NULL, - group_avatar_width tinyint(4) DEFAULT '0' NOT NULL, - group_avatar_height tinyint(4) DEFAULT '0' NOT NULL, + group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, + group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_colour varchar(6) DEFAULT '' NOT NULL, group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -713,13 +713,13 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( - style_id tinyint(4) NOT NULL auto_increment, + style_id smallint(4) UNSIGNED NOT NULL auto_increment, style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id tinyint(4) DEFAULT '0' NOT NULL, - theme_id tinyint(4) DEFAULT '0' NOT NULL, - imageset_id tinyint(4) DEFAULT '0' NOT NULL, + template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name), KEY template_id (template_id), @@ -730,7 +730,7 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( - template_id tinyint(4) NOT NULL auto_increment, + template_id smallint(4) UNSIGNED NOT NULL auto_increment, template_name varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, @@ -743,7 +743,7 @@ CREATE TABLE phpbb_styles_template ( # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( - template_id tinyint(4) NOT NULL auto_increment, + template_id smallint(4) UNSIGNED NOT NULL auto_increment, template_filename varchar(100) DEFAULT '' NOT NULL, template_included text NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -755,7 +755,7 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( - theme_id tinyint(4) NOT NULL auto_increment, + theme_id smallint(4) UNSIGNED NOT NULL auto_increment, theme_name varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, @@ -769,7 +769,7 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( - imageset_id tinyint(4) NOT NULL auto_increment, + imageset_id smallint(4) UNSIGNED NOT NULL auto_increment, imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, @@ -786,7 +786,7 @@ CREATE TABLE phpbb_styles_imageset_data ( image_lang varchar(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id tinyint(4) DEFAULT '0' NOT NULL, + imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -914,7 +914,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style tinyint(4) DEFAULT '0' NOT NULL, + user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 69889a3db2..7dad10dd67 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -593,7 +593,7 @@ CREATE TABLE phpbb_groups ( group_desc_uid varchar2(5) DEFAULT '' , group_display number(1) DEFAULT '0' NOT NULL, group_avatar varchar2(255) DEFAULT '' , - group_avatar_type number(4) DEFAULT '0' NOT NULL, + group_avatar_type number(2) DEFAULT '0' NOT NULL, group_avatar_width number(4) DEFAULT '0' NOT NULL, group_avatar_height number(4) DEFAULT '0' NOT NULL, group_rank number(8) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index c49423bcf9..f9b0557d8a 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -361,7 +361,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar(5) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style INT2 DEFAULT '0' NOT NULL, + forum_style INT2 DEFAULT '0' NOT NULL CHECK (forum_style >= 0), forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules varchar(4000) DEFAULT '' NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, @@ -447,8 +447,8 @@ CREATE TABLE phpbb_groups ( group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0), group_avatar varchar(255) DEFAULT '' NOT NULL, group_avatar_type INT2 DEFAULT '0' NOT NULL, - group_avatar_width INT2 DEFAULT '0' NOT NULL, - group_avatar_height INT2 DEFAULT '0' NOT NULL, + group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0), + group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0), group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0), group_colour varchar(6) DEFAULT '' NOT NULL, group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0), @@ -946,9 +946,9 @@ CREATE TABLE phpbb_styles ( style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0), - template_id INT2 DEFAULT '0' NOT NULL, - theme_id INT2 DEFAULT '0' NOT NULL, - imageset_id INT2 DEFAULT '0' NOT NULL, + template_id INT2 DEFAULT '0' NOT NULL CHECK (template_id >= 0), + theme_id INT2 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), + imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (style_id) ); @@ -1035,7 +1035,7 @@ CREATE TABLE phpbb_styles_imageset_data ( image_lang varchar(30) DEFAULT '' NOT NULL, image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), - imageset_id INT2 DEFAULT '0' NOT NULL, + imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (image_id) ); @@ -1179,7 +1179,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0), user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style INT2 DEFAULT '0' NOT NULL, + user_style INT2 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg INT2 DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 81e8c3cf80..cce71d0593 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -12,6 +12,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local 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_bbcode', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); @@ -205,7 +206,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 156e4bfc76..90847e9d31 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -221,7 +221,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar(5) NOT NULL DEFAULT '', forum_link varchar(255) NOT NULL DEFAULT '', forum_password varchar(40) NOT NULL DEFAULT '', - forum_style tinyint(4) NOT NULL DEFAULT '0', + forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0', forum_image varchar(255) NOT NULL DEFAULT '', forum_rules text(65535) NOT NULL DEFAULT '', forum_rules_link varchar(255) NOT NULL DEFAULT '', @@ -295,9 +295,9 @@ CREATE TABLE phpbb_groups ( group_desc_uid varchar(5) NOT NULL DEFAULT '', group_display INTEGER UNSIGNED NOT NULL DEFAULT '0', group_avatar varchar(255) NOT NULL DEFAULT '', - group_avatar_type tinyint(4) NOT NULL DEFAULT '0', - group_avatar_width tinyint(4) NOT NULL DEFAULT '0', - group_avatar_height tinyint(4) NOT NULL DEFAULT '0', + group_avatar_type tinyint(2) NOT NULL DEFAULT '0', + group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', + group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', group_colour varchar(6) NOT NULL DEFAULT '', group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0', @@ -693,9 +693,9 @@ CREATE TABLE phpbb_styles ( style_name varchar(255) NOT NULL DEFAULT '', style_copyright varchar(255) NOT NULL DEFAULT '', style_active INTEGER UNSIGNED NOT NULL DEFAULT '1', - template_id tinyint(4) NOT NULL DEFAULT '0', - theme_id tinyint(4) NOT NULL DEFAULT '0', - imageset_id tinyint(4) NOT NULL DEFAULT '0' + template_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); @@ -758,7 +758,7 @@ CREATE TABLE phpbb_styles_imageset_data ( image_lang varchar(30) NOT NULL DEFAULT '', image_height INTEGER UNSIGNED NOT NULL DEFAULT '0', image_width INTEGER UNSIGNED NOT NULL DEFAULT '0', - imageset_id tinyint(4) NOT NULL DEFAULT '0' + imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id); @@ -884,7 +884,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) NOT NULL DEFAULT '0', user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0', user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i', - user_style tinyint(4) NOT NULL DEFAULT '0', + user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', user_new_privmsg tinyint(4) NOT NULL DEFAULT '0', diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 90676cf6bc..5d0627475c 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -55,10 +55,12 @@ $lang = array_merge($lang, array( 'ACP_BOARD_FEATURES_EXPLAIN' => 'Here you can enable/disable several board features.', 'ALLOW_ATTACHMENTS' => 'Allow attachments', + 'ALLOW_BIRTHDAYS' => 'Allow birthdays', + 'ALLOW_BIRTHDAYS_EXPLAIN' => 'Allow birthdays to be entered and age being displayed in profiles. Please note the birthday list within the board index is controlled by a separate load setting.', 'ALLOW_BOOKMARKS' => 'Allow bookmarking topics', 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks.', 'ALLOW_BBCODE' => 'Allow BBCode', - 'ALLOW_FORUM_NOTIFY' => 'Allow forum watching', + 'ALLOW_FORUM_NOTIFY' => 'Allow subscribing to forums', 'ALLOW_NAME_CHANGE' => 'Allow username changes', 'ALLOW_NO_CENSORS' => 'Allow disabling of word censoring', 'ALLOW_NO_CENSORS_EXPLAIN' => 'Users can choose to disable the automatic word censoring of posts and private messages.', @@ -71,7 +73,7 @@ $lang = array_merge($lang, array( 'ALLOW_SIG_LINKS_EXPLAIN' => 'If disallowed the [URL] BBCode tag and automatic/magic URLs are disabled.', 'ALLOW_SIG_SMILIES' => 'Allow use of smilies in user signatures', 'ALLOW_SMILIES' => 'Allow smilies', - 'ALLOW_TOPIC_NOTIFY' => 'Allow topic watching', + 'ALLOW_TOPIC_NOTIFY' => 'Allow subscribing to topics', 'BOARD_PM' => 'Private messaging', 'BOARD_PM_EXPLAIN' => 'Enable or disable private messaging for all users.', )); @@ -271,6 +273,7 @@ $lang = array_merge($lang, array( 'YES_ANON_READ_MARKING' => 'Enable topic marking for guests', 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled posts are always read for guests.', 'YES_BIRTHDAYS' => 'Enable birthday listing', + 'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature need to be enabled too.', 'YES_JUMPBOX' => 'Enable display of jumpbox', 'YES_MODERATORS' => 'Enable display of moderators', 'YES_ONLINE' => 'Enable online user listings', @@ -376,7 +379,7 @@ $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), do not specify any old name here! If the server requires authentication (and only if it does) enter the necessary username and password. Please note only basic authentication is offered, different authentication implementations are not currently supported.', + '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.', '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.', @@ -389,7 +392,7 @@ $lang = array_merge($lang, array( '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 e-mails sent in one package.', + '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 emails.', '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', diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php index a166142d24..ffc5442482 100644 --- a/phpBB/language/en/acp/bots.php +++ b/phpBB/language/en/acp/bots.php @@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang)) // Bot settings $lang = array_merge($lang, array( 'BOTS' => 'Manage bots', - 'BOTS_EXPLAIN' => '"Bots", "spiders" or "crawlers" are automated agents most commonly used by search engines to update their databases. Since they rarely make proper use of sessions they can distort visitor counts, increase load and sometimes fail to index sites correctly. Here you can define a special type of user to overcome these problems.', + 'BOTS_EXPLAIN' => '“Botsâ€, “spiders†or “crawlers†are automated agents most commonly used by search engines to update their databases. Since they rarely make proper use of sessions they can distort visitor counts, increase load and sometimes fail to index sites correctly. Here you can define a special type of user to overcome these problems.', 'BOT_ACTIVATE' => 'Activate', 'BOT_ACTIVE' => 'Bot active', 'BOT_ADD' => 'Add bot', @@ -51,7 +51,7 @@ $lang = array_merge($lang, array( 'BOT_IP_EXPLAIN' => 'Partial matches are allowed, separate addresses with a comma.', 'BOT_NAME' => 'Bot name', 'BOT_NAME_EXPLAIN' => 'Used only for your own information.', - 'BOT_NAME_TAKEN' => 'The name is already in use on your board and can\'t be used for the Bot.', + 'BOT_NAME_TAKEN' => 'The name is already in use on your board and can’t be used for the Bot.', 'BOT_NEVER' => 'Never', 'BOT_STYLE' => 'Bot style', 'BOT_STYLE_EXPLAIN' => 'The style used for the board by the bot.', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 92e6d77dfb..576b87eabd 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -296,6 +296,7 @@ $lang = array_merge($lang, array( 'AVATAR_DIR_SIZE' => 'Avatar directory size', 'BOARD_STARTED' => 'Board started', + 'BOARD_VERSION' => 'Board version', 'DATABASE_SERVER_INFO' => 'Database server', 'DATABASE_SIZE' => 'Database size', @@ -402,6 +403,8 @@ $lang = array_merge($lang, array( 'LOG_ADMIN_AUTH_FAIL' => 'Failed administration login attempt', 'LOG_ADMIN_AUTH_SUCCESS' => 'Successful administration login', + 'LOG_ATTACHMENTS_DELETED' => 'Removed user attachments
» %s', + 'LOG_ATTACH_EXT_ADD' => 'Added or edited attachment extension
» %s', 'LOG_ATTACH_EXT_DEL' => 'Removed attachment extension
» %s', 'LOG_ATTACH_EXT_UPDATE' => 'Updated attachment extension
» %s', @@ -523,6 +526,7 @@ $lang = array_merge($lang, array( 'LOG_IMAGESET_EDIT_DETAILS' => 'Edited imageset details
» %s', 'LOG_IMAGESET_EDIT' => 'Edited imageset
» %s', 'LOG_IMAGESET_EXPORT' => 'Exported imageset
» %s', + 'LOG_IMAGESET_LANG_MISSING' => 'Imageset misses “%2$s†localisation
» %1$s', 'LOG_IMAGESET_LANG_REFRESHED' => 'Refreshed “%2$s†localisation of imageset
» %1$s', 'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset
» %s', diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php index 8efeaef978..9d0e5e3cf6 100644 --- a/phpBB/language/en/acp/database.php +++ b/phpBB/language/en/acp/database.php @@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang)) // Database Backup/Restore $lang = array_merge($lang, array( 'ACP_BACKUP_EXPLAIN' => 'Here you can backup all your phpBB related data. You may store the resulting archive in your store/ folder or download it directly. Depending on your server configuration you may be able to compress the file in a number of formats.', - 'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. WARNING This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the store/ folder and are assumed to be generated by phpBB\'s backup functionality. Restoring backups that were not created by the built in system may or may not work.', + 'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. WARNING This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete. Backups are stored in the store/ folder and are assumed to be generated by phpBB’s backup functionality. Restoring backups that were not created by the built in system may or may not work.', 'BACKUP_DELETE' => 'The backup file has been deleted successfully.', 'BACKUP_INVALID' => 'The selected file to backup is invalid.', diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php index 5281651bad..8ad28f175d 100644 --- a/phpBB/language/en/acp/forums.php +++ b/phpBB/language/en/acp/forums.php @@ -62,7 +62,7 @@ $lang = array_merge($lang, array( 'ENABLE_TOPIC_ICONS' => 'Enable topic icons', 'FORUM_ADMIN' => 'Forum administration', - 'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum.', + 'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum. You need to copy or set appropriate permissions for newly created forums to have them displayed.', 'FORUM_AUTO_PRUNE' => 'Enable auto-pruning', 'FORUM_AUTO_PRUNE_EXPLAIN' => 'Prunes the forum of topics, set the frequency/age parameters below.', 'FORUM_CREATED' => 'Forum created successfully.', @@ -102,6 +102,8 @@ $lang = array_merge($lang, array( 'FORUM_TYPE' => 'Forum type', 'FORUM_UPDATED' => 'Forum information updated successfully.', + 'FORUM_WITH_SUBFORUMS_NOT_TO_LINK' => 'You want to change a postable forum having subforums to a link. Please move all subforums out of this forum before you proceed, because after changing to a link you are no longer able to see the subforums currently connected to this forum.', + 'GENERAL_FORUM_SETTINGS' => 'General forum settings', 'LINK' => 'Link', @@ -126,7 +128,7 @@ $lang = array_merge($lang, array( 'PRUNE_STICKY' => 'Prune stickies', 'PRUNE_OLD_POLLS' => 'Prune old polls', 'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.', - + 'REDIRECT_ACL' => 'Now you are able to %sset permissions%s for this forum.', 'SYNC_IN_PROGRESS' => 'Synchronizing forum', diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php index ee05c5a568..3deeb344af 100644 --- a/phpBB/language/en/acp/permissions.php +++ b/phpBB/language/en/acp/permissions.php @@ -139,6 +139,7 @@ $lang = array_merge($lang, array( 'REMOVE_PERMISSIONS' => 'Remove permissions', 'REMOVE_ROLE' => 'Remove role', + 'RESULTING_PERMISSION' => 'Resulting permission', 'ROLE' => 'Role', 'ROLE_ADD_SUCCESS' => 'Role successfully added.', 'ROLE_ASSIGNED_TO' => 'Users/Groups assigned to %s', @@ -214,27 +215,44 @@ $lang = array_merge($lang, array( 'TRACE_FOR' => 'Trace for', 'TRACE_GLOBAL_SETTING' => '%s (global)', 'TRACE_GROUP_NEVER_TOTAL_NEVER' => 'This group’s permission is set to NEVER like the total result so the old result is kept.', + 'TRACE_GROUP_NEVER_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to NEVER like the total result so the old result is kept.', 'TRACE_GROUP_NEVER_TOTAL_NO' => 'This group’s permission is set to NEVER which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_NEVER_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to NEVER which becomes the new total value because it wasn’t set yet (set to NO).', 'TRACE_GROUP_NEVER_TOTAL_YES' => 'This group’s permission is set to NEVER which overwrites the total YES to a NEVER for this user.', + 'TRACE_GROUP_NEVER_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to NEVER which overwrites the total YES to a NEVER for this user.', 'TRACE_GROUP_NO' => 'The permission is NO for this group so the old total value is kept.', + 'TRACE_GROUP_NO_LOCAL' => 'The permission is NO for this group within this forum so the old total value is kept.', 'TRACE_GROUP_YES_TOTAL_NEVER' => 'This group’s permission is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_GROUP_YES_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to YES but the total NEVER cannot be overwritten.', 'TRACE_GROUP_YES_TOTAL_NO' => 'This group’s permission is set to YES which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_YES_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to YES which becomes the new total value because it wasn’t set yet (set to NO).', 'TRACE_GROUP_YES_TOTAL_YES' => 'This group’s permission is set to YES and the total permission is already set to YES, so the total result is kept.', + 'TRACE_GROUP_YES_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to YES and the total permission is already set to YES, so the total result is kept.', 'TRACE_PERMISSION' => 'Trace permission - %s', + 'TRACE_RESULT' => 'Trace result', 'TRACE_SETTING' => 'Trace setting', 'TRACE_USER_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to YES but the total permission is already set to YES, so the total result is kept. %sTrace global permission%s', 'TRACE_USER_GLOBAL_YES_TOTAL_NEVER' => 'The forum independent user permission evaluates to YES which overwrites the current local result NEVER. %sTrace global permission%s', 'TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT' => 'The forum independent user permission evaluates to NEVER which doesn’t influence the local permission. %sTrace global permission%s', + 'TRACE_USER_FOUNDER' => 'The user has the founder type set, therefore admin permissions are set to YES by default.', - 'TRACE_USER_KEPT' => 'The user permission is NO so the old total value is kept.', - 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user permission is set to NEVER and the total value is set to NEVER, so nothing is changed.', - 'TRACE_USER_NEVER_TOTAL_NO' => 'The user permission is set to NEVER which becomes the total value because it was set to NO.', - 'TRACE_USER_NEVER_TOTAL_YES' => 'The user permission is set to NEVER and overwrites the previous YES.', - 'TRACE_USER_NO_TOTAL_NO' => 'The user permission is NO and the total value was set to NO so it defaults to NEVER.', - 'TRACE_USER_YES_TOTAL_NEVER' => 'The user permission is set to YES but the total NEVER cannot be overwritten.', - 'TRACE_USER_YES_TOTAL_NO' => 'The user permission is set to YES which becomes the total value because it was set to NO.', - 'TRACE_USER_YES_TOTAL_YES' => 'The user permission is set to YES and the total value is set to YES, so nothing is changed.', + 'TRACE_USER_KEPT' => 'The user’s permission is NO so the old total value is kept.', + 'TRACE_USER_KEPT_LOCAL' => 'The user’s permission for this forum is NO so the old total value is kept.', + 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user’s permission is set to NEVER and the total value is set to NEVER, so nothing is changed.', + 'TRACE_USER_NEVER_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to NEVER and the total value is set to NEVER, so nothing is changed.', + 'TRACE_USER_NEVER_TOTAL_NO' => 'The user’s permission is set to NEVER which becomes the total value because it was set to NO.', + 'TRACE_USER_NEVER_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to NEVER which becomes the total value because it was set to NO.', + 'TRACE_USER_NEVER_TOTAL_YES' => 'The user’s permission is set to NEVER and overwrites the previous YES.', + 'TRACE_USER_NEVER_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to NEVER and overwrites the previous YES.', + 'TRACE_USER_NO_TOTAL_NO' => 'The user’s permission is NO and the total value was set to NO so it defaults to NEVER.', + 'TRACE_USER_NO_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is NO and the total value was set to NO so it defaults to NEVER.', + 'TRACE_USER_YES_TOTAL_NEVER' => 'The user’s permission is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_USER_YES_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_USER_YES_TOTAL_NO' => 'The user’s permission is set to YES which becomes the total value because it was set to NO.', + 'TRACE_USER_YES_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to YES which becomes the total value because it was set to NO.', + 'TRACE_USER_YES_TOTAL_YES' => 'The user’s permission is set to YES and the total value is set to YES, so nothing is changed.', + 'TRACE_USER_YES_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to YES and the total value is set to YES, so nothing is changed.', 'TRACE_WHO' => 'Who', 'TRACE_TOTAL' => 'Total', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index 00c53257ad..6579f23018 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -78,17 +78,21 @@ $lang = array_merge($lang, array( 'user_group' => 'Users & Groups', ), + // With defining 'global' here we are able to specify what is printed out if the permission is within the global scope. 'permission_type' => array( 'u_' => 'User permissions', 'a_' => 'Admin permissions', 'm_' => 'Moderator permissions', 'f_' => 'Forum permissions', + 'global' => array( + 'm_' => 'Global moderator permissions', + ), ), )); // User Permissions $lang = array_merge($lang, array( - 'acl_u_viewprofile' => array('lang' => 'Can view profiles', 'cat' => 'profile'), + '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'), @@ -175,8 +179,8 @@ $lang = array_merge($lang, array( 'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'topic_actions'), 'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'), - 'acl_m_warn' => array('lang' => 'Can issue warnings', 'cat' => 'misc'), // This moderator setting is only global (and not local) - 'acl_m_ban' => array('lang' => 'Can manage bans', 'cat' => 'misc'), // This moderator setting is only global (and not local) + 'acl_m_warn' => array('lang' => 'Can issue warnings
This setting is only assigned globally. It is not forum based.', 'cat' => 'misc'), // This moderator setting is only global (and not local) + 'acl_m_ban' => array('lang' => 'Can manage bans
This setting is only assigned globally. It is not forum based.', 'cat' => 'misc'), // This moderator setting is only global (and not local) )); // Admin Permissions @@ -196,7 +200,7 @@ $lang = array_merge($lang, array( 'acl_a_bbcode' => array('lang' => 'Can define BBCode tags', 'cat' => 'posting'), 'acl_a_attach' => array('lang' => 'Can alter attachment related settings', 'cat' => 'posting'), - 'acl_a_user' => array('lang' => 'Can manage users', 'cat' => 'user_group'), + 'acl_a_user' => array('lang' => 'Can manage users
This also includes seeing the users browser agent within the viewonline list.', 'cat' => 'user_group'), 'acl_a_userdel' => array('lang' => 'Can delete/prune users', 'cat' => 'user_group'), 'acl_a_group' => array('lang' => 'Can manage groups', 'cat' => 'user_group'), 'acl_a_groupadd' => array('lang' => 'Can add new groups', 'cat' => 'user_group'), diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 1644e1393b..bededcf947 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -56,12 +56,12 @@ $lang = array_merge($lang, array( 'EXAMPLES' => 'Examples:', 'HTML_REPLACEMENT' => 'HTML replacement', - 'HTML_REPLACEMENT_EXAMPLE' => '<span style="background-color:{COLOR};">{TEXT}</span>

<span style="font-family:{TEXT1};">{TEXT2}</span>', + 'HTML_REPLACEMENT_EXAMPLE' => '<span style="background-color: {COLOR};">{TEXT}</span>

<span style="font-family: {TEXT1};">{TEXT2}</span>', 'HTML_REPLACEMENT_EXPLAIN' => 'Here you define the default HTML replacement. Do not forget to put back tokens you used above!', 'TOKEN' => 'Token', 'TOKENS' => 'Tokens', - 'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {USERNAME1}, {USERNAME2}.

In addition to these tokens you can use any language string present in your language/ directory like this: {L_<STRINGNAME>} where <STRINGNAME> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as "wrote" or its translation according to user’s locale.', + 'TOKENS_EXPLAIN' => 'Tokens are placeholders for user input. The input will be validated only if it matches the corresponding definition. If needed, you can number them by adding a number as the last character between the braces, e.g. {TEXT1}, {TEXT2}.

Within the HTML replacement you can also use any language string present in your language/ directory like this: {L_<STRINGNAME>} where <STRINGNAME> is the name of the translated string you want to add. For example, {L_WROTE} will be displayed as "wrote" or its translation according to user’s locale.

Please note that only tokens listed below are able to be used within custom BBCodes.', 'TOKEN_DEFINITION' => 'What can it be?', 'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again.', @@ -69,7 +69,7 @@ $lang = array_merge($lang, array( 'TEXT' => 'Any text, including foreign characters, numbers, etc…', 'NUMBER' => 'Any series of digits', 'EMAIL' => 'A valid e-mail 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.', + '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' ) @@ -162,7 +162,7 @@ $lang = array_merge($lang, array( // Word censors $lang = array_merge($lang, array( - 'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, eg. *test* will match detestable, test* would match testing, *test would match detest.', + 'ACP_WORDS_EXPLAIN' => 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, e.g. *test* will match detestable, test* would match testing, *test would match detest.', 'ADD_WORD' => 'Add new word', 'EDIT_WORD' => 'Edit word censor', diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php index 24e7b732f2..15fe8391cd 100644 --- a/phpBB/language/en/acp/profile.php +++ b/phpBB/language/en/acp/profile.php @@ -38,7 +38,7 @@ $lang = array_merge($lang, array( 'ALWAYS_TODAY' => 'Always the current date', 'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now', - 'BOOL_TYPE_EXPLAIN' => 'Define the type, either a checkbox or radio buttons.', + 'BOOL_TYPE_EXPLAIN' => 'Define the type, either a checkbox or radio buttons. A checkbox will only be displayed if it is checked for a given user. In that case the second language option will be used. Radio buttons will display regardless of their value.', 'CHANGED_PROFILE_FIELD' => 'Successfully changed profile field.', 'CHARS_ANY' => 'Any character', @@ -62,7 +62,7 @@ $lang = array_merge($lang, array( 'DISPLAY_AT_REGISTER' => 'Display at registration screen', 'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration and able to be changed within the user control panel.', 'DISPLAY_PROFILE_FIELD' => 'Display profile field', - 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown on topic pages, profiles and the memberlist if this is enabled within the load settings. Only showing within the users profile is enabled by default.', + 'DISPLAY_PROFILE_FIELD_EXPLAIN' => 'The profile field will be shown in all places allowed within the load settings. Setting this to “no†will hide the field from topic pages, profiles and the memberlist.', 'DROPDOWN_ENTRIES_EXPLAIN' => 'Enter your options now, every option in one line.', 'EDIT_DROPDOWN_LANG_EXPLAIN' => 'Please note that you are able to change your options text and also able to add new options to the end. It is not advised to add new options between existing options - this could result in wrong options assigned to your users. This can also happen if you remove options in-between. Removing options from the end result in users having assigned this item now reverting back to the default one.', diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index 3367f63e48..2d6019c3d4 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -52,7 +52,7 @@ $lang = array_merge($lang, array( '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_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.', 'GENERAL_SEARCH_SETTINGS' => 'General search settings', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 4f7472e5ff..4be2e79982 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -97,6 +97,7 @@ $lang = array_merge($lang, array( 'EDIT_THEME' => 'Edit theme', 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.', 'EDIT_THEME_STORED_DB' => 'The stylesheet file was unwritable so the stylesheet is now stored in the database containing your modification.', + 'EDIT_THEME_STORE_PARSED' => 'The theme requires that its stylesheet is parsed. This is only possible if it’s stored in the database.', 'EXPORT' => 'Export', 'FOREGROUND' => 'Foreground', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 9d2755667d..fe528d48fe 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -294,6 +294,7 @@ $lang = array_merge($lang, array( 'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few moments but gives you increased capabilities. The board administrator may also grant additional permissions to registered users. Before you register please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.', 'LOGIN_VIEWFORUM' => 'The board requires you to be registered and logged in to view this forum.', 'LOGIN_EXPLAIN_EDIT' => 'In order to edit posts in this forum you have to be registered and logged in.', + 'LOGIN_EXPLAIN_VIEWONLINE' => 'In order to view the online list you have to be registered and logged in.', 'LOGOUT' => 'Logout', 'LOGOUT_USER' => 'Logout [ %s ]', 'LOG_ME_IN' => 'Log me on automatically each visit', @@ -320,7 +321,7 @@ $lang = array_merge($lang, array( 'MSNM' => 'MSNM/WLM', 'NA' => 'N/A', - 'NEWEST_USER' => 'Our newest member %s%s%s', + 'NEWEST_USER' => 'Our newest member %s', 'NEW_MESSAGE' => 'New message', 'NEW_MESSAGES' => 'New messages', 'NEW_PM' => '%d new message', @@ -590,8 +591,8 @@ $lang = array_merge($lang, array( 'UNREAD_MESSAGES' => 'Unread messages', 'UNREAD_PM' => '%d unread message', 'UNREAD_PMS' => '%d unread messages', - 'UNWATCHED_FORUMS' => 'You are no longer watching the selected forums.', - 'UNWATCHED_TOPICS' => 'You are no longer watching the selected topics.', + 'UNWATCHED_FORUMS' => 'You are no longer subscribed to the selected forums.', + 'UNWATCHED_TOPICS' => 'You are no longer subscribed to the selected topics.', 'UPDATE' => 'Update', 'UPLOAD_IN_PROGRESS' => 'The upload is currently in progress.', 'URL_REDIRECT' => 'If your browser does not support meta redirection %splease click HERE to be redirected%s.', @@ -645,6 +646,7 @@ $lang = array_merge($lang, array( 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.', 'WRONG_DATA_LANG' => 'The language you specified is not valid.', 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.', + 'WROTE' => 'wrote', 'YEAR' => 'Year', 'YEAR_MONTH_DAY' => '(YYYY-MM-DD)', diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 8c7b4c2329..5ffe3ac742 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -32,7 +32,7 @@ $help = array( ), array( 0 => 'What is BBCode?', - 1 => 'BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML, tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.' + 1 => 'BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML, tags are enclosed in square brackets [ and ] rather than < and > and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.' ), array( 0 => '--', @@ -40,15 +40,15 @@ $help = array( ), array( 0 => 'How to create bold, italic and underlined text', - 1 => 'BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways:
  • To make a piece of text bold enclose it in [b][/b], eg.

    [b]Hello[/b]

    will become Hello
  • For underlining use [u][/u], for example:

    [u]Good Morning[/u]

    becomes Good Morning
  • To italicise text use [i][/i], eg.

    This is [i]Great![/i]

    would give This is Great!
' + 1 => 'BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways:
  • To make a piece of text bold enclose it in [b][/b], e.g.

    [b]Hello[/b]

    will become Hello
  • For underlining use [u][/u], for example:

    [u]Good Morning[/u]

    becomes Good Morning
  • To italicise text use [i][/i], e.g.

    This is [i]Great![/i]

    would give This is Great!
' ), array( 0 => 'How to change the text colour or size', - 1 => 'To alter the colour or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system:
  • Changing the colour of text is achieved by wrapping it in [color=][/color]. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, eg. #FFFFFF, #000000. For example, to create red text you could use:

    [color=red]Hello![/color]

    or

    [color=#FF0000]Hello![/color]

    will both output Hello!
  • Changing the text size is achieved in a similar way using [size=][/size]. This tag is dependent on the template the user has selected but the recommended format is a numerical value representing the text size in percent, starting at 20 through to 200 (very large) by default. For example:

    [size=30]SMALL[/size]

    will generally be SMALL

    whereas:

    [size=200]HUGE![/size]

    will be HUGE!
' + 1 => 'To alter the colour or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system:
  • Changing the colour of text is achieved by wrapping it in [color=][/color]. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, e.g. #FFFFFF, #000000. For example, to create red text you could use:

    [color=red]Hello![/color]

    or

    [color=#FF0000]Hello![/color]

    Both will output Hello!
  • Changing the text size is achieved in a similar way using [size=][/size]. This tag is dependent on the template the user has selected but the recommended format is a numerical value representing the text size in percent, starting at 20 (very small) through to 200 (very large) by default. For example:

    [size=30]SMALL[/size]

    will generally be SMALL

    whereas:

    [size=200]HUGE![/size]

    will be HUGE!
' ), array( 0 => 'Can I combine formatting tags?', - 1 => 'Yes, of course you can, for example to get someones attention you may write:

[size=150][color=red][b]LOOK AT ME![/b][/color][/size]

this would output LOOK AT ME!

We don’t recommend you output lots of text that looks like this though! Remember it is up to you, the poster to ensure tags are closed correctly. For example the following is incorrect:

[b][u]This is wrong[/b][/u]' + 1 => 'Yes, of course you can, for example to get someones attention you may write:

[size=200][color=red][b]LOOK AT ME![/b][/color][/size]

this would output LOOK AT ME!

We don’t recommend you output lots of text that looks like this though! Remember it is up to you, the poster, to ensure tags are closed correctly. For example the following is incorrect:

[b][u]This is wrong[/b][/u]' ), array( 0 => '--', @@ -56,23 +56,23 @@ $help = array( ), array( 0 => 'Quoting text in replies', - 1 => 'There are two ways you can quote text, with a reference or without.
  • When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a [quote=""][/quote] block. This method allows you to quote with a reference to a person or whatever else you choose to put! For example to quote a piece of text Mr. Blobby wrote you would enter:

    [quote="Mr. Blobby"]The text Mr. Blobby wrote would go here[/quote]

    The resulting output will automatically add, Mr. Blobby wrote: before the actual text. Remember you must include the quotation marks "" around the name you are quoting, they are not optional.
  • The second method allows you to blindly quote something. To utilise this enclose the text in [quote][/quote] tags. When you view the message it will simply show the text within a quotation block.
' + 1 => 'There are two ways you can quote text, with a reference or without.
  • When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a [quote=""][/quote] block. This method allows you to quote with a reference to a person or whatever else you choose to put! For example to quote a piece of text Mr. Blobby wrote you would enter:

    [quote="Mr. Blobby"]The text Mr. Blobby wrote would go here[/quote]

    The resulting output will automatically add "Mr. Blobby wrote:" before the actual text. Remember you must include the quotation marks "" around the name you are quoting, they are not optional.
  • The second method allows you to blindly quote something. To utilise this enclose the text in [quote][/quote] tags. When you view the message it will simply show the text within a quotation block.
' ), array( 0 => 'Outputting code or fixed width data', - 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

[code]echo "This is some code";[/code]

All formatting used within [code][/code] tags is retained when you later view it. PHP syntax highlighting can be enabled using [code=php][/code] and is recommended when posting PHP code samples as it improves readability.' + 1 => 'If you want to output a piece of code or in fact anything that requires a fixed width, e.g. Courier type font you should enclose the text in [code][/code] tags, e.g.

[code]echo "This is some code";[/code]

All formatting used within [code][/code] tags is retained when you later view it. PHP syntax highlighting can be enabled using [code=php][/code] and is recommended when posting PHP code samples as it improves readability.' ), array( 0 => '--', 1 => 'Generating lists' ), array( - 0 => 'Creating an Un-ordered list', + 0 => 'Creating an Unordered list', 1 => 'BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list outputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use [list][/list] and define each item within the list using [*]. For example to list your favourite colours you could use:

[list]
[*]Red
[*]Blue
[*]Yellow
[/list]

This would generate the following list:
  • Red
  • Blue
  • Yellow
' ), array( 0 => 'Creating an Ordered list', - 1 => 'The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list items are specified using [*]. For example:

[list=1]
[*]Go to the shops
[*]Buy a new computer
[*]Swear at computer when it crashes
[/list]

will generate the following:
  1. Go to the shops
  2. Buy a new computer
  3. Swear at computer when it crashes
Whereas for an alphabetical list you would use:

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]

giving
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
' + 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list, items are specified using [*]. For example:

[list=1]
[*]Go to the shops
[*]Buy a new computer
[*]Swear at computer when it crashes
[/list]

will generate the following:
  1. Go to the shops
  2. Buy a new computer
  3. Swear at computer when it crashes
Whereas for an alphabetical list you would use:

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]

giving
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
' ), array( 0 => '--', @@ -80,7 +80,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 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.' ), array( 0 => '--', @@ -88,11 +88,11 @@ $help = array( ), array( 0 => 'Adding an image to a post', - 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

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

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

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

would generate:

' + 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

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

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, e.g.

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

would generate:

' ), array( 0 => 'Adding attachments into a post', - 1 => 'Attachments can now be placed in any part of a post by using the new [attachment=][/attachment] BBCode, if the attachments functionality has been enabled by a board administrator & if you are given the appropriate permissions to create attachments. Within the posting screen is a drop-down box for placing attachments inline.' + 1 => 'Attachments can now be placed in any part of a post by using the new [attachment=][/attachment] BBCode, if the attachments functionality has been enabled by a board administrator and if you are given the appropriate permissions to create attachments. Within the posting screen is a drop-down box (respectively a button) for placing attachments inline.' ), array( 0 => '--', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 180157d5e0..1a932369a8 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -58,6 +58,7 @@ $lang = array_merge($lang, array( 'CHANGE' => 'Change', 'CHECK_TABLE_PREFIX' => 'Please check your table prefix and try again.', 'CLEAN_VERIFY' => 'Cleaning up and verifying the final structure', + 'CLEANING_USERNAMES' => 'Cleaning usernames', 'COLLIDING_CLEAN_USERNAME' => '%s is the clean username for:', 'COLLIDING_USERNAMES_FOUND' => 'Colliding usernames were found on your old board. In order to complete the conversion please delete or rename these users so that there is only one user on your old board for each clean username.', 'COLLIDING_USER' => '» user id: %d username: %s (%d posts)', @@ -245,6 +246,8 @@ $lang = array_merge($lang, array( 'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.', 'INVALID_PRIMARY_KEY' => 'Invalid primary key : %s', + 'LONG_SCRIPT_EXECUTION' => 'Please note that this can take a while... Please do not stop the script.', + // mbstring 'MBSTRING_CHECK' => 'mbstring extension check', 'MBSTRING_CHECK_EXPLAIN' => 'Required - mbstring is a PHP extension that provides multibyte string functions. Certain features of mbstring are not compatible with phpBB and must be disabled.', @@ -360,7 +363,9 @@ $lang = array_merge($lang, array( 'BACK' => 'Back', 'BINARY_FILE' => 'Binary file', + 'BOT' => 'Spider/Robot', + 'CHANGE_CLEAN_NAMES' => 'The method used to make sure a username is not used by multiple users has been changed. There are some users which have the same name when compared with the new method. You have to delete or rename these users to make sure that each name is only used by one user before you can proceed.', 'CHECK_FILES' => 'Check files', 'CHECK_FILES_AGAIN' => 'Check files again', 'CHECK_FILES_EXPLAIN' => 'Within the next step all files will be checked against the update files - this can take a while if this is the first file check.', @@ -375,6 +380,8 @@ $lang = array_merge($lang, array( 'DATABASE_TYPE' => 'Database type', 'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.', + 'DELETE_USER_REMOVE' => 'Delete user and remove posts', + 'DELETE_USER_RETAIN' => 'Delete user but keep posts', 'DESTINATION' => 'Destination file', 'DIFF_INLINE' => 'Inline', 'DIFF_RAW' => 'Raw unified diff', @@ -388,7 +395,8 @@ $lang = array_merge($lang, array( 'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive', 'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.', - 'ERROR' => 'Error', + 'ERROR' => 'Error', + 'EDIT_USERNAME' => 'Edit username', 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.', 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.', @@ -412,6 +420,8 @@ $lang = array_merge($lang, array( 'INCOMPLETE_UPDATE_FILES' => 'The update files are incomplete.', 'INLINE_UPDATE_SUCCESSFUL' => 'The database update was successful. Now you need to continue the update process.', + 'KEEP_OLD_NAME' => 'Keep username', + 'LATEST_VERSION' => 'Latest version', 'LINE' => 'Line', 'LINE_ADDED' => 'Added', @@ -421,6 +431,9 @@ $lang = array_merge($lang, array( 'LOGIN_UPDATE_EXPLAIN' => 'In order to update your installation you need to login first.', 'MAPPING_FILE_STRUCTURE' => 'To ease the upload here are the file locations which map your phpBB installation.', + + 'MERGE_MODIFICATIONS_OPTION' => 'Merge modifications', + 'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file', 'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file', 'MERGE_MOD_FILE_OPTION' => 'Merge differences and use modified code within conflicting block', @@ -428,6 +441,7 @@ $lang = array_merge($lang, array( 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.', 'NEW_FILE' => 'New updated file', + 'NEW_USERNAME' => 'New username', 'NO_AUTH_UPDATE' => 'Not authorised to update', 'NO_ERRORS' => 'No errors', 'NO_UPDATE_FILES' => 'Not updating the following files', @@ -442,8 +456,9 @@ $lang = array_merge($lang, array( 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.', + 'PACKAGE_UPDATES_TO' => 'Current package updates to version', 'PERFORM_DATABASE_UPDATE' => 'Perform database update', - 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a link to the database update script. This script needs to be run separately because updating the database might result in unexpected behaviour if you are logged in. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update had been performed just follow the link presented to continue the update process.', + 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update has been performed just follow the instructions to continue the update process.', 'PREVIOUS_VERSION' => 'Previous version', 'PROGRESS' => 'Progress', @@ -513,6 +528,7 @@ $lang = array_merge($lang, array( ', 'UPDATE_METHOD' => 'Update method', 'UPDATE_METHOD_EXPLAIN' => 'You are now able to choose your preferred update method. Using the FTP upload will present you with a form you need to enter your FTP account details into. With this method the files will be automatically moved to the new location and backups of the old files being created by appending .bak to the filename. If you choose to download the modified files you are able to unpack and upload them to their correct location manually later.', + 'UPDATE_REQUIRES_FILE' => 'The updater requires that the following file is present: %s', 'UPDATE_SUCCESS' => 'Update was successful', 'UPDATE_SUCCESS_EXPLAIN' => 'Successfully updated all files. The next step involves checking all files again to make sure the files got updated correctly.', 'UPDATE_VERSION_OPTIMIZE' => 'Updating version and optimising tables', @@ -522,6 +538,8 @@ $lang = array_merge($lang, array( 'UPLOAD_METHOD' => 'Upload method', 'UPDATE_DB_SUCCESS' => 'Database update was successful.', + 'USER_ACTIVE' => 'Active user', + 'USER_INACTIVE' => 'Inactive user', 'VERSION_CHECK' => 'Version check', 'VERSION_CHECK_EXPLAIN' => 'Checks to see if the version of phpBB you are currently running is up to date.', @@ -561,7 +579,7 @@ $lang = array_merge($lang, array( 'REPORT_WAREZ' => 'The post contains links to illegal or pirated software.', 'REPORT_SPAM' => 'The reported post has the only purpose to advertise for a website or another product.', 'REPORT_OFF_TOPIC' => 'The reported post is off topic.', - 'REPORT_OTHER' => 'The reported post does not fit into any other category, please use the description field.', + 'REPORT_OTHER' => 'The reported post does not fit into any other category, please use the further information field.', 'SMILIES_ARROW' => 'Arrow', 'SMILIES_CONFUSED' => 'Confused', diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 087e8997e5..dc20fd64e8 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -362,7 +362,7 @@ $lang = array_merge($lang, array( 'WAREZ' => 'The post contains links to illegal or pirated software.', 'SPAM' => 'The reported post has the only purpose to advertise for a website or another product.', 'OFF_TOPIC' => 'The reported post is off topic.', - 'OTHER' => 'The reported post does not fit into any other category, please use the description field.', + 'OTHER' => 'The reported post does not fit into any other category, please use the further information field.', ) ), )); diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php index 6feb16c02c..c4a392c81d 100644 --- a/phpBB/language/en/memberlist.php +++ b/phpBB/language/en/memberlist.php @@ -78,6 +78,7 @@ $lang = array_merge($lang, array( 'IM_MSNM_BROWSER' => 'Your browser does not support this.', 'IM_MSNM_CONNECT' => 'MSNM is not connected.\nYou have to connect to MSNM to continue.', 'IM_NAME' => 'Your Name', + 'IM_NO_DATA' => 'There is no suitable contact information for this user.', 'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this server. You will need a Jabber client installed on your system to contact the recipient above.', 'IM_RECIPIENT' => 'Recipient', 'IM_SEND' => 'Send message', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 4ff4b9be62..6f7b273efe 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -53,7 +53,7 @@ $lang = array_merge($lang, array( 'BBCODE_O_HELP' => 'Ordered list: [list=]text[/list]', 'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img]', 'BBCODE_Q_HELP' => 'Quote text: [quote]text[/quote]', - 'BBCODE_S_HELP' => 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000', + 'BBCODE_S_HELP' => 'Font colour: [color=red]text[/color] Tip: you can also use color=#FF0000', 'BBCODE_U_HELP' => 'Underline text: [u]text[/u]', 'BBCODE_W_HELP' => 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]', 'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash]', @@ -91,8 +91,8 @@ $lang = array_merge($lang, array( 'FLASH_IS_OFF' => '[flash] is OFF', 'FLASH_IS_ON' => '[flash] is ON', 'FLOOD_ERROR' => 'You cannot make another post so soon after your last.', - 'FONT_COLOR' => 'Font color', - 'FONT_COLOR_HIDE' => 'Hide font color', + 'FONT_COLOR' => 'Font colour', + 'FONT_COLOR_HIDE' => 'Hide font colour', 'FONT_HUGE' => 'Huge', 'FONT_LARGE' => 'Large', 'FONT_NORMAL' => 'Normal', @@ -151,7 +151,7 @@ $lang = array_merge($lang, array( 'POLL_VOTE_CHANGE' => 'Allow re-voting', 'POLL_VOTE_CHANGE_EXPLAIN' => 'If enabled users are able to change their vote.', 'POSTED_ATTACHMENTS' => 'Posted attachments', - 'POST_APPROVAL_NOTIFY' => ' You will be notified when your post has been approved.', + 'POST_APPROVAL_NOTIFY' => 'You will be notified when your post has been approved.', 'POST_CONFIRMATION' => 'Confirmation of post', 'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', 'POST_DELETED' => 'This message has been deleted successfully.', diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index 641aa74efc..7f4b2d932f 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -73,7 +73,7 @@ $lang = array_merge($lang, array( 'SEARCH_AUTHOR_EXPLAIN' => 'Use * as a wildcard for partial matches.', 'SEARCH_FIRST_POST' => 'First post of topics only', 'SEARCH_FORUMS' => 'Search in forums', - 'SEARCH_FORUMS_EXPLAIN' => 'Select the forum or forums you wish to search in. For speed all subforums can be searched by selecting the parent and setting enable search subforums below.', + 'SEARCH_FORUMS_EXPLAIN' => 'Select the forum or forums you wish to search in. Subforums are searched automatically if you do not disable “search subforums“ below.', 'SEARCH_IN_RESULTS' => 'Search these results', 'SEARCH_KEYWORDS_EXPLAIN' => 'Place + in front of a word which must be found and - in front of a word which must not be found. Put a list of words separated by | into brackets if only one of the words must be found. Use * as a wildcard for partial matches.', 'SEARCH_MSG_ONLY' => 'Message text only', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 4c402d9b59..34040317a0 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -34,7 +34,7 @@ if (empty($lang) || !is_array($lang)) $lang = array_merge($lang, array( 'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s†(hereinafter “weâ€, “usâ€, “ourâ€, “%1$sâ€, “%2$sâ€), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$sâ€. We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s†after changes mean you agree to be legally bound by these terms as they are updated and/or amended.

- Our forums are powered by phpBB (hereinafter “theyâ€, “themâ€, “theirâ€, “phpBB softwareâ€, “www.phpbb.comâ€, “phpBB Groupâ€, “phpBB Teamsâ€) which is a bulletin board solution released under the “General Public License†(hereinafter “GPLâ€) and can be downloaded from www.phpbb.com. The phpBB software only facilitates Internet based discussions and the GPL strictly forbids them in what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: http://www.phpbb.com/.
+ Our forums are powered by phpBB (hereinafter “theyâ€, “themâ€, “theirâ€, “phpBB softwareâ€, “www.phpbb.comâ€, “phpBB Groupâ€, “phpBB Teamsâ€) which is a bulletin board solution released under the “General Public License†(hereinafter “GPLâ€) and can be downloaded from www.phpbb.com. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: http://www.phpbb.com/.

You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s†is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s†have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s†nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised. ', @@ -105,6 +105,7 @@ $lang = array_merge($lang, array( 'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.', 'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder you want to remove.', + 'CANNOT_MOVE_FROM_SPECIAL' => 'Messages can not be moved from the outbox.', 'CANNOT_RENAME_FOLDER' => 'This folder can not be renamed.', 'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.', 'CHANGE_DEFAULT_GROUP' => 'Change default group', @@ -161,7 +162,7 @@ $lang = array_merge($lang, array( '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 you supplied when registering.', + '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.', 'EMPTY_DRAFT' => 'You must enter a message to submit your changes.', 'EMPTY_DRAFT_TITLE' => 'You must enter a draft title.', @@ -210,7 +211,7 @@ $lang = array_merge($lang, array( 'GLOBAL_ANNOUNCEMENT' => 'Global announcement', 'HIDE_ONLINE' => 'Hide my online status', - 'HIDE_ONLINE_EXPLAIN' => 'Changing this setting won\'t become effective until your next visit to the board.', + 'HIDE_ONLINE_EXPLAIN' => 'Changing this setting won’t become effective until your next visit to the board.', 'HOLD_NEW_MESSAGES' => 'Do not accept new messages (New messages will be held back until enough space is available)', 'HOLD_NEW_MESSAGES_SHORT' => 'New messages will be held back', @@ -288,6 +289,7 @@ $lang = array_merge($lang, array( 'NO_BCC_RECIPIENT' => 'None', '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_FOES' => 'No foes currently defined', 'NO_FRIENDS' => 'No friends currently defined', @@ -304,8 +306,8 @@ $lang = array_merge($lang, array( 'NO_RULES_DEFINED' => 'No rules defined.', 'NO_SAVED_DRAFTS' => 'No drafts saved.', 'NO_TO_RECIPIENT' => 'None', - 'NO_WATCHED_FORUMS' => 'You are not watching any forums.', - 'NO_WATCHED_TOPICS' => 'You are not watching any topics.', + 'NO_WATCHED_FORUMS' => 'You are not subscribed to any forums.', + 'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.', 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case and must contain numbers.', 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$d and %2$d characters.', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index aec904eddc..59d3371f45 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -101,7 +101,6 @@ $lang = array_merge($lang, array( 'VISIT_WEBSITE' => 'WWW', 'VOTE_SUBMITTED' => 'Your vote has been cast.', - 'WROTE' => 'wrote', )); ?> \ No newline at end of file diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 94c17c83f7..c772918dd7 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); @@ -78,7 +78,7 @@ $post_id = request_var('p', 0); $topic_id = request_var('t', 0); $forum_id = request_var('f', 0); $user_id = request_var('u', 0); -$username = request_var('username', '', true); +$username = utf8_normalize_nfc(request_var('username', '', true)); if ($post_id) { @@ -129,14 +129,14 @@ if (!$auth->acl_getf_global('m_')) if (!$allow_user) { - trigger_error($user->lang['NOT_AUTHORISED']); + trigger_error('NOT_AUTHORISED'); } } // if the user cannot read the forum he tries to access then we won't allow mcp access either if ($forum_id && !$auth->acl_get('f_read', $forum_id)) { - trigger_error($user->lang['NOT_AUTHORISED']); + trigger_error('NOT_AUTHORISED'); } if ($forum_id) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index dfeaf9801f..c88845340b 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); @@ -316,7 +316,11 @@ switch ($mode) if (!$row) { - trigger_error('NO_USER_DATA'); + trigger_error('NO_USER'); + } + else if (empty($row[$sql_field])) + { + trigger_error('IM_NO_DATA'); } // Post data grab actions @@ -328,7 +332,7 @@ switch ($mode) include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']); - $message = trim(request_var('message', '', true)); + $message = utf8_normalize_nfc(request_var('message', '', true)); if (empty($message)) { @@ -586,7 +590,7 @@ switch ($mode) ); } - // Now generate page tilte + // Now generate page title $page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']); $template_html = 'memberlist_view.html'; @@ -665,7 +669,7 @@ switch ($mode) { if (!$auth->acl_get('f_read', $row['forum_id'])) { - trigger_error($user->lang['SORRY_AUTH_READ']); + trigger_error('SORRY_AUTH_READ'); } if (!$auth->acl_get('f_email', $row['forum_id'])) @@ -678,7 +682,7 @@ switch ($mode) // If global announcement, we need to check if the user is able to at least read and email in one forum... if (!$auth->acl_getf_global('f_read')) { - trigger_error($user->lang['SORRY_AUTH_READ']); + trigger_error('SORRY_AUTH_READ'); } if (!$auth->acl_getf_global('f_email')) @@ -694,11 +698,11 @@ switch ($mode) $error = array(); - $name = request_var('name', '', true); + $name = utf8_normalize_nfc(request_var('name', '', true)); $email = request_var('email', ''); $email_lang = request_var('lang', $config['default_lang']); - $subject = request_var('subject', '', true); - $message = request_var('message', '', true); + $subject = utf8_normalize_nfc(request_var('subject', '', true)); + $message = utf8_normalize_nfc(request_var('message', '', true)); $cc = (isset($_POST['cc_email'])) ? true : false; $submit = (isset($_POST['submit'])) ? true : false; @@ -1240,7 +1244,7 @@ switch ($mode) 'S_JOINED_TIME_OPTIONS' => $s_find_join_time, 'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time, 'S_GROUP_SELECT' => $s_group_select, - 'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=$form&field=$field")) + 'S_USER_SEARCH_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=$form&field=$field")) ); } @@ -1440,7 +1444,7 @@ function show_profile($data) if ($config['load_onlinetrack']) { $update_time = $config['load_online_time'] * 60; - $online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline'])) || $auth->acl_get('u_viewonline'))) ? true : false; + $online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false; } else { @@ -1458,7 +1462,7 @@ function show_profile($data) $age = ''; - if ($data['user_birthday']) + if ($config['allow_birthdays'] && $data['user_birthday']) { list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday'])); diff --git a/phpBB/posting.php b/phpBB/posting.php index 403eea5418..92b44b3f21 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); @@ -476,12 +476,12 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( if (confirm_box(true)) { $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'user_id' => $user->data['user_id'], - 'topic_id' => $topic_id, - 'forum_id' => $forum_id, - 'save_time' => $current_time, - 'draft_subject' => $subject, - 'draft_message' => $message) + 'user_id' => (int) $user->data['user_id'], + 'topic_id' => (int) $topic_id, + 'forum_id' => (int) $forum_id, + 'save_time' => (int) $current_time, + 'draft_subject' => (string) $subject, + 'draft_message' => (string) $message) ); $db->sql_query($sql); @@ -512,7 +512,7 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( } else { - if (!$subject) + if (!$subject || !utf_clean_string($subject)) { $error[] = $user->lang['EMPTY_SUBJECT']; } @@ -561,7 +561,7 @@ $solved_captcha = false; if ($submit || $preview || $refresh) { $post_data['topic_cur_post_id'] = request_var('topic_cur_post_id', 0); - $post_data['post_subject'] = trim(utf8_normalize_nfc(request_var('subject', '', true))); + $post_data['post_subject'] = utf8_normalize_nfc(request_var('subject', '', true)); $message_parser->message = utf8_normalize_nfc(request_var('message', '', true)); $post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true)); @@ -756,7 +756,7 @@ if ($submit || $preview || $refresh) } // Parse subject - if (!$preview && !$refresh && !$post_data['post_subject'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))) + if (!$preview && !$refresh && !utf8_clean_string($post_data['post_subject']) && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id))) { $error[] = $user->lang['EMPTY_SUBJECT']; } @@ -994,7 +994,7 @@ if ($submit || $preview || $refresh) { meta_refresh(10, $redirect_url); $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD']; - $message .= (($user->data['user_id'] == ANONYMOUS) ? '' : $user->lang['POST_APPROVAL_NOTIFY']); + $message .= (($user->data['user_id'] == ANONYMOUS) ? '' : ' '. $user->lang['POST_APPROVAL_NOTIFY']); } else { @@ -1070,10 +1070,11 @@ if (!sizeof($error) && $preview) $preview_poll_options = explode('
', $parse_poll->message); unset($parse_poll); - foreach ($preview_poll_options as $option) + foreach ($preview_poll_options as $key => $option) { $template->assign_block_vars('poll_option', array( - 'POLL_OPTION_CAPTION' => $option) + 'POLL_OPTION_CAPTION' => $option, + 'POLL_OPTION_ID' => $key + 1) ); } unset($preview_poll_options); diff --git a/phpBB/report.php b/phpBB/report.php index cbae24b228..090dee5d0c 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); diff --git a/phpBB/search.php b/phpBB/search.php index 0693b32569..8dabfa895a 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); @@ -30,8 +30,8 @@ $topic_id = request_var('t', 0); $view = request_var('view', ''); $submit = request_var('submit', false); -$keywords = request_var('keywords', '', true); -$add_keywords = request_var('add_keywords', '', true); +$keywords = utf8_normalize_nfc(request_var('keywords', '', true)); +$add_keywords = utf8_normalize_nfc(request_var('add_keywords', '', true)); $author = request_var('author', '', true); $author_id = request_var('author_id', 0); $show_results = ($topic_id) ? 'posts' : request_var('sr', 'posts'); @@ -44,19 +44,21 @@ $sort_days = request_var('st', 0); $sort_key = request_var('sk', 't'); $sort_dir = request_var('sd', 'd'); -$return_chars = request_var('ch', ($topic_id) ? -1 : 200); +$return_chars = request_var('ch', ($topic_id) ? -1 : 300); $search_forum = request_var('fid', array(0)); // Is user able to search? Has search been disabled? if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search']) { - trigger_error($user->lang['NO_SEARCH']); + $template->assign_var('S_NO_SEARCH', true); + trigger_error('NO_SEARCH'); } // Check search load limit if ($user->load && $config['limit_search_load'] && ($user->load > doubleval($config['limit_search_load']))) { - trigger_error($user->lang['NO_SEARCH_TIME']); + $template->assign_var('S_NO_SEARCH', true); + trigger_error('NO_SEARCH_TIME'); } // Check flood limit ... if applicable @@ -65,7 +67,8 @@ if ($interval && !$auth->acl_get('u_ignoreflood')) { if ($user->data['user_last_search'] > time() - $interval) { - trigger_error($user->lang['NO_SEARCH_TIME']); + $template->assign_var('S_NO_SEARCH', true); + trigger_error('NO_SEARCH_TIME'); } } @@ -121,7 +124,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) if (!sizeof($author_id_ary)) { - trigger_error($user->lang['NO_SEARCH_RESULTS']); + trigger_error('NO_SEARCH_RESULTS'); } } @@ -416,13 +419,14 @@ if ($keywords || $author || $author_id || $search_id || $submit) } else if (sizeof($author_id_ary)) { - $total_match_count = $search->author_search($show_results, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $id_ary, $start, $per_page); + $firstpost_only = ($search_fields === 'firstpost') ? true : false; + $total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $id_ary, $start, $per_page); } // For some searches we need to print out the "no results" page directly to allow re-sorting/refining the search options. if (!sizeof($id_ary) && !$search_id) { - trigger_error($user->lang['NO_SEARCH_RESULTS']); + trigger_error('NO_SEARCH_RESULTS'); } $sql_where = ''; @@ -473,7 +477,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $u_search .= ($u_search_forum) ? '&fid%5B%5D=' . $u_search_forum : ''; $u_search .= (!$search_child) ? '&sc=0' : ''; $u_search .= ($search_fields != 'all') ? '&sf=' . $search_fields : ''; - $u_search .= ($return_chars != 200) ? '&ch=' . $return_chars : ''; + $u_search .= ($return_chars != 300) ? '&ch=' . $return_chars : ''; $template->assign_vars(array( 'SEARCH_TITLE' => $l_search_title, @@ -995,7 +999,7 @@ unset($pad_store); if (!$s_forums) { - trigger_error($user->lang['NO_SEARCH']); + trigger_error('NO_SEARCH'); } // Number of chars returned @@ -1006,13 +1010,29 @@ $s_characters .= ''; for ($i = 100; $i <= 1000 ; $i += 100) { - $selected = ($i == 200) ? ' selected="selected"' : ''; + $selected = ($i == 300) ? ' selected="selected"' : ''; $s_characters .= ''; } +$s_hidden_fields = array('t' => $topic_id); + +if ($_SID) +{ + $s_hidden_fields['sid'] = $_SID; +} + +if (!empty($_EXTRA_URL)) +{ + foreach ($_EXTRA_URL as $url_param) + { + $url_param = explode('=', $url_param, 2); + $s_hidden_fields[$url_param[0]] = $url_param[1]; + } +} + $template->assign_vars(array( 'S_SEARCH_ACTION' => "{$phpbb_root_path}search.$phpEx", - 'S_HIDDEN_FIELDS' => build_hidden_fields(array('sid' => $user->session_id, 't' => $topic_id)), + 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), 'S_CHARACTER_OPTIONS' => $s_characters, 'S_FORUM_OPTIONS' => $s_forums, 'S_SELECT_SORT_DIR' => $s_sort_dir, diff --git a/phpBB/style.php b/phpBB/style.php index 58eabd0e7f..b33d473ae7 100644 --- a/phpBB/style.php +++ b/phpBB/style.php @@ -12,7 +12,7 @@ * @ignore */ define('IN_PHPBB', true); -$phpbb_root_path = './'; +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($phpbb_root_path . 'config.' . $phpEx); @@ -33,7 +33,7 @@ if (!empty($load_extensions)) } -$sid = (isset($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : ''; +$sid = (isset($_GET['sid']) && !is_array($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : ''; $id = (isset($_GET['id'])) ? intval($_GET['id']) : 0; if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid)) @@ -126,6 +126,19 @@ if ($id && $sid) exit; } + // gzip_compression + if ($config['gzip_compress']) + { + if (@extension_loaded('zlib') && !headers_sent()) + { + ob_start('ob_gzhandler'); + } + } + + // Expire time of seven days if not recached + $expire_time = 7*86400; + $recache = false; + // Re-cache stylesheet data if necessary if ($recompile || empty($theme['theme_data'])) { @@ -141,46 +154,53 @@ if ($id && $sid) else if (!$recache) { $last_change = $theme['theme_mtime']; + $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme"); - foreach (glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT) as $file) + if ($dir) { - if ($last_change < @filemtime($file)) + while (($entry = readdir($dir)) !== false) { - $recache = true; - break; + if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}")) + { + $recache = true; + break; + } } + closedir($dir); } } + } - if ($recache) - { - include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx); + header('Content-type: text/css; charset=UTF-8'); - $theme['theme_data'] = acp_styles::db_theme_data($theme); - $theme['theme_mtime'] = $update_time; + if ($recache) + { + include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx); - // Save CSS contents - $sql_ary = array( - 'theme_mtime' => $theme['theme_mtime'], - 'theme_data' => $theme['theme_data'] - ); + $theme['theme_data'] = acp_styles::db_theme_data($theme); + $theme['theme_mtime'] = $update_time; - $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " - WHERE theme_id = $id"; - $db->sql_query($sql); + // Save CSS contents + $sql_ary = array( + 'theme_mtime' => $theme['theme_mtime'], + 'theme_data' => $theme['theme_data'] + ); - $cache->destroy('sql', STYLES_THEME_TABLE); + $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " + WHERE theme_id = $id"; + $db->sql_query($sql); - header('Expires: 0'); - } + $cache->destroy('sql', STYLES_THEME_TABLE); + + header('Cache-Control: private, no-cache="set-cookie"'); + header('Expires: 0'); + header('Pragma: no-cache'); } else { - header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 3600)); + header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire_time)); } - header('Content-type: text/css'); - // Parse Theme Data $replace = array( '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme', @@ -255,4 +275,6 @@ if ($id && $sid) $db->sql_close(); } +exit; + ?> \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html index 2b48785e32..25a5681b70 100644 --- a/phpBB/styles/prosilver/template/drafts.html +++ b/phpBB/styles/prosilver/template/drafts.html @@ -21,7 +21,7 @@ -
    +
    • diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index e9754aeae2..dd6c9b2aa1 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -229,7 +229,7 @@ function play_qt_file(obj) if (rectangle) { - rectangle = rectangle.split(',') + rectangle = rectangle.split(','); var x1 = parseInt(rectangle[0]); var x2 = parseInt(rectangle[2]); var y1 = parseInt(rectangle[1]); diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index b2f43b79aa..51255489ef 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -19,14 +19,17 @@

      {L_LOGIN_LOGOUT}  •  {L_REGISTER}

      -

      {L_WHO_IS_ONLINE}

      +

      {L_WHO_IS_ONLINE}

      {L_WHO_IS_ONLINE}

      {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})
      {RECORD_USERS}

      {LOGGED_IN_USER_LIST}
      {L_LEGEND}: {LEGEND}

      diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html index 369321f36d..637e5c7e9a 100644 --- a/phpBB/styles/prosilver/template/jumpbox.html +++ b/phpBB/styles/prosilver/template/jumpbox.html @@ -9,7 +9,7 @@

      {L_RETURN_TO}: {SEARCH_TOPIC}

      -

      {L_RETURN_TO} {L_SEARCH_ADV}

      +

      {L_RETURN_TO_SEARCH_ADV}

      diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html index bb47956a57..480ec47b3a 100644 --- a/phpBB/styles/prosilver/template/mcp_notes_user.html +++ b/phpBB/styles/prosilver/template/mcp_notes_user.html @@ -17,7 +17,7 @@
      {L_RANK}:
      {RANK_TITLE}
      -
      {L_RANK}:
      {RANK_IMG}
      +
       {L_RANK}:
      {RANK_IMG}
      {L_JOINED}:
      {JOINED}
      {L_TOTAL_POSTS}:
      {POSTS}
      {L_WARNINGS}:
      {WARNINGS}
      diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 9cfaa05db3..65798a89a8 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -180,8 +180,8 @@
      -   - +   +
      diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 52d815eb8e..4b61c469c8 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -60,8 +60,7 @@ onload_functions.push('subPanels()');
      - -
      +
      diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html index e0401e1912..df922c015e 100644 --- a/phpBB/styles/prosilver/template/mcp_warn_list.html +++ b/phpBB/styles/prosilver/template/mcp_warn_list.html @@ -7,7 +7,7 @@
      -

      {L_WARNED_USERS_EXPLAIN}

      +

      {L_WARNED_USERS_EXPLAIN}

      + + +
      +
      + +

      {L_SIGNATURE}

      + +
      {SIGNATURE}
      + +
      +
      + + diff --git a/phpBB/styles/prosilver/template/message_body.html b/phpBB/styles/prosilver/template/message_body.html index a1b6ddd530..eac7aeb2cb 100644 --- a/phpBB/styles/prosilver/template/message_body.html +++ b/phpBB/styles/prosilver/template/message_body.html @@ -4,7 +4,7 @@

      {MESSAGE_TITLE}

      {MESSAGE_TEXT}

      -

      {L_RETURN_TO_SEARCH_ADV}

      +

      {L_RETURN_TO_SEARCH_ADV}

      diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index a1da979548..23dfe073fd 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -30,7 +30,7 @@ The phpBB Group : 2006 //--> -
    -
      +
      • diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index eaf6e6dd03..e702dcc48b 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -43,18 +43,12 @@ - - - + + - - - - - - + + + diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html index 318c97d497..84b9aae8f9 100644 --- a/phpBB/styles/prosilver/template/ucp_groups_manage.html +++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html @@ -104,7 +104,7 @@ - {leader.USERNAME} + {leader.USERNAME_FULL} {L_YES}{L_NO} {leader.USER_POSTS} {leader.JOINED} @@ -143,7 +143,7 @@ - {member.USERNAME} + {member.USERNAME_FULL} {L_YES}{L_NO} {member.USER_POSTS} {member.JOINED} diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 9aba7614d2..c21d4b0213 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -31,8 +31,8 @@

        {L_SENT_AT}: {SENT_DATE}
        {L_PM_FROM}: {MESSAGE_AUTHOR_FULL} -
        {L_TO}: {to_recipient.NAME} -
        {L_BCC}: {bcc_recipient.NAME} +
        {L_TO}: {to_recipient.NAME_FULL}{to_recipient.NAME} +
        {L_BCC}: {bcc_recipient.NAME_FULL}{bcc_recipient.NAME}

        @@ -98,7 +98,7 @@ {L_VIEW_NEXT_PM}   - + diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html index d323e9d038..b8151ce399 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -122,7 +122,7 @@ hr.sep { {S_TIMEZONE} - Powered by phpBB {PHPBB_VERSION} © 2000, 2002, 2005, 2007 phpBB Group
        http://www.phpbb.com/
        + Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
        http://www.phpbb.com/
        diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html index 7ae6fd054b..329597f542 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html +++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html @@ -46,17 +46,19 @@
        -
        -

        {L_BIRTHDAY_EXPLAIN}
        -
        - - - -
        -
        + +
        +

        {L_BIRTHDAY_EXPLAIN}
        +
        + + + +
        +
        +
        -
        +

        {profile_fields.LANG_EXPLAIN}
        {profile_fields.ERROR}
        {profile_fields.FIELD}
        diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index e9e17fc2cf..66245f3e6d 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -63,7 +63,7 @@
        -
        +

        {profile_fields.LANG_EXPLAIN}
        {profile_fields.ERROR}
        {profile_fields.FIELD}
        diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index c950055574..7d03939605 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -28,21 +28,19 @@ - +
        style="margin-top: 2em;"> - - - - + + @@ -123,7 +121,7 @@
        -
          + @@ -237,8 +238,8 @@
          @@ -255,7 +256,7 @@
          - + {S_TOPIC_MOD}
          diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html index db6a5c7648..a7d9731ab2 100644 --- a/phpBB/styles/prosilver/template/viewtopic_print.html +++ b/phpBB/styles/prosilver/template/viewtopic_print.html @@ -54,7 +54,7 @@ //-->
          diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index b3a4e68705..6d07dd3511 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -66,10 +66,6 @@ a.sendemail { width: 22px; } -a.sendemail:hover { - background-position: 0 -18px; -} - a.fontsize { background-image: none; background-position: 0 -1px; diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index c1a0c504ca..e46bbba836 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -321,6 +321,7 @@ ul.linklist li.rightside, p.rightside { ul.navlinks { padding-bottom: 1px; + margin-bottom: 1px; border-bottom: 1px solid #FFFFFF; font-weight: bold; } @@ -581,6 +582,10 @@ div.rules { font-size: 1.1em; } +div.rules li { + margin-left: 20px; +} + p.rules { background-color: #ececec; background-image: none; diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css index 8031f52b81..1f48d02dae 100644 --- a/phpBB/styles/prosilver/theme/forms.css +++ b/phpBB/styles/prosilver/theme/forms.css @@ -79,12 +79,12 @@ fieldset dd { /* Specific layout 1 */ fieldset.fields1 dt { - width: 10em; + width: 15em; border-right-width: 0; } fieldset.fields1 dd { - margin-left: 10em; + margin-left: 15em; border-left-width: 0; } @@ -294,7 +294,7 @@ fieldset.submit-buttons input { input.inputbox { width: 85%; } input.medium { width: 50%; } input.narrow { width: 25%; } -input.tiny { width: 110px; } +input.tiny { width: 125px; } textarea.inputbox { width: 85%; diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html index 1a78fff7c7..e45a5d9383 100644 --- a/phpBB/styles/subsilver2/template/index_body.html +++ b/phpBB/styles/subsilver2/template/index_body.html @@ -21,7 +21,7 @@ - + @@ -75,7 +75,7 @@ - +

          {L_WHO_IS_ONLINE}

          {L_WHO_IS_ONLINE}

          {L_WHO_IS_ONLINE}

          {L_LOGIN_LOGOUT}

          {L_USERNAME}:   {L_PASSWORD}:   {L_LOG_ME_IN}   {L_USERNAME}:   {L_PASSWORD}:   {L_LOG_ME_IN}  
          diff --git a/phpBB/styles/subsilver2/template/mcp_approve.html b/phpBB/styles/subsilver2/template/mcp_approve.html index b8e89b330a..22b89cff47 100644 --- a/phpBB/styles/subsilver2/template/mcp_approve.html +++ b/phpBB/styles/subsilver2/template/mcp_approve.html @@ -11,7 +11,7 @@ - {ADDITIONAL_MSG}
          + {ADDITIONAL_MSG}
          {L_NOTIFY_POSTER_APPROVAL}{L_NOTIFY_POSTER_DISAPPROVAL}
          diff --git a/phpBB/styles/subsilver2/template/mcp_logs.html b/phpBB/styles/subsilver2/template/mcp_logs.html index d759af5931..e163cf35d0 100644 --- a/phpBB/styles/subsilver2/template/mcp_logs.html +++ b/phpBB/styles/subsilver2/template/mcp_logs.html @@ -26,7 +26,7 @@ -   +   diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html index eed7ca8fe3..6e2356044f 100644 --- a/phpBB/styles/subsilver2/template/mcp_move.html +++ b/phpBB/styles/subsilver2/template/mcp_move.html @@ -11,7 +11,7 @@ - {ADDITIONAL_MSG}
          + {ADDITIONAL_MSG}

          {L_SELECT_DESTINATION_FORUM}  
          diff --git a/phpBB/styles/subsilver2/template/mcp_notes_user.html b/phpBB/styles/subsilver2/template/mcp_notes_user.html index 54ddeb05be..fdc3bcd094 100644 --- a/phpBB/styles/subsilver2/template/mcp_notes_user.html +++ b/phpBB/styles/subsilver2/template/mcp_notes_user.html @@ -80,7 +80,7 @@ -   +   diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 5cf4ac5ca6..9bcd302c9b 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -25,7 +25,7 @@ - +
          checked="checked" />{L_NO_TOPIC_ICON} checked="checked" /> checked="checked" />{L_NO_TOPIC_ICON} checked="checked" />
          diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index fb9a014331..98536a5265 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -138,10 +138,12 @@ {L_LOCATION}: {LOCATION} + {L_AGE}: - {AGE} + {AGE} - + {L_OCCUPATION}: {OCCUPATION} diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 3eaae01108..4cdd0c993e 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -14,13 +14,7 @@ {META} {SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE} - - - -