Date: Sun, 20 Aug 2006 19:50:08 +0000
Subject: [PATCH 020/291] - add some language variables i will need at another
location. ;) - also add X-Sendfile support to the download.php file.
git-svn-id: file:///svn/phpbb/trunk@6308 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/download.php | 18 +++--
phpBB/install/index.php | 11 ++-
phpBB/install/install_install.php | 20 ++++-
phpBB/install/schemas/schema_data.sql | 2 +-
phpBB/language/en/common.php | 1 +
phpBB/language/en/install.php | 103 ++++++++++++++++++++++++++
6 files changed, 137 insertions(+), 18 deletions(-)
diff --git a/phpBB/download.php b/phpBB/download.php
index 86cfed7292..cd24f3ccc1 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -189,15 +189,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Now send the File Contents to the Browser
$size = @filesize($filename);
- // Might not be ideal to store the contents, but file_get_contents is binary-safe as well as the recommended method
// To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
- $contents = @file_get_contents($filename);
// Check if headers already sent or not able to get the file contents.
- if (headers_sent() || $contents === false)
+ if (headers_sent() || !@file_exists($filename) || !@is_readable($filename))
{
- unset($contents);
-
// PHP track_errors setting On?
if (!empty($php_errormsg))
{
@@ -210,15 +206,21 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Now the tricky part... let's dance
header('Pragma: public');
+ // Try X-Sendfile since it is much more server friendly.
+ // lighttpd has core support for it. An apache2 module is available at http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
+ header('X-Sendfile: ' . $filename);
+
// Send out the Headers
- header('Content-type: ' . $attachment['mimetype'] . '; name="' . $attachment['real_filename'] . '"');
+ header('Content-Type: ' . $attachment['mimetype'] . '; name="' . $attachment['real_filename'] . '"');
header('Content-Disposition: inline; filename="' . $attachment['real_filename'] . '"');
if ($size)
{
- header("Content-length: $size");
+ header("Content-Length: $size");
}
- echo $contents;
+
+ // Might not be ideal to store the contents, but file_get_contents is binary-safe as well as the recommended method
+ echo @file_get_contents($filename);
unset($contents);
flush();
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 9a542dc2df..053ef19a17 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -173,7 +173,7 @@ set_error_handler('msg_handler');
$user = new user();
$auth = new auth();
$cache = new cache();
-$template = new Template();
+$template = new template();
$template->set_custom_template('../adm/style', 'admin');
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
@@ -212,7 +212,7 @@ class module
*/
function create($module_type, $module_url, $selected_mod = false, $selected_submod = false)
{
- global $db, $config, $phpEx;
+ global $db, $config, $phpEx, $phpbb_root_path;
$module = array();
@@ -285,10 +285,9 @@ class module
$this->mode = $mode;
}
- /**
- * @todo this could be written as $this->module = new $this->filename($this); ... no? (eval statement in install/index.php)
- */
- eval("\$this->module = new $this->filename(\$this);");
+ $module = $this->filename;
+ $this->module = new $module($this);
+
if (method_exists($this->module, 'main'))
{
$this->module->main($this->mode, $this->sub);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index e318683334..287596497d 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -19,6 +19,19 @@ if ( !defined('IN_INSTALL') )
if (!empty($setmodules))
{
+ /* If phpBB is already installed we do not include this module
+ // This does not work at the moment because on installation the config file will be written before
+ // everything is finished.
+ if (@file_exists($phpbb_root_path . 'config.' . $phpEx))
+ {
+ include_once($phpbb_root_path . 'config.' . $phpEx);
+
+ if (defined('PHPBB_INSTALLED'))
+ {
+ return;
+ }
+ }*/
+
$module[] = array(
'module_type' => 'install',
'module_title' => 'INSTALL',
@@ -748,9 +761,9 @@ class install_install extends module
// $config_data .= "\$acm_type = '" . (($acm_type) ? $acm_type : 'file') . "';\n";
$config_data .= "\$acm_type = 'file';\n";
$config_data .= "\$load_extensions = '$load_extensions';\n\n";
- $config_data .= "define('PHPBB_INSTALLED', true);\n";
- $config_data .= "define('DEBUG', true);\n"; // @todo Comment out when final
- $config_data .= "define('DEBUG_EXTRA', true);\n"; // @todo Comment out when final
+ $config_data .= "@define('PHPBB_INSTALLED', true);\n";
+ $config_data .= "@define('DEBUG', true);\n"; // @todo Comment out when final
+ $config_data .= "@define('DEBUG_EXTRA', true);\n"; // @todo Comment out when final
$config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
// Attempt to write out the config file directly. If it works, this is the easiest way to do it ...
@@ -927,6 +940,7 @@ class install_install extends module
global $db, $lang, $template, $phpbb_root_path, $phpEx;
$this->page_title = $lang['STAGE_CREATE_TABLE'];
+ $s_hidden_fields = '';
// Obtain any submitted data
foreach ($this->request_vars as $var)
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index c2dd6babfe..fba8c5ccce 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -205,7 +205,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.B2');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.B3-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 183f465a98..246d1afc14 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -140,6 +140,7 @@ $lang = array_merge($lang, array(
'ERR_CHANGING_DIRECTORY' => 'Unable to change directory',
'ERR_CONNECTING_SERVER' => 'Error connecting to the server',
'ERR_UNABLE_TO_LOGIN' => 'Error on login. Supplied username or password wrong.',
+ 'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path entered seems to be not valid.',
'EXTENSION' => 'Extension',
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension %s has been deactivated and can no longer be displayed',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index d3738b95ca..4edb29e097 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -255,4 +255,107 @@ $lang = array_merge($lang, array(
'WRITEABLE' => 'Writeable',
));
+// Updater
+$lang = array_merge($lang, array(
+ 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You may want to run the database update tool now.',
+ 'ARCHIVE_FILE' => 'Source file within archive',
+
+ 'BACK' => 'Back',
+
+ 'CHECK_FILES' => 'Check files',
+ 'CHECK_FILES_AGAIN' => 'Check files again',
+ 'CHECK_FILES_EXPLAIN' => 'Within the next step all all files will be checked against the update files - this can take a while if this is the first file check.',
+ 'CHECK_FILES_UP_TO_DATE' => 'According to your database your version is up to date. You may want to proceed with the file check to make sure all files are really up to date with the latest phpBB version.',
+ 'COLLECTED_INFORMATIONS' => 'Collected file informations',
+ 'COLLECTED_INFORMATIONS_EXPLAIN'=> 'The list below shows informations about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.',
+ 'CURRENT_FILE' => 'Current original file',
+ 'CURRENT_VERSION' => 'Current version',
+
+ 'DESTINATION' => 'Destination file',
+ 'DIFF_INLINE' => 'Inline',
+ 'DIFF_RAW' => 'Raw unified diff',
+ 'DIFF_SIDE_BY_SIDE' => 'Side by Side',
+ 'DIFF_UNIFIED' => 'Unified diff',
+ 'DOWNLOAD' => 'Download',
+ 'DOWNLOAD_AS' => 'Download as',
+ '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.',
+
+ 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date',
+ 'FILES_CONFLICT' => 'Conflict files',
+ 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified the them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.',
+ 'FILES_MODIFIED' => 'Modified files',
+ 'FILES_MODIFIED_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. The updated file will be a merge between your modifications and the new file.',
+ 'FILES_NEW' => 'New files',
+ 'FILES_NEW_EXPLAIN' => 'The following files currently do not exist within your installation.',
+ 'FILES_NEW_CONFLICT' => 'New conflicting files',
+ 'FILES_NEW_CONFLICT_EXPLAIN' => 'The following files are new within the latest version but it has been determined that there is already a file with the same name within the same position. This file will be overwritten by the new file.',
+ 'FILES_NOT_MODIFIED' => 'Not modified files',
+ 'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files were not modified and represent the original phpBB files from the version you want to update from.',
+ 'FILES_UP_TO_DATE' => 'Already updated files',
+ 'FILES_UP_TO_DATE_EXPLAIN' => 'The following files are already up to date and do not need to be updated.',
+ 'FTP_SETTINGS' => 'FTP Settings',
+ 'FTP_UPDATE_METHOD' => 'FTP Upload',
+
+ 'INCOMPATIBLE_UPDATE_FILES' => 'The update files found are incompatible with your installed version. Your installed version is %1$s and the update file is for updating phpBB %2$s to %3$s.',
+ 'INCOMPLETE_UPDATE_FILES' => 'The update files are incomplete',
+
+ 'LATEST_VERSION' => 'Latest version',
+ 'LINE' => 'Line',
+ 'LINE_ADDED' => 'Added',
+ 'LINE_MODIFIED' => 'Modified',
+ 'LINE_REMOVED' => 'Removed',
+ 'LINE_UNMODIFIED' => 'Unmodified',
+ '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_MOD_FILE_OPTION' => 'Use modified file code on final merge',
+ 'MERGE_NEW_FILE_OPTION' => 'Use new file code on final merge',
+ 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.',
+
+ 'NEW_FILE' => 'New updated file',
+ 'NO_AUTH_UPDATE' => 'Not authorized to update',
+ 'NO_UPDATE_FILES_OUTDATED' => 'No valid update directory was found, please make sure you uploaded the relevant files. Your installation does not seem to be up to date. Updates are available for your version of phpBB %1$s, please visit http://www.phpbb.com/downloads.php to obtain the correct package to update from Version %2$s to Version %3$s.',
+ 'NO_UPDATE_FILES_UP_TO_DATE' => 'Your version is up to date. There is no need to run the update tool. If you want to make an integrity check on your files make sure you uploaded the correct update files.',
+ 'NO_UPDATE_INFO' => 'Update file informations could not be found.',
+ 'NO_VISIBLE_CHANGES' => 'No visible changes',
+ 'NOTICE' => 'Notice',
+ 'NUM_CONFLICTS' => 'Number of conflicts',
+
+ 'SELECT_DIFF_MODE' => 'Select diff mode',
+ 'SELECT_DOWNLOAD_FORMAT' => 'Select download archive format',
+ 'SELECT_FTP_SETTINGS' => 'Select FTP Settings',
+ 'SHOW_DIFFERENCES' => 'Show differences',
+ 'SHOW_DIFFERENCES_CONFLICT' => 'Show differences/conflicts',
+ 'SHOW_FILE_CONTENTS' => 'Show file contents',
+ 'SHOW_MERGED_DIFFERENCES' => 'Show merged differences',
+ 'STAGE_FILE_CHECK' => 'Check files',
+ 'STAGE_UPDATE_DB' => 'Update database',
+ 'STAGE_UPDATE_FILES' => 'Update files',
+ 'STAGE_VERSION_CHECK' => 'Version Check',
+ 'STATUS_CONFLICT' => 'Modified file producing conflicts',
+ 'STATUS_MODIFIED' => 'Modified file',
+ 'STATUS_NEW' => 'New file',
+ 'STATUS_NEW_CONFLICT' => 'Conflicting new file',
+ 'STATUS_NOT_MODIFIED' => 'Not modified file',
+ 'STATUS_UP_TO_DATE' => 'Already updated file',
+
+ 'UPDATE_DATABASE' => 'Update database',
+ 'UPDATE_FILES' => 'Update files',
+ 'UPDATE_INSTALLATION' => 'Update phpBB Installation',
+ 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version. During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update. The file update itself can be done in two different ways.Manual Update With this update you only download your personal set of changed files to make sure you do not loose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location. If everything is correctly updated you will be forwarded to the database updater.
Automatic Update with FTP This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly. If so, you will be forwarded to the database updater.',
+ 'UPDATE_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_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.',
+ 'UPLOAD_METHOD' => 'Upload method',
+
+ 'VERSION_CHECK' => 'Version Check',
+ 'VERSION_CHECK_EXPLAIN' => 'Checks to see if the version of phpBB you are currently running is up to date.',
+ 'VERSION_NOT_UP_TO_DATE' => 'Your version of phpBB is not up to date. Please continue the update process.',
+ 'VERSION_UP_TO_DATE' => 'Your installation is up to date, no updates are available for your version of phpBB. You may want to continue anyway to perform a file validity check.',
+ 'VIEWING_FILE_CONTENTS' => 'Viewing file contents',
+ 'VIEWING_FILE_DIFF' => 'Viewing file differences',
+));
+
?>
\ No newline at end of file
From 4553293053ba5ccdd369a181adda30e6ee0159eb Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Mon, 21 Aug 2006 15:58:48 +0000
Subject: [PATCH 021/291] Initial batch of colourization changes. This
includes: - schema changes for first post and last post - display in
viewforum, search and ucp of first post - update of database on posting
Still outstanding - display of last post
git-svn-id: file:///svn/phpbb/trunk@6309 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/develop/create_schema_files.php | 2 ++
phpBB/includes/functions_admin.php | 4 +++-
phpBB/includes/functions_display.php | 2 +-
phpBB/includes/functions_posting.php | 8 +++++---
phpBB/includes/ucp/ucp_main.php | 8 ++++++--
phpBB/install/schemas/firebird_schema.sql | 2 ++
phpBB/install/schemas/mssql_schema.sql | 2 ++
phpBB/install/schemas/mysql_schema.sql | 2 ++
phpBB/install/schemas/oracle_schema.sql | 2 ++
phpBB/install/schemas/postgres_schema.sql | 2 ++
phpBB/install/schemas/sqlite_schema.sql | 2 ++
phpBB/search.php | 4 +++-
phpBB/styles/subSilver/template/search_results.html | 2 +-
phpBB/styles/subSilver/template/viewforum_body.html | 4 ++--
phpBB/viewforum.php | 4 +++-
15 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index bf4ca84ade..546fcdbe07 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1612,9 +1612,11 @@ function get_schema_struct()
'topic_type' => array('TINT:3', 0),
'topic_first_post_id' => array('UINT', 0),
'topic_first_poster_name' => array('VCHAR', ''),
+ 'topic_first_poster_colour' => array('VCHAR:6', ''),
'topic_last_post_id' => array('UINT', 0),
'topic_last_poster_id' => array('UINT', 0),
'topic_last_poster_name' => array('VCHAR', ''),
+ 'topic_last_poster_colour' => array('VCHAR:6', ''),
'topic_last_post_time' => array('TIMESTAMP', 0),
'topic_last_view_time' => array('TIMESTAMP', 0),
'topic_moved_id' => array('UINT', 0),
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 307044b9a0..ffcf91b2bb 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1638,7 +1638,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
unset($delete_topics);
}
- $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_username, p.post_time, u.username
+ $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_username, p.post_time, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND u.user_id = p.poster_id';
@@ -1658,6 +1658,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$topic_data[$topic_id]['time'] = $row['post_time'];
$topic_data[$topic_id]['poster'] = $row['poster_id'];
$topic_data[$topic_id]['first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $topic_data[$topic_id]['first_poster_colour'] = $row['user_colour'];
}
if ($row['post_id'] == $topic_data[$topic_id]['last_post_id'])
@@ -1665,6 +1666,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$topic_data[$topic_id]['last_poster_id'] = $row['poster_id'];
$topic_data[$topic_id]['last_post_time'] = $row['post_time'];
$topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
+ $topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
}
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index f6b73afa0e..fdedac05ed 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -498,7 +498,7 @@ function topic_topic_author(&$topic_row)
{
global $phpEx, $phpbb_root_path, $user;
- $topic_author = ($topic_row['topic_poster'] != ANONYMOUS) ? '' : '';
+ $topic_author = ($topic_row['topic_poster'] != ANONYMOUS) ? ' ' : '';
$topic_author .= ($topic_row['topic_poster'] != ANONYMOUS) ? $topic_row['topic_first_poster_name'] : (($topic_row['topic_first_poster_name'] != '') ? $topic_row['topic_first_poster_name'] : $user->lang['GUEST']);
$topic_author .= ($topic_row['topic_poster'] != ANONYMOUS) ? ' ' : '';
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 01dad1328e..695f821c73 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1197,7 +1197,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
break;
case 'delete_first_post':
- $sql = 'SELECT p.post_id, p.poster_id, p.post_username, u.username
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_username, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
@@ -1211,7 +1211,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
$sql_data[FORUMS_TABLE] = 'forum_posts = forum_posts - 1';
}
- $sql_data[TOPICS_TABLE] = 'topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
+ $sql_data[TOPICS_TABLE] = 'topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . ", topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
$sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
$next_post_id = (int) $row['post_id'];
@@ -1462,6 +1462,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_approved' => (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? 0 : 1,
'topic_title' => $subject,
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
+ 'topic_first_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'topic_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0
@@ -1560,7 +1561,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_last_post_id' => $data['post_id'],
'topic_last_post_time' => $current_time,
'topic_last_poster_id' => (int) $user->data['user_id'],
- 'topic_last_poster_name'=> (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')
+ 'topic_last_poster_name'=> (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
+ 'topic_last_poster_colour' => (($user->data['user_id'] != ANONYMOUS) ? $user->data['user_colour'] : ''),
);
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 8936a7728b..dc975d0585 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -419,7 +419,9 @@ class ucp_main
$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => topic_topic_author($row),
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
@@ -578,7 +580,9 @@ class ucp_main
'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
- 'TOPIC_AUTHOR' => topic_topic_author($row),
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 6126af9549..6ff0ac3e97 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -1285,9 +1285,11 @@ CREATE TABLE phpbb_topics (
topic_type INTEGER DEFAULT 0 NOT NULL,
topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
topic_first_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
topic_moved_id INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 737ec7842f..d878f26473 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1469,9 +1469,11 @@ CREATE TABLE [phpbb_topics] (
[topic_type] [int] DEFAULT (0) NOT NULL ,
[topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
[topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
[topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
[topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
[topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
[topic_moved_id] [int] DEFAULT (0) NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index a90917ccc6..0ed3de8167 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -886,9 +886,11 @@ CREATE TABLE phpbb_topics (
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index a5c0b9202e..c9574dda86 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1653,9 +1653,11 @@ CREATE TABLE phpbb_topics (
topic_type number(3) DEFAULT '0' NOT NULL,
topic_first_post_id number(8) DEFAULT '0' NOT NULL,
topic_first_poster_name varchar2(255) DEFAULT '' ,
+ topic_first_poster_colour varchar2(6) DEFAULT '' ,
topic_last_post_id number(8) DEFAULT '0' NOT NULL,
topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
topic_last_poster_name varchar2(255) DEFAULT '' ,
+ topic_last_poster_colour varchar2(6) DEFAULT '' ,
topic_last_post_time number(11) DEFAULT '0' NOT NULL,
topic_last_view_time number(11) DEFAULT '0' NOT NULL,
topic_moved_id number(8) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 7a4b3662b0..a7ea962311 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -1134,9 +1134,11 @@ CREATE TABLE phpbb_topics (
topic_type INT2 DEFAULT '0' NOT NULL,
topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0),
topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0),
topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0),
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0),
topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0),
topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0),
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index ae204d4be9..65b1d5c369 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -858,9 +858,11 @@ CREATE TABLE phpbb_topics (
topic_type tinyint(3) NOT NULL DEFAULT '0',
topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
diff --git a/phpBB/search.php b/phpBB/search.php
index d85eb4b1a0..47362a9951 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -677,7 +677,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';
$tpl_ary = array(
- 'TOPIC_AUTHOR' => topic_topic_author($row),
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html
index bbbde2c921..932a346ed0 100644
--- a/phpBB/styles/subSilver/template/search_results.html
+++ b/phpBB/styles/subSilver/template/search_results.html
@@ -51,7 +51,7 @@
{L_IN} {searchresults.FORUM_TITLE}
- {searchresults.TOPIC_AUTHOR}
+ {searchresults.TOPIC_AUTHOR_LINK}
{searchresults.TOPIC_REPLIES}
{searchresults.TOPIC_VIEWS}
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index a31b4ad162..fb8e14a239 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -52,7 +52,7 @@
[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]
- {topicrow.TOPIC_AUTHOR}
+ {topicrow.TOPIC_AUTHOR_LINK}
{topicrow.REPLIES}
{topicrow.VIEWS}
@@ -173,7 +173,7 @@
[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]
- {topicrow.TOPIC_AUTHOR}
+ {topicrow.TOPIC_AUTHOR_LINK}
{topicrow.REPLIES}
{topicrow.VIEWS}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 36f740e210..bd7c50b8d5 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -511,7 +511,9 @@ if (sizeof($topic_list))
$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => topic_topic_author($row),
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
From 556bbfe856e5a36f38a26c3ae8357eeba0d3b228 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 22 Aug 2006 10:57:57 +0000
Subject: [PATCH 022/291] specialchar sql query to ensure proper display if
there are html characters within the sql query
git-svn-id: file:///svn/phpbb/trunk@6310 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/db/dbal.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index f774b5dcc3..4732f3c3a6 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -364,7 +364,7 @@ class dbal
// Print out a nice backtrace...
$backtrace = get_backtrace();
- $message .= ($sql) ? 'SQL ' . $sql : '';
+ $message .= ($sql) ? 'SQL ' . htmlspecialchars($sql) : '';
$message .= ($backtrace) ? 'BACKTRACE ' . $backtrace : '';
$message .= ' ';
}
From b0afc8e6320598734ae20e664be9f840ca501f91 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Tue, 22 Aug 2006 11:01:56 +0000
Subject: [PATCH 023/291] Phase 2 of the changes This should now be complete
git-svn-id: file:///svn/phpbb/trunk@6311 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/develop/create_schema_files.php | 1 +
phpBB/includes/functions_display.php | 17 ++------
phpBB/includes/functions_posting.php | 6 ++-
phpBB/includes/functions_user.php | 2 +-
phpBB/includes/ucp/ucp_main.php | 39 +++++++++++--------
phpBB/install/schemas/firebird_schema.sql | 1 +
phpBB/install/schemas/mssql_schema.sql | 1 +
phpBB/install/schemas/mysql_schema.sql | 1 +
phpBB/install/schemas/oracle_schema.sql | 1 +
phpBB/install/schemas/postgres_schema.sql | 1 +
phpBB/install/schemas/schema_data.sql | 6 +--
phpBB/install/schemas/sqlite_schema.sql | 1 +
phpBB/search.php | 16 ++++----
.../styles/subSilver/template/index_body.html | 2 +-
.../subSilver/template/search_results.html | 4 +-
.../subSilver/template/viewforum_body.html | 4 +-
.../template/viewforum_subforum.html | 2 +-
phpBB/viewforum.php | 20 +++++-----
18 files changed, 66 insertions(+), 59 deletions(-)
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 546fcdbe07..f3c03a7a69 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -903,6 +903,7 @@ function get_schema_struct()
'forum_last_poster_id' => array('UINT', 0),
'forum_last_post_time' => array('TIMESTAMP', 0),
'forum_last_poster_name'=> array('VCHAR', ''),
+ 'forum_last_poster_colour'=> array('VCHAR:6', ''),
'forum_flags' => array('TINT:4', 32),
'display_on_index' => array('BOOL', 1),
'enable_indexing' => array('BOOL', 1),
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index fdedac05ed..1fc6b63996 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -183,6 +183,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
$forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
$forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
+ $forum_rows[$parent_id]['forum_last_poster_colour'] = $row['forum_last_poster_colour'];
$forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
}
else
@@ -306,6 +307,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST'];
+ $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : '';
$last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['forum_last_poster_id']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
@@ -342,6 +344,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'SUBFORUMS' => $subforums_list,
'LAST_POST_TIME' => $last_post_time,
'LAST_POSTER' => $last_poster,
+ 'LAST_POSTER_COLOUR' => $last_poster_colour,
'MODERATORS' => $moderators_list,
'L_SUBFORUM_STR' => $l_subforums,
@@ -491,20 +494,6 @@ function get_forum_parents(&$forum_data)
return $forum_parents;
}
-/**
-* Get topic author
-*/
-function topic_topic_author(&$topic_row)
-{
- global $phpEx, $phpbb_root_path, $user;
-
- $topic_author = ($topic_row['topic_poster'] != ANONYMOUS) ? '' : '';
- $topic_author .= ($topic_row['topic_poster'] != ANONYMOUS) ? $topic_row['topic_first_poster_name'] : (($topic_row['topic_first_poster_name'] != '') ? $topic_row['topic_first_poster_name'] : $user->lang['GUEST']);
- $topic_author .= ($topic_row['topic_poster'] != ANONYMOUS) ? ' ' : '';
-
- return $topic_author;
-}
-
/**
* Generate topic pagination
*/
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 695f821c73..6fc9d83be6 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -139,15 +139,16 @@ function update_post_information($type, $ids, $return_update_sql = false)
foreach ($empty_forums as $void => $forum_id)
{
$update_sql[$forum_id][] = 'forum_last_post_id = 0';
- $update_sql[$forum_id][] = 'forum_last_post_time = 0';
+ $update_sql[$forum_id][] = 'forum_last_post_time = 0';
$update_sql[$forum_id][] = 'forum_last_poster_id = 0';
$update_sql[$forum_id][] = "forum_last_poster_name = ''";
+ $update_sql[$forum_id][] = "forum_last_poster_colour = ''";
}
}
if (sizeof($last_post_ids))
{
- $sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_time, p.poster_id, p.post_username, u.user_id, u.username
+ $sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE p.poster_id = u.user_id
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
@@ -158,6 +159,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
$update_sql[$row["{$type}_id"]][] = $type . '_last_poster_id = ' . (int) $row['poster_id'];
+ $update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c03e92d0b0..870c20f665 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -262,7 +262,7 @@ function user_delete($mode, $user_id, $post_username = false)
{
case 'retain':
$sql = 'UPDATE ' . FORUMS_TABLE . '
- SET forum_last_poster_id = ' . ANONYMOUS . (($post_username !== false) ? ", forum_last_poster_name = '" . $db->sql_escape($post_username) . "'" : '') . "
+ SET forum_last_poster_id = ' . ANONYMOUS . (($post_username !== false) ? ", forum_last_poster_name = '" . $db->sql_escape($post_username) . "'" : '') . ", forum_last_poster_colour = ''
WHERE forum_last_poster_id = $user_id";
$db->sql_query($sql);
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index dc975d0585..0dd69e4bcf 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -286,6 +286,7 @@ class ucp_main
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_poster = ($row['forum_last_poster_name'] != '') ? $row['forum_last_poster_name'] : $user->lang['GUEST'];
+ $last_poster_colour = ($row['forum_last_poster_colour']) ? '#' . $row['forum_last_poster_colour'] : '';
$last_poster_url = ($row['forum_last_poster_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['forum_last_poster_id']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
@@ -303,6 +304,7 @@ class ucp_main
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'LAST_POST_TIME' => $last_post_time,
'LAST_POST_AUTHOR' => $last_poster,
+ 'LAST_POST_AUTHOR_COLOUR' => $last_poster_colour,
'U_LAST_POST_AUTHOR' => $last_poster_url,
'U_LAST_POST' => $last_post_url,
@@ -417,15 +419,16 @@ class ucp_main
// Send vars to template
$template->assign_block_vars('topicrow', array(
- 'FORUM_ID' => $forum_id,
- 'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
- 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
- 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+
'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")),
'REPLIES' => $replies,
'VIEWS' => $row['topic_views'],
@@ -448,6 +451,7 @@ class ucp_main
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '',
+ 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '',
'U_VIEW_TOPIC' => $view_topic_url)
);
}
@@ -580,15 +584,15 @@ class ucp_main
'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
- 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
- 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
- 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")),
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+ 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")),
'POSTED_AT' => $user->format_date($row['topic_time']),
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
@@ -598,6 +602,7 @@ class ucp_main
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '',
+ 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '',
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_MOVE_UP' => ($row['order_id'] != 1) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks&move_up=' . $row['order_id']) : '',
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 6ff0ac3e97..4a4415f185 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -372,6 +372,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
forum_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
forum_flags INTEGER DEFAULT 32 NOT NULL,
display_on_index INTEGER DEFAULT 1 NOT NULL,
enable_indexing INTEGER DEFAULT 1 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index d878f26473..acd33bda23 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -424,6 +424,7 @@ CREATE TABLE [phpbb_forums] (
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
[forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
[forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[forum_flags] [int] DEFAULT (32) NOT NULL ,
[display_on_index] [int] DEFAULT (1) NOT NULL ,
[enable_indexing] [int] DEFAULT (1) NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index 0ed3de8167..6b418fe2ef 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -244,6 +244,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
forum_flags tinyint(4) DEFAULT '32' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index c9574dda86..adc683ec07 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -499,6 +499,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
forum_last_post_time number(11) DEFAULT '0' NOT NULL,
forum_last_poster_name varchar2(255) DEFAULT '' ,
+ forum_last_poster_colour varchar2(6) DEFAULT '' ,
forum_flags number(4) DEFAULT '32' NOT NULL,
display_on_index number(1) DEFAULT '1' NOT NULL,
enable_indexing number(1) DEFAULT '1' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index a7ea962311..d6db57ad10 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -376,6 +376,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0),
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
forum_flags INT2 DEFAULT '32' NOT NULL,
display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0),
enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0),
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index fba8c5ccce..ac8e86a25c 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -391,9 +391,9 @@ INSERT INTO phpbb_styles_template (template_name, template_copyright, template_p
INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_data) VALUES ('subSilver', '© phpBB Group', 'subSilver', '');
# -- Forums
-INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('My first Category', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('My first Category', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0);
-INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('Test Forum 1', 'This is just a test forum.', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('Test Forum 1', 'This is just a test forum.', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0);
# -- Users / Anonymous user
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (2, 1, 'Anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
@@ -542,7 +542,7 @@ INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id,
# -- Demo Topic
-INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 1, 2, 'Admin', 972086460, 972086460, '');
+INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_first_poster_colour, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', 972086460, 972086460, '');
# -- Demo Post
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 1, 972086460, '', '127.0.0.1', 'Welcome to phpBB 3', 'This is an example post in your phpBB 3.0 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', '5dd683b17f641daf84c040bfefc58ce9', '');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 65b1d5c369..a06d6b1f24 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -237,6 +237,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
forum_flags tinyint(4) NOT NULL DEFAULT '32',
display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1',
diff --git a/phpBB/search.php b/phpBB/search.php
index 47362a9951..6fa500d761 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -677,13 +677,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';
$tpl_ary = array(
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
- 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
- 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+
'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'TOPIC_TYPE' => $topic_type,
@@ -707,6 +708,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '',
+ 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '',
'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&t=' . $result_topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html
index e8dfafbcdf..7e60aad70c 100644
--- a/phpBB/styles/subSilver/template/index_body.html
+++ b/phpBB/styles/subSilver/template/index_body.html
@@ -55,7 +55,7 @@
{forumrow.LAST_POST_TIME}
- {forumrow.LAST_POSTER}
+ style="color: {forumrow.LAST_POSTER_COLOUR}">{forumrow.LAST_POSTER}
{forumrow.LAST_POSTER}
diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html
index 932a346ed0..a192f090ad 100644
--- a/phpBB/styles/subSilver/template/search_results.html
+++ b/phpBB/styles/subSilver/template/search_results.html
@@ -51,12 +51,12 @@
{L_IN} {searchresults.FORUM_TITLE}
- {searchresults.TOPIC_AUTHOR_LINK}
+ style="color: {searchresults.TOPIC_AUTHOR_COLOUR}">{searchresults.TOPIC_AUTHOR} {searchresults.TOPIC_AUTHOR}
{searchresults.TOPIC_REPLIES}
{searchresults.TOPIC_VIEWS}
{searchresults.LAST_POST_TIME}
- {searchresults.LAST_POST_AUTHOR} {searchresults.LAST_POST_AUTHOR}
+
style="color: {searchresults.LAST_POST_AUTHOR_COLOUR}">{searchresults.LAST_POST_AUTHOR} {searchresults.LAST_POST_AUTHOR}
{searchresults.LAST_POST_IMG}
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index fb8e14a239..4fdf762baf 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -173,12 +173,12 @@
[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]
- {topicrow.TOPIC_AUTHOR_LINK}
+ style="color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR} {topicrow.TOPIC_AUTHOR}
{topicrow.REPLIES}
{topicrow.VIEWS}
{topicrow.LAST_POST_TIME}
- {topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_AUTHOR}
+
style="color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_AUTHOR}
{LAST_POST_IMG}
diff --git a/phpBB/styles/subSilver/template/viewforum_subforum.html b/phpBB/styles/subSilver/template/viewforum_subforum.html
index 64a31583ee..46f8ede834 100644
--- a/phpBB/styles/subSilver/template/viewforum_subforum.html
+++ b/phpBB/styles/subSilver/template/viewforum_subforum.html
@@ -47,7 +47,7 @@
{forumrow.LAST_POST_TIME}
- {forumrow.LAST_POSTER}
+ style="color: {forumrow.LAST_POSTER_COLOUR}">{forumrow.LAST_POSTER}
{forumrow.LAST_POSTER}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index bd7c50b8d5..6c85ed7ffe 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -509,15 +509,16 @@ if (sizeof($topic_list))
// Send vars to template
$template->assign_block_vars('topicrow', array(
- 'FORUM_ID' => $forum_id,
- 'TOPIC_ID' => $topic_id,
- 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
- 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
- 'TOPIC_AUTHOR_LINK' => topic_topic_author($row),
- 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name']) ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'TOPIC_AUTHOR' => ($row['topic_first_poster_name']) ? $row['topic_first_poster_name'] : $user->lang['GUEST'],
+ 'TOPIC_AUTHOR_COLOUR' => ($row['topic_first_poster_colour']) ? '#' . $row['topic_first_poster_colour'] : '',
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+ 'LAST_POST_AUTHOR' => ($row['topic_last_poster_name']) ? $row['topic_last_poster_name'] : $user->lang['GUEST'],
+ 'LAST_POST_AUTHOR_COLOUR' => ($row['topic_last_poster_colour']) ? '#' . $row['topic_last_poster_colour'] : '',
+
'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'REPLIES' => $replies,
'VIEWS' => $row['topic_views'],
@@ -548,6 +549,7 @@ if (sizeof($topic_list))
'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_last_poster_id']) : '',
+ 'U_TOPIC_AUTHOR' => ($row['topic_poster'] != ANONYMOUS && $row['topic_poster']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['topic_poster']) : '',
'U_VIEW_TOPIC' => $view_topic_url,
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $forum_id . '&t=' . $topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
From 1d42d1b9817050974c8bc8b91bc34a6c3cfbfef8 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 22 Aug 2006 21:26:06 +0000
Subject: [PATCH 024/291] some updates. Also adjusted the utf tools and
normalizer more to our coding guidelines.
git-svn-id: file:///svn/phpbb/trunk@6312 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_language.html | 4 +-
phpBB/docs/AUTHORS | 2 +
phpBB/includes/acm/acm_file.php | 26 +
phpBB/includes/acp/acp_database.php | 2 +-
phpBB/includes/acp/acp_language.php | 2 +-
phpBB/includes/acp/acp_profile.php | 2 +-
phpBB/includes/db/dbal.php | 2 +-
phpBB/includes/db/firebird.php | 10 +-
phpBB/includes/db/mssql.php | 10 +-
phpBB/includes/db/mssql_odbc.php | 10 +-
phpBB/includes/db/mysql.php | 12 +-
phpBB/includes/db/mysql4.php | 10 +-
phpBB/includes/db/mysqli.php | 10 +-
phpBB/includes/db/oracle.php | 8 +-
phpBB/includes/db/postgres.php | 10 +-
phpBB/includes/db/sqlite.php | 10 +-
phpBB/includes/functions.php | 5 +-
phpBB/includes/functions_admin.php | 2 +-
phpBB/includes/functions_jabber.php | 22 +-
phpBB/includes/functions_messenger.php | 2 +-
phpBB/includes/functions_profile_fields.php | 28 +-
phpBB/includes/functions_template.php | 24 +-
phpBB/includes/functions_transfer.php | 74 +-
phpBB/includes/functions_upload.php | 2 +-
phpBB/includes/message_parser.php | 2 +-
phpBB/includes/session.php | 5 +-
phpBB/includes/template.php | 26 +-
phpBB/includes/utf/utf_normalizer.php | 3063 ++++++++-----------
phpBB/includes/utf/utf_tools.php | 34 +-
phpBB/language/en/install.php | 1 +
30 files changed, 1545 insertions(+), 1875 deletions(-)
diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html
index 5f32855f48..76eb7c7b84 100644
--- a/phpBB/adm/style/acp_language.html
+++ b/phpBB/adm/style/acp_language.html
@@ -177,8 +177,8 @@
- {data.NAME}: {data.EXPLAIN}
-
+ {data.NAME}: {data.EXPLAIN}
+
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
index a14d037a96..8120424fc5 100644
--- a/phpBB/docs/AUTHORS
+++ b/phpBB/docs/AUTHORS
@@ -34,6 +34,8 @@ Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
GPL licenced:
phpMyAdmin 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber class 2003 Carlo Zottmann, http://phpjabber.g-blog.net
+Chora: Copyright 2000-2006, The Horde Project. http://horde.org/chora/
+Horde Project: Copyright 2000-2006, The Horde Project. http://horde.org/
PHP License, version 3.0:
Pear 2001-2004 PHP Group, http://pear.php.net
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index 175ef0ad81..f79a94c987 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -175,6 +175,32 @@ class acm
}
}
+ /**
+ * Purge cache data
+ */
+ function purge()
+ {
+ // Purge sql data
+ $dir = opendir($this->cache_dir);
+ while (($entry = readdir($dir)) !== false)
+ {
+ if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
+ {
+ continue;
+ }
+
+ @unlink($this->cache_dir . $entry);
+ }
+ @closedir($dir);
+
+ unset($this->vars);
+ unset($this->var_expires);
+ unset($this->sql_rowset);
+ unset($this->sql_row_pointer);
+
+ $this->is_modified = false;
+ }
+
/**
* Destroy cache data
*/
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 4a5382b67a..00ffebc6e5 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -433,7 +433,7 @@ class acp_database
$column_list = array();
$table_cols = explode(',', trim($matches[1]));
- foreach($table_cols as $declaration)
+ foreach ($table_cols as $declaration)
{
$entities = preg_split('#\s+#', trim($declaration));
$column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 29aabe240f..e2431749d1 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -838,7 +838,7 @@ class acp_language
$compress->close();
$compress->download('lang_' . $row['lang_iso']);
- @unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . '.' . $use_method);
+ @unlink($phpbb_root_path . 'store/lang_' . $row['lang_iso'] . $use_method);
exit;
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index c361c47c2e..5ab70f609f 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -129,7 +129,7 @@ class acp_profile
$new_table_cols = trim($matches[1]);
$old_table_cols = explode(',', $new_table_cols);
$column_list = array();
- foreach($old_table_cols as $declaration)
+ foreach ($old_table_cols as $declaration)
{
$entities = preg_split('#\s+#', trim($declaration));
if ($entities[0] !== '_' . $field_ident)
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 4732f3c3a6..6f6b5ddce4 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -131,7 +131,7 @@ class dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function sql_transaction($status = 'begin')
{
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 7ea5dd3612..3446513e19 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -66,7 +66,7 @@ class dbal_firebird extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -360,7 +360,7 @@ class dbal_firebird extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -369,7 +369,7 @@ class dbal_firebird extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -381,7 +381,7 @@ class dbal_firebird extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -395,7 +395,7 @@ class dbal_firebird extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index fe6cf75b12..11548998ba 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -79,7 +79,7 @@ class dbal_mssql extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -371,7 +371,7 @@ class dbal_mssql extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -410,7 +410,7 @@ class dbal_mssql extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -419,7 +419,7 @@ class dbal_mssql extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -428,7 +428,7 @@ class dbal_mssql extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index e1b2675a23..54655c389a 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -73,7 +73,7 @@ class dbal_mssql_odbc extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -381,7 +381,7 @@ class dbal_mssql_odbc extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -390,7 +390,7 @@ class dbal_mssql_odbc extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -402,7 +402,7 @@ class dbal_mssql_odbc extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -411,7 +411,7 @@ class dbal_mssql_odbc extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 7e363721a9..48ae9e9773 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -33,7 +33,7 @@ class dbal_mysql extends dbal
{
/**
* Connect to server
- * @access: public
+ * @access public
*/
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false)
{
@@ -65,7 +65,7 @@ class dbal_mysql extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -330,7 +330,7 @@ class dbal_mysql extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -346,7 +346,7 @@ class dbal_mysql extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -366,7 +366,7 @@ class dbal_mysql extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -375,7 +375,7 @@ class dbal_mysql extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index 071f4c4b55..dd89de5e5c 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -67,7 +67,7 @@ class dbal_mysql4 extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -333,7 +333,7 @@ class dbal_mysql4 extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -349,7 +349,7 @@ class dbal_mysql4 extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -369,7 +369,7 @@ class dbal_mysql4 extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -378,7 +378,7 @@ class dbal_mysql4 extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index fa4d3ffdc7..66bbd9beda 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -67,7 +67,7 @@ class dbal_mysqli extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -313,7 +313,7 @@ class dbal_mysqli extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -329,7 +329,7 @@ class dbal_mysqli extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -349,7 +349,7 @@ class dbal_mysqli extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -358,7 +358,7 @@ class dbal_mysqli extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index fc5bf6f78e..e87b7aa1f9 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -57,7 +57,7 @@ class dbal_oracle extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -443,7 +443,7 @@ class dbal_oracle extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -465,7 +465,7 @@ class dbal_oracle extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -474,7 +474,7 @@ class dbal_oracle extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index 1836952346..a91a8e81bb 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -105,7 +105,7 @@ class dbal_postgres extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -189,7 +189,7 @@ class dbal_postgres extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -398,7 +398,7 @@ class dbal_postgres extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -410,7 +410,7 @@ class dbal_postgres extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -419,7 +419,7 @@ class dbal_postgres extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index cd6d40e3c7..65be2fef64 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -63,7 +63,7 @@ class dbal_sqlite extends dbal
/**
* SQL Transaction
- * @access: private
+ * @access private
*/
function _sql_transaction($status = 'begin')
{
@@ -310,7 +310,7 @@ class dbal_sqlite extends dbal
/**
* return sql error array
- * @access: private
+ * @access private
*/
function _sql_error()
{
@@ -322,7 +322,7 @@ class dbal_sqlite extends dbal
/**
* Build db-specific query data
- * @access: private
+ * @access private
*/
function _sql_custom_build($stage, $data)
{
@@ -331,7 +331,7 @@ class dbal_sqlite extends dbal
/**
* Close sql connection
- * @access: private
+ * @access private
*/
function _sql_close()
{
@@ -340,7 +340,7 @@ class dbal_sqlite extends dbal
/**
* Build db-specific report
- * @access: private
+ * @access private
*/
function _sql_report($mode, $query = '')
{
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 84de408eb9..8affabc8c9 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -15,7 +15,7 @@
*
* Set variable, used by {@link request_var the request_var function}
*
-* @access: private
+* @access private
*/
function set_var(&$result, $var, $type, $multibyte = false)
{
@@ -1865,7 +1865,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
if (!$redirect)
{
// We just use what the session code determined...
- $redirect = $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
+ // We do not append the phpbb_root_path directory because we are within the root dir if the redirect happens and not within the current directory.
+ $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
}
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index ffcf91b2bb..85ed30db18 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2467,7 +2467,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
}
else if (strpos($line, '404 Not Found') !== false)
{
- $errstr = $user->lang['FILE_NOT_FOUND'];
+ $errstr = $user->lang['FILE_NOT_FOUND'] . ': ' . $filename;
return false;
}
}
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index d98293dd0f..96d2e686e4 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -627,7 +627,7 @@ class jabber
/**
* Send auth
- * @access: private
+ * @access private
*/
function _sendauth_ok($zerok_token, $zerok_sequence)
{
@@ -655,7 +655,7 @@ class jabber
/**
* Send auth digest
- * @access: private
+ * @access private
*/
function _sendauth_digest()
{
@@ -671,7 +671,7 @@ class jabber
/**
* Send auth plain
- * @access: private
+ * @access private
*/
function _sendauth_plaintext()
{
@@ -687,7 +687,7 @@ class jabber
/**
* Listen on socket
- * @access: private
+ * @access private
*/
function _listen_incoming()
{
@@ -704,7 +704,7 @@ class jabber
/**
* Check if connected
- * @access: private
+ * @access private
*/
function _check_connected()
{
@@ -733,7 +733,7 @@ class jabber
/**
* Split incoming packet
- * @access: private
+ * @access private
*/
function _split_incoming($incoming)
{
@@ -750,7 +750,7 @@ class jabber
/**
* Get packet type
- * @access: private
+ * @access private
*/
function _get_packet_type($packet = NULL)
{
@@ -765,7 +765,7 @@ class jabber
/**
* Recursively prepares the strings in an array to be used in XML data.
- * @access: private
+ * @access private
*/
function _array_xmlspecialchars(&$array)
{
@@ -787,7 +787,7 @@ class jabber
/**
* Prepares a string for usage in XML data.
- * @access: private
+ * @access private
*/
function _xmlspecialchars(&$string)
{
@@ -797,7 +797,7 @@ class jabber
/**
* Recursively converts all elements in an array to UTF-8 from the encoding stored in {@link encoding the encoding attribute}.
- * @access: private
+ * @access private
*/
function _array_conv_utf8(&$array)
{
@@ -830,7 +830,7 @@ class jabber
*
* @return boolean True on success, false on failure.
*
- * @access: private
+ * @access private
*/
function _conv_utf8(&$string)
{
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 052f372443..207ff00b8d 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -706,7 +706,7 @@ class queue
/**
* Format array
- * @access: private
+ * @access private
*/
function format_array($array)
{
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 6f71724754..95723f8181 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -21,7 +21,7 @@ class custom_profile
/**
* Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
* Called by ucp_profile and ucp_register
- * @access: public
+ * @access public
*/
function generate_profile_fields($mode, $lang_id)
{
@@ -74,7 +74,7 @@ class custom_profile
/**
* Validate entered profile field data
- * @access: public
+ * @access public
*/
function validate_profile_field($field_type, &$field_value, $field_data)
{
@@ -186,7 +186,7 @@ class custom_profile
/**
* Build profile cache, used for display
- * @access: private
+ * @access private
*/
function build_cache()
{
@@ -248,7 +248,7 @@ class custom_profile
/**
* Submit profile field
- * @access: public
+ * @access public
*/
function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
{
@@ -340,7 +340,7 @@ class custom_profile
/**
* Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled)
* This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
- * @access: public
+ * @access public
*/
function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
{
@@ -535,7 +535,7 @@ class custom_profile
/**
* Get field value for registration/profile
- * @access: private
+ * @access private
*/
function get_var($field_validation, &$profile_row, $default_value, $preview)
{
@@ -590,7 +590,7 @@ class custom_profile
/**
* Process int-type
- * @access: private
+ * @access private
*/
function generate_int($profile_row, $preview = false)
{
@@ -602,7 +602,7 @@ class custom_profile
/**
* Process date-type
- * @access: private
+ * @access private
*/
function generate_date($profile_row, $preview = false)
{
@@ -661,7 +661,7 @@ class custom_profile
/**
* Process bool-type
- * @access: private
+ * @access private
*/
function generate_bool($profile_row, $preview = false)
{
@@ -692,7 +692,7 @@ class custom_profile
/**
* Process string-type
- * @access: private
+ * @access private
*/
function generate_string($profile_row, $preview = false)
{
@@ -704,7 +704,7 @@ class custom_profile
/**
* Process text-type
- * @access: private
+ * @access private
*/
function generate_text($profile_row, $preview = false)
{
@@ -721,7 +721,7 @@ class custom_profile
/**
* Process dropdown-type
- * @access: private
+ * @access private
*/
function generate_dropdown($profile_row, $preview = false)
{
@@ -750,7 +750,7 @@ class custom_profile
/**
* Return Templated value/field. Possible values for $mode are:
* change == user is able to set/enter profile values; preview == just show the value
- * @access: private
+ * @access private
*/
function process_field_row($mode, $profile_row)
{
@@ -814,7 +814,7 @@ class custom_profile
/**
* Get profile field value on submit
- * @access: private
+ * @access private
*/
function get_profile_field($profile_row)
{
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index fa93df7318..dacfafefa6 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -52,7 +52,7 @@ class template_compile
/**
* Load template source from file
- * @access: private
+ * @access private
*/
function _tpl_load_file($handle)
{
@@ -153,7 +153,7 @@ class template_compile
/**
* The all seeing all doing compile method. Parts are inspired by or directly from Smarty
- * @access: private
+ * @access private
*/
function compile($code, $no_echo = false, $echo_var = '')
{
@@ -280,7 +280,7 @@ class template_compile
/**
* Compile variables
- * @access: private
+ * @access private
*/
function compile_var_tags(&$text_blocks)
{
@@ -322,7 +322,7 @@ class template_compile
/**
* Compile blocks
- * @access: private
+ * @access private
*/
function compile_tag_block($tag_args)
{
@@ -413,7 +413,7 @@ class template_compile
/**
* Compile IF tags - much of this is from Smarty with
* some adaptions for our block level methods
- * @access: private
+ * @access private
*/
function compile_tag_if($tag_args, $elseif)
{
@@ -540,7 +540,7 @@ class template_compile
/**
* Compile DEFINE tags
- * @access: private
+ * @access private
*/
function compile_tag_define($tag_args, $op)
{
@@ -593,7 +593,7 @@ class template_compile
/**
* Compile INCLUDE tag
- * @access: private
+ * @access private
*/
function compile_tag_include($tag_args)
{
@@ -602,7 +602,7 @@ class template_compile
/**
* Compile INCLUDE_PHP tag
- * @access: private
+ * @access private
*/
function compile_tag_include_php($tag_args)
{
@@ -612,7 +612,7 @@ class template_compile
/**
* parse expression
* This is from Smarty
- * @access: private
+ * @access private
*/
function _parse_is_expr($is_arg, $tokens)
{
@@ -683,7 +683,7 @@ class template_compile
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
* It's ready to be inserted into an "echo" line in one of the templates.
* NOTE: expects a trailing "." on the namespace.
- * @access: private
+ * @access private
*/
function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
{
@@ -708,7 +708,7 @@ class template_compile
*
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
* NOTE: does not expect a trailing "." on the blockname.
- * @access: private
+ * @access private
*/
function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
{
@@ -737,7 +737,7 @@ class template_compile
/**
* Write compiled file to cache directory
- * @access: private
+ * @access private
*/
function compile_write(&$handle, $data)
{
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index d2cc95f728..b147052c9c 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -188,6 +188,24 @@ class transfer
return $this->_rename($old_handle, $new_handle);
}
+ /**
+ * Check if a specified file exist...
+ */
+ function file_exists($directory, $filename)
+ {
+ global $phpbb_root_path;
+
+ $directory = $this->root_path . str_replace($phpbb_root_path, '', $directory);
+ $result = $this->_ls($directory);
+
+ if ($result !== false && is_array($result))
+ {
+ return (in_array($filename, $result)) ? true : false;
+ }
+
+ return false;
+ }
+
/**
* Open session
*/
@@ -272,7 +290,7 @@ class ftp extends transfer
/**
* Init FTP Session
- * @access: private
+ * @access private
*/
function _init()
{
@@ -304,7 +322,7 @@ class ftp extends transfer
/**
* Create Directory (MKDIR)
- * @access: private
+ * @access private
*/
function _mkdir($dir)
{
@@ -313,7 +331,7 @@ class ftp extends transfer
/**
* Remove directory (RMDIR)
- * @access: private
+ * @access private
*/
function _rmdir($dir)
{
@@ -322,7 +340,7 @@ class ftp extends transfer
/**
* Rename file
- * @access: private
+ * @access private
*/
function _rename($old_handle, $new_handle)
{
@@ -331,7 +349,7 @@ class ftp extends transfer
/**
* Change current working directory (CHDIR)
- * @access: private
+ * @access private
*/
function _chdir($dir = '')
{
@@ -345,7 +363,7 @@ class ftp extends transfer
/**
* change file permissions (CHMOD)
- * @access: private
+ * @access private
*/
function _chmod($file, $perms)
{
@@ -364,7 +382,7 @@ class ftp extends transfer
/**
* Upload file to location (PUT)
- * @access: private
+ * @access private
*/
function _put($from_file, $to_file)
{
@@ -386,7 +404,7 @@ class ftp extends transfer
/**
* Delete file (DELETE)
- * @access: private
+ * @access private
*/
function _delete($file)
{
@@ -395,7 +413,7 @@ class ftp extends transfer
/**
* Close ftp session (CLOSE)
- * @access: private
+ * @access private
*/
function _close()
{
@@ -410,7 +428,7 @@ class ftp extends transfer
/**
* Return current working directory (CWD)
* At the moment not used by parent class
- * @access: private
+ * @access private
*/
function _cwd()
{
@@ -419,8 +437,7 @@ class ftp extends transfer
/**
* Return list of files in a given directory (LS)
- * At the moment not used by parent class
- * @access: private
+ * @access private
*/
function _ls($dir = './')
{
@@ -429,7 +446,7 @@ class ftp extends transfer
/**
* FTP SITE command (ftp-only function)
- * @access: private
+ * @access private
*/
function _site($command)
{
@@ -487,7 +504,7 @@ class ftp_fsock extends transfer
/**
* Init FTP Session
- * @access: private
+ * @access private
*/
function _init()
{
@@ -526,7 +543,7 @@ class ftp_fsock extends transfer
/**
* Create Directory (MKDIR)
- * @access: private
+ * @access private
*/
function _mkdir($dir)
{
@@ -535,7 +552,7 @@ class ftp_fsock extends transfer
/**
* Remove directory (RMDIR)
- * @access: private
+ * @access private
*/
function _rmdir($dir)
{
@@ -544,7 +561,7 @@ class ftp_fsock extends transfer
/**
* Rename File
- * @access: private
+ * @access private
*/
function _rename($old_handle, $new_handle)
{
@@ -554,7 +571,7 @@ class ftp_fsock extends transfer
/**
* Change current working directory (CHDIR)
- * @access: private
+ * @access private
*/
function _chdir($dir = '')
{
@@ -568,7 +585,7 @@ class ftp_fsock extends transfer
/**
* change file permissions (CHMOD)
- * @access: private
+ * @access private
*/
function _chmod($file, $perms)
{
@@ -577,7 +594,7 @@ class ftp_fsock extends transfer
/**
* Upload file to location (PUT)
- * @access: private
+ * @access private
*/
function _put($from_file, $to_file)
{
@@ -613,7 +630,7 @@ class ftp_fsock extends transfer
/**
* Delete file (DELETE)
- * @access: private
+ * @access private
*/
function _delete($file)
{
@@ -622,7 +639,7 @@ class ftp_fsock extends transfer
/**
* Close ftp session (CLOSE)
- * @access: private
+ * @access private
*/
function _close()
{
@@ -637,7 +654,7 @@ class ftp_fsock extends transfer
/**
* Return current working directory (CWD)
* At the moment not used by parent class
- * @access: private
+ * @access private
*/
function _cwd()
{
@@ -647,8 +664,7 @@ class ftp_fsock extends transfer
/**
* Return list of files in a given directory (LS)
- * At the moment not used by parent class
- * @access: private
+ * @access private
*/
function _ls($dir = './')
{
@@ -671,7 +687,7 @@ class ftp_fsock extends transfer
/**
* Send a command to server (FTP fsock only function)
- * @access: private
+ * @access private
*/
function _send_command($command, $args = '', $check = true)
{
@@ -692,7 +708,7 @@ class ftp_fsock extends transfer
/**
* Opens a connection to send data (FTP fosck only function)
- * @access: private
+ * @access private
*/
function _open_data_connection()
{
@@ -727,7 +743,7 @@ class ftp_fsock extends transfer
/**
* Closes a connection used to send data
- * @access: private
+ * @access private
*/
function _close_data_connection()
{
@@ -736,7 +752,7 @@ class ftp_fsock extends transfer
/**
* Check to make sure command was successful (FTP fsock only function)
- * @access: private
+ * @access private
*/
function _check_command($return = false)
{
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 28701339e4..ca2618c96a 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -38,7 +38,7 @@ class filespec
/**
* File Class
- * @access: private
+ * @access private
*/
function filespec($upload_ary, $upload_namespace)
{
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 9ce4c1d6da..3cdd3ec0b2 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -803,7 +803,7 @@ class bbcode_firstpass extends bbcode
* @param string $url the url to check
* @return true if the url is pointing to this domain/script_path/php-file, false if not
*
- * @access: private
+ * @access private
*/
function path_in_domain($url)
{
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 64a203e0bf..0e934edb8a 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -588,6 +588,9 @@ class session
$SID = '?sid=';
$this->session_id = $_SID = '';
+ // To make sure a valid session is created we create one for the anonymous user
+ $this->session_create(ANONYMOUS);
+
return true;
}
@@ -1207,7 +1210,7 @@ class user extends session
/**
* Set language entry (called by add_lang)
- * @access: private
+ * @access private
*/
function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false)
{
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 5281860ac5..abacd2d118 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -39,7 +39,7 @@ class template
/**
* Set template location
- * @access: public
+ * @access public
*/
function set_template()
{
@@ -60,7 +60,7 @@ class template
/**
* Set custom template location (able to use directory outside of phpBB)
- * @access: public
+ * @access public
*/
function set_custom_template($template_path, $template_name)
{
@@ -75,7 +75,7 @@ class template
/**
* Sets the template filenames for handles. $filename_array
* should be a hash of handle => filename pairs.
- * @access: public
+ * @access public
*/
function set_filenames($filename_array)
{
@@ -100,7 +100,7 @@ class template
/**
* Destroy template data set
- * @access: public
+ * @access public
*/
function destroy()
{
@@ -109,7 +109,7 @@ class template
/**
* Reset/empty complete block
- * @access: public
+ * @access public
*/
function destroy_block_vars($blockname)
{
@@ -139,7 +139,7 @@ class template
/**
* Display handle
- * @access: public
+ * @access public
*/
function display($handle, $include_once = true)
{
@@ -159,7 +159,7 @@ class template
/**
* Display the handle and assign the output to a template variable or return the compiled result.
- * @access: public
+ * @access public
*/
function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
{
@@ -179,7 +179,7 @@ class template
/**
* Load a compiled template if possible, if not, recompile it
- * @access: private
+ * @access private
*/
function _tpl_load(&$handle)
{
@@ -271,7 +271,7 @@ class template
/**
* Assign key variable pairs from an array
- * @access: public
+ * @access public
*/
function assign_vars($vararray)
{
@@ -285,7 +285,7 @@ class template
/**
* Assign a single variable to a single key
- * @access: public
+ * @access public
*/
function assign_var($varname, $varval)
{
@@ -296,7 +296,7 @@ class template
/**
* Assign key variable pairs from an array to a specified block
- * @access: public
+ * @access public
*/
function assign_block_vars($blockname, $vararray)
{
@@ -398,7 +398,7 @@ class template
* and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
*
* @return false on error, true on success
- * @access: public
+ * @access public
*/
function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
{
@@ -484,7 +484,7 @@ class template
/**
* Include a seperate template
- * @access: private
+ * @access private
*/
function _tpl_include($filename, $include = true)
{
diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php
index 0b567fad6b..613a1098a7 100644
--- a/phpBB/includes/utf/utf_normalizer.php
+++ b/phpBB/includes/utf/utf_normalizer.php
@@ -28,951 +28,614 @@ define('UTF8_CJK_B_FIRST', "\xF0\xA0\x80\x80");
define('UTF8_CJK_B_LAST', "\xF0\xAA\x9B\x96");
+// Wrapper for the utfnormal extension, ICU wrapper
if (function_exists('utf8_normalize'))
{
+ define('UNORM_NONE', 1);
+ define('UNORM_NFD', 2);
+ define('UNORM_NFKD', 3);
+ define('UNORM_NFC', 4);
+ define('UNORM_NFKC', 5);
+ define('UNORM_FCD', 6);
+ define('UNORM_DEFAULT', UNORM_NFC);
-////////////////////////////////////////////////////////////////////////////////
-// Wrapper for the utfnormal extension, ICU wrapper //
-////////////////////////////////////////////////////////////////////////////////
-
-define('UNORM_NONE', 1);
-define('UNORM_NFD', 2);
-define('UNORM_NFKD', 3);
-define('UNORM_NFC', 4);
-define('UNORM_NFKC', 5);
-define('UNORM_FCD', 6);
-define('UNORM_DEFAULT', UNORM_NFC);
-
-/**
-* utf_normalizer class for the utfnormal extension
-*
-* @ignore
-*/
-class utf_normalizer
-{
- function cleanup($str)
+ /**
+ * utf_normalizer class for the utfnormal extension
+ *
+ * @ignore
+ */
+ class utf_normalizer
{
- /**
- * The string below is the list of all autorized characters, sorted by
- * frequency in latin text
- */
- $pos = strspn(
- $str,
- "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D"
- );
-
- if (!isset($str[$pos]))
+ function cleanup($str)
{
/**
- * ASCII strings with no special chars return immediately
+ * The string below is the list of all autorized characters, sorted by
+ * frequency in latin text
*/
- return $str;
+ $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
+
+ if (!isset($str[$pos]))
+ {
+ // ASCII strings with no special chars return immediately
+ return $str;
+ }
+
+ // Check if there is potentially a U+FFFE or U+FFFF char (UTF sequence 0xEFBFBE or 0xEFBFBF) and replace them
+ // Note: we start searching at position $pos
+ if (is_int(strpos($str, "\xEF\xBF", $pos)))
+ {
+ $str = str_replace(
+ array("\xEF\xBF\xBE", "\xEF\xBF\xBF"),
+ array(UTF8_REPLACEMENT, UTF8_REPLACEMENT),
+ $str
+ );
+ }
+
+ // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
+ // We replace those characters with a 0xFF byte, which is illegal in
+ // UTF-8 and will in turn be replaced with a Unicode replacement char
+ $str = strtr(
+ $str,
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ );
+
+ // As per the original implementation, "the UnicodeString constructor fails if the string ends with a head byte".
+ // Therefore, if the string ends with a leading byte we replace it with 0xFF, which is illegal too and will be
+ // replaced with a Unicode replacement character
+ if (substr($str, -1) >= "\xC0")
+ {
+ $str[strlen($str) - 1] = "\xFF";
+ }
+
+ return utf8_normalize($str, UNORM_NFC);
}
- /**
- * Check if there is potentially a U+FFFE or U+FFFF char (UTF sequence
- * 0xEFBFBE or 0xEFBFBF) and replace them
- *
- * Note: we start searching at position $pos
- */
- if (is_int(strpos($str, "\xEF\xBF", $pos)))
+ function nfc($str)
{
- $str = str_replace(
- array("\xEF\xBF\xBE", "\xEF\xBF\xBF"),
- array(UTF8_REPLACEMENT, UTF8_REPLACEMENT),
- $str
+ return utf8_normalize($str, UNORM_NFC);
+ }
+
+ function nfkc($str)
+ {
+ return utf8_normalize($str, UNORM_NFKC);
+ }
+
+ function nfd($str)
+ {
+ return utf8_normalize($str, UNORM_NFD);
+ }
+
+ function nfkd($str)
+ {
+ return utf8_normalize($str, UNORM_NFKD);
+ }
+ }
+}
+else
+{
+ // This block will NOT be loaded if the utfnormal extension is
+
+ // Unset global variables
+ unset($GLOBALS['utf_jamo_index'], $GLOBALS['utf_jamo_type'], $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_combining_class'], $GLOBALS['utf_canonical_comp'], $GLOBALS['utf_canonical_decomp'], $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+
+ // NFC_QC and NFKC_QC values
+ define('UNICODE_QC_MAYBE', 0);
+ define('UNICODE_QC_NO', 1);
+
+ // Contains all the ASCII characters appearing in UTF-8, sorted by frequency
+ define('UTF8_ASCII_RANGE', "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F");
+
+ // Contains all the tail bytes that can appear in the composition of a UTF-8 char
+ define('UTF8_TRAILING_BYTES', "\xA9\xA0\xA8\x80\xAA\x99\xA7\xBB\xAB\x89\x94\x82\xB4\xA2\xAE\x83\xB0\xB9\xB8\x93\xAF\xBC\xB3\x81\xA4\xB2\x9C\xA1\xB5\xBE\xBD\xBA\x98\xAD\xB1\x84\x95\xA6\xB6\x88\x8D\x90\xB7\xBF\x92\x85\xA5\x97\x8C\x86\xA3\x8E\x9F\x8F\x87\x91\x9D\xAC\x9E\x8B\x96\x9B\x8A\x9A");
+
+ // Constants used by the Hangul [de]composition algorithms
+ define('UNICODE_HANGUL_SBASE', 0xAC00);
+ define('UNICODE_HANGUL_LBASE', 0x1100);
+ define('UNICODE_HANGUL_VBASE', 0x1161);
+ define('UNICODE_HANGUL_TBASE', 0x11A7);
+ define('UNICODE_HANGUL_SCOUNT', 11172);
+ define('UNICODE_HANGUL_LCOUNT', 19);
+ define('UNICODE_HANGUL_VCOUNT', 21);
+ define('UNICODE_HANGUL_TCOUNT', 28);
+ define('UNICODE_HANGUL_NCOUNT', 588);
+ define('UNICODE_JAMO_L', 0);
+ define('UNICODE_JAMO_V', 1);
+ define('UNICODE_JAMO_T', 2);
+
+ /**
+ * Unicode normalization routines
+ *
+ * @package phpBB3
+ */
+ class utf_normalizer
+ {
+ /**
+ * Validate, cleanup and normalize a string
+ *
+ * The ultimate convenience function! Clean up invalid UTF-8 sequences,
+ * and convert to Normal Form C, canonical composition.
+ *
+ * @param string $str The dirty string
+ * @return string The same string, all shiny and cleaned-up
+ */
+ function cleanup($str)
+ {
+ // The string below is the list of all autorized characters, sorted by frequency in latin text
+ $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings with no special chars return immediately
+ return $str;
+ }
+
+ // Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed they are always loaded together
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ // Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
+ // We replace those characters with a 0xFF byte, which is illegal in UTF-8 and will in turn be replaced with a UTF replacement char
+ return utf_normalizer::recompose(
+ strtr(
+ $str,
+ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ ),
+ $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']
);
}
/**
- * Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
+ * Validate and normalize a UTF string to NFC
*
- * We replace those characters with a 0xFF byte, which is illegal in
- * UTF-8 and will in turn be replaced with a Unicode replacement char
+ * @param string $str Unchecked UTF string
+ * @return string The string, validated and in normal form
*/
- $str = strtr(
- $str,
- "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
- "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
- );
-
- /**
- * As per the original implementation, "the UnicodeString constructor fails
- * if the string ends with a head byte". Therefore, if the string ends with
- * a leading byte we replace it with 0xFF, which is illegal too and will be
- * replaced with a Unicode replacement character
- */
- if (substr($str, -1) >= "\xC0")
+ function nfc($str)
{
- $str[strlen($str) - 1] = "\xFF";
- }
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
- return utf8_normalize($str, UNORM_NFC);
- }
-
- function nfc($str)
- {
- return utf8_normalize($str, UNORM_NFC);
- }
-
- function nfkc($str)
- {
- return utf8_normalize($str, UNORM_NFKC);
- }
-
- function nfd($str)
- {
- return utf8_normalize($str, UNORM_NFD);
- }
-
- function nfkd($str)
- {
- return utf8_normalize($str, UNORM_NFKD);
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// End of the ICU wrapper //
-////////////////////////////////////////////////////////////////////////////////
-
-
-}
-else
-{
-
-
-////////////////////////////////////////////////////////////////////////////////
-// This block will NOT be loaded if the utfnormal extension is //
-////////////////////////////////////////////////////////////////////////////////
-
-/**
-* Unset global variables
-*/
-unset($GLOBALS['utf_jamo_index'], $GLOBALS['utf_jamo_type'], $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_combining_class'], $GLOBALS['utf_canonical_comp'], $GLOBALS['utf_canonical_decomp'], $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
-
-/**
-* NFC_QC and NFKC_QC values
-*/
-define('UNICODE_QC_MAYBE', 0);
-define('UNICODE_QC_NO', 1);
-
-/**
-* Contains all the ASCII characters appearing in UTF-8, sorted by frequency
-*/
-define('UTF8_ASCII_RANGE', "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F");
-
-/**
-* Contains all the tail bytes that can appear in the composition of a UTF-8 char
-*/
-define('UTF8_TRAILING_BYTES', "\xA9\xA0\xA8\x80\xAA\x99\xA7\xBB\xAB\x89\x94\x82\xB4\xA2\xAE\x83\xB0\xB9\xB8\x93\xAF\xBC\xB3\x81\xA4\xB2\x9C\xA1\xB5\xBE\xBD\xBA\x98\xAD\xB1\x84\x95\xA6\xB6\x88\x8D\x90\xB7\xBF\x92\x85\xA5\x97\x8C\x86\xA3\x8E\x9F\x8F\x87\x91\x9D\xAC\x9E\x8B\x96\x9B\x8A\x9A");
-
-/**
-* Constants used by the Hangul [de]composition algorithms
-*/
-define('UNICODE_HANGUL_SBASE', 0xAC00);
-define('UNICODE_HANGUL_LBASE', 0x1100);
-define('UNICODE_HANGUL_VBASE', 0x1161);
-define('UNICODE_HANGUL_TBASE', 0x11A7);
-define('UNICODE_HANGUL_SCOUNT', 11172);
-define('UNICODE_HANGUL_LCOUNT', 19);
-define('UNICODE_HANGUL_VCOUNT', 21);
-define('UNICODE_HANGUL_TCOUNT', 28);
-define('UNICODE_HANGUL_NCOUNT', 588);
-define('UNICODE_JAMO_L', 0);
-define('UNICODE_JAMO_V', 1);
-define('UNICODE_JAMO_T', 2);
-
-/**
-* Unicode normalization routines
-*
-* @package phpBB3
-*/
-class utf_normalizer
-{
- /**
- * Validate, cleanup and normalize a string
- *
- * The ultimate convenience function! Clean up invalid UTF-8 sequences,
- * and convert to Normal Form C, canonical composition.
- *
- * @param string $str The dirty string
- * @return string The same string, all shiny and cleaned-up
- */
- function cleanup($str)
- {
- /**
- * The string below is the list of all autorized characters, sorted by
- * frequency in latin text
- */
- $pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
- $len = strlen($str);
-
- if ($pos == $len)
- {
- /**
- * ASCII strings with no special chars return immediately
- */
- return $str;
- }
-
- /**
- * Note: we do not check for $GLOBALS['utf_canonical_decomp']. It is assumed
- * they are always loaded together
- */
- if (!isset($GLOBALS['utf_nfc_qc']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
- }
-
- /**
- * Replace any byte in the range 0x00..0x1F, except for \r, \n and \t
- *
- * We replace those characters with a 0xFF byte, which is illegal in
- * UTF-8 and will in turn be replaced with a UTF replacement char
- */
- return utf_normalizer::recompose(
- strtr(
- $str,
- "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F",
- "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
- ),
- $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']
- );
- }
-
- /**
- * Validate and normalize a UTF string to NFC
- *
- * @param string $str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfc($str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- /**
- * ASCII strings return immediately
- */
- return $str;
- }
-
- if (!isset($GLOBALS['utf_nfc_qc']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
- }
-
- return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
- }
-
- /**
- * Validate and normalize a UTF string to NFKC
- *
- * @param string $str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfkc($str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- /**
- * ASCII strings return immediately
- */
- return $str;
- }
-
- if (!isset($GLOBALS['utf_nfkc_qc']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
- }
- if (!isset($GLOBALS['utf_canonical_comp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
- }
-
- return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
- }
-
- /**
- * Validate and normalize a UTF string to NFD
- *
- * @param string $str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfd($str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- /**
- * ASCII strings return immediately
- */
- return $str;
- }
-
- if (!isset($GLOBALS['utf_canonical_decomp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
- }
-
- return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
- }
-
- /**
- * Validate and normalize a UTF string to NFKD
- *
- * @param string $str Unchecked UTF string
- * @return string The string, validated and in normal form
- */
- function nfkd($str)
- {
- $pos = strspn($str, UTF8_ASCII_RANGE);
- $len = strlen($str);
-
- if ($pos == $len)
- {
- /**
- * ASCII strings return immediately
- */
- return $str;
- }
-
- if (!isset($GLOBALS['utf_compatibility_decomp']))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
- }
-
- return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
- }
-
-
- ////////////////////////////////////////////////////////////////////////////
- // Internal functions //
- ////////////////////////////////////////////////////////////////////////////
-
- /**
- * Recompose a UTF string
- *
- * @param string $str Unchecked UTF string
- * @param integer $pos Position of the first UTF char (in bytes)
- * @param integer $len Length of the string (in bytes)
- * @param array $qc Quick-check array, passed by reference but never modified
- * @param array $decomp_map Decomposition mapping, passed by reference but never modified
- * @return string The string, validated and recomposed
- *
- * @access private
- */
- function recompose($str, $pos, $len, &$qc, &$decomp_map)
- {
- global $utf_combining_class, $utf_canonical_comp, $utf_jamo_type, $utf_jamo_index;
-
- /**
- * Load some commonly-used tables
- */
- if (!isset($utf_jamo_index, $utf_jamo_type, $utf_combining_class))
- {
- global $phpbb_root_path;
- include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php');
- }
-
- /**
- * Buffer the last ASCII char before the UTF-8 stuff if applicable
- */
- $tmp = '';
- $i = $tmp_pos = $last_cc = 0;
-
- if ($pos)
- {
- $buffer = array(++$i => $str[$pos - 1]);
- }
- else
- {
- $buffer = array();
- }
-
- /**
- * UTF char length array
- *
- * This array is used to determine the length of a UTF character. Be $c the
- * result of ($str[$pos] & "\xF0") --where $str is the string we're operating
- * on and $pos the position of the cursor--, if $utf_len_mask[$c] does not
- * exist, the byte is an ASCII char. Otherwise, if $utf_len_mask[$c] is greater
- * than 0, we have a the leading byte of a multibyte character whose length is
- * $utf_len_mask[$c] and if it is equal to 0, the byte is a trailing byte.
- */
- $utf_len_mask = array(
- /**
- * Leading bytes masks
- */
- "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
-
- /**
- * Trailing bytes masks
- */
- "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
- );
-
- $extra_check = array(
- "\xED"=>1, "\xEF"=>1, "\xC0"=>1, "\xC1"=>1, "\xE0"=>1, "\xF0"=>1,
- "\xF4"=>1, "\xF5"=>1, "\xF6"=>1, "\xF7"=>1, "\xF8"=>1, "\xF9"=>1,
- "\xFA"=>1, "\xFB"=>1, "\xFC"=>1, "\xFD"=>1, "\xFE"=>1, "\xFF"=>1
- );
-
- $utf_validation_mask = array(
- 2 => "\xE0\xC0",
- 3 => "\xF0\xC0\xC0",
- 4 => "\xF8\xC0\xC0\xC0"
- );
-
- $utf_validation_check = array(
- 2 => "\xC0\x80",
- 3 => "\xE0\x80\x80",
- 4 => "\xF0\x80\x80\x80"
- );
-
- ////////////////////////////////////////////////////////////////////////
- // Main loop //
- ////////////////////////////////////////////////////////////////////////
-
- do
- {
- ////////////////////////////////////////////////////////////////////
- // STEP 0: Capture the current char and buffer it //
- ////////////////////////////////////////////////////////////////////
-
- $c = $str[$pos];
- $c_mask = $c & "\xF0";
-
- if (isset($utf_len_mask[$c_mask]))
+ if ($pos == $len)
{
- /**
- * Byte at $pos is either a leading byte or a missplaced trailing byte
- */
- if ($utf_len = $utf_len_mask[$c_mask])
- {
- /**
- * Capture the char
- */
- $buffer[++$i & 7] = $utf_char = substr($str, $pos, $utf_len);
+ // ASCII strings return immediately
+ return $str;
+ }
- /**
- * Let's find out if a thorough check is needed
- */
- if (isset($qc[$utf_char]))
+ if (!isset($GLOBALS['utf_nfc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
+ }
+
+ return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfc_qc'], $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFKC
+ *
+ * @param string $str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfkc($str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return $str;
+ }
+
+ if (!isset($GLOBALS['utf_nfkc_qc']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_nfkc_qc.' . $phpEx);
+ }
+
+ if (!isset($GLOBALS['utf_canonical_comp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
+ }
+
+ return utf_normalizer::recompose($str, $pos, $len, $GLOBALS['utf_nfkc_qc'], $GLOBALS['utf_compatibility_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFD
+ *
+ * @param string $str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfd($str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return $str;
+ }
+
+ if (!isset($GLOBALS['utf_canonical_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
+ }
+
+ return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_canonical_decomp']);
+ }
+
+ /**
+ * Validate and normalize a UTF string to NFKD
+ *
+ * @param string $str Unchecked UTF string
+ * @return string The string, validated and in normal form
+ */
+ function nfkd($str)
+ {
+ $pos = strspn($str, UTF8_ASCII_RANGE);
+ $len = strlen($str);
+
+ if ($pos == $len)
+ {
+ // ASCII strings return immediately
+ return $str;
+ }
+
+ if (!isset($GLOBALS['utf_compatibility_decomp']))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/data/utf_compatibility_decomp.' . $phpEx);
+ }
+
+ return utf_normalizer::decompose($str, $pos, $len, $GLOBALS['utf_compatibility_decomp']);
+ }
+
+
+ /**
+ * Recompose a UTF string
+ *
+ * @param string $str Unchecked UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array $qc Quick-check array, passed by reference but never modified
+ * @param array $decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, validated and recomposed
+ *
+ * @access private
+ */
+ function recompose($str, $pos, $len, &$qc, &$decomp_map)
+ {
+ global $utf_combining_class, $utf_canonical_comp, $utf_jamo_type, $utf_jamo_index;
+
+ // Load some commonly-used tables
+ if (!isset($utf_jamo_index, $utf_jamo_type, $utf_combining_class))
+ {
+ global $phpbb_root_path;
+ include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php');
+ }
+
+ // Buffer the last ASCII char before the UTF-8 stuff if applicable
+ $tmp = '';
+ $i = $tmp_pos = $last_cc = 0;
+
+ if ($pos)
+ {
+ $buffer = array(++$i => $str[$pos - 1]);
+ }
+ else
+ {
+ $buffer = array();
+ }
+
+ // UTF char length array
+ // This array is used to determine the length of a UTF character.
+ // Be $c the result of ($str[$pos] & "\xF0") --where $str is the string we're operating on and $pos
+ // the position of the cursor--, if $utf_len_mask[$c] does not exist, the byte is an ASCII char.
+ // Otherwise, if $utf_len_mask[$c] is greater than 0, we have a the leading byte of a multibyte character
+ // whose length is $utf_len_mask[$c] and if it is equal to 0, the byte is a trailing byte.
+ $utf_len_mask = array(
+ // Leading bytes masks
+ "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
+ // Trailing bytes masks
+ "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
+ );
+
+ $extra_check = array(
+ "\xED" => 1, "\xEF" => 1, "\xC0" => 1, "\xC1" => 1, "\xE0" => 1, "\xF0" => 1,
+ "\xF4" => 1, "\xF5" => 1, "\xF6" => 1, "\xF7" => 1, "\xF8" => 1, "\xF9" => 1,
+ "\xFA" => 1, "\xFB" => 1, "\xFC" => 1, "\xFD" => 1, "\xFE" => 1, "\xFF" => 1
+ );
+
+ $utf_validation_mask = array(
+ 2 => "\xE0\xC0",
+ 3 => "\xF0\xC0\xC0",
+ 4 => "\xF8\xC0\xC0\xC0"
+ );
+
+ $utf_validation_check = array(
+ 2 => "\xC0\x80",
+ 3 => "\xE0\x80\x80",
+ 4 => "\xF0\x80\x80\x80"
+ );
+
+ // Main loop
+ do
+ {
+ // STEP 0: Capture the current char and buffer it
+ $c = $str[$pos];
+ $c_mask = $c & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ // Byte at $pos is either a leading byte or a missplaced trailing byte
+ if ($utf_len = $utf_len_mask[$c_mask])
{
- /**
- * If the UTF char is in the qc array then it may not be in normal
- * form. We do nothing here, the actual processing is below this
- * "if" block
- */
- }
- elseif (isset($utf_combining_class[$utf_char]))
- {
- if ($utf_combining_class[$utf_char] < $last_cc)
+ // Capture the char
+ $buffer[++$i & 7] = $utf_char = substr($str, $pos, $utf_len);
+
+ // Let's find out if a thorough check is needed
+ if (isset($qc[$utf_char]))
{
- /**
- * A combining character that is NOT canonically ordered
- */
+ // If the UTF char is in the qc array then it may not be in normal form. We do nothing here, the actual processing is below this "if" block
+ }
+ else if (isset($utf_combining_class[$utf_char]))
+ {
+ if ($utf_combining_class[$utf_char] < $last_cc)
+ {
+ // A combining character that is NOT canonically ordered
+ }
+ else
+ {
+ // A combining character that IS canonically ordered, skip to the next char
+ $last_cc = $utf_combining_class[$utf_char];
+
+ $pos += $utf_len;
+ continue;
+ }
}
else
{
- /**
- * A combining character that IS canonically ordered, skip
- * to the next char
- */
- $last_cc = $utf_combining_class[$utf_char];
+ // At this point, $utf_char holds a UTF char that we know is not a NF[K]C_QC and is not a combining character.
+ // It can be a singleton, a canonical composite, a replacement char or an even an ill-formed bunch of bytes. Let's find out
+ $last_cc = 0;
+ // Check that we have the correct number of trailing bytes
+ if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
+ {
+ // Current char isn't well-formed or legal: either one or several trailing bytes are missing, or the Unicode char
+ // has been encoded in a five- or six- byte sequence
+ if ($utf_char[0] >= "\xF8")
+ {
+ if ($utf_char[0] < "\xF8")
+ {
+ $trailing_bytes = 3;
+ }
+ else if ($utf_char[0] < "\xFC")
+ {
+ $trailing_bytes = 4;
+ }
+
+ if ($utf_char[0] > "\xFD")
+ {
+ $trailing_bytes = 0;
+ }
+ else
+ {
+ $trailing_bytes = 5;
+ }
+ }
+ else
+ {
+ $trailing_bytes = $utf_len - 1;
+ }
+
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp_pos = $pos;
+
+ continue;
+ }
+
+ if (isset($extra_check[$c]))
+ {
+ switch ($c)
+ {
+ // Note: 0xED is quite common in Korean
+ case "\xED":
+ if ($utf_char >= "\xED\xA0\x80")
+ {
+ // Surrogates (U+D800..U+DFFF) are not allowed in UTF-8 (UTF sequence 0xEDA080..0xEDBFBF)
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ // Note: 0xEF is quite common in Japanese
+ case "\xEF":
+ if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
+ {
+ // U+FFFE and U+FFFF are explicitly disallowed (UTF sequence 0xEFBFBE..0xEFBFBF)
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xC0":
+ case "\xC1":
+ if ($utf_char <= "\xC1\xBF")
+ {
+ // Overlong sequence: Unicode char U+0000..U+007F encoded as a double-byte UTF char
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xE0":
+ if ($utf_char <= "\xE0\x9F\xBF")
+ {
+ // Unicode char U+0000..U+07FF encoded in 3 bytes
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xF0":
+ if ($utf_char <= "\xF0\x8F\xBF\xBF")
+ {
+ // Unicode char U+0000..U+FFFF encoded in 4 bytes
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += $utf_len;
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ default:
+ // Five- and six- byte sequences do not need being checked for here anymore
+ if ($utf_char > UTF8_MAX)
+ {
+ // Out of the Unicode range
+ if ($utf_char[0] < "\xF8")
+ {
+ $trailing_bytes = 3;
+ }
+ else if ($utf_char[0] < "\xFC")
+ {
+ $trailing_bytes = 4;
+ }
+ else if ($utf_char[0] > "\xFD")
+ {
+ $trailing_bytes = 0;
+ }
+ else
+ {
+ $trailing_bytes = 5;
+ }
+
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
+ $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
+ $tmp_pos = $pos;
+ continue 2;
+ }
+ break;
+ }
+ }
+
+ // The char is a valid starter, move the cursor and go on
$pos += $utf_len;
continue;
}
}
else
{
- /**
- * At this point, $utf_char holds a UTF char that we know
- * is not a NF[K]C_QC and is not a combining character. It can
- * be a singleton, a canonical composite, a replacement char or
- * an even an ill-formed bunch of bytes. Let's find out
- */
- $last_cc = 0;
+ // A trailing byte came out of nowhere, we will advance the cursor and treat the this byte and all following trailing bytes as if
+ // each of them was a Unicode replacement char
+ $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
- /**
- * Check that we have the correct number of trailing bytes
- */
- if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
- {
- /**
- * Current char isn't well-formed or legal: either one or
- * several trailing bytes are missing, or the Unicode char
- * has been encoded in a five- or six- byte sequence
- */
- if ($utf_char[0] >= "\xF8")
- {
- if ($utf_char[0] < "\xF8")
- {
- $trailing_bytes = 3;
- }
- elseif ($utf_char[0] < "\xFC")
- {
- $trailing_bytes = 4;
- }
- if ($utf_char[0] > "\xFD")
- {
- $trailing_bytes = 0;
- }
- else
- {
- $trailing_bytes = 5;
- }
- }
- else
- {
- $trailing_bytes = $utf_len - 1;
- }
-
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
- $tmp_pos = $pos;
-
- continue;
- }
-
- if (isset($extra_check[$c]))
- {
- switch($c)
- {
- /**
- * Note: 0xED is quite common in Korean
- */
- case "\xED":
- if ($utf_char >= "\xED\xA0\x80")
- {
- /**
- * Surrogates (U+D800..U+DFFF) are not allowed in UTF-8
- * (UTF sequence 0xEDA080..0xEDBFBF)
- */
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += $utf_len;
- $tmp_pos = $pos;
- continue 2;
- }
- break;
-
- /**
- * Note: 0xEF is quite common in Japanese
- */
- case "\xEF":
- if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
- {
- /**
- * U+FFFE and U+FFFF are explicitly disallowed
- * (UTF sequence 0xEFBFBE..0xEFBFBF)
- */
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += $utf_len;
- $tmp_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xC0":
- case "\xC1":
- if ($utf_char <= "\xC1\xBF")
- {
- /**
- * Overlong sequence: Unicode char U+0000..U+007F encoded as a
- * double-byte UTF char
- */
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += $utf_len;
- $tmp_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xE0":
- if ($utf_char <= "\xE0\x9F\xBF")
- {
- /**
- * Unicode char U+0000..U+07FF encoded in 3 bytes
- */
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += $utf_len;
- $tmp_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xF0":
- if ($utf_char <= "\xF0\x8F\xBF\xBF")
- {
- /**
- * Unicode char U+0000..U+FFFF encoded in 4 bytes
- */
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += $utf_len;
- $tmp_pos = $pos;
- continue 2;
- }
- break;
-
- default:
- /**
- * Five- and six- byte sequences do not need being checked for here anymore
- */
- if ($utf_char > UTF8_MAX)
- {
- /**
- * Out of the Unicode range
- */
- if ($utf_char[0] < "\xF8")
- {
- $trailing_bytes = 3;
- }
- elseif ($utf_char[0] < "\xFC")
- {
- $trailing_bytes = 4;
- }
- elseif ($utf_char[0] > "\xFD")
- {
- $trailing_bytes = 0;
- }
- else
- {
- $trailing_bytes = 5;
- }
-
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . UTF8_REPLACEMENT;
- $pos += strspn($str, UTF8_TRAILING_BYTES, ++$pos, $trailing_bytes);
- $tmp_pos = $pos;
- continue 2;
- }
- }
- }
-
- /**
- * The char is a valid starter, move the cursor and go on
- */
- $pos += $utf_len;
+ $pos += $spn;
+ $tmp_pos = $pos;
continue;
}
- }
- else
- {
- /**
- * A trailing byte came out of nowhere, we will advance the cursor
- * and treat the this byte and all following trailing bytes as if
- * each of them was a Unicode replacement char
- */
- $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
-
- $pos += $spn;
- $tmp_pos = $pos;
- continue;
- }
- ////////////////////////////////////////////////////////////////////
- // STEP 1: Decompose current char //
- ////////////////////////////////////////////////////////////////////
+ // STEP 1: Decompose current char
- /**
- * We have found a character that is either:
- * - in the NFC_QC/NFKC_QC list
- * - a non-starter char that is not canonically ordered
- *
- * We are going to capture the shortest UTF sequence that satisfies
- * these two conditions:
- *
- * 1 - If the sequence does not start at the begginning of the string,
- * it must begin with a starter, and that starter must not have the
- * NF[K]C_QC property equal to "MAYBE"
- *
- * 2 - If the sequence does not end at the end of the string, it must end
- * with a non-starter and be immediately followed by a starter that
- * is not on the QC list
- */
- $utf_seq = array();
- $last_cc = 0;
- $lpos = $pos;
- $pos += $utf_len;
+ // We have found a character that is either:
+ // - in the NFC_QC/NFKC_QC list
+ // - a non-starter char that is not canonically ordered
+ //
+ // We are going to capture the shortest UTF sequence that satisfies these two conditions:
+ //
+ // 1 - If the sequence does not start at the begginning of the string, it must begin with a starter,
+ // and that starter must not have the NF[K]C_QC property equal to "MAYBE"
+ //
+ // 2 - If the sequence does not end at the end of the string, it must end with a non-starter and be
+ // immediately followed by a starter that is not on the QC list
+ //
+ $utf_seq = array();
+ $last_cc = 0;
+ $lpos = $pos;
+ $pos += $utf_len;
- if (isset($decomp_map[$utf_char]))
- {
- $_pos = 0;
- $_len = strlen($decomp_map[$utf_char]);
- do
+ if (isset($decomp_map[$utf_char]))
{
- $_utf_len =& $utf_len_mask[$decomp_map[$utf_char][$_pos] & "\xF0"];
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
- if (isset($_utf_len))
- {
- $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
- $_pos += $_utf_len;
- }
- else
- {
- $utf_seq[] = $decomp_map[$utf_char][$_pos];
- ++$_pos;
- }
- }
- while($_pos < $_len);
- }
- else
- {
- /**
- * The char is not decomposable
- */
- $utf_seq = array($utf_char);
- }
-
-
- ////////////////////////////////////////////////////////////////
- // STEP 2: Capture the starter //
- ////////////////////////////////////////////////////////////////
-
- /**
- * Check out the combining class of the first character of the UTF sequence
- */
- $k = 0;
- if (isset($utf_combining_class[$utf_seq[0]]) || $qc[$utf_char] == UNICODE_QC_MAYBE)
- {
- /**
- * Not a starter, inspect previous characters
- *
- * The last 8 characters are kept in a buffer so that we don't have
- * to capture them everytime. This is enough for all real-life strings
- * but even if it wasn't, we can capture characters in backward mode,
- * although it is slower than this method.
- *
- * In the following loop, $j starts at the previous buffered character
- * ($i - 1, because current character is at offset $i) and process them
- * in backward mode until we find a starter.
- *
- * $k is the index on each UTF character inside of our UTF sequence.
- * At this time, $utf_seq contains one or more characters numbered 0 to
- * n. $k starts at 0 and for each char we prepend we pre-decrement it
- * and for numbering
- */
- $starter_found = 0;
- $j_min = max(1, $i - 7);
- for($j = $i - 1; $j >= $j_min && $lpos > $tmp_pos; --$j)
- {
- $utf_char = $buffer[$j & 7];
- $lpos -= strlen($utf_char);
-
- if (isset($decomp_map[$utf_char]))
- {
- /**
- * The char is a composite, decompose for storage
- */
- $decomp_seq = array();
- $_pos = 0;
- $_len = strlen($decomp_map[$utf_char]);
- do
- {
- $c = $decomp_map[$utf_char][$_pos];
- $_utf_len =& $utf_len_mask[$c & "\xF0"];
-
- if (isset($_utf_len))
- {
- $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
- $_pos += $_utf_len;
- }
- else
- {
- $decomp_seq[] = $c;
- ++$_pos;
- }
- }
- while($_pos < $_len);
-
- /**
- * Prepend the UTF sequence with our decomposed sequence
- */
- if (isset($decomp_seq[1]))
- {
- /**
- * The char expanded into several chars
- */
- $decomp_cnt = count($decomp_seq);
- foreach($decomp_seq as $decomp_i => $decomp_char)
- {
- $utf_seq[$k + $decomp_i - $decomp_cnt] = $decomp_char;
- }
- $k -= $decomp_cnt;
- }
- else
- {
- /**
- * Decomposed to a single char, easier to prepend
- */
- $utf_seq[--$k] = $decomp_seq[0];
- }
- }
- else
- {
- $utf_seq[--$k] = $utf_char;
- }
-
- if (!isset($utf_combining_class[$utf_seq[$k]]))
- {
- /**
- * We have found our starter
- */
- $starter_found = 1;
- break;
- }
- }
-
- if (!$starter_found && $lpos > $tmp_pos)
- {
- /**
- * The starter was not found in the buffer, let's rewind some more
- */
do
{
- /**
- * $utf_len_mask contains the masks of both leading bytes and
- * trailing bytes. If $utf_en > 0 then it's a leading byte,
- * otherwise it's a trailing byte.
- */
- $c = $str[--$lpos];
- $c_mask = $c & "\xF0";
+ $_utf_len =& $utf_len_mask[$decomp_map[$utf_char][$_pos] & "\xF0"];
- if (isset($utf_len_mask[$c_mask]))
+ if (isset($_utf_len))
{
- /**
- * UTF byte
- */
- if ($utf_len = $utf_len_mask[$c_mask])
- {
- /**
- * UTF *leading* byte
- */
- $utf_char = substr($str, $lpos, $utf_len);
-
- if (isset($decomp_map[$utf_char]))
- {
- /**
- * Decompose the character
- */
- $decomp_seq = array();
- $_pos = 0;
- $_len = strlen($decomp_map[$utf_char]);
- do
- {
- $c = $decomp_map[$utf_char][$_pos];
- $_utf_len =& $utf_len_mask[$c & "\xF0"];
-
- if (isset($_utf_len))
- {
- $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
- $_pos += $_utf_len;
- }
- else
- {
- $decomp_seq[] = $c;
- ++$_pos;
- }
- }
- while($_pos < $_len);
-
- /**
- * Prepend the UTF sequence with our decomposed sequence
- */
- if (isset($decomp_seq[1]))
- {
- /**
- * The char expanded into several chars
- */
- $decomp_cnt = count($decomp_seq);
- foreach($decomp_seq as $decomp_i => $utf_char)
- {
- $utf_seq[$k + $decomp_i - $decomp_cnt] = $utf_char;
- }
- $k -= $decomp_cnt;
- }
- else
- {
- /**
- * Decomposed to a single char, easier to prepend
- */
- $utf_seq[--$k] = $decomp_seq[0];
- }
- }
- else
- {
- $utf_seq[--$k] = $utf_char;
- }
- }
+ $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
}
else
{
- /**
- * ASCII char
- */
- $utf_seq[--$k] = $c;
+ $utf_seq[] = $decomp_map[$utf_char][$_pos];
+ ++$_pos;
}
}
- while($lpos > $tmp_pos);
+ while ($_pos < $_len);
}
- }
-
-
- ////////////////////////////////////////////////////////////////
- // STEP 3: Capture following combining modifiers //
- ////////////////////////////////////////////////////////////////
-
- while($pos < $len)
- {
- $c_mask = $str[$pos] & "\xF0";
-
- if (isset($utf_len_mask[$c_mask]))
+ else
{
- if ($utf_len = $utf_len_mask[$c_mask])
- {
- $utf_char = substr($str, $pos, $utf_len);
- }
- else
- {
- /**
- * A trailing byte came out of nowhere
- *
- * Trailing bytes are replaced with Unicode replacement chars,
- * we will just ignore it for now, break out of the loop
- * as if it was a starter (replacement chars ARE starters)
- * and let the next loop replace it
- */
- break;
- }
+ // The char is not decomposable
+ $utf_seq = array($utf_char);
+ }
- if (isset($utf_combining_class[$utf_char]) || isset($qc[$utf_char]))
+
+ // STEP 2: Capture the starter
+
+ // Check out the combining class of the first character of the UTF sequence
+ $k = 0;
+ if (isset($utf_combining_class[$utf_seq[0]]) || $qc[$utf_char] == UNICODE_QC_MAYBE)
+ {
+ // Not a starter, inspect previous characters
+ // The last 8 characters are kept in a buffer so that we don't have to capture them everytime.
+ // This is enough for all real-life strings but even if it wasn't, we can capture characters in backward mode,
+ // although it is slower than this method.
+ //
+ // In the following loop, $j starts at the previous buffered character ($i - 1, because current character is
+ // at offset $i) and process them in backward mode until we find a starter.
+ //
+ // $k is the index on each UTF character inside of our UTF sequence. At this time, $utf_seq contains one or more
+ // characters numbered 0 to n. $k starts at 0 and for each char we prepend we pre-decrement it and for numbering
+ $starter_found = 0;
+ $j_min = max(1, $i - 7);
+
+ for ($j = $i - 1; $j >= $j_min && $lpos > $tmp_pos; --$j)
{
- /**
- * Combining character, add it to the sequence and move the cursor
- */
+ $utf_char = $buffer[$j & 7];
+ $lpos -= strlen($utf_char);
+
if (isset($decomp_map[$utf_char]))
{
- /**
- * Decompose the character
- */
+ // The char is a composite, decompose for storage
+ $decomp_seq = array();
$_pos = 0;
$_len = strlen($decomp_map[$utf_char]);
+
do
{
$c = $decomp_map[$utf_char][$_pos];
@@ -980,491 +643,569 @@ class utf_normalizer
if (isset($_utf_len))
{
- $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
$_pos += $_utf_len;
}
else
{
- $utf_seq[] = $c;
+ $decomp_seq[] = $c;
++$_pos;
}
}
- while($_pos < $_len);
- }
- else
- {
- $utf_seq[] = $utf_char;
- }
+ while ($_pos < $_len);
- $pos += $utf_len;
- }
- else
- {
- /**
- * Combining class 0 and no QC, break out of the loop
- *
- * Note: we do not know if that character is valid. If
- * it's not, the next iteration will replace it
- */
- break;
- }
- }
- else
- {
- /**
- * ASCII chars are starters
- */
- break;
- }
- }
-
-
- ////////////////////////////////////////////////////////////////
- // STEP 4: Sort and combine //
- ////////////////////////////////////////////////////////////////
-
- /**
- * Here we sort...
- */
- $k_max = $k + count($utf_seq);
- if (!$k && $k_max == 1)
- {
- /**
- * There is only one char in the UTF sequence, add it then
- * jump to the next iteration of main loop
- *
- * Note: the two commented lines below can be enabled under PHP5
- * for a very small performance gain in most cases
- */
-// if (substr_compare($str, $utf_seq[0], $lpos, $pos - $lpos))
-// {
- $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $utf_seq[0];
- $tmp_pos = $pos;
-// }
-
- continue;
- }
-
- /**
- * ...there we combine
- */
- if (isset($utf_combining_class[$utf_seq[$k]]))
- {
- $starter = $nf_seq = '';
- }
- else
- {
- $starter = $utf_seq[$k++];
- $nf_seq = '';
- }
- $utf_sort = array();
-
- /**
- * We add an empty char at the end of the UTF char sequence.
- * It will act as a starter and trigger the sort/combine routine
- * at the end of the string without altering it
- */
- $utf_seq[] = '';
-
- do
- {
- $utf_char = $utf_seq[$k++];
-
- if (isset($utf_combining_class[$utf_char]))
- {
- $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
- }
- else
- {
- if (empty($utf_sort))
- {
- /**
- * No combining characters... check for a composite
- * of the two starters
- */
- if (isset($utf_canonical_comp[$starter . $utf_char]))
- {
- /**
- * Good ol' composite character
- */
- $starter = $utf_canonical_comp[$starter . $utf_char];
- }
- elseif (isset($utf_jamo_type[$utf_char]))
- {
- /**
- * Current char is a composable jamo
- */
- if (isset($utf_jamo_type[$starter])
- && $utf_jamo_type[$starter] == UNICODE_JAMO_L
- && $utf_jamo_type[$utf_char] == UNICODE_JAMO_V)
+ // Prepend the UTF sequence with our decomposed sequence
+ if (isset($decomp_seq[1]))
{
- /**
- * We have a L jamo followed by a V jamo, we are going
- * to prefetch the next char to see if it's a T jamo
- */
- if (isset($utf_jamo_type[$utf_seq[$k]]) && $utf_jamo_type[$utf_seq[$k]] == UNICODE_JAMO_T)
- {
- /**
- * L+V+T jamos, combine to a LVT Hangul syllable
- * ($k is incremented)
- */
- $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char] + $utf_jamo_index[$utf_seq[$k]];
+ // The char expanded into several chars
+ $decomp_cnt = sizeof($decomp_seq);
- ++$k;
- }
- else
+ foreach ($decomp_seq as $decomp_i => $decomp_char)
{
- /**
- * L+V jamos, combine to a LV Hangul syllable
- */
- $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char];
+ $utf_seq[$k + $decomp_i - $decomp_cnt] = $decomp_char;
}
-
- $starter = chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ $k -= $decomp_cnt;
}
else
{
- /**
- * Non-composable jamo, just add it to the sequence
- */
+ // Decomposed to a single char, easier to prepend
+ $utf_seq[--$k] = $decomp_seq[0];
+ }
+ }
+ else
+ {
+ $utf_seq[--$k] = $utf_char;
+ }
+
+ if (!isset($utf_combining_class[$utf_seq[$k]]))
+ {
+ // We have found our starter
+ $starter_found = 1;
+ break;
+ }
+ }
+
+ if (!$starter_found && $lpos > $tmp_pos)
+ {
+ // The starter was not found in the buffer, let's rewind some more
+ do
+ {
+ // $utf_len_mask contains the masks of both leading bytes and trailing bytes. If $utf_en > 0 then it's a leading byte, otherwise it's a trailing byte.
+ $c = $str[--$lpos];
+ $c_mask = $c & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ // UTF byte
+ if ($utf_len = $utf_len_mask[$c_mask])
+ {
+ // UTF *leading* byte
+ $utf_char = substr($str, $lpos, $utf_len);
+
+ if (isset($decomp_map[$utf_char]))
+ {
+ // Decompose the character
+ $decomp_seq = array();
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $decomp_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $decomp_seq[] = $c;
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+
+ // Prepend the UTF sequence with our decomposed sequence
+ if (isset($decomp_seq[1]))
+ {
+ // The char expanded into several chars
+ $decomp_cnt = sizeof($decomp_seq);
+ foreach ($decomp_seq as $decomp_i => $utf_char)
+ {
+ $utf_seq[$k + $decomp_i - $decomp_cnt] = $utf_char;
+ }
+ $k -= $decomp_cnt;
+ }
+ else
+ {
+ // Decomposed to a single char, easier to prepend
+ $utf_seq[--$k] = $decomp_seq[0];
+ }
+ }
+ else
+ {
+ $utf_seq[--$k] = $utf_char;
+ }
+ }
+ }
+ else
+ {
+ // ASCII char
+ $utf_seq[--$k] = $c;
+ }
+ }
+ while ($lpos > $tmp_pos);
+ }
+ }
+
+
+ // STEP 3: Capture following combining modifiers
+
+ while ($pos < $len)
+ {
+ $c_mask = $str[$pos] & "\xF0";
+
+ if (isset($utf_len_mask[$c_mask]))
+ {
+ if ($utf_len = $utf_len_mask[$c_mask])
+ {
+ $utf_char = substr($str, $pos, $utf_len);
+ }
+ else
+ {
+ // A trailing byte came out of nowhere
+ // Trailing bytes are replaced with Unicode replacement chars, we will just ignore it for now, break out of the loop
+ // as if it was a starter (replacement chars ARE starters) and let the next loop replace it
+ break;
+ }
+
+ if (isset($utf_combining_class[$utf_char]) || isset($qc[$utf_char]))
+ {
+ // Combining character, add it to the sequence and move the cursor
+ if (isset($decomp_map[$utf_char]))
+ {
+ // Decompose the character
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
+
+ do
+ {
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
+
+ if (isset($_utf_len))
+ {
+ $utf_seq[] = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
+ }
+ else
+ {
+ $utf_seq[] = $c;
+ ++$_pos;
+ }
+ }
+ while ($_pos < $_len);
+ }
+ else
+ {
+ $utf_seq[] = $utf_char;
+ }
+
+ $pos += $utf_len;
+ }
+ else
+ {
+ // Combining class 0 and no QC, break out of the loop
+ // Note: we do not know if that character is valid. If it's not, the next iteration will replace it
+ break;
+ }
+ }
+ else
+ {
+ // ASCII chars are starters
+ break;
+ }
+ }
+
+
+ // STEP 4: Sort and combine
+
+ // Here we sort...
+ $k_max = $k + sizeof($utf_seq);
+
+ if (!$k && $k_max == 1)
+ {
+ // There is only one char in the UTF sequence, add it then jump to the next iteration of main loop
+ // Note: the two commented lines below can be enabled under PHP5 for a very small performance gain in most cases
+// if (substr_compare($str, $utf_seq[0], $lpos, $pos - $lpos))
+// {
+ $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $utf_seq[0];
+ $tmp_pos = $pos;
+// }
+
+ continue;
+ }
+
+ // ...there we combine
+ if (isset($utf_combining_class[$utf_seq[$k]]))
+ {
+ $starter = $nf_seq = '';
+ }
+ else
+ {
+ $starter = $utf_seq[$k++];
+ $nf_seq = '';
+ }
+ $utf_sort = array();
+
+ // We add an empty char at the end of the UTF char sequence. It will act as a starter and trigger the sort/combine routine
+ // at the end of the string without altering it
+ $utf_seq[] = '';
+
+ do
+ {
+ $utf_char = $utf_seq[$k++];
+
+ if (isset($utf_combining_class[$utf_char]))
+ {
+ $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
+ }
+ else
+ {
+ if (empty($utf_sort))
+ {
+ // No combining characters... check for a composite of the two starters
+ if (isset($utf_canonical_comp[$starter . $utf_char]))
+ {
+ // Good ol' composite character
+ $starter = $utf_canonical_comp[$starter . $utf_char];
+ }
+ else if (isset($utf_jamo_type[$utf_char]))
+ {
+ // Current char is a composable jamo
+ if (isset($utf_jamo_type[$starter]) && $utf_jamo_type[$starter] == UNICODE_JAMO_L && $utf_jamo_type[$utf_char] == UNICODE_JAMO_V)
+ {
+ // We have a L jamo followed by a V jamo, we are going to prefetch the next char to see if it's a T jamo
+ if (isset($utf_jamo_type[$utf_seq[$k]]) && $utf_jamo_type[$utf_seq[$k]] == UNICODE_JAMO_T)
+ {
+ // L+V+T jamos, combine to a LVT Hangul syllable ($k is incremented)
+ $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char] + $utf_jamo_index[$utf_seq[$k]];
+ ++$k;
+ }
+ else
+ {
+ // L+V jamos, combine to a LV Hangul syllable
+ $cp = $utf_jamo_index[$starter] + $utf_jamo_index[$utf_char];
+ }
+
+ $starter = chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ // Non-composable jamo, just add it to the sequence
+ $nf_seq .= $starter;
+ $starter = $utf_char;
+ }
+ }
+ else
+ {
+ // No composite, just add the first starter to the sequence then continue with the other one
$nf_seq .= $starter;
$starter = $utf_char;
}
}
else
{
- /**
- * No composite, just add the first starter to the sequence
- * then continue with the other one
- */
+ ksort($utf_sort);
+
+ // For each class of combining characters
+ foreach ($utf_sort as $cc => $utf_chars)
+ {
+ $j = 0;
+
+ do
+ {
+ // Look for a composite
+ if (isset($utf_canonical_comp[$starter . $utf_chars[$j]]))
+ {
+ // Found a composite, replace the starter
+ $starter = $utf_canonical_comp[$starter . $utf_chars[$j]];
+ unset($utf_sort[$cc][$j]);
+ }
+ else
+ {
+ // No composite, all following characters in that class are blocked
+ break;
+ }
+ }
+ while (isset($utf_sort[$cc][++$j]));
+ }
+
+ // Add the starter to the normalized sequence, followed by non-starters in canonical order
$nf_seq .= $starter;
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ if (!empty($utf_chars))
+ {
+ $nf_seq .= implode('', $utf_chars);
+ }
+ }
+
+ // Reset the array and go on
+ $utf_sort = array();
$starter = $utf_char;
}
}
- else
- {
- ksort($utf_sort);
-
- /**
- * For each class of combining characters
- */
- foreach($utf_sort as $cc => $utf_chars)
- {
- $j = 0;
-
- do
- {
- /**
- * Look for a composite
- */
- if (isset($utf_canonical_comp[$starter . $utf_chars[$j]]))
- {
- /**
- * Found a composite, replace the starter
- */
- $starter = $utf_canonical_comp[$starter . $utf_chars[$j]];
- unset($utf_sort[$cc][$j]);
- }
- else
- {
- /**
- * No composite, all following characters in that
- * class are blocked
- */
- break;
- }
- }
- while(isset($utf_sort[$cc][++$j]));
- }
-
- /**
- * Add the starter to the normalized sequence, followed by
- * non-starters in canonical order
- */
- $nf_seq .= $starter;
- foreach($utf_sort as $utf_chars)
- {
- if (!empty($utf_chars))
- {
- $nf_seq .= implode('', $utf_chars);
- }
- }
-
- /**
- * Reset the array and go on
- */
- $utf_sort = array();
- $starter = $utf_char;
- }
}
- }
- while($k <= $k_max);
+ while ($k <= $k_max);
- $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $nf_seq;
- $tmp_pos = $pos;
- }
- else
- {
- /**
- * Only a ASCII char can make the program get here
- *
- * First we skip the current byte with ++$pos, then we quickly
- * skip following ASCII chars with strspn().
- *
- * The first two "if"'s here can be removed, with the consequences
- * of being faster on latin text (lots of ASCII) and slower on
- * multi-byte text (where the only ASCII chars are spaces and punctuation)
- */
- if (++$pos != $len)
- {
- if ($str[$pos] < "\x80")
- {
- $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
- $buffer[++$i & 7] = $str[$pos - 1];
- }
- else
- {
- $buffer[++$i & 7] = $c;
- }
- }
- }
- }
- while($pos < $len);
-
- /**
- * Now is time to return the string
- */
- if ($tmp_pos)
- {
- /**
- * If the $tmp_pos cursor is not at the beggining of the string then at least
- * one character was not in normal form. Replace $str with the fixed version
- */
- if ($tmp_pos == $len)
- {
- /**
- * The $tmp_pos cursor is at the end of $str, therefore $tmp holds the
- * whole $str
- */
- return $tmp;
- }
- else
- {
- /**
- * The rightmost chunk of $str has not been appended to $tmp yet
- */
- return $tmp . substr($str, $tmp_pos);
- }
- }
-
- /**
- * The string was already in normal form
- */
- return $str;
- }
-
- /**
- * Decompose a UTF string
- *
- * @param string $str UTF string
- * @param integer $pos Position of the first UTF char (in bytes)
- * @param integer $len Length of the string (in bytes)
- * @param array $decomp_map Decomposition mapping, passed by reference but never modified
- * @return string The string, decomposed and sorted canonically
- *
- * @access private
- */
- function decompose($str, $pos, $len, &$decomp_map)
- {
- global $utf_combining_class, $utf_canonical_decomp, $phpbb_root_path;
-
- /**
- * Load some commonly-used tables
- */
- if (!isset($utf_combining_class))
- {
- include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php');
- }
-
- /**
- * UTF char length array
- */
- $utf_len_mask = array(
- /**
- * Leading bytes masks
- */
- "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
-
- /**
- * Trailing bytes masks
- */
- "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
- );
-
- /**
- * Some extra checks are triggered on the first byte of a UTF sequence
- */
- $extra_check = array(
- "\xED"=>1, "\xEF"=>1, "\xC0"=>1, "\xC1"=>1, "\xE0"=>1, "\xF0"=>1,
- "\xF4"=>1, "\xF5"=>1, "\xF6"=>1, "\xF7"=>1, "\xF8"=>1, "\xF9"=>1,
- "\xFA"=>1, "\xFB"=>1, "\xFC"=>1, "\xFD"=>1, "\xFE"=>1, "\xFF"=>1
- );
-
- /**
- * These masks are used to check if a UTF sequence is well formed.
- * Here are the only 3 lengths we acknowledge:
- * - 2-byte: 110? ???? 10?? ????
- * - 3-byte: 1110 ???? 10?? ???? 10?? ????
- * - 4-byte: 1111 0??? 10?? ???? 10?? ???? 10?? ????
- *
- * Note that 5- and 6- byte sequences are automatically discarded
- */
- $utf_validation_mask = array(
- 2 => "\xE0\xC0",
- 3 => "\xF0\xC0\xC0",
- 4 => "\xF8\xC0\xC0\xC0"
- );
- $utf_validation_check = array(
- 2 => "\xC0\x80",
- 3 => "\xE0\x80\x80",
- 4 => "\xF0\x80\x80\x80"
- );
-
- $tmp = '';
- $starter_pos = $pos;
- $tmp_pos = $last_cc = $sort = $dump = 0;
- $utf_sort = array();
-
-
- ////////////////////////////////////////////////////////////////////////
- // Main loop //
- ////////////////////////////////////////////////////////////////////////
-
- do
- {
- ////////////////////////////////////////////////////////////////////
- // STEP 0: Capture the current char //
- ////////////////////////////////////////////////////////////////////
-
- $cur_mask = $str[$pos] & "\xF0";
- if (isset($utf_len_mask[$cur_mask]))
- {
- if ($utf_len = $utf_len_mask[$cur_mask])
- {
- /**
- * Multibyte char
- */
- $utf_char = substr($str, $pos, $utf_len);
- $pos += $utf_len;
+ $tmp .= substr($str, $tmp_pos, $lpos - $tmp_pos) . $nf_seq;
+ $tmp_pos = $pos;
}
else
{
- /**
- * A trailing byte came out of nowhere, we will treat it and all
- * following trailing bytes as if each of them was a Unicode
- * replacement char and we will advance the cursor
- */
- $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
-
- if ($dump)
+ // Only a ASCII char can make the program get here
+ //
+ // First we skip the current byte with ++$pos, then we quickly skip following ASCII chars with strspn().
+ //
+ // The first two "if"'s here can be removed, with the consequences of being faster on latin text (lots of ASCII) and slower on
+ // multi-byte text (where the only ASCII chars are spaces and punctuation)
+ if (++$pos != $len)
{
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- /**
- * Dump combiners
- */
- if (!empty($utf_sort))
+ if ($str[$pos] < "\x80")
{
- if ($sort)
- {
- ksort($utf_sort);
- }
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
+ $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
+ $buffer[++$i & 7] = $str[$pos - 1];
}
+ else
+ {
+ $buffer[++$i & 7] = $c;
+ }
+ }
+ }
+ }
+ while ($pos < $len);
- $tmp .= str_repeat(UTF8_REPLACEMENT, $spn);
- $dump = $sort = 0;
+ // Now is time to return the string
+ if ($tmp_pos)
+ {
+ // If the $tmp_pos cursor is not at the beggining of the string then at least one character was not in normal form. Replace $str with the fixed version
+ if ($tmp_pos == $len)
+ {
+ // The $tmp_pos cursor is at the end of $str, therefore $tmp holds the whole $str
+ return $tmp;
+ }
+ else
+ {
+ // The rightmost chunk of $str has not been appended to $tmp yet
+ return $tmp . substr($str, $tmp_pos);
+ }
+ }
+
+ // The string was already in normal form
+ return $str;
+ }
+
+ /**
+ * Decompose a UTF string
+ *
+ * @param string $str UTF string
+ * @param integer $pos Position of the first UTF char (in bytes)
+ * @param integer $len Length of the string (in bytes)
+ * @param array $decomp_map Decomposition mapping, passed by reference but never modified
+ * @return string The string, decomposed and sorted canonically
+ *
+ * @access private
+ */
+ function decompose($str, $pos, $len, &$decomp_map)
+ {
+ global $utf_combining_class, $utf_canonical_decomp, $phpbb_root_path;
+
+ // Load some commonly-used tables
+ if (!isset($utf_combining_class))
+ {
+ include($phpbb_root_path . 'includes/utf/data/utf_normalizer_common.php');
+ }
+
+ // UTF char length array
+ $utf_len_mask = array(
+ // Leading bytes masks
+ "\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4,
+ // Trailing bytes masks
+ "\x80" => 0, "\x90" => 0, "\xA0" => 0, "\xB0" => 0
+ );
+
+ // Some extra checks are triggered on the first byte of a UTF sequence
+ $extra_check = array(
+ "\xED" => 1, "\xEF" => 1, "\xC0" => 1, "\xC1" => 1, "\xE0" => 1, "\xF0" => 1,
+ "\xF4" => 1, "\xF5" => 1, "\xF6" => 1, "\xF7" => 1, "\xF8" => 1, "\xF9" => 1,
+ "\xFA" => 1, "\xFB" => 1, "\xFC" => 1, "\xFD" => 1, "\xFE" => 1, "\xFF" => 1
+ );
+
+ // These masks are used to check if a UTF sequence is well formed. Here are the only 3 lengths we acknowledge:
+ // - 2-byte: 110? ???? 10?? ????
+ // - 3-byte: 1110 ???? 10?? ???? 10?? ????
+ // - 4-byte: 1111 0??? 10?? ???? 10?? ???? 10?? ????
+ // Note that 5- and 6- byte sequences are automatically discarded
+ $utf_validation_mask = array(
+ 2 => "\xE0\xC0",
+ 3 => "\xF0\xC0\xC0",
+ 4 => "\xF8\xC0\xC0\xC0"
+ );
+
+ $utf_validation_check = array(
+ 2 => "\xC0\x80",
+ 3 => "\xE0\x80\x80",
+ 4 => "\xF0\x80\x80\x80"
+ );
+
+ $tmp = '';
+ $starter_pos = $pos;
+ $tmp_pos = $last_cc = $sort = $dump = 0;
+ $utf_sort = array();
+
+
+ // Main loop
+ do
+ {
+ // STEP 0: Capture the current char
+
+ $cur_mask = $str[$pos] & "\xF0";
+ if (isset($utf_len_mask[$cur_mask]))
+ {
+ if ($utf_len = $utf_len_mask[$cur_mask])
+ {
+ // Multibyte char
+ $utf_char = substr($str, $pos, $utf_len);
+ $pos += $utf_len;
}
else
{
- $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+ // A trailing byte came out of nowhere, we will treat it and all following trailing bytes as if each of them was a Unicode
+ // replacement char and we will advance the cursor
+ $spn = strspn($str, UTF8_TRAILING_BYTES, $pos);
+
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= str_repeat(UTF8_REPLACEMENT, $spn);
+ $dump = $sort = 0;
+ }
+ else
+ {
+ $tmp .= substr($str, $tmp_pos, $pos - $tmp_pos) . str_repeat(UTF8_REPLACEMENT, $spn);
+ }
+
+ $pos += $spn;
+ $tmp_pos = $starter_pos = $pos;
+
+ $utf_sort = array();
+ $last_cc = 0;
+
+ continue;
}
- $pos += $spn;
- $tmp_pos = $starter_pos = $pos;
- $utf_sort = array();
- $last_cc = 0;
+ // STEP 1: Decide what to do with current char
- continue;
- }
-
-
- ////////////////////////////////////////////////////////////////////
- // STEP 1: Decide what to do with current char //
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Now, in that order:
- * - check if that character is decomposable
- * - check if that character is a non-starter
- * - check if that character requires extra checks to be performed
- */
- if (isset($decomp_map[$utf_char]))
- {
- /**
- * Decompose the char
- */
- $_pos = 0;
- $_len = strlen($decomp_map[$utf_char]);
-
- do
+ // Now, in that order:
+ // - check if that character is decomposable
+ // - check if that character is a non-starter
+ // - check if that character requires extra checks to be performed
+ if (isset($decomp_map[$utf_char]))
{
- $c = $decomp_map[$utf_char][$_pos];
- $_utf_len =& $utf_len_mask[$c & "\xF0"];
+ // Decompose the char
+ $_pos = 0;
+ $_len = strlen($decomp_map[$utf_char]);
- if (isset($_utf_len))
+ do
{
- $_utf_char = substr($decomp_map[$utf_char], $_pos, $_utf_len);
- $_pos += $_utf_len;
+ $c = $decomp_map[$utf_char][$_pos];
+ $_utf_len =& $utf_len_mask[$c & "\xF0"];
- if (isset($utf_combining_class[$_utf_char]))
+ if (isset($_utf_len))
{
- /**
- * The character decomposed to a non-starter, buffer it for sorting
- */
- $utf_sort[$utf_combining_class[$_utf_char]][] = $_utf_char;
+ $_utf_char = substr($decomp_map[$utf_char], $_pos, $_utf_len);
+ $_pos += $_utf_len;
- if ($utf_combining_class[$_utf_char] < $last_cc)
+ if (isset($utf_combining_class[$_utf_char]))
{
- /**
- * Not canonically ordered, will require sorting
- */
- $sort = $dump = 1;
+ // The character decomposed to a non-starter, buffer it for sorting
+ $utf_sort[$utf_combining_class[$_utf_char]][] = $_utf_char;
+
+ if ($utf_combining_class[$_utf_char] < $last_cc)
+ {
+ // Not canonically ordered, will require sorting
+ $sort = $dump = 1;
+ }
+ else
+ {
+ $dump = 1;
+ $last_cc = $utf_combining_class[$_utf_char];
+ }
}
else
{
- $dump = 1;
- $last_cc = $utf_combining_class[$_utf_char];
+ // This character decomposition contains a starter, dump the buffer and continue
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $_utf_char;
+ $dump = $sort = 0;
+ }
+ else
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos) . $_utf_char;
+ }
+
+ $tmp_pos = $starter_pos = $pos;
+ $utf_sort = array();
+ $last_cc = 0;
}
}
else
{
- /**
- * This character decomposition contains a starter,
- * dump the buffer and continue
- */
+ // This character decomposition contains an ASCII char, which is a starter. Dump the buffer and continue
+ ++$_pos;
+
if ($dump)
{
$tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
- /**
- * Dump combiners
- */
+ // Dump combiners
if (!empty($utf_sort))
{
if ($sort)
@@ -1472,18 +1213,18 @@ class utf_normalizer
ksort($utf_sort);
}
- foreach($utf_sort as $utf_chars)
+ foreach ($utf_sort as $utf_chars)
{
$tmp .= implode('', $utf_chars);
}
}
- $tmp .= $_utf_char;
+ $tmp .= $c;
$dump = $sort = 0;
}
else
{
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos) . $_utf_char;
+ $tmp .= substr($str, $tmp_pos, $pos - $utf_len - $tmp_pos) . $c;
}
$tmp_pos = $starter_pos = $pos;
@@ -1491,350 +1232,290 @@ class utf_normalizer
$last_cc = 0;
}
}
+ while ($_pos < $_len);
+ }
+ else if (isset($utf_combining_class[$utf_char]))
+ {
+ // Combining character
+ if ($utf_combining_class[$utf_char] < $last_cc)
+ {
+ // Not in canonical order
+ $sort = $dump = 1;
+ }
else
{
- /**
- * This character decomposition contains an ASCII char,
- * which is a starter. Dump the buffer and continue
- */
- ++$_pos;
- if ($dump)
+ $last_cc = $utf_combining_class[$utf_char];
+ }
+
+ $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
+ }
+ else
+ {
+ // Non-decomposable starter, check out if it's a Hangul syllable
+ if ($utf_char < UTF8_HANGUL_FIRST || $utf_char > UTF8_HANGUL_LAST)
+ {
+ // Nope, regular UTF char, check that we have the correct number of trailing bytes
+ if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
{
+ // Current char isn't well-formed or legal: either one or several trailing bytes are missing, or the Unicode char
+ // has been encoded in a five- or six- byte sequence.
+ // Move the cursor back to its original position then advance it to the position it should really be at
+ $pos -= $utf_len;
$tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
- /**
- * Dump combiners
- */
if (!empty($utf_sort))
{
- if ($sort)
- {
- ksort($utf_sort);
- }
+ ksort($utf_sort);
- foreach($utf_sort as $utf_chars)
+ foreach ($utf_sort as $utf_chars)
{
$tmp .= implode('', $utf_chars);
}
+ $utf_sort = array();
}
- $tmp .= $c;
+ // Add a replacement char then another replacement char for every trailing byte.
+ //
+ // @todo I'm not entirely sure that's how we're supposed to mark invalidated byte sequences, check this
+ $spn = strspn($str, UTF8_TRAILING_BYTES, ++$pos);
+ $tmp .= str_repeat(UTF8_REPLACEMENT, $spn + 1);
+
$dump = $sort = 0;
- }
- else
- {
- $tmp .= substr($str, $tmp_pos, $pos - $utf_len - $tmp_pos) . $c;
+
+ $pos += $spn;
+ $tmp_pos = $pos;
+ continue;
}
- $tmp_pos = $starter_pos = $pos;
- $utf_sort = array();
- $last_cc = 0;
- }
- }
- while($_pos < $_len);
- }
- elseif (isset($utf_combining_class[$utf_char]))
- {
- /**
- * Combining character
- */
- if ($utf_combining_class[$utf_char] < $last_cc)
- {
- /**
- * Not in canonical order
- */
- $sort = $dump = 1;
- }
- else
- {
- $last_cc = $utf_combining_class[$utf_char];
- }
-
- $utf_sort[$utf_combining_class[$utf_char]][] = $utf_char;
- }
- else
- {
- /**
- * Non-decomposable starter, check out if it's a Hangul syllable
- */
- if ($utf_char < UTF8_HANGUL_FIRST || $utf_char > UTF8_HANGUL_LAST)
- {
- /**
- * Nope, regular UTF char, check that we have the correct number of trailing bytes
- */
- if (($utf_char & $utf_validation_mask[$utf_len]) != $utf_validation_check[$utf_len])
- {
- /**
- * Current char isn't well-formed or legal: either one or
- * several trailing bytes are missing, or the Unicode char
- * has been encoded in a five- or six- byte sequence.
- *
- * Move the cursor back to its original position then advance
- * it to the position it should really be at
- */
- $pos -= $utf_len;
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
+ if (isset($extra_check[$utf_char[0]]))
{
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
+ switch ($utf_char[0])
{
- $tmp .= implode('', $utf_chars);
+ // Note: 0xED is quite common in Korean
+ case "\xED":
+ if ($utf_char >= "\xED\xA0\x80")
+ {
+ // Surrogates (U+D800..U+DFFF) are not allowed in UTF-8 (UTF sequence 0xEDA080..0xEDBFBF)
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ // Note: 0xEF is quite common in Japanese
+ case "\xEF":
+ if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
+ {
+ // U+FFFE and U+FFFF are explicitly disallowed (UTF sequence 0xEFBFBE..0xEFBFBF)
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xC0":
+ case "\xC1":
+ if ($utf_char <= "\xC1\xBF")
+ {
+ // Overlong sequence: Unicode char U+0000..U+007F encoded as a double-byte UTF char
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xE0":
+ if ($utf_char <= "\xE0\x9F\xBF")
+ {
+ // Unicode char U+0000..U+07FF encoded in 3 bytes
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ case "\xF0":
+ if ($utf_char <= "\xF0\x8F\xBF\xBF")
+ {
+ // Unicode char U+0000..U+FFFF encoded in 4 bytes
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
+
+ default:
+ if ($utf_char > UTF8_MAX)
+ {
+ // Out of the Unicode range
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ if (!empty($utf_sort))
+ {
+ ksort($utf_sort);
+
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ $utf_sort = array();
+ }
+
+ $tmp .= UTF8_REPLACEMENT;
+ $dump = $sort = 0;
+
+ $tmp_pos = $starter_pos = $pos;
+ continue 2;
+ }
+ break;
}
- $utf_sort = array();
- }
-
- /**
- * Add a replacement char then another replacement char for
- * every trailing byte.
- *
- * @todo I'm not entirely sure that's how we're supposed to
- * mark invalidated byte sequences, check this
- */
- $spn = strspn($str, UTF8_TRAILING_BYTES, ++$pos);
- $tmp .= str_repeat(UTF8_REPLACEMENT, $spn + 1);
-
- $dump = $sort = 0;
-
- $pos += $spn;
- $tmp_pos = $pos;
- continue;
- }
-
- if (isset($extra_check[$utf_char[0]]))
- {
- switch($utf_char[0])
- {
- /**
- * Note: 0xED is quite common in Korean
- */
- case "\xED":
- if ($utf_char >= "\xED\xA0\x80")
- {
- /**
- * Surrogates (U+D800..U+DFFF) are not allowed in UTF-8
- * (UTF sequence 0xEDA080..0xEDBFBF)
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- break;
-
- /**
- * Note: 0xEF is quite common in Japanese
- */
- case "\xEF":
- if ($utf_char == "\xEF\xBF\xBE" || $utf_char == "\xEF\xBF\xBF")
- {
- /**
- * U+FFFE and U+FFFF are explicitly disallowed
- * (UTF sequence 0xEFBFBE..0xEFBFBF)
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xC0":
- case "\xC1":
- if ($utf_char <= "\xC1\xBF")
- {
- /**
- * Overlong sequence: Unicode char U+0000..U+007F encoded as a
- * double-byte UTF char
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xE0":
- if ($utf_char <= "\xE0\x9F\xBF")
- {
- /**
- * Unicode char U+0000..U+07FF encoded in 3 bytes
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- break;
-
- case "\xF0":
- if ($utf_char <= "\xF0\x8F\xBF\xBF")
- {
- /**
- * Unicode char U+0000..U+FFFF encoded in 4 bytes
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- break;
-
- default:
- if ($utf_char > UTF8_MAX)
- {
- /**
- * Out of the Unicode range
- */
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- if (!empty($utf_sort))
- {
- ksort($utf_sort);
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
- $utf_sort = array();
- }
-
- $tmp .= UTF8_REPLACEMENT;
- $dump = $sort = 0;
-
- $tmp_pos = $starter_pos = $pos;
- continue 2;
- }
- }
- }
- }
- else
- {
- /**
- * Hangul syllable
- */
- $idx = (((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F)) - UNICODE_HANGUL_SBASE;
-
- /**
- * LIndex can only range from 0 to 18, therefore it cannot influence
- * the first two bytes of the L Jamo, which allows us to hardcode
- * them (based on LBase).
- *
- * The same goes for VIndex, but for TIndex there's a catch: the value
- * of the third byte could exceed 0xBF and we would have to increment
- * the second byte
- */
- if ($tIndex = $idx % UNICODE_HANGUL_TCOUNT)
- {
- if ($tIndex < 25)
- {
- $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x86\x00";
- $utf_char[8] = chr(0xA7 + $tIndex);
- }
- else
- {
- $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x87\x00";
- $utf_char[8] = chr(0x67 + $tIndex);
}
}
else
{
- $utf_char = "\xE1\x84\x00\xE1\x85\x00";
+ // Hangul syllable
+ $idx = (((ord($utf_char[0]) & 0x0F) << 12) | ((ord($utf_char[1]) & 0x3F) << 6) | (ord($utf_char[2]) & 0x3F)) - UNICODE_HANGUL_SBASE;
+
+ // LIndex can only range from 0 to 18, therefore it cannot influence the first two bytes of the L Jamo, which allows us to hardcode them (based on LBase).
+ //
+ // The same goes for VIndex, but for TIndex there's a catch: the value of the third byte could exceed 0xBF and we would have to increment the second byte
+ if ($tIndex = $idx % UNICODE_HANGUL_TCOUNT)
+ {
+ if ($tIndex < 25)
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x86\x00";
+ $utf_char[8] = chr(0xA7 + $tIndex);
+ }
+ else
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00\xE1\x87\x00";
+ $utf_char[8] = chr(0x67 + $tIndex);
+ }
+ }
+ else
+ {
+ $utf_char = "\xE1\x84\x00\xE1\x85\x00";
+ }
+
+ $utf_char[2] = chr(0x80 + (int) ($idx / UNICODE_HANGUL_NCOUNT));
+ $utf_char[5] = chr(0xA1 + (int) (($idx % UNICODE_HANGUL_NCOUNT) / UNICODE_HANGUL_TCOUNT));
+
+ // Just like other decompositions, the resulting Jamos must be dumped to the tmp string
+ $dump = 1;
}
- $utf_char[2] = chr(0x80 + (int) ($idx / UNICODE_HANGUL_NCOUNT));
- $utf_char[5] = chr(0xA1 + (int) (($idx % UNICODE_HANGUL_NCOUNT) / UNICODE_HANGUL_TCOUNT));
+ // Do we need to dump stuff to the tmp string?
+ if ($dump)
+ {
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+ // Dump combiners
+ if (!empty($utf_sort))
+ {
+ if ($sort)
+ {
+ ksort($utf_sort);
+ }
- /**
- * Just like other decompositions, the resulting Jamos must
- * be dumped to the tmp string
- */
- $dump = 1;
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
+
+ $tmp .= $utf_char;
+ $dump = $sort = 0;
+ $tmp_pos = $pos;
+ }
+
+ $last_cc = 0;
+ $utf_sort = array();
+ $starter_pos = $pos;
}
-
- /**
- * Do we need to dump stuff to the tmp string?
- */
+ }
+ else
+ {
+ // ASCII char, which happens to be a starter (as any other ASCII char)
if ($dump)
{
$tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
- /**
- * Dump combiners
- */
+ // Dump combiners
if (!empty($utf_sort))
{
if ($sort)
@@ -1842,15 +1523,21 @@ class utf_normalizer
ksort($utf_sort);
}
- foreach($utf_sort as $utf_chars)
+ foreach ($utf_sort as $utf_chars)
{
$tmp .= implode('', $utf_chars);
}
}
- $tmp .= $utf_char;
+ $tmp .= $str[$pos];
$dump = $sort = 0;
- $tmp_pos = $pos;
+ $tmp_pos = ++$pos;
+
+ $pos += strspn($str, UTF8_ASCII_RANGE, $pos);
+ }
+ else
+ {
+ $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
}
$last_cc = 0;
@@ -1858,103 +1545,49 @@ class utf_normalizer
$starter_pos = $pos;
}
}
- else
+ while ($pos < $len);
+
+ // Now is time to return the string
+ if ($dump)
{
- /**
- * ASCII char, which happens to be a starter (as any other ASCII char)
- */
- if ($dump)
+ $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
+
+ // Dump combiners
+ if (!empty($utf_sort))
{
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- /**
- * Dump combiners
- */
- if (!empty($utf_sort))
+ if ($sort)
{
- if ($sort)
- {
- ksort($utf_sort);
- }
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
- }
+ ksort($utf_sort);
}
- $tmp .= $str[$pos];
- $dump = $sort = 0;
- $tmp_pos = ++$pos;
+ foreach ($utf_sort as $utf_chars)
+ {
+ $tmp .= implode('', $utf_chars);
+ }
+ }
- $pos += strspn($str, UTF8_ASCII_RANGE, $pos);
+ return $tmp;
+
+ }
+ else if ($tmp_pos)
+ {
+ // If the $tmp_pos cursor was moved then at least one character was not in normal form. Replace $str with the fixed version
+ if ($tmp_pos == $len)
+ {
+ // The $tmp_pos cursor is at the end of $str, therefore $tmp holds the whole $str
+ return $tmp;
}
else
{
- $pos += strspn($str, UTF8_ASCII_RANGE, ++$pos);
- }
-
- $last_cc = 0;
- $utf_sort = array();
- $starter_pos = $pos;
- }
- }
- while($pos < $len);
-
- /**
- * Now is time to return the string
- */
- if ($dump)
- {
- $tmp .= substr($str, $tmp_pos, $starter_pos - $tmp_pos);
-
- /**
- * Dump combiners
- */
- if (!empty($utf_sort))
- {
- if ($sort)
- {
- ksort($utf_sort);
- }
-
- foreach($utf_sort as $utf_chars)
- {
- $tmp .= implode('', $utf_chars);
+ // The rightmost chunk of $str has not been appended to $tmp yet
+ return $tmp . substr($str, $tmp_pos);
}
}
- return $tmp;
-
+ // The string was already in normal form
+ return $str;
}
- elseif ($tmp_pos)
- {
- /**
- * If the $tmp_pos cursor was moved then at least one character was not in
- * normal form. Replace $str with the fixed version
- */
- if ($tmp_pos == $len)
- {
- /**
- * The $tmp_pos cursor is at the end of $str, therefore $tmp holds
- * the whole $str
- */
- return $tmp;
- }
- else
- {
- /**
- * The rightmost chunk of $str has not been appended to $tmp yet
- */
- return $tmp . substr($str, $tmp_pos);
- }
- }
-
- /**
- * The string was already in normal form
- */
- return $str;
}
}
-}
\ No newline at end of file
+?>
\ No newline at end of file
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index b3c3c5ed5e..ede1dd85ea 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -59,17 +59,13 @@ function utf8_recode($string, $encoding)
return $string;
}
- /**
- * PHP has a built-in function for encoding from iso-8859-1, let's use that
- */
+ // PHP has a built-in function for encoding from iso-8859-1, let's use that
if ($encoding == 'iso-8859-1')
{
return utf8_encode($string);
}
- /**
- * First, try iconv()
- */
+ // First, try iconv()
if (function_exists('iconv'))
{
$ret = @iconv($encoding, 'utf-8', $string);
@@ -80,9 +76,7 @@ function utf8_recode($string, $encoding)
}
}
- /**
- * Try the mb_string extension
- */
+ // Try the mb_string extension
if (function_exists('mb_convert_encoding'))
{
$ret = @mb_convert_encoding($string, 'utf-8', $encoding);
@@ -93,9 +87,7 @@ function utf8_recode($string, $encoding)
}
}
- /**
- * Try the recode extension
- */
+ // Try the recode extension
if (function_exists('recode_string'))
{
$ret = @recode_string($encoding . '..utf-8', $string);
@@ -106,25 +98,21 @@ function utf8_recode($string, $encoding)
}
}
- /**
- * If nothing works, check if we have a custom transcoder available
- */
+ // If nothing works, check if we have a custom transcoder available
if (!preg_match('#^[a-z0-9\\-]+$#', $encoding))
{
- /**
- * Make sure the encoding name is alphanumeric, we don't want it
- * to be abused into loading arbitrary files
- */
- trigger_error('Unknown encoding: ' . $encoding);
+ // Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files
+ trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
}
global $phpbb_root_path;
+
if (!file_exists($phpbb_root_path . 'includes/utf/data/'))
{
return $string;
}
- die('Finish me!! '.basename(__FILE__).' at line '.__LINE__);
+ die('Finish me!! ' . basename(__FILE__) . ' at line ' . __LINE__);
}
/**
@@ -200,11 +188,11 @@ function utf8_decode_ncr_callback($m)
{
return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
- elseif ($cp > 0x7FF)
+ else if ($cp > 0x7FF)
{
return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
}
- elseif ($cp > 0x7F)
+ else if ($cp > 0x7F)
{
return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
}
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 4edb29e097..032a5e90bf 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -271,6 +271,7 @@ $lang = array_merge($lang, array(
'CURRENT_FILE' => 'Current original file',
'CURRENT_VERSION' => 'Current version',
+ 'DATABASE_UPDATE_INFO_OLD' => 'The latest version is newer than the database info stored. Please download the correct archive.',
'DESTINATION' => 'Destination file',
'DIFF_INLINE' => 'Inline',
'DIFF_RAW' => 'Raw unified diff',
From cb23c1f04482278a2478bdd9700503b1f1fcddf4 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 22 Aug 2006 21:29:45 +0000
Subject: [PATCH 025/291] Thanks to the GPL we are able to use the pear package
text_diff - now splitted into the diff classes, the renderer and the engine
git-svn-id: file:///svn/phpbb/trunk@6313 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/diff/diff.php | 779 +++++++++++++++++++++++++++++
phpBB/includes/diff/engine.php | 512 +++++++++++++++++++
phpBB/includes/diff/renderer.php | 832 +++++++++++++++++++++++++++++++
3 files changed, 2123 insertions(+)
create mode 100644 phpBB/includes/diff/diff.php
create mode 100644 phpBB/includes/diff/engine.php
create mode 100644 phpBB/includes/diff/renderer.php
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
new file mode 100644
index 0000000000..102f1119b2
--- /dev/null
+++ b/phpBB/includes/diff/diff.php
@@ -0,0 +1,779 @@
+
+*/
+class diff
+{
+ /**
+ * Array of changes.
+ * @var array
+ */
+ var $_edits;
+
+ /**
+ * Computes diffs between sequences of strings.
+ *
+ * @param array $from_lines An array of strings. Typically these are lines from a file.
+ * @param array $to_lines An array of strings.
+ */
+ function diff($from_lines, $to_lines)
+ {
+ $diff_engine = &new diff_engine();
+ $this->_edits = call_user_func_array(array($diff_engine, 'diff'), array($from_lines, $to_lines));
+ }
+
+ /**
+ * Returns the array of differences.
+ */
+ function get_diff()
+ {
+ return $this->_edits;
+ }
+
+ /**
+ * Computes a reversed diff.
+ *
+ * Example:
+ *
+ * $diff = &new diff($lines1, $lines2);
+ * $rev = $diff->reverse();
+ *
+ *
+ * @return diff A Diff object representing the inverse of the original diff.
+ * Note that we purposely don't return a reference here, since
+ * this essentially is a clone() method.
+ */
+ function reverse()
+ {
+ if (version_compare(zend_version(), '2', '>'))
+ {
+ $rev = clone($this);
+ }
+ else
+ {
+ $rev = $this;
+ }
+
+ $rev->_edits = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ $rev->_edits[] = $edit->reverse();
+ }
+
+ return $rev;
+ }
+
+ /**
+ * Checks for an empty diff.
+ *
+ * @return boolean True if two sequences were identical.
+ */
+ function is_empty()
+ {
+ foreach ($this->_edits as $edit)
+ {
+ if (!is_a($edit, 'diff_op_copy'))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Computes the length of the Longest Common Subsequence (LCS).
+ *
+ * This is mostly for diagnostic purposes.
+ *
+ * @return integer The length of the LCS.
+ */
+ function lcs()
+ {
+ $lcs = 0;
+
+ foreach ($this->_edits as $edit)
+ {
+ if (is_a($edit, 'diff_op_copy'))
+ {
+ $lcs += sizeof($edit->orig);
+ }
+ }
+ return $lcs;
+ }
+
+ /**
+ * Gets the original set of lines.
+ *
+ * This reconstructs the $from_lines parameter passed to the constructor.
+ *
+ * @return array The original sequence of strings.
+ */
+ function get_original()
+ {
+ $lines = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->orig)
+ {
+ array_splice($lines, sizeof($lines), 0, $edit->orig);
+ }
+ }
+ return $lines;
+ }
+
+ /**
+ * Gets the final set of lines.
+ *
+ * This reconstructs the $to_lines parameter passed to the constructor.
+ *
+ * @return array The sequence of strings.
+ */
+ function get_final()
+ {
+ $lines = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->final)
+ {
+ array_splice($lines, sizeof($lines), 0, $edit->final);
+ }
+ }
+ return $lines;
+ }
+
+ /**
+ * Removes trailing newlines from a line of text. This is meant to be used with array_walk().
+ *
+ * @param string $line The line to trim.
+ * @param integer $key The index of the line in the array. Not used.
+ */
+ function trim_newlines(&$line, $key)
+ {
+ $line = str_replace(array("\n", "\r"), '', $line);
+ }
+
+ /**
+ * Checks a diff for validity.
+ *
+ * This is here only for debugging purposes.
+ */
+ function _check($from_lines, $to_lines)
+ {
+ if (serialize($from_lines) != serialize($this->get_original()))
+ {
+ trigger_error("[diff] Reconstructed original doesn't match", E_USER_ERROR);
+ }
+
+ if (serialize($to_lines) != serialize($this->get_final()))
+ {
+ trigger_error("[diff] Reconstructed final doesn't match", E_USER_ERROR);
+ }
+
+ $rev = $this->reverse();
+
+ if (serialize($to_lines) != serialize($rev->get_original()))
+ {
+ trigger_error("[diff] Reversed original doesn't match", E_USER_ERROR);
+ }
+
+ if (serialize($from_lines) != serialize($rev->get_final()))
+ {
+ trigger_error("[diff] Reversed final doesn't match", E_USER_ERROR);
+ }
+
+ $prevtype = null;
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($prevtype == get_class($edit))
+ {
+ trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR);
+ }
+ $prevtype = get_class($edit);
+ }
+
+ return true;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*/
+class mapped_diff extends diff
+{
+ /**
+ * Computes a diff between sequences of strings.
+ *
+ * This can be used to compute things like case-insensitve diffs, or diffs
+ * which ignore changes in white-space.
+ *
+ * @param array $from_lines An array of strings.
+ * @param array $to_lines An array of strings.
+ * @param array $mapped_from_lines This array should have the same size number of elements as $from_lines.
+ * The elements in $mapped_from_lines and $mapped_to_lines are what is actually
+ * compared when computing the diff.
+ * @param array $mapped_to_lines This array should have the same number of elements as $to_lines.
+ */
+ function mapped_diff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines)
+ {
+ if (sizeof($from_lines) != sizeof($mapped_from_lines) || sizeof($to_lines) != sizeof($mapped_to_lines))
+ {
+ return false;
+ }
+
+ parent::diff($mapped_from_lines, $mapped_to_lines);
+
+ $xi = $yi = 0;
+ for ($i = 0; $i < sizeof($this->_edits); $i++)
+ {
+ $orig = &$this->_edits[$i]->orig;
+ if (is_array($orig))
+ {
+ $orig = array_slice($from_lines, $xi, sizeof($orig));
+ $xi += sizeof($orig);
+ }
+
+ $final = &$this->_edits[$i]->final;
+ if (is_array($final))
+ {
+ $final = array_slice($to_lines, $yi, sizeof($final));
+ $yi += sizeof($final);
+ }
+ }
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff_op
+{
+ var $orig;
+ var $final;
+
+ function reverse()
+ {
+ trigger_error('[diff] Abstract method', E_USER_ERROR);
+ }
+
+ function norig()
+ {
+ return ($this->orig) ? sizeof($this->orig) : 0;
+ }
+
+ function nfinal()
+ {
+ return ($this->final) ? sizeof($this->final) : 0;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff_op_copy extends diff_op
+{
+ function diff_op_copy($orig, $final = false)
+ {
+ if (!is_array($final))
+ {
+ $final = $orig;
+ }
+ $this->orig = $orig;
+ $this->final = $final;
+ }
+
+ function &reverse()
+ {
+ $reverse = &new diff_op_copy($this->final, $this->orig);
+ return $reverse;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff_op_delete extends diff_op
+{
+ function diff_op_delete($lines)
+ {
+ $this->orig = $lines;
+ $this->final = false;
+ }
+
+ function &reverse()
+ {
+ $reverse = &new diff_op_add($this->orig);
+ return $reverse;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff_op_add extends diff_op
+{
+ function diff_op_add($lines)
+ {
+ $this->final = $lines;
+ $this->orig = false;
+ }
+
+ function &reverse()
+ {
+ $reverse = &new diff_op_delete($this->final);
+ return $reverse;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff_op_change extends diff_op
+{
+ function diff_op_change($orig, $final)
+ {
+ $this->orig = $orig;
+ $this->final = $final;
+ }
+
+ function &reverse()
+ {
+ $reverse = &new diff_op_change($this->final, $this->orig);
+ return $reverse;
+ }
+}
+
+
+/**
+* A class for computing three way diffs.
+*
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*/
+class diff3 extends diff
+{
+ /**
+ * Conflict counter.
+ * @var integer
+ */
+ var $_conflicting_blocks = 0;
+
+ /**
+ * Computes diff between 3 sequences of strings.
+ *
+ * @param array $orig The original lines to use.
+ * @param array $final1 The first version to compare to.
+ * @param array $final2 The second version to compare to.
+ */
+ function diff3($orig, $final1, $final2)
+ {
+ $engine = new diff_engine();
+ $this->_edits = $this->_diff3($engine->diff($orig, $final1), $engine->diff($orig, $final2));
+ }
+
+ /**
+ * Return merged output
+ *
+ * @param string $label1 the cvs file version/label from the original set of lines
+ * @param string $label2 the cvs file version/label from the new set of lines
+ * @param bool $get_conflicts if set to true only the number of conflicts is returned
+ * @param bool $merge_new if set to true the merged output will have the new file contents on a conflicting merge
+ *
+ * @return mixed the merged output
+ */
+ function merged_output($label1 = 'CURRENT_FILE', $label2 = 'NEW_FILE', $get_conflicts = false, $merge_new = false)
+ {
+ global $user;
+
+ if ($get_conflicts)
+ {
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $this->_conflicting_blocks++;
+ }
+ }
+
+ return $this->_conflicting_blocks;
+ }
+
+ $label1 = (!empty($user->lang[$label1])) ? $user->lang[$label1] : $label1;
+ $label2 = (!empty($user->lang[$label2])) ? $user->lang[$label2] : $label2;
+
+ $lines = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ if (!$merge_new)
+ {
+ $lines = array_merge($lines, array('<<<<<<<' . ($label1 ? ' ' . $label1 : '')), $edit->final1, array('======='), $edit->final2, array('>>>>>>>' . ($label2 ? ' ' . $label2 : '')));
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->final1);
+ }
+ $this->_conflicting_blocks++;
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Merge the output and use the new file code for conflicts
+ */
+ function merged_new_output()
+ {
+ $lines = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $lines = array_merge($lines, $edit->final2);
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Merge the output and use the original file code for conflicts
+ */
+ function merged_orig_output()
+ {
+ $lines = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $lines = array_merge($lines, $edit->final1);
+ }
+ else
+ {
+ $lines = array_merge($lines, $edit->merged());
+ }
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Get conflicting block(s)
+ */
+ function get_conflicts()
+ {
+ $conflicts = array();
+
+ foreach ($this->_edits as $edit)
+ {
+ if ($edit->is_conflict())
+ {
+ $conflicts[] = array($edit->final1, $edit->final2);
+ }
+ }
+
+ return $conflicts;
+ }
+
+ /**
+ * @access private
+ */
+ function _diff3($edits1, $edits2)
+ {
+ $edits = array();
+ $bb = &new diff3_block_builder();
+
+ $e1 = current($edits1);
+ $e2 = current($edits2);
+
+ while ($e1 || $e2)
+ {
+ if ($e1 && $e2 && is_a($e1, 'diff_op_copy') && is_a($e2, 'diff_op_copy'))
+ {
+ // We have copy blocks from both diffs. This is the (only) time we want to emit a diff3 copy block.
+ // Flush current diff3 diff block, if any.
+ if ($edit = $bb->finish())
+ {
+ $edits[] = $edit;
+ }
+
+ $ncopy = min($e1->norig(), $e2->norig());
+ $edits[] = &new diff3_op_copy(array_slice($e1->orig, 0, $ncopy));
+
+ if ($e1->norig() > $ncopy)
+ {
+ array_splice($e1->orig, 0, $ncopy);
+ array_splice($e1->final, 0, $ncopy);
+ }
+ else
+ {
+ $e1 = next($edits1);
+ }
+
+ if ($e2->norig() > $ncopy)
+ {
+ array_splice($e2->orig, 0, $ncopy);
+ array_splice($e2->final, 0, $ncopy);
+ }
+ else
+ {
+ $e2 = next($edits2);
+ }
+ }
+ else
+ {
+ if ($e1 && $e2)
+ {
+ if ($e1->orig && $e2->orig)
+ {
+ $norig = min($e1->norig(), $e2->norig());
+ $orig = array_splice($e1->orig, 0, $norig);
+ array_splice($e2->orig, 0, $norig);
+ $bb->input($orig);
+ }
+ else
+ {
+ $norig = 0;
+ }
+
+ if (is_a($e1, 'diff_op_copy'))
+ {
+ $bb->out1(array_splice($e1->final, 0, $norig));
+ }
+
+ if (is_a($e2, 'diff_op_copy'))
+ {
+ $bb->out2(array_splice($e2->final, 0, $norig));
+ }
+ }
+
+ if ($e1 && ! $e1->orig)
+ {
+ $bb->out1($e1->final);
+ $e1 = next($edits1);
+ }
+
+ if ($e2 && ! $e2->orig)
+ {
+ $bb->out2($e2->final);
+ $e2 = next($edits2);
+ }
+ }
+ }
+
+ if ($edit = $bb->finish())
+ {
+ $edits[] = $edit;
+ }
+
+ return $edits;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff3_op
+{
+ function diff3_op($orig = false, $final1 = false, $final2 = false)
+ {
+ $this->orig = $orig ? $orig : array();
+ $this->final1 = $final1 ? $final1 : array();
+ $this->final2 = $final2 ? $final2 : array();
+ }
+
+ function merged()
+ {
+ if (!isset($this->_merged))
+ {
+ if ($this->final1 === $this->final2)
+ {
+ $this->_merged = &$this->final1;
+ }
+ else if ($this->final1 === $this->orig)
+ {
+ $this->_merged = &$this->final2;
+ }
+ else if ($this->final2 === $this->orig)
+ {
+ $this->_merged = &$this->final1;
+ }
+ else
+ {
+ $this->_merged = false;
+ }
+ }
+
+ return $this->_merged;
+ }
+
+ function is_conflict()
+ {
+ return ($this->merged() === false) ? true : false;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff3_op_copy extends diff3_op
+{
+ function diff3_op_copy($lines = false)
+ {
+ $this->orig = $lines ? $lines : array();
+ $this->final1 = &$this->orig;
+ $this->final2 = &$this->orig;
+ }
+
+ function merged()
+ {
+ return $this->orig;
+ }
+
+ function is_conflict()
+ {
+ return false;
+ }
+}
+
+/**
+* @package phpBB3
+* @author Geoffrey T. Dairiki
+*
+* @access private
+*/
+class diff3_block_builder
+{
+ function diff3_block_builder()
+ {
+ $this->_init();
+ }
+
+ function input($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->orig, $lines);
+ }
+ }
+
+ function out1($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->final1, $lines);
+ }
+ }
+
+ function out2($lines)
+ {
+ if ($lines)
+ {
+ $this->_append($this->final2, $lines);
+ }
+ }
+
+ function is_empty()
+ {
+ return !$this->orig && !$this->final1 && !$this->final2;
+ }
+
+ function finish()
+ {
+ if ($this->is_empty())
+ {
+ return false;
+ }
+ else
+ {
+ $edit = &new diff3_op($this->orig, $this->final1, $this->final2);
+ $this->_init();
+ return $edit;
+ }
+ }
+
+ function _init()
+ {
+ $this->orig = $this->final1 = $this->final2 = array();
+ }
+
+ function _append(&$array, $lines)
+ {
+ array_splice($array, sizeof($array), 0, $lines);
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
new file mode 100644
index 0000000000..c230d865cd
--- /dev/null
+++ b/phpBB/includes/diff/engine.php
@@ -0,0 +1,512 @@
+ 2, and some optimizations) are from
+* Geoffrey T. Dairiki . The original PHP version of this
+* code was written by him, and is used/adapted with his permission.
+*
+* @author Geoffrey T. Dairiki
+* @package phpBB3
+*
+* @access private
+*/
+class diff_engine
+{
+ function diff($from_lines, $to_lines)
+ {
+ array_walk($from_lines, array('diff', 'trim_newlines'));
+ array_walk($to_lines, array('diff', 'trim_newlines'));
+
+ $n_from = sizeof($from_lines);
+ $n_to = sizeof($to_lines);
+
+ $this->xchanged = $this->ychanged = $this->xv = $this->yv = $this->xind = $this->yind = array();
+ unset($this->seq, $this->in_seq, $this->lcs);
+
+ // Skip leading common lines.
+ for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++)
+ {
+ if ($from_lines[$skip] !== $to_lines[$skip])
+ {
+ break;
+ }
+ $this->xchanged[$skip] = $this->ychanged[$skip] = false;
+ }
+
+ // Skip trailing common lines.
+ $xi = $n_from;
+ $yi = $n_to;
+
+ for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++)
+ {
+ if ($from_lines[$xi] !== $to_lines[$yi])
+ {
+ break;
+ }
+ $this->xchanged[$xi] = $this->ychanged[$yi] = false;
+ }
+
+ // Ignore lines which do not exist in both files.
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
+ {
+ $xhash[$from_lines[$xi]] = 1;
+ }
+
+ for ($yi = $skip; $yi < $n_to - $endskip; $yi++)
+ {
+ $line = $to_lines[$yi];
+
+ if (($this->ychanged[$yi] = empty($xhash[$line])))
+ {
+ continue;
+ }
+ $yhash[$line] = 1;
+ $this->yv[] = $line;
+ $this->yind[] = $yi;
+ }
+
+ for ($xi = $skip; $xi < $n_from - $endskip; $xi++)
+ {
+ $line = $from_lines[$xi];
+
+ if (($this->xchanged[$xi] = empty($yhash[$line])))
+ {
+ continue;
+ }
+ $this->xv[] = $line;
+ $this->xind[] = $xi;
+ }
+
+ // Find the LCS.
+ $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
+
+ // Merge edits when possible.
+ $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged);
+ $this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged);
+
+ // Compute the edit operations.
+ $edits = array();
+ $xi = $yi = 0;
+
+ while ($xi < $n_from || $yi < $n_to)
+ {
+ // Skip matching "snake".
+ $copy = array();
+
+ while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi])
+ {
+ $copy[] = $from_lines[$xi++];
+ $yi++;
+ }
+
+ if ($copy)
+ {
+ $edits[] = &new diff_op_copy($copy);
+ }
+
+ // Find deletes & adds.
+ $delete = array();
+ while ($xi < $n_from && $this->xchanged[$xi])
+ {
+ $delete[] = $from_lines[$xi++];
+ }
+
+ $add = array();
+ while ($yi < $n_to && $this->ychanged[$yi])
+ {
+ $add[] = $to_lines[$yi++];
+ }
+
+ if ($delete && $add)
+ {
+ $edits[] = &new diff_op_change($delete, $add);
+ }
+ else if ($delete)
+ {
+ $edits[] = &new diff_op_delete($delete);
+ }
+ else if ($add)
+ {
+ $edits[] = &new diff_op_add($add);
+ }
+ }
+
+ return $edits;
+ }
+
+ /**
+ * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF,
+ * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized segments.
+ *
+ * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of
+ * NCHUNKS+1 (X, Y) indexes giving the diving points between sub
+ * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1),
+ * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) ==
+ * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM).
+ *
+ * This function assumes that the first lines of the specified portions of
+ * the two files do not match, and likewise that the last lines do not
+ * match. The caller must trim matching lines from the beginning and end
+ * of the portions it is going to specify.
+ */
+ function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
+ {
+ $flip = false;
+
+ if ($xlim - $xoff > $ylim - $yoff)
+ {
+ // Things seems faster (I'm not sure I understand why) when the shortest sequence is in X.
+ $flip = true;
+ list($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim);
+ }
+
+ if ($flip)
+ {
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ {
+ $ymatches[$this->xv[$i]][] = $i;
+ }
+ }
+ else
+ {
+ for ($i = $ylim - 1; $i >= $yoff; $i--)
+ {
+ $ymatches[$this->yv[$i]][] = $i;
+ }
+ }
+
+ $this->lcs = 0;
+ $this->seq[0]= $yoff - 1;
+ $this->in_seq = array();
+ $ymids[0] = array();
+
+ $numer = $xlim - $xoff + $nchunks - 1;
+ $x = $xoff;
+
+ for ($chunk = 0; $chunk < $nchunks; $chunk++)
+ {
+ if ($chunk > 0)
+ {
+ for ($i = 0; $i <= $this->lcs; $i++)
+ {
+ $ymids[$i][$chunk - 1] = $this->seq[$i];
+ }
+ }
+
+ $x1 = $xoff + (int)(($numer + ($xlim-$xoff)*$chunk) / $nchunks);
+
+ for (; $x < $x1; $x++)
+ {
+ $line = $flip ? $this->yv[$x] : $this->xv[$x];
+ if (empty($ymatches[$line]))
+ {
+ continue;
+ }
+ $matches = $ymatches[$line];
+
+ foreach ($matches as $y)
+ {
+ if (empty($this->in_seq[$y]))
+ {
+ $k = $this->_lcs_pos($y);
+ $ymids[$k] = $ymids[$k - 1];
+ break;
+ }
+ }
+
+ while (list($junk, $y) = each($matches))
+ {
+ if ($y > $this->seq[$k - 1])
+ {
+ // Optimization: this is a common case: next match is just replacing previous match.
+ $this->in_seq[$this->seq[$k]] = false;
+ $this->seq[$k] = $y;
+ $this->in_seq[$y] = 1;
+ }
+ else if (empty($this->in_seq[$y]))
+ {
+ $k = $this->_lcs_pos($y);
+ $ymids[$k] = $ymids[$k - 1];
+ }
+ }
+ }
+ }
+
+ $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
+ $ymid = $ymids[$this->lcs];
+
+ for ($n = 0; $n < $nchunks - 1; $n++)
+ {
+ $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks);
+ $y1 = $ymid[$n] + 1;
+ $seps[] = $flip ? array($y1, $x1) : array($x1, $y1);
+ }
+ $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim);
+
+ return array($this->lcs, $seps);
+ }
+
+ function _lcs_pos($ypos)
+ {
+ $end = $this->lcs;
+
+ if ($end == 0 || $ypos > $this->seq[$end])
+ {
+ $this->seq[++$this->lcs] = $ypos;
+ $this->in_seq[$ypos] = 1;
+ return $this->lcs;
+ }
+
+ $beg = 1;
+ while ($beg < $end)
+ {
+ $mid = (int)(($beg + $end) / 2);
+ if ($ypos > $this->seq[$mid])
+ {
+ $beg = $mid + 1;
+ }
+ else
+ {
+ $end = $mid;
+ }
+ }
+
+ $this->in_seq[$this->seq[$end]] = false;
+ $this->seq[$end] = $ypos;
+ $this->in_seq[$ypos] = 1;
+
+ return $end;
+ }
+
+ /**
+ * Finds LCS of two sequences.
+ *
+ * The results are recorded in the vectors $this->{x,y}changed[], by
+ * storing a 1 in the element for each line that is an insertion or
+ * deletion (ie. is not in the LCS).
+ *
+ * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1.
+ *
+ * Note that XLIM, YLIM are exclusive bounds. All line numbers are
+ * origin-0 and discarded lines are not counted.
+ */
+ function _compareseq($xoff, $xlim, $yoff, $ylim)
+ {
+ // Slide down the bottom initial diagonal.
+ while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff])
+ {
+ ++$xoff;
+ ++$yoff;
+ }
+
+ // Slide up the top initial diagonal.
+ while ($xlim > $xoff && $ylim > $yoff && $this->xv[$xlim - 1] == $this->yv[$ylim - 1])
+ {
+ --$xlim;
+ --$ylim;
+ }
+
+ if ($xoff == $xlim || $yoff == $ylim)
+ {
+ $lcs = 0;
+ }
+ else
+ {
+ // This is ad hoc but seems to work well.
+ // $nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
+ // $nchunks = max(2,min(8,(int)$nchunks));
+ $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1;
+ list($lcs, $seps) = $this->_diag($xoff, $xlim, $yoff, $ylim, $nchunks);
+ }
+
+ if ($lcs == 0)
+ {
+ // X and Y sequences have no common subsequence: mark all changed.
+ while ($yoff < $ylim)
+ {
+ $this->ychanged[$this->yind[$yoff++]] = 1;
+ }
+
+ while ($xoff < $xlim)
+ {
+ $this->xchanged[$this->xind[$xoff++]] = 1;
+ }
+ }
+ else
+ {
+ // Use the partitions to split this problem into subproblems.
+ reset($seps);
+ $pt1 = $seps[0];
+
+ while ($pt2 = next($seps))
+ {
+ $this->_compareseq($pt1[0], $pt2[0], $pt1[1], $pt2[1]);
+ $pt1 = $pt2;
+ }
+ }
+ }
+
+ /**
+ * Adjusts inserts/deletes of identical lines to join changes as much as possible.
+ *
+ * We do something when a run of changed lines include a line at one end
+ * and has an excluded, identical line at the other. We are free to
+ * choose which identical line is included. 'compareseq' usually chooses
+ * the one at the beginning, but usually it is cleaner to consider the
+ * following identical line to be the "change".
+ *
+ * This is extracted verbatim from analyze.c (GNU diffutils-2.7).
+ */
+ function _shift_boundaries($lines, &$changed, $other_changed)
+ {
+ $i = 0;
+ $j = 0;
+
+ $len = sizeof($lines);
+ $other_len = sizeof($other_changed);
+
+ while (1)
+ {
+ // Scan forward to find the beginning of another run of
+ // changes. Also keep track of the corresponding point in the other file.
+ //
+ // Throughout this code, $i and $j are adjusted together so that
+ // the first $i elements of $changed and the first $j elements of
+ // $other_changed both contain the same number of zeros (unchanged lines).
+ //
+ // Furthermore, $j is always kept so that $j == $other_len or $other_changed[$j] == false.
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+
+ while ($i < $len && ! $changed[$i])
+ {
+ $i++;
+ $j++;
+
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+ }
+
+ if ($i == $len)
+ {
+ break;
+ }
+
+ $start = $i;
+
+ // Find the end of this run of changes.
+ while (++$i < $len && $changed[$i])
+ {
+ continue;
+ }
+
+ do
+ {
+ // Record the length of this run of changes, so that we can later determine whether the run has grown.
+ $runlength = $i - $start;
+
+ // Move the changed region back, so long as the previous unchanged line matches the last changed one.
+ // This merges with previous changed regions.
+ while ($start > 0 && $lines[$start - 1] == $lines[$i - 1])
+ {
+ $changed[--$start] = 1;
+ $changed[--$i] = false;
+
+ while ($start > 0 && $changed[$start - 1])
+ {
+ $start--;
+ }
+
+ while ($other_changed[--$j])
+ {
+ continue;
+ }
+ }
+
+ // Set CORRESPONDING to the end of the changed run, at the last point where it corresponds to a changed run in the
+ // other file. CORRESPONDING == LEN means no such point has been found.
+ $corresponding = $j < $other_len ? $i : $len;
+
+ // Move the changed region forward, so long as the first changed line matches the following unchanged one.
+ // This merges with following changed regions.
+ // Do this second, so that if there are no merges, the changed region is moved forward as far as possible.
+ while ($i < $len && $lines[$start] == $lines[$i])
+ {
+ $changed[$start++] = false;
+ $changed[$i++] = 1;
+
+ while ($i < $len && $changed[$i])
+ {
+ $i++;
+ }
+
+ $j++;
+ if ($j < $other_len && $other_changed[$j])
+ {
+ $corresponding = $i;
+ while ($j < $other_len && $other_changed[$j])
+ {
+ $j++;
+ }
+ }
+ }
+ }
+ while ($runlength != $i - $start);
+
+ // If possible, move the fully-merged run of changes back to a corresponding run in the other file.
+ while ($corresponding < $i)
+ {
+ $changed[--$start] = 1;
+ $changed[--$i] = 0;
+
+ while ($other_changed[--$j])
+ {
+ continue;
+ }
+ }
+ }
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
new file mode 100644
index 0000000000..408addb858
--- /dev/null
+++ b/phpBB/includes/diff/renderer.php
@@ -0,0 +1,832 @@
+ $value)
+ {
+ $v = '_' . $param;
+ if (isset($this->$v))
+ {
+ $this->$v = $value;
+ }
+ }
+ }
+
+ /**
+ * Get any renderer parameters.
+ *
+ * @return array All parameters of this renderer object.
+ */
+ function get_params()
+ {
+ $params = array();
+ foreach (get_object_vars($this) as $k => $v)
+ {
+ if ($k[0] == '_')
+ {
+ $params[substr($k, 1)] = $v;
+ }
+ }
+
+ return $params;
+ }
+
+ /**
+ * Renders a diff.
+ *
+ * @param diff $diff A diff object.
+ *
+ * @return string The formatted output.
+ */
+ function render(&$diff)
+ {
+ $xi = $yi = 1;
+ $block = false;
+ $context = array();
+
+ // Create a new diff object if it is a 3-way diff
+ if (is_a($diff, 'diff3'))
+ {
+ $diff3 = &$diff;
+ $diff = &new diff($diff3->get_original(), $diff3->merged_output());
+ unset($diff3);
+ }
+
+ $nlead = $this->_leading_context_lines;
+ $ntrail = $this->_trailing_context_lines;
+
+ $output = $this->_start_diff();
+ $diffs = $diff->get_diff();
+
+ foreach ($diffs as $i => $edit)
+ {
+ if (is_a($edit, 'diff_op_copy'))
+ {
+ if (is_array($block))
+ {
+ $keep = ($i == sizeof($diffs) - 1) ? $ntrail : $nlead + $ntrail;
+ if (sizeof($edit->orig) <= $keep)
+ {
+ $block[] = $edit;
+ }
+ else
+ {
+ if ($ntrail)
+ {
+ $context = array_slice($edit->orig, 0, $ntrail);
+ $block[] = &new diff_op_copy($context);
+ }
+
+ $output .= $this->_block($x0, $ntrail + $xi - $x0, $y0, $ntrail + $yi - $y0, $block);
+ $block = false;
+ }
+ }
+ $context = $edit->orig;
+ }
+ else
+ {
+ if (!is_array($block))
+ {
+ $context = array_slice($context, sizeof($context) - $nlead);
+ $x0 = $xi - sizeof($context);
+ $y0 = $yi - sizeof($context);
+ $block = array();
+
+ if ($context)
+ {
+ $block[] = &new diff_op_copy($context);
+ }
+ }
+ $block[] = $edit;
+ }
+
+ $xi += ($edit->orig) ? sizeof($edit->orig) : 0;
+ $yi += ($edit->final) ? sizeof($edit->final) : 0;
+ }
+
+ if (is_array($block))
+ {
+ $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block);
+ }
+
+ return $output . $this->_end_diff();
+ }
+
+ function _block($xbeg, $xlen, $ybeg, $ylen, &$edits)
+ {
+ $output = $this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen));
+
+ foreach ($edits as $edit)
+ {
+ switch (get_class($edit))
+ {
+ case 'diff_op_copy':
+ $output .= $this->_context($edit->orig);
+ break;
+
+ case 'diff_op_add':
+ $output .= $this->_added($edit->final);
+ break;
+
+ case 'diff_op_delete':
+ $output .= $this->_deleted($edit->orig);
+ break;
+
+ case 'diff_op_change':
+ $output .= $this->_changed($edit->orig, $edit->final);
+ break;
+ }
+ }
+
+ return $output . $this->_end_block();
+ }
+
+ function _start_diff()
+ {
+ return '';
+ }
+
+ function _end_diff()
+ {
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen > 1)
+ {
+ $xbeg .= ',' . ($xbeg + $xlen - 1);
+ }
+
+ if ($ylen > 1)
+ {
+ $ybeg .= ',' . ($ybeg + $ylen - 1);
+ }
+
+ return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
+ }
+
+ function _start_block($header)
+ {
+ return $header . "\n";
+ }
+
+ function _end_block()
+ {
+ return '';
+ }
+
+ function _lines($lines, $prefix = ' ')
+ {
+ return $prefix . implode("\n$prefix", $lines) . "\n";
+ }
+
+ function _context($lines)
+ {
+ return $this->_lines($lines, ' ');
+ }
+
+ function _added($lines)
+ {
+ return $this->_lines($lines, '> ');
+ }
+
+ function _deleted($lines)
+ {
+ return $this->_lines($lines, '< ');
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . "---\n" . $this->_added($final);
+ }
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return $this->render($diff);
+ }
+}
+
+/**
+* Renders a unified diff
+* @package phpBB3
+*/
+class diff_renderer_unified extends diff_renderer
+{
+ var $_leading_context_lines = 4;
+ var $_trailing_context_lines = 4;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return nl2br($this->render($diff));
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen != 1)
+ {
+ $xbeg .= ',' . $xlen;
+ }
+
+ if ($ylen != 1)
+ {
+ $ybeg .= ',' . $ylen;
+ }
+ return '@@ -' . $xbeg . ' +' . $ybeg . ' @@
';
+ }
+
+ function _context($lines)
+ {
+ return '' . htmlspecialchars($this->_lines($lines, ' ')) . ' ';
+ }
+
+ function _added($lines)
+ {
+ return '' . htmlspecialchars($this->_lines($lines, '+')) . ' ';
+ }
+
+ function _deleted($lines)
+ {
+ return '' . htmlspecialchars($this->_lines($lines, '-')) . ' ';
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+
+ function _start_diff()
+ {
+ $start = '';
+
+ return $start;
+ }
+
+ function _end_diff()
+ {
+ return '
';
+ }
+
+ function _end_block()
+ {
+ return '';
+ }
+}
+
+/**
+* "Inline" diff renderer.
+*
+* This class renders diffs in the Wiki-style "inline" format.
+*
+* @author Ciprian Popovici
+* @package phpBB3
+*/
+class diff_renderer_inline extends diff_renderer
+{
+ var $_leading_context_lines = 10000;
+ var $_trailing_context_lines = 10000;
+
+ // Prefix and suffix for inserted text
+ var $_ins_prefix = '';
+ var $_ins_suffix = ' ';
+
+ // Prefix and suffix for deleted text
+ var $_del_prefix = '';
+ var $_del_suffix = ' ';
+
+ var $_block_head = '';
+
+ // What are we currently splitting on? Used to recurse to show word-level
+ var $_split_level = 'lines';
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return '' . nl2br($this->render($diff)) . ' ';
+ }
+
+ function _start_diff()
+ {
+ return '';
+ }
+
+ function _end_diff()
+ {
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ return $this->_block_head;
+ }
+
+ function _start_block($header)
+ {
+ return $header;
+ }
+
+ function _lines($lines, $prefix = ' ', $encode = true)
+ {
+ if ($encode)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ }
+
+ if ($this->_split_level == 'words')
+ {
+ return implode('', $lines);
+ }
+ else
+ {
+ return implode("\n", $lines) . "\n";
+ }
+ }
+
+ function _added($lines)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ $lines[0] = $this->_ins_prefix . $lines[0];
+ $lines[sizeof($lines) - 1] .= $this->_ins_suffix;
+ return $this->_lines($lines, ' ', false);
+ }
+
+ function _deleted($lines, $words = false)
+ {
+ array_walk($lines, array(&$this, '_encode'));
+ $lines[0] = $this->_del_prefix . $lines[0];
+ $lines[sizeof($lines) - 1] .= $this->_del_suffix;
+ return $this->_lines($lines, ' ', false);
+ }
+
+ function _changed($orig, $final)
+ {
+ // If we've already split on words, don't try to do so again - just display.
+ if ($this->_split_level == 'words')
+ {
+ $prefix = '';
+ while ($orig[0] !== false && $final[0] !== false && substr($orig[0], 0, 1) == ' ' && substr($final[0], 0, 1) == ' ')
+ {
+ $prefix .= substr($orig[0], 0, 1);
+ $orig[0] = substr($orig[0], 1);
+ $final[0] = substr($final[0], 1);
+ }
+
+ return $prefix . $this->_deleted($orig) . $this->_added($final);
+ }
+
+ $text1 = implode("\n", $orig);
+ $text2 = implode("\n", $final);
+
+ // Non-printing newline marker.
+ $nl = "\0";
+
+ // We want to split on word boundaries, but we need to preserve whitespace as well.
+ // Therefore we split on words, but include all blocks of whitespace in the wordlist.
+ $diff = &new diff($this->_split_on_words($text1, $nl), $this->_split_on_words($text2, $nl));
+
+ // Get the diff in inline format.
+ $renderer = &new diff_renderer_inline(array_merge($this->get_params(), array('split_level' => 'words')));
+
+ // Run the diff and get the output.
+ return str_replace($nl, "\n", $renderer->render($diff)) . "\n";
+ }
+
+ function _split_on_words($string, $newline_escape = "\n")
+ {
+ // Ignore \0; otherwise the while loop will never finish.
+ $string = str_replace("\0", '', $string);
+
+ $words = array();
+ $length = strlen($string);
+ $pos = 0;
+
+ $tab_there = true;
+ while ($pos < $length)
+ {
+ // Check for tabs... do not include them
+ if ($tab_there && substr($string, $pos, 1) === "\t")
+ {
+ $words[] = "\t";
+ $pos++;
+
+ continue;
+ }
+ else
+ {
+ $tab_there = false;
+ }
+
+ // Eat a word with any preceding whitespace.
+ $spaces = strspn(substr($string, $pos), " \n");
+ $nextpos = strcspn(substr($string, $pos + $spaces), " \n");
+ $words[] = str_replace("\n", $newline_escape, substr($string, $pos, $spaces + $nextpos));
+ $pos += $spaces + $nextpos;
+ }
+
+ return $words;
+ }
+
+ function _encode(&$string)
+ {
+ $string = htmlspecialchars($string);
+ }
+}
+
+/**
+* "raw" diff renderer.
+* This class could be used to output a raw unified patch file
+*
+* @package phpBB3
+*/
+class diff_renderer_raw extends diff_renderer
+{
+ var $_leading_context_lines = 4;
+ var $_trailing_context_lines = 4;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ if ($xlen != 1)
+ {
+ $xbeg .= ',' . $xlen;
+ }
+
+ if ($ylen != 1)
+ {
+ $ybeg .= ',' . $ylen;
+ }
+ return '@@ -' . $xbeg . ' +' . $ybeg . ' @@';
+ }
+
+ function _context($lines)
+ {
+ return $this->_lines($lines, ' ');
+ }
+
+ function _added($lines)
+ {
+ return $this->_lines($lines, '+');
+ }
+
+ function _deleted($lines)
+ {
+ return $this->_lines($lines, '-');
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+}
+
+/**
+* "chora (Horde)" diff renderer - similar style.
+* This renderer class is a modified human_readable function from the Horde Framework.
+*
+* @package phpBB3
+*/
+class diff_renderer_side_by_side extends diff_renderer
+{
+ var $_leading_context_lines = 3;
+ var $_trailing_context_lines = 3;
+
+ var $lines = array();
+
+ // Hold the left and right columns of lines for change blocks.
+ var $cols;
+ var $state;
+
+ var $data = false;
+
+ /**
+ * Our function to get the diff
+ */
+ function get_diff_content($diff)
+ {
+ global $user;
+
+ $output = '';
+ $output .= '
+
+ ' . $user->lang['LINE_UNMODIFIED'] . '
+ ' . $user->lang['LINE_ADDED'] . '
+ ' . $user->lang['LINE_MODIFIED'] . '
+ ' . $user->lang['LINE_REMOVED'] . '
+
+
+';
+
+ $this->render($diff);
+
+ // Is the diff empty?
+ if (!sizeof($this->lines))
+ {
+ $output .= '' . $user->lang['NO_VISIBLE_CHANGES'] . ' ';
+ }
+ else
+ {
+ // Iterate through every header block of changes
+ foreach ($this->lines as $header)
+ {
+ $output .= 'Line ' . $header['oldline'] . ' ' . $user->lang['LINE'] . ' ' . $header['newline'] . ' ';
+
+ // Each header block consists of a number of changes (add, remove, change).
+ $current_context = '';
+
+ foreach ($header['contents'] as $change)
+ {
+ if (!empty($current_context) && $change['type'] != 'empty')
+ {
+ $line = $current_context;
+ $current_context = '';
+
+ $output .= '' . ((strlen($line)) ? $line : ' ') . '
+ ' . ((strlen($line)) ? $line : ' ') . ' ';
+ }
+
+ switch ($change['type'])
+ {
+ case 'add':
+ $line = '';
+
+ foreach ($change['lines'] as $_line)
+ {
+ $line .= htmlspecialchars($_line) . ' ';
+ }
+
+ $output .= ' ' . ((strlen($line)) ? $line : ' ') . ' ';
+ break;
+
+ case 'remove':
+ $line = '';
+
+ foreach ($change['lines'] as $_line)
+ {
+ $line .= htmlspecialchars($_line) . ' ';
+ }
+
+ $output .= '' . ((strlen($line)) ? $line : ' ') . ' ';
+ break;
+
+ case 'empty':
+ $current_context .= htmlspecialchars($change['line']) . ' ';
+ break;
+
+ case 'change':
+ // Pop the old/new stacks one by one, until both are empty.
+ $oldsize = sizeof($change['old']);
+ $newsize = sizeof($change['new']);
+ $left = $right = '';
+
+ for ($row = 0, $row_max = max($oldsize, $newsize); $row < $row_max; ++$row)
+ {
+ $left .= isset($change['old'][$row]) ? htmlspecialchars($change['old'][$row]) : '';
+ $left .= ' ';
+ $right .= isset($change['new'][$row]) ? htmlspecialchars($change['new'][$row]) : '';
+ $right .= ' ';
+ }
+
+ $output .= '';
+
+ if (!empty($left))
+ {
+ $output .= '' . $left . ' ';
+ }
+ else if ($row < $oldsize)
+ {
+ $output .= ' ';
+ }
+ else
+ {
+ $output .= ' ';
+ }
+
+ if (!empty($right))
+ {
+ $output .= '' . $right . ' ';
+ }
+ else if ($row < $newsize)
+ {
+ $output .= ' ';
+ }
+ else
+ {
+ $output .= ' ';
+ }
+
+ $output .= ' ';
+ break;
+ }
+ }
+
+ if (!empty($current_context))
+ {
+ $line = $current_context;
+ $current_context = '';
+
+ $output .= '' . ((strlen($line)) ? $line : ' ') . ' ';
+ $output .= '' . ((strlen($line)) ? $line : ' ') . ' ';
+ }
+ }
+ }
+
+ $output .= '
';
+
+ return $output;
+ }
+
+ function _start_diff()
+ {
+ $this->lines = array();
+
+ $this->data = false;
+ $this->cols = array(array(), array());
+ $this->state = 'empty';
+
+ return '';
+ }
+
+ function _end_diff()
+ {
+ // Just flush any remaining entries in the columns stack.
+ switch ($this->state)
+ {
+ case 'add':
+ $this->data['contents'][] = array('type' => 'add', 'lines' => $this->cols[0]);
+ break;
+
+ case 'remove':
+ // We have some removal lines pending in our stack, so flush them.
+ $this->data['contents'][] = array('type' => 'remove', 'lines' => $this->cols[0]);
+ break;
+
+ case 'change':
+ // We have both remove and addition lines, so this is a change block.
+ $this->data['contents'][] = array('type' => 'change', 'old' => $this->cols[0], 'new' => $this->cols[1]);
+ break;
+ }
+
+ if ($this->data !== false)
+ {
+ $this->lines[] = $this->data;
+ }
+
+ return '';
+ }
+
+ function _block_header($xbeg, $xlen, $ybeg, $ylen)
+ {
+ // Push any previous header information to the return stack.
+ if ($this->data !== false)
+ {
+ $this->lines[] = $this->data;
+ }
+
+ $this->data = array('type' => 'header', 'oldline' => $xbeg, 'newline' => $ybeg, 'contents' => array());
+ $this->state = 'dump';
+ }
+
+ function _added($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_add'));
+ }
+
+ function _perform_add($line)
+ {
+ if ($this->state == 'empty')
+ {
+ return '';
+ }
+
+ // This is just an addition line.
+ if ($this->state == 'dump' || $this->state == 'add')
+ {
+ // Start adding to the addition stack.
+ $this->cols[0][] = $line;
+ $this->state = 'add';
+ }
+ else
+ {
+ // This is inside a change block, so start accumulating lines.
+ $this->state = 'change';
+ $this->cols[1][] = $line;
+ }
+ }
+
+ function _deleted($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_delete'));
+ }
+
+ function _perform_delete($line)
+ {
+ // This is a removal line.
+ $this->state = 'remove';
+ $this->cols[0][] = $line;
+ }
+
+ function _context($lines)
+ {
+ array_walk($lines, array(&$this, '_perform_context'));
+ }
+
+ function _perform_context($line)
+ {
+ // An empty block with no action.
+ switch ($this->state)
+ {
+ case 'add':
+ $this->data['contents'][] = array('type' => 'add', 'lines' => $this->cols[0]);
+ break;
+
+ case 'remove':
+ // We have some removal lines pending in our stack, so flush them.
+ $this->data['contents'][] = array('type' => 'remove', 'lines' => $this->cols[0]);
+ break;
+
+ case 'change':
+ // We have both remove and addition lines, so this is a change block.
+ $this->data['contents'][] = array('type' => 'change', 'old' => $this->cols[0], 'new' => $this->cols[1]);
+ break;
+ }
+
+ $this->cols = array(array(), array());
+ $this->data['contents'][] = array('type' => 'empty', 'line' => $line);
+ $this->state = 'dump';
+ }
+
+ function _changed($orig, $final)
+ {
+ return $this->_deleted($orig) . $this->_added($final);
+ }
+
+}
+
+?>
\ No newline at end of file
From 5fda5b4ab087c708963026924c7c10ce60482de7 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Wed, 23 Aug 2006 07:52:07 +0000
Subject: [PATCH 026/291] fix redirect if we are within the admin directory
(not /ucp.php but /{admin_directory}/index.php)
git-svn-id: file:///svn/phpbb/trunk@6314 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8affabc8c9..349719af57 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1865,8 +1865,15 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
if (!$redirect)
{
// We just use what the session code determined...
- // We do not append the phpbb_root_path directory because we are within the root dir if the redirect happens and not within the current directory.
- $redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
+ // If we are not within the admin directory we use the page dir...
+ $redirect = '';
+
+ if (!$admin)
+ {
+ $redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '';
+ }
+
+ $redirect .= $user->page['page_name'] . (($user->page['query_string']) ? '?' . $user->page['query_string'] : '');
}
$s_hidden_fields = build_hidden_fields(array('redirect' => $redirect, 'sid' => $user->session_id));
From e6e1be982771f9604c4316cffaa7ccea5a9010f7 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Wed, 23 Aug 2006 14:59:52 +0000
Subject: [PATCH 027/291] Fix some minor bugs arising from yesterday. Nils - I
haven't looked into the other related pages yet
git-svn-id: file:///svn/phpbb/trunk@6315 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions_admin.php | 11 +++++++----
phpBB/install/schemas/schema_data.sql | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 85ed30db18..73022aa2a3 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1378,6 +1378,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$forum_data[$forum_id]['last_post_time'] = 0;
$forum_data[$forum_id]['last_poster_id'] = 0;
$forum_data[$forum_id]['last_poster_name'] = '';
+ $forum_data[$forum_id]['last_poster_colour'] = '';
}
$db->sql_freeresult($result);
@@ -1427,7 +1428,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
// 4: Retrieve last_post infos
if (sizeof($post_ids))
{
- $sql = 'SELECT p.post_id, p.poster_id, p.post_time, p.post_username, u.username
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_time, p.post_username, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND p.poster_id = u.user_id';
@@ -1448,6 +1449,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$forum_data[$forum_id]['last_post_time'] = $post_info[$data['last_post_id']]['post_time'];
$forum_data[$forum_id]['last_poster_id'] = $post_info[$data['last_post_id']]['poster_id'];
$forum_data[$forum_id]['last_poster_name'] = ($post_info[$data['last_post_id']]['poster_id'] != ANONYMOUS) ? $post_info[$data['last_post_id']]['username'] : $post_info[$data['last_post_id']]['post_username'];
+ $forum_data[$forum_id]['last_poster_colour'] = $post_info[$data['last_post_id']]['user_colour'];
}
else
{
@@ -1456,6 +1458,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$forum_data[$forum_id]['last_post_time'] = 0;
$forum_data[$forum_id]['last_poster_id'] = 0;
$forum_data[$forum_id]['last_poster_name'] = '';
+ $forum_data[$forum_id]['last_poster_colour'] = '';
}
}
}
@@ -1463,7 +1466,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
}
// 5: Now do that thing
- $fieldnames = array('posts', 'topics', 'topics_real', 'last_post_id', 'last_post_time', 'last_poster_id', 'last_poster_name');
+ $fieldnames = array('posts', 'topics', 'topics_real', 'last_post_id', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
foreach ($forum_data as $forum_id => $row)
{
@@ -1497,7 +1500,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
case 'topic':
$topic_data = $post_ids = $approved_unapproved_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
- $sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_last_post_id, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time
+ $sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
FROM ' . TOPICS_TABLE . " t
$where_sql";
$result = $db->sql_query($sql);
@@ -1682,7 +1685,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
unset($approved_unapproved_ids);
// These are fields that will be synchronised
- $fieldnames = array('time', 'replies', 'replies_real', 'poster', 'first_post_id', 'first_poster_name', 'last_post_id', 'last_post_time', 'last_poster_id', 'last_poster_name');
+ $fieldnames = array('time', 'replies', 'replies_real', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
if ($sync_extra)
{
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index ac8e86a25c..b40061c912 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -542,7 +542,7 @@ INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id,
# -- Demo Topic
-INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_first_poster_colour, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', 972086460, 972086460, '');
+INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', 972086460, 972086460, '');
# -- Demo Post
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 1, 972086460, '', '127.0.0.1', 'Welcome to phpBB 3', 'This is an example post in your phpBB 3.0 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', '5dd683b17f641daf84c040bfefc58ce9', '');
From d1ae8c52a4fc4ab88f34347962ac667a0365f8a9 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Wed, 23 Aug 2006 15:46:10 +0000
Subject: [PATCH 028/291] colour is a string. :)
git-svn-id: file:///svn/phpbb/trunk@6316 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions_admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 73022aa2a3..bb889eae12 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -1476,7 +1476,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
{
if ($row['forum_' . $fieldname] != $row[$fieldname])
{
- if (preg_match('#name$#', $fieldname))
+ if (preg_match('#(name|colour)$#', $fieldname))
{
$sql_ary['forum_' . $fieldname] = (string) $row[$fieldname];
}
From e7cbcfe874d663703a4f6d36974aa8eb19a59c58 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Fri, 25 Aug 2006 15:15:53 +0000
Subject: [PATCH 029/291] some fixes.
David, could you check the pass_complex expressions? They are:
.* PASS_TYPE_ANY (any characters are allowed, no check)
[a-zA-Z] PASS_TYPE_CASE (password must contain alphanumerics)
[a-zA-Z0-9] PASS_TYPE_ALPHA (password must contain alphanumerics and numbers)
[a-zA-Z\W] PASS_TYPE_SYMBOL (password must contain alphanumers, numbers and symbols)
At the moment the pass complexity check is done within validate_password(), but the expressions are wrong. :)
git-svn-id: file:///svn/phpbb/trunk@6317 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/cron.php | 17 +++++++++--------
phpBB/includes/acp/acp_users.php | 11 +++++++----
phpBB/includes/functions_posting.php | 3 ++-
phpBB/includes/functions_user.php | 24 ++++++++++++++++++++++++
phpBB/includes/mcp/mcp_main.php | 13 +++++++++++--
phpBB/includes/ucp/ucp_profile.php | 7 +++++--
phpBB/includes/ucp/ucp_register.php | 7 +++++--
phpBB/language/en/acp/email.php | 2 +-
phpBB/language/en/posting.php | 2 +-
phpBB/language/en/ucp.php | 8 ++++++--
phpBB/mcp.php | 1 -
phpBB/posting.php | 4 ++--
phpBB/viewtopic.php | 2 +-
13 files changed, 74 insertions(+), 27 deletions(-)
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 38bcd38d3e..99a8b42955 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -23,6 +23,15 @@ $auth->acl($user->data);
$cron_type = request_var('cron_type', '');
$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
+// Output transparent gif
+header('Cache-Control: no-cache');
+header('Content-type: image/gif');
+header('Content-length: 43');
+
+echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
+
+flush();
+
/**
* Run cron-like action
* Real cron-based layer will be introduced in 3.2
@@ -217,14 +226,6 @@ else
garbage_collection();
}
-// Output transparent gif
-header('Cache-Control: no-cache');
-header('Content-type: image/gif');
-header('Content-length: 43');
-
-echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
-
-flush();
exit;
?>
\ No newline at end of file
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index e658609c5f..fa4327c169 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -622,9 +622,11 @@ class acp_users
$data['username'] = $data['user'];
unset($data['user']);
- // Validation data
+ // Validation data - we do not check the password complexity setting here
$var_ary = array(
- 'user_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'user_password' => array(
+ array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'warnings' => array('num'),
);
@@ -772,6 +774,7 @@ class acp_users
}
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS');
+ $pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
if ($user_id == $user->data['user_id'])
{
@@ -794,8 +797,8 @@ class acp_users
}
$template->assign_vars(array(
- 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[$config['allow_name_chars']] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang['CHANGE_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
'S_OVERVIEW' => true,
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 6fc9d83be6..e54c27ed53 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -535,7 +535,8 @@ function create_thumbnail($source, $destination, $mimetype)
// Only use imagemagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
- passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
+ @passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');
+
if (file_exists($destination))
{
$used_imagick = true;
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 870c20f665..b5dfecb45f 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1034,6 +1034,7 @@ function validate_match($string, $optional = false, $match)
* Also checks if it includes the " character, which we don't allow in usernames.
* Used for registering, changing names, and posting anonymously with a username
*
+* @todo do we really check and disallow the " character in usernames as written above. Has it only be forgotten to include the check?
* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/
function validate_username($username)
@@ -1105,6 +1106,29 @@ function validate_username($username)
return false;
}
+/**
+* Check to see if the password meets the complexity settings
+*
+* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
+*/
+function validate_password($password)
+{
+ global $config, $db, $user;
+
+ if (!$password)
+ {
+ return false;
+ }
+
+ // We only check for existance of characters
+ if (!preg_match('#' . str_replace('\\\\', '\\', $config['pass_complex']) . '#i', $password))
+ {
+ return 'INVALID_CHARS';
+ }
+
+ return false;
+}
+
/**
* Check to see if email address is banned or already present in the DB
*
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index b77c3e4451..fe1047db79 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -207,9 +207,18 @@ function lock_unlock($action, $ids)
$l_prefix = 'POST';
}
- if (!($forum_id = check_ids($ids, $table, $sql_id, array('f_user_lock', 'm_lock'))))
+ if (!($forum_id = check_ids($ids, $table, $sql_id, array('m_lock'))))
{
- return;
+ // Make sure that for f_user_lock only the lock action is triggered.
+ if ($action != 'lock')
+ {
+ return;
+ }
+
+ if (!($forum_id = check_ids($ids, $table, $sql_id, array('f_user_lock'))))
+ {
+ return;
+ }
}
$redirect = request_var('redirect', $user->data['session_page']);
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index d757d6e14d..eec8d4c3da 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -51,7 +51,9 @@ class ucp_profile
// Do not check cur_password, it is the old one.
$var_ary = array(
- 'new_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'new_password' => array(
+ array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
@@ -207,6 +209,7 @@ class ucp_profile
}
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS');
+ $pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode(' ', $error) : '',
@@ -218,7 +221,7 @@ class ucp_profile
'CUR_PASSWORD' => '',
'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang['CHANGE_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'S_FORCE_PASSWORD' => ($config['chg_passforce'] && $user->data['user_passchg'] < time() - $config['chg_passforce']) ? true : false,
'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 01b92125ac..2a4e376f14 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -117,7 +117,9 @@ class ucp_register
'username' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('username')),
- 'new_password' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'new_password' => array(
+ array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('password')),
'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
@@ -433,6 +435,7 @@ class ucp_register
}
$user_char_ary = array('.*' => 'USERNAME_CHARS_ANY', '[\w]+' => 'USERNAME_ALPHA_ONLY', '[\w_\+\. \-\[\]]+' => 'USERNAME_ALPHA_SPACERS');
+ $pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
$lang = (isset($lang)) ? $lang : $config['default_lang'];
$tz = (isset($tz)) ? $tz : $config['board_timezone'];
@@ -450,7 +453,7 @@ class ucp_register
'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '', ' '),
'L_REG_COND' => $l_reg_cond,
'L_USERNAME_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_NEW_PASSWORD_EXPLAIN' => sprintf($user->lang['NEW_PASSWORD_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_NEW_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
'S_LANG_OPTIONS' => language_select($lang),
'S_TZ_OPTIONS' => tz_select($tz),
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index c72bdbcb68..73f061c1db 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -41,7 +41,7 @@ $lang = array_merge($lang, array(
'LOG_SESSION' => 'Log mail session to critical log',
- 'SEND_IMMEDIATLY' => 'Send immediatly',
+ 'SEND_IMMEDIATLY' => 'Send immediately',
'SEND_TO_GROUP' => 'Send to group',
'SEND_TO_USERS' => 'Send to users',
'SEND_TO_USERS_EXPLAIN' => 'Entering names here will override any group selected above. Enter each username on a new line.',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 30ed20d2f2..518b3ec672 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -53,7 +53,7 @@ $lang = array_merge($lang, array(
'BBCODE_S_HELP' => 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000',
'BBCODE_U_HELP' => 'Underline text: [u]text[/u] (alt+u)',
'BBCODE_W_HELP' => 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)',
- 'BBCODE_D_HELP' => 'Flash: [flash=height,width]http://url[/flash] (alt+d)',
+ 'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash] (alt+d)',
'BUMP_ERROR' => 'You cannot bump this topic so soon after the last post.',
'CANNOT_DELETE_REPLIED' => 'Sorry but you may only delete posts which have not been replied to.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 39a3831e9a..c9c22c6221 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -120,7 +120,6 @@ $lang = array_merge($lang, array(
'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.',
'CHANGE_DEFAULT_GROUP' => 'Change default group',
'CHANGE_PASSWORD' => 'Change password',
- 'CHANGE_PASSWORD_EXPLAIN' => 'Must be between %1$d and %2$d characters.',
'CLICK_RETURN_FOLDER' => '%1$sReturn to your "%3$s" folder%2$s',
'CONFIRMATION' => 'Confirmation of registration',
'CONFIRM_EMAIL' => 'Confirm email address',
@@ -225,6 +224,8 @@ $lang = array_merge($lang, array(
'IF_FOLDER_FULL' => 'If folder is full',
'IMPORTANT_NEWS' => 'Important announcements',
+ 'INVALID_CHARS_USERNAME' => 'The username contains forbidden characters.',
+ 'INVALID_CHARS_NEW_PASSWORD'=> 'The password does not contain the required characters.',
'ITEMS_REQUIRED' => 'The items marked with * are required profile fields and need to be filled out',
'JOIN_SELECTED' => 'Join selected',
@@ -261,7 +262,6 @@ $lang = array_merge($lang, array(
'NEW_FOLDER_NAME' => 'New folder name',
'NEW_PASSWORD' => 'Password',
'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.',
- 'NEW_PASSWORD_EXPLAIN' => 'Must be between %1$d and %2$d characters.',
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',
'NOTIFY_METHOD_EMAIL' => 'Email only',
@@ -313,6 +313,10 @@ $lang = array_merge($lang, array(
'NO_WATCHED_FORUMS' => 'You are not watching any forums.',
'NO_WATCHED_TOPICS' => 'You are not watching any topics.',
+ 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d chars long and must contain alphanumerics',
+ 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$d and %2$d characters.',
+ 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$d and %2$d chars long and must be mixed case',
+ 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d chars long and must contain symbols',
'PASSWORD_ACTIVATED' => 'Your new password has been activated',
'PASSWORD_UPDATED' => 'Your password has been sent successfully to your original email address.',
'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 0ecef72efa..1b09eb1e2c 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -106,7 +106,6 @@ if (!$auth->acl_getf_global('m_'))
// Except he is using one of the quickmod tools for users
$user_quickmod_actions = array(
'lock' => 'f_user_lock',
- 'unlock' => 'f_user_lock',
'make_sticky' => 'f_sticky',
'make_announce' => 'f_announce',
'make_global' => 'f_announce',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 8210767ec2..fc3ce33c11 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -808,7 +808,7 @@ if ($submit || $preview || $refresh)
{
// Lock/Unlock Topic
$change_topic_status = $post_data['topic_status'];
- $perm_lock_unlock = ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster']));
+ $perm_lock_unlock = ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED)) ? true : false;
if ($post_data['topic_status'] == ITEM_LOCKED && !$topic_lock && $perm_lock_unlock)
{
@@ -1160,7 +1160,7 @@ $template->assign_vars(array(
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
'S_NOTIFY_ALLOWED' => (!$user->data['is_registered'] || ($mode == 'edit' && $user->data['user_id'] != $post_data['poster_id']) || !$config['allow_topic_notify']) ? false : true,
'S_NOTIFY_CHECKED' => ($notify_checked) ? ' checked="checked"' : '',
- 'S_LOCK_TOPIC_ALLOWED' => (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster']))) ? true : false,
+ 'S_LOCK_TOPIC_ALLOWED' => (($mode == 'edit' || $mode == 'reply' || $mode == 'quote') && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && !empty($post_data['topic_poster']) && $user->data['user_id'] == $post_data['topic_poster'] && $post_data['topic_status'] == ITEM_UNLOCKED))) ? true : false,
'S_LOCK_TOPIC_CHECKED' => ($lock_topic_checked) ? ' checked="checked"' : '',
'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '',
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 9a8b893e59..14ab1f69ee 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -472,7 +472,7 @@ gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
$allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
$topic_mod = '';
-$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '' . $user->lang['LOCK_TOPIC'] . ' ' : '' . $user->lang['UNLOCK_TOPIC'] . ' ') : '';
+$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '' . $user->lang['LOCK_TOPIC'] . ' ' : '' . $user->lang['UNLOCK_TOPIC'] . ' ') : '';
$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '' . $user->lang['DELETE_TOPIC'] . ' ' : '';
$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '' . $user->lang['MOVE_TOPIC'] . ' ' : '';
$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '' . $user->lang['SPLIT_TOPIC'] . ' ' : '';
From 6d583dcf6e20db10070a1e61f66291b4464f6f75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sun, 27 Aug 2006 18:32:22 +0000
Subject: [PATCH 030/291] Testing, testing, ... is this thing on?
Some cleaning up on view profile - bug #3834
git-svn-id: file:///svn/phpbb/trunk@6318 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/styles/subSilver/template/memberlist_view.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html
index 1443997d00..dd33810495 100644
--- a/phpBB/styles/subSilver/template/memberlist_view.html
+++ b/phpBB/styles/subSilver/template/memberlist_view.html
@@ -124,30 +124,30 @@
-
+
{L_USERGROUPS}:
{S_GROUP_OPTIONS}
{L_LOCATION}:
- {LOCATION}
+ {LOCATION}
{L_AGE}:
- {AGE}
+ {AGE}
{L_OCCUPATION}:
- {OCCUPATION}
+ {OCCUPATION}
{L_INTERESTS}:
- {INTERESTS}
+ {INTERESTS}
{L_WEBSITE}:
- {U_WWW}
+ {U_WWW}
From 902285684d08394437650174fa9bdfe6904db85c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sun, 27 Aug 2006 19:22:06 +0000
Subject: [PATCH 031/291] Some more minor style bugs fixed.
git-svn-id: file:///svn/phpbb/trunk@6319 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_prune_forums.html | 2 +-
phpBB/adm/style/admin.css | 1 +
phpBB/styles/subSilver/template/mcp_reports.html | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
index 22592f79c5..b6a9fac56a 100644
--- a/phpBB/adm/style/acp_prune_forums.html
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -25,7 +25,7 @@
- {L_NO_PRUNE}
+ {L_NO_PRUNE}
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index c1bac3d3c6..da00033931 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -18,6 +18,7 @@ html {
font-size: 100%;
height: 100%;
margin-bottom: 1px;
+ background-color: #E4EDF0;
}
body {
diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html
index f0c1281b0b..9eaf11a6f0 100644
--- a/phpBB/styles/subSilver/template/mcp_reports.html
+++ b/phpBB/styles/subSilver/template/mcp_reports.html
@@ -23,7 +23,7 @@
{L_FORUM}: {postrow.FORUM_NAME} {postrow.FORUM_NAME}
{postrow.POSTER} {postrow.POSTER}
{postrow.POST_TIME}
- {postrow.REPORTER} {postrow.REPORTER}
+ {postrow.REPORTER} {postrow.REPORTER}
{postrow.REPORT_TIME}
[ {L_VIEW_DETAILS} ]
From 1d37b69ddd79d9d6bc1346f3761a899d20305636 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Mon, 28 Aug 2006 15:50:33 +0000
Subject: [PATCH 032/291] - some bugfixes - using E_USER_WARNING if an error
occurred within the ACP (sadly not able to use it as a default for
trigger_error - it seems to be hardcoded in PHP)
git-svn-id: file:///svn/phpbb/trunk@6320 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_profile.html | 2 +-
phpBB/adm/style/message_body.html | 2 +-
phpBB/includes/acp/acp_attachments.php | 12 +++--
phpBB/includes/acp/acp_bbcodes.php | 8 +--
phpBB/includes/acp/acp_board.php | 7 +--
phpBB/includes/acp/acp_bots.php | 6 +--
phpBB/includes/acp/acp_captcha.php | 6 +--
phpBB/includes/acp/acp_database.php | 4 +-
phpBB/includes/acp/acp_disallow.php | 6 +--
phpBB/includes/acp/acp_email.php | 5 +-
phpBB/includes/acp/acp_forums.php | 51 ++++++++++++++-----
phpBB/includes/acp/acp_groups.php | 24 ++++-----
phpBB/includes/acp/acp_icons.php | 6 +--
phpBB/includes/acp/acp_jabber.php | 6 +--
phpBB/includes/acp/acp_language.php | 40 ++++++++-------
phpBB/includes/acp/acp_main.php | 16 +++---
phpBB/includes/acp/acp_modules.php | 16 +++---
phpBB/includes/acp/acp_permission_roles.php | 19 +++----
phpBB/includes/acp/acp_permissions.php | 27 +++++-----
phpBB/includes/acp/acp_php_info.php | 2 +-
phpBB/includes/acp/acp_profile.php | 14 ++---
phpBB/includes/acp/acp_prune.php | 2 +-
phpBB/includes/acp/acp_ranks.php | 4 +-
phpBB/includes/acp/acp_reasons.php | 6 +--
phpBB/includes/acp/acp_search.php | 13 ++---
phpBB/includes/acp/acp_styles.php | 44 ++++++++--------
phpBB/includes/acp/acp_users.php | 28 +++++-----
phpBB/includes/acp/acp_words.php | 6 +--
phpBB/includes/constants.php | 1 +
phpBB/includes/functions.php | 31 ++++++++---
phpBB/includes/functions_posting.php | 4 +-
phpBB/includes/ucp/ucp_pm_viewfolder.php | 4 +-
phpBB/install/schemas/schema_data.sql | 1 +
phpBB/language/en/acp/attachments.php | 2 +
phpBB/language/en/common.php | 2 +
.../subSilver/template/posting_body.html | 4 +-
.../template/ucp_pm_viewmessage.html | 4 +-
.../subSilver/template/viewforum_body.html | 8 +--
.../subSilver/template/viewtopic_body.html | 2 +-
phpBB/viewforum.php | 3 ++
phpBB/viewtopic.php | 42 +++++++++++++--
41 files changed, 296 insertions(+), 194 deletions(-)
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
index 809eb46bda..5f7c87432c 100644
--- a/phpBB/adm/style/acp_profile.html
+++ b/phpBB/adm/style/acp_profile.html
@@ -170,7 +170,7 @@
{fields.FIELD_IDENT}
{fields.FIELD_TYPE}
- {fields.L_ACTIVATE_DEACTIVATE} | {L_EDIT}
+ {fields.L_ACTIVATE_DEACTIVATE} | {L_EDIT}
{ICON_MOVE_UP}
diff --git a/phpBB/adm/style/message_body.html b/phpBB/adm/style/message_body.html
index 17db5aca37..5d907e911c 100644
--- a/phpBB/adm/style/message_body.html
+++ b/phpBB/adm/style/message_body.html
@@ -1,6 +1,6 @@
-
+
class="successbox"class="errorbox">
{MESSAGE_TITLE}
{MESSAGE_TEXT}
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 1089a06152..0b3e9dda0a 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -46,7 +46,8 @@ class acp_attachments
break;
default:
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
}
$this->tpl_name = 'acp_attachments';
@@ -102,6 +103,7 @@ class acp_attachments
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'type' => 'text:20:200', 'explain' => true, 'append' => '
[ ' . $user->lang['SEARCH_IMAGICK'] . ' ] '),
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
@@ -403,12 +405,12 @@ class acp_attachments
if ($action != 'add' && $action != 'edit')
{
- trigger_error('WRONG_MODE');
+ trigger_error('WRONG_MODE', E_USER_WARNING);
}
if (!$group_id && $action == 'edit')
{
- trigger_error('NO_EXT_GROUP_SPECIFIED');
+ trigger_error('NO_EXT_GROUP_SPECIFIED', E_USER_WARNING);
}
if ($group_id)
@@ -578,7 +580,7 @@ class acp_attachments
if (!$group_id)
{
- trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -770,7 +772,7 @@ class acp_attachments
if (!$group_id)
{
- trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_EXTENSION_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index cdfe8e42eb..f37d9b1aef 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -47,7 +47,7 @@ class acp_bbcodes
if (!$row)
{
- trigger_error('BBCODE_NOT_EXIST');
+ trigger_error('BBCODE_NOT_EXIST', E_USER_WARNING);
}
$bbcode_match = $row['bbcode_match'];
@@ -66,7 +66,7 @@ class acp_bbcodes
if (!$row)
{
- trigger_error('BBCODE_NOT_EXIST');
+ trigger_error('BBCODE_NOT_EXIST', E_USER_WARNING);
}
// No break here
@@ -129,7 +129,7 @@ class acp_bbcodes
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
{
- trigger_error('BBCODE_INVALID_TAG_NAME');
+ trigger_error('BBCODE_INVALID_TAG_NAME', E_USER_WARNING);
}
}
@@ -170,7 +170,7 @@ class acp_bbcodes
if ($bbcode_id > 1511)
{
- trigger_error('TOO_MANY_BBCODES');
+ trigger_error('TOO_MANY_BBCODES', E_USER_WARNING);
}
$sql_ary['bbcode_id'] = (int) $bbcode_id;
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 49e4b1eb1c..5f5cf6cd99 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -335,7 +335,8 @@ class acp_board
break;
default:
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
+ break;
}
if (isset($display_vars['lang']))
@@ -448,14 +449,14 @@ class acp_board
{
set_config($config_name, $config_value);
}
- trigger_error($error . adm_back_link($this->u_action));
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
set_config('auth_method', $cfg_array['auth_method']);
}
else
{
- trigger_error('NO_AUTH_PLUGIN');
+ trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
}
}
}
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index f24a6b7b12..fcee10fde5 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -159,7 +159,7 @@ class acp_bots
if (!$group_row)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
}
$user_id = user_add(array(
@@ -197,7 +197,7 @@ class acp_bots
if (!$row)
{
- trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"));
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
}
$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
@@ -237,7 +237,7 @@ class acp_bots
if (!$bot_row)
{
- trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"));
+ trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING);
}
$bot_row['bot_lang'] = $bot_row['user_lang'];
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 3ac354004a..2ae65b7687 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -86,17 +86,17 @@ class acp_captcha
if (!@extension_loaded('gd'))
{
- trigger_error($user->lang['NO_GD']);
+ trigger_error($user->lang['NO_GD'], E_USER_WARNING);
}
if (!($policy === 'policy_entropy' || $policy === 'policy_3dbitmap') && (!function_exists('imagettfbbox') || !function_exists('imagettftext')))
{
- trigger_error($user->lang['NO_TTF']);
+ trigger_error($user->lang['NO_TTF'], E_USER_WARNING);
}
if (!in_array($policy, $policy_modules))
{
- trigger_error($user->lang['BAD_POLICY']);
+ trigger_error($user->lang['BAD_POLICY'], E_USER_WARNING);
}
$user->add_lang('ucp');
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 00ffebc6e5..265f73114e 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -113,7 +113,7 @@ class acp_database
if (!$fp)
{
- trigger_error('Unable to write temporary file to storage folder');
+ trigger_error('Unable to write temporary file to storage folder', E_USER_ERROR);
}
}
@@ -1194,7 +1194,7 @@ class acp_database
if (!(file_exists($file_name) && is_readable($file_name)))
{
- trigger_error($user->lang['BACKUP_INVALID']);
+ trigger_error($user->lang['BACKUP_INVALID'], E_USER_WARNING);
}
if ($delete)
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index 1fdc2f8551..b42eb190d7 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -37,7 +37,7 @@ class acp_disallow
if (!$disallowed_user)
{
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
@@ -54,7 +54,7 @@ class acp_disallow
if (!$disallowed_id)
{
- trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
@@ -63,7 +63,7 @@ class acp_disallow
add_log('admin', 'LOG_DISALLOW_DELETE');
- trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DISALLOWED_DELETED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Grab the current list of disallowed usernames...
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index c20640bd54..c977d405cc 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -87,7 +87,7 @@ class acp_email
if (!$row)
{
$db->sql_freeresult($result);
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$i = $j = 0;
@@ -185,12 +185,13 @@ class acp_email
if (!$errored)
{
$message = ($use_queue) ? $user->lang['EMAIL_SENT_QUEUE'] : $user->lang['EMAIL_SENT'];
+ trigger_error($message . adm_back_link($this->u_action));
}
else
{
$message = sprintf($user->lang['EMAIL_SEND_ERROR'], '
', ' ');
+ trigger_error($message . adm_back_link($this->u_action), E_USER_WARNING);
}
- trigger_error($message . adm_back_link($this->u_action));
}
}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 5964a285e7..e9e75ed57d 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -40,7 +40,7 @@ class acp_forums
if (!$auth->acl_get('a_forumdel'))
{
- trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -49,7 +49,7 @@ class acp_forums
if (!$auth->acl_get('a_forumadd'))
{
- trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
break;
@@ -265,7 +265,7 @@ class acp_forums
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -277,7 +277,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$move_forum_name = $this->move_forum_by($row, $action, 1);
@@ -293,7 +293,7 @@ class acp_forums
case 'sync':
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$sql = 'SELECT forum_name, forum_type
@@ -305,7 +305,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
sync('forum', 'forum_id', $forum_id);
@@ -560,7 +560,7 @@ class acp_forums
if (!$forum_id)
{
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
}
$forum_data = $this->get_forum_info($forum_id);
@@ -821,7 +821,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id));
+ trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . FORUMS_TABLE . '
@@ -885,7 +885,8 @@ class acp_forums
return array($user->lang['NO_FORUM_ACTION']);
}
- $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = 0;
+ $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
+ $forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
}
if (sizeof($errors))
@@ -1018,7 +1019,7 @@ class acp_forums
{
global $db;
- $table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ $table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
@@ -1121,6 +1122,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
+ $db->sql_query($sql);
}
else if ($action_subforums == 'move')
{
@@ -1167,6 +1176,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
}
}
@@ -1181,6 +1198,14 @@ class acp_forums
$sql = 'DELETE FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_USERS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $db->sql_query($sql);
}
// Resync tree
@@ -1365,18 +1390,18 @@ class acp_forums
foreach ($tables as $table)
{
- $db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $id_list));
+ $db->sql_query("DELETE FROM $table WHERE " . $db->sql_in_set($field, $ids));
}
}
}
while ($row);
}
- unset($ids, $id_list);
+ unset($ids);
break;
}
- $table_ary = array(ACL_GROUPS_TABLE, ACL_USERS_TABLE, FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
+ $table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
foreach ($table_ary as $table)
{
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 9f7e68bfe5..1443cf476a 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -52,7 +52,7 @@ class acp_groups
if (!$group_row)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -64,7 +64,7 @@ class acp_groups
case 'promote':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Approve, demote or promote
@@ -91,7 +91,7 @@ class acp_groups
case 'default':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -155,7 +155,7 @@ class acp_groups
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = '';
@@ -165,7 +165,7 @@ class acp_groups
case 'delete':
if (!$auth->acl_get('a_groupdel'))
{
- trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = group_delete($group_id, $group_row['group_name']);
@@ -180,7 +180,7 @@ class acp_groups
if ($error)
{
- trigger_error($user->lang[$error] . adm_back_link($back_link));
+ trigger_error($user->lang[$error] . adm_back_link($back_link), E_USER_WARNING);
}
$message = ($action == 'delete') ? 'GROUP_DELETED' : 'GROUP_USERS_REMOVE';
@@ -201,12 +201,12 @@ class acp_groups
case 'addusers':
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$name_ary)
{
- trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
+ trigger_error($user->lang['NO_USERS'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);
}
$name_ary = array_unique(explode("\n", $name_ary));
@@ -214,7 +214,7 @@ class acp_groups
// Add user/s to group
if ($error = group_user_add($group_id, false, $name_ary, $group_row['group_name'], $default, $leader, 0, $group_row))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);
}
$message = ($action == 'addleaders') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
@@ -228,12 +228,12 @@ class acp_groups
if ($action == 'edit' && !$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
{
- trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$error = array();
@@ -542,7 +542,7 @@ class acp_groups
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'GROUP_MEMBERS';
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 8c846d28ab..f49338e8f1 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -363,7 +363,7 @@ class acp_icons
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
{
- trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
foreach ($pak_ary as $pak_entry)
@@ -374,7 +374,7 @@ class acp_icons
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
(sizeof($data[1]) != 6 && $mode == 'smilies'))
{
- trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Stripslash here because it got addslashed before... (on export)
@@ -523,7 +523,7 @@ class acp_icons
}
else
{
- trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . strtoupper($fields) . '_EXPORT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 7c7e4586e0..b55ac27fea 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -65,7 +65,7 @@ class acp_jabber
{
if (!$jabber->connect())
{
- trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// First we'll try to authorise using this account, if that fails we'll try to create it.
@@ -94,12 +94,12 @@ class acp_jabber
{
if (!$jabber->connect())
{
- trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_CONNECT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$jabber->send_auth())
{
- trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ERR_JAB_AUTH'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->send_presence(NULL, NULL, 'online');
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index e2431749d1..423ced43e0 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -76,7 +76,8 @@ class acp_language
break;
default:
- trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ break;
}
$test_connection = $transfer->open_session();
@@ -124,7 +125,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -155,12 +156,12 @@ class acp_language
if (!$lang_id || !isset($_POST['entry']) || !is_array($_POST['entry']))
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$this->language_file || (!$this->language_directory && !in_array($this->language_file, $this->main_files)))
{
- trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FILE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -187,7 +188,7 @@ class acp_language
{
if (!@mkdir($dir, 0777))
{
- trigger_error("Could not create directory $dir");
+ trigger_error("Could not create directory $dir", E_USER_ERROR);
}
@chmod($dir, 0777);
}
@@ -200,7 +201,7 @@ class acp_language
if (!$fp)
{
- trigger_error($user->lang['UNABLE_TO_WRITE_FILE']);
+ trigger_error($user->lang['UNABLE_TO_WRITE_FILE'], E_USER_WARNING);
}
if ($this->language_directory == 'email')
@@ -301,12 +302,13 @@ class acp_language
break;
default:
- trigger_error($user->lang['INVALID_UPLOAD_METHOD']);
+ trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
+ break;
}
if (($result = $transfer->open_session()) !== true)
{
- trigger_error($user->lang[$result] . adm_back_link($this->u_action));
+ trigger_error($user->lang[$result] . adm_back_link($this->u_action), E_USER_WARNING);
}
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
@@ -329,7 +331,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = 'LANGUAGE_PACK_DETAILS';
@@ -362,28 +364,28 @@ class acp_language
case 'email':
if (!in_array($this->language_file, $email_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id), E_USER_WARNING);
}
break;
case 'acp':
if (!in_array($this->language_file, $acp_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id), E_USER_WARNING);
}
break;
case 'mods':
if (!in_array($this->language_file, $mods_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id), E_USER_WARNING);
}
break;
default:
if (!in_array($this->language_file, $this->main_files))
{
- trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id));
+ trigger_error($user->lang['WRONG_LANGUAGE_FILE'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id), E_USER_WARNING);
}
}
@@ -644,7 +646,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -656,7 +658,7 @@ class acp_language
if ($row['lang_iso'] == $config['default_lang'])
{
- trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);
@@ -677,7 +679,7 @@ class acp_language
if (!$lang_iso || !file_exists("{$phpbb_root_path}language/$lang_iso/iso.txt"))
{
- trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['LANGUAGE_PACK_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$file = file("{$phpbb_root_path}language/$lang_iso/iso.txt");
@@ -697,13 +699,13 @@ class acp_language
if ($row = $db->sql_fetchrow($result))
{
- trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['LANGUAGE_PACK_ALREADY_INSTALLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
if (!$lang_pack['name'] || !$lang_pack['local_name'])
{
- trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['INVALID_LANGUAGE_PACK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Add language pack
@@ -727,7 +729,7 @@ class acp_language
if (!$lang_id)
{
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index bab08bc0ff..93f8733daa 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -32,7 +32,7 @@ class acp_main
if (!$auth->acl_get('a_user'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT username
@@ -65,7 +65,7 @@ class acp_main
{
if (!$auth->acl_get('a_userdel'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
@@ -81,12 +81,12 @@ class acp_main
case 'remind':
if (!$auth->acl_get('a_user'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
if (empty($config['email_enable']))
{
- trigger_error($user->lang['EMAIL_DISABLED']);
+ trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
@@ -144,7 +144,7 @@ class acp_main
case 'online':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
set_config('record_online_users', 1, true);
@@ -155,7 +155,7 @@ class acp_main
case 'stats':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT COUNT(post_id) AS stat
@@ -205,7 +205,7 @@ class acp_main
case 'user':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
@@ -227,7 +227,7 @@ class acp_main
case 'date':
if (!$auth->acl_get('a_board'))
{
- trigger_error($user->lang['NO_ADMIN']);
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
}
set_config('board_startdate', time() - 1);
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 7c72a1ca6b..e8d12b9d93 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -61,7 +61,7 @@ class acp_modules
case 'delete':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
if (confirm_box(true))
@@ -91,7 +91,7 @@ class acp_modules
case 'disable':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . '
@@ -108,7 +108,7 @@ class acp_modules
case 'move_down':
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -121,7 +121,7 @@ class acp_modules
if (!$row)
{
- trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
$move_module_name = $this->move_module_by($row, $action, 1);
@@ -190,7 +190,7 @@ class acp_modules
if (!$module_id)
{
- trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
$module_row = $this->get_module_row($module_id);
@@ -228,7 +228,7 @@ class acp_modules
{
if (!$module_data['module_langname'])
{
- trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id));
+ trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $parent_id), E_USER_WARNING);
}
$module_type = request_var('module_type', 'category');
@@ -476,7 +476,7 @@ class acp_modules
if (!$row)
{
- trigger_error($user->lang['NO_MODULE']);
+ trigger_error($user->lang['NO_MODULE'], E_USER_WARNING);
}
return $row;
@@ -721,7 +721,7 @@ class acp_modules
return 'PARENT_NO_EXIST';
}
- trigger_error($user->lang['PARENT_NO_EXIST']);
+ trigger_error($user->lang['PARENT_NO_EXIST'], E_USER_WARNING);
}
$sql = 'UPDATE ' . MODULES_TABLE . "
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 2026aebaf0..be69618516 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -58,7 +58,8 @@ class acp_permission_roles
break;
default:
- trigger_error('INVALID_MODE');
+ trigger_error('INVALID_MODE', E_USER_ERROR);
+ break;
}
$template->assign_vars(array(
@@ -75,7 +76,7 @@ class acp_permission_roles
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -87,7 +88,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -112,7 +113,7 @@ class acp_permission_roles
case 'edit':
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Get role we edit
@@ -125,7 +126,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// no break;
@@ -138,7 +139,7 @@ class acp_permission_roles
if (!$role_name)
{
- trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// if we add/edit a role we check the name to be unique among the settings...
@@ -153,7 +154,7 @@ class acp_permission_roles
// Make sure we only print out the error if we add the role or change it's name
if ($row && ($mode == 'add' || ($mode == 'edit' && strtolower($role_row['role_name']) != strtolower($role_name))))
{
- trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action));
+ trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -252,7 +253,7 @@ class acp_permission_roles
{
if (!$role_id)
{
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -279,7 +280,7 @@ class acp_permission_roles
if (!$role_row)
{
- trigger_error($user->lang['NO_PRESET_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index ee4b2a1ade..fe244b7175 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -47,7 +47,7 @@ class acp_permissions
return;
}
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
}
// Set some vars
@@ -98,7 +98,7 @@ class acp_permissions
if (!sizeof($user_id))
{
- trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
unset($username);
@@ -190,7 +190,8 @@ class acp_permissions
break;
default:
- trigger_error('INVALID_MODE');
+ trigger_error('INVALID_MODE', E_USER_ERROR);
+ break;
}
$template->assign_vars(array(
@@ -203,7 +204,7 @@ class acp_permissions
if (!in_array($permission_type, $this->permission_dropdown))
{
- trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -237,14 +238,14 @@ class acp_permissions
}
else
{
- trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
case 'apply_permissions':
if (!isset($_POST['setting']))
{
- trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -253,7 +254,7 @@ class acp_permissions
case 'apply_all_permissions':
if (!isset($_POST['setting']))
{
- trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->set_all_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id);
@@ -436,7 +437,7 @@ class acp_permissions
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
{
- trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
@@ -566,7 +567,7 @@ class acp_permissions
if (!sizeof($ids))
{
- trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -585,7 +586,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$ug_id = $forum_id = 0;
@@ -664,7 +665,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array();
@@ -769,7 +770,7 @@ class acp_permissions
// Check the permission setting again
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
@@ -888,7 +889,7 @@ class acp_permissions
if (!$userdata)
{
- trigger_error('NO_USERS');
+ trigger_error('NO_USERS', E_USER_ERROR);
}
$forum_name = false;
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 44917bd8fc..fe223b623e 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -22,7 +22,7 @@ class acp_php_info
if ($mode != 'info')
{
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_ERROR);
}
$this->tpl_name = 'acp_php_info';
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 5ab70f609f..756a94cb2c 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -91,7 +91,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -192,7 +192,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT lang_id
@@ -204,7 +204,7 @@ class acp_profile
if (!in_array($default_lang_id, $lang_defs['entry'][$field_id]))
{
- trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DEFAULT_LANGUAGE_NOT_FILLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -229,7 +229,7 @@ class acp_profile
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -275,7 +275,7 @@ class acp_profile
{
if (!$field_id)
{
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT l.*, f.*
@@ -289,7 +289,7 @@ class acp_profile
if (!$field_row)
{
- trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['FIELD_NOT_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_type = $field_row['field_type'];
@@ -319,7 +319,7 @@ class acp_profile
if (!$field_type)
{
- trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$field_row = array_merge($default_values[$field_type], array(
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 4752e7bafe..0214a252d0 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -155,7 +155,7 @@ class acp_prune
if (!$row)
{
$db->sql_freeresult($result);
- trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$forum_list = $s_hidden_fields = '';
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index 59505c34c2..7b5789cb30 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -48,7 +48,7 @@ class acp_ranks
if (!$rank_title)
{
- trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_RANK_TITLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -96,7 +96,7 @@ class acp_ranks
}
else
{
- trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['MUST_SELECT_RANK'] . adm_back_link($this->u_action), E_USER_WARNING);
}
break;
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 402663ad90..2234871bce 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -137,7 +137,7 @@ class acp_reasons
if (!$reason_row)
{
- trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -180,12 +180,12 @@ class acp_reasons
if (!$reason_row)
{
- trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if ($reason_row['reason_title'] == 'other')
{
- trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Let the deletion be confirmed...
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index b7c37772ed..b3caae028e 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -152,7 +152,7 @@ class acp_search
}
else
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
}
else
@@ -168,7 +168,7 @@ class acp_search
}
else
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
}
@@ -228,7 +228,8 @@ class acp_search
break;
default:
- trigger_error('NO_ACTION');
+ trigger_error('NO_ACTION', E_USER_ERROR);
+ break;
}
if (empty($this->state[0]))
@@ -240,7 +241,7 @@ class acp_search
$error = false;
if ($this->init_search($this->state[0], $this->search, $error))
{
- trigger_error($error);
+ trigger_error($error, E_USER_WARNING);
}
$action = &$this->state[1];
@@ -262,7 +263,7 @@ class acp_search
{
$this->state = array('');
$this->save_state();
- trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
@@ -314,7 +315,7 @@ class acp_search
{
$this->state = array('');
$this->save_state();
- trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js());
+ trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
}
}
else
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 48277dc487..fd8500d68f 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -191,7 +191,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if ($style_id == $config['default_style'])
{
- trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'UPDATE ' . STYLES_TABLE . '
@@ -234,7 +234,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$template_row)
{
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -311,7 +311,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$theme_row)
{
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!$theme_row['theme_storedb'])
@@ -369,7 +369,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$imageset_row)
{
- trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
@@ -605,7 +605,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($template_info = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -621,7 +621,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen($file, 'wb')))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
fwrite($fp, $template_data);
fclose($fp);
@@ -674,7 +674,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($template_path . "/$template_file") || !($template_data = file_get_contents($template_path . "/$template_file")))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
}
}
@@ -804,7 +804,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($template_row = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_TEMPLATE']);
+ trigger_error($user->lang['NO_TEMPLATE'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -941,7 +941,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($theme_info = $db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -951,7 +951,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!file_exists($stylesheet_path) || !($stylesheet = file_get_contents($stylesheet_path)))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
}
else
@@ -1030,7 +1030,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!isset($matches[1]))
{
- trigger_error($user->lang['NO_CLASS']);
+ trigger_error($user->lang['NO_CLASS'], E_USER_WARNING);
}
$css_data = implode(";\n", array_diff(array_map('trim', explode("\n", preg_replace("#;[\n]*#s", "\n", $matches[1]))), array('')));
@@ -1262,7 +1262,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// check whether the custom class name is valid
if (!preg_match('/^[a-z0-9#:.\- ]+$/i', $add_custom))
{
- trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&action=edit&id=$theme_id&text_rows=$text_rows"));
+ trigger_error($user->lang['THEME_ERR_CLASS_CHARS'] . adm_back_link($this->u_action . "&action=edit&id=$theme_id&text_rows=$text_rows"), E_USER_WARNING);
}
else
{
@@ -1278,7 +1278,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
// write stylesheet to file
if (!($fp = fopen($stylesheet_path, 'wb')))
{
- trigger_error($user->lang['NO_THEME']);
+ trigger_error($user->lang['NO_THEME'], E_USER_WARNING);
}
fwrite($fp, $stylesheet);
fclose($fp);
@@ -1355,7 +1355,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!extract($db->sql_fetchrow($result)))
{
- trigger_error($user->lang['NO_IMAGESET']);
+ trigger_error($user->lang['NO_IMAGESET'], E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -1540,7 +1540,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = "SELECT {$mode}_id, {$mode}_name
@@ -1561,7 +1561,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
- trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$db->sql_freeresult($result);
@@ -1719,7 +1719,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright');
@@ -1951,7 +1951,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
}
$this->page_title = $l_prefix . '_EXPORT';
@@ -2021,7 +2021,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$style_row)
{
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0;
@@ -2331,7 +2331,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
{
if (!($fp = fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
{
- trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file");
+ trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
}
$template_data = fread($fp, filesize("{$phpbb_root_path}styles/$template_path$pathfile$file"));
fclose($fp);
@@ -2396,7 +2396,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!($dp = @opendir("{$phpbb_root_path}cache")))
{
- trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ']);
+ trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ'], E_USER_ERROR);
}
$file_ary = array();
@@ -2538,7 +2538,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
}
else
{
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
}
$style_row['store_db'] = request_var('store_db', 0);
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index fa4327c169..bd4b0b1407 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -92,7 +92,7 @@ class acp_users
if (!$user_id)
{
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -108,7 +108,7 @@ class acp_users
if (!$user_row)
{
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
// Generate overall "header" for user admin
@@ -139,7 +139,7 @@ class acp_users
// Prevent normal users/admins change/view founders if they are not a founder by themselves
if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER)
{
- trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
switch ($mode)
@@ -157,18 +157,18 @@ class acp_users
{
if (!$auth->acl_get('a_userdel'))
{
- trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
// Check if the user wants to remove himself or the guest user account
if ($user_id == ANONYMOUS)
{
- trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if (confirm_box(true))
@@ -201,7 +201,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
$ban = array();
@@ -252,7 +252,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
- trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['CANNOT_FORCE_REACT_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if ($config['email_enable'])
@@ -307,7 +307,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
// It is only deactivation since the user is already activated (else he would not have reached this page)
- trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
user_active_flip($user_id, $user_row['user_type'], false, $user_row['username']);
@@ -707,7 +707,7 @@ class acp_users
}
else
{
- trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['AT_LEAST_ONE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
}
}
@@ -1775,12 +1775,12 @@ class acp_users
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if ($error = group_user_del($group_id, $user_id))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
$error = array();
@@ -1804,13 +1804,13 @@ class acp_users
{
if (!$group_id)
{
- trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
// Add user/s to group
if ($error = group_user_add($group_id, $user_id))
{
- trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&u=' . $user_id));
+ trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
$error = array();
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index cacea98d97..dc5a694d0a 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -40,7 +40,7 @@ class acp_words
if (!$word_id)
{
- trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT *
@@ -74,7 +74,7 @@ class acp_words
if (!$word || !$replacement)
{
- trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql_ary = array(
@@ -107,7 +107,7 @@ class acp_words
if (!$word_id)
{
- trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT word
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 61016b5b31..55c7ec7428 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -130,6 +130,7 @@ define('FIELD_BOOL', 4);
define('FIELD_DROPDOWN', 5);
define('FIELD_DATE', 6);
+
// Additional constants
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 349719af57..4227a8a9a3 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1131,6 +1131,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
* @param int $f_mark_time the forums last mark time if user is registered and load_db_lastread enabled
* @param int $mark_time_forum false if the mark time needs to be obtained, else the last users forum mark time
*
+* @return true if complete forum got marked read, else false.
*/
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
{
@@ -1225,7 +1226,10 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
if (!$row)
{
markread('topics', $forum_id);
+ return true;
}
+
+ return false;
}
// Pagination functions
@@ -2645,7 +2649,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
case E_USER_NOTICE:
define('IN_ERROR_HANDLER', true);
-
+
if (empty($user->data))
{
$user->session_begin();
@@ -2679,8 +2683,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
);
$template->assign_vars(array(
- 'MESSAGE_TITLE' => $msg_title,
- 'MESSAGE_TEXT' => $msg_text)
+ 'MESSAGE_TITLE' => $msg_title,
+ 'MESSAGE_TEXT' => $msg_text,
+ 'S_USER_WARNING' => ($errno == E_USER_WARNING) ? true : false,
+ 'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
);
// We do not want the cron script to be called on error messages
@@ -2793,7 +2799,12 @@ function page_header($page_title = '', $display_online_list = true)
{
if ($row['user_colour'])
{
- $row['username'] = '
' . $row['username'] . ' ';
+ $user_colour = ' style="color:#' . $row['user_colour'] . '"';
+ $row['username'] = '
' . $row['username'] . ' ';
+ }
+ else
+ {
+ $user_colour = '';
}
if ($row['user_allow_viewonline'] && $row['session_viewonline'])
@@ -2803,13 +2814,21 @@ function page_header($page_title = '', $display_online_list = true)
}
else
{
- $user_online_link = '
' . $row['username'] . ' ';
+ $user_online_link = '
' . $row['username'] . ' ';
$logged_hidden_online++;
}
if (($row['user_allow_viewonline'] && $row['session_viewonline']) || $auth->acl_get('u_viewonline'))
{
- $user_online_link = ($row['user_type'] <> USER_IGNORE) ? '
' . $user_online_link . ' ' : $user_online_link;
+ if ($row['user_type'] <> USER_IGNORE)
+ {
+ $user_online_link = '
' . $user_online_link . ' ';
+ }
+ else
+ {
+ $user_online_link = ($user_colour) ? '
' . $user_online_link . ' ' : $user_online_link;
+ }
+
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
}
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e54c27ed53..2ac732746e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -423,8 +423,10 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
*/
function get_img_size_format($width, $height)
{
+ global $config;
+
// Maximum Width the Image can take
- $max_width = 400;
+ $max_width = ($config['img_max_thumb_width']) ? $config['img_max_thumb_width'] : 400;
if ($width > $height)
{
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 91a44c31c1..ab5318f9d8 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -164,7 +164,9 @@ function view_folder($id, $mode, $folder_id, $folder)
{
foreach ($id_ary as $ug_id => $_id)
{
- $address_list[$message_id][] = (($type == 'u') ? '
' : ' ') . (($recipient_list[$type][$ug_id]['colour']) ? '' : '') . $recipient_list[$type][$ug_id]['name'] . ' ';
+ $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : '';
+
+ $address_list[$message_id][] = (($type == 'u') ? '
' : ' ') . $recipient_list[$type][$ug_id]['name'] . ' ';
}
}
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index b40061c912..ee40c0ff2c 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -95,6 +95,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_imagick', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_height', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_thumb_width', '400');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 4d49e1c8c3..407de35837 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -99,6 +99,8 @@ $lang = array_merge($lang, array(
'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize',
'MAX_IMAGE_SIZE' => 'Maximum Image Dimensions',
'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments, 0px by 0px disables image attachments.',
+ 'MAX_THUMB_WIDTH' => 'Maximum thumbnail width in pixel',
+ 'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here',
'MIN_THUMB_FILESIZE' => 'Minimum thumbnail filesize',
'MIN_THUMB_FILESIZE_EXPLAIN' => 'Do not create a thumbnail for images smaller than this.',
'MODE_INLINE' => 'Inline',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 246d1afc14..9d1146c13b 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -325,10 +325,12 @@ $lang = array_merge($lang, array(
'NO_NEW_POSTS' => 'No new posts',
'NO_ONLINE_USERS' => 'No registered users',
'NO_POSTS' => 'No posts',
+ 'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn\'t exist',
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods',
'NO_TOPIC' => 'The requested topic does not exist.',
'NO_TOPICS' => 'There are no topics or posts in this forum.',
+ 'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.',
'NO_UNREAD_PM' => '
0 unread messages',
'NO_USER' => 'The requested user does not exist.',
'NO_USERS' => 'The requested users do not exist',
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html
index d9924ddcc6..36df9cd268 100644
--- a/phpBB/styles/subSilver/template/posting_body.html
+++ b/phpBB/styles/subSilver/template/posting_body.html
@@ -194,7 +194,7 @@ function checkForm()
- class="blue">{to_recipient.NAME}
+ style="color:#{to_recipient.COLOUR}" class="blue">{to_recipient.NAME}
{L_NO_TO_RECIPIENT}
@@ -205,7 +205,7 @@ function checkForm()
- class="blue">{bcc_recipient.NAME}
+ style="color:#{bcc_recipient.COLOUR}" class="blue">{bcc_recipient.NAME}
{L_NO_BCC_RECIPIENT}
diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
index 8fcc265860..868cb063c9 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html
@@ -27,7 +27,7 @@
{L_TO}:
- class="blue">{to_recipient.NAME}
+ style="color:#{to_recipient.COLOUR}" class="blue">{to_recipient.NAME}
@@ -38,7 +38,7 @@
{L_BCC}:
- class="blue">{bcc_recipient.NAME}
+ style="color:#{bcc_recipient.COLOUR}" class="blue">{bcc_recipient.NAME}
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 4fdf762baf..9783f9f29e 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -67,9 +67,9 @@
- {L_NO_TOPICS}
+ {L_NO_TOPICS}{L_NO_TOPICS_TIME_FRAME}
- {L_NO_TOPICS}
+ {L_NO_TOPICS}{L_NO_TOPICS_TIME_FRAME}
@@ -188,9 +188,9 @@
- {L_NO_TOPICS}
+ {L_NO_TOPICS}{L_NO_TOPICS_TIME_FRAME}
- {L_NO_TOPICS}
+ {L_NO_TOPICS}{L_NO_TOPICS_TIME_FRAME}
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 61d63c3d9c..6e523b5cc1 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -52,7 +52,7 @@
{L_EMAIL_TOPIC} |
{L_BUMP_TOPIC}
- {L_VIEW_PREVIOUS_TOPIC} | {L_VIEW_UNREAD_POST} | {L_VIEW_NEXT_TOPIC}
+ {L_VIEW_PREVIOUS_TOPIC} | {L_VIEW_UNREAD_POST} | {L_VIEW_NEXT_TOPIC}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 6c85ed7ffe..156540b5a7 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -210,6 +210,9 @@ if ($sort_days)
$start = 0;
}
$sql_limit_time = "AND t.topic_last_post_time >= $min_post_time";
+
+ // Make sure we have information about day selection ready
+ $template->assign_var('S_SORT_DAYS', true);
}
else
{
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 14ab1f69ee..f05030493c 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -550,7 +550,6 @@ $template->assign_vars(array(
'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id",
'U_FORUM' => $server_path,
- 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
'U_VIEW_TOPIC' => $viewtopic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=previous"),
@@ -828,7 +827,14 @@ $db->sql_freeresult($result);
if (!sizeof($post_list))
{
- trigger_error('NO_TOPIC');
+ if ($sort_days)
+ {
+ trigger_error('NO_POSTS_TIME_FRAME');
+ }
+ else
+ {
+ trigger_error('NO_TOPIC');
+ }
}
// Holding maximum post time for marking topic read
@@ -1490,7 +1496,37 @@ if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'
markread('topic', $forum_id, $topic_id, $max_post_time);
// Update forum info
- update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+ $all_marked_read = update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+}
+else
+{
+ $all_marked_read = true;
+}
+
+// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link
+if ($all_marked_read && $post_unread)
+{
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+}
+else if (!$all_marked_read)
+{
+ $last_page = ((floor($start / $config['posts_per_page']) + 1) == max(ceil($total_posts / $config['posts_per_page']), 1)) ? true : false;
+
+ // What can happen is that we are at the last displayed page. If so, we also display the #unread link based in $post_unread
+ if ($last_page && $post_unread)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => '#unread',
+ ));
+ }
+ else if (!$last_page)
+ {
+ $template->assign_vars(array(
+ 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
+ ));
+ }
}
// Change encoding if appropriate
From c0a880b6652d330b760b7da7cdde8076f854d836 Mon Sep 17 00:00:00 2001
From: Nils Adermann
Date: Mon, 28 Aug 2006 17:20:21 +0000
Subject: [PATCH 033/291] - birthdays/age in user's timezone and not server's
local time - parse bbcode in posts with fewer characters than selected
maximum on search results page - retrieve search word context in posts which
are longer than maximum characters (no raw BBCode anymore) - formatted text
is processed in the same order everywhere now: censor_text, replace newlines,
bbcode, smileys, attachments, highlighting [including Bug #2048] -
highlighting pattern updated to exclude style and script (e.g custom BBCode)
[Bug #3856] - fixed a style problem in Opera [Bug #3770] - performance
increase for user::img() - slight adjustments to search
git-svn-id: file:///svn/phpbb/trunk@6321 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/admin.css | 2 +-
phpBB/includes/functions.php | 143 +++++++++++++++++++++-
phpBB/includes/functions_posting.php | 5 +-
phpBB/includes/mcp/mcp_post.php | 2 +-
phpBB/includes/mcp/mcp_queue.php | 1 +
phpBB/includes/mcp/mcp_reports.php | 1 +
phpBB/includes/mcp/mcp_topic.php | 2 +-
phpBB/includes/mcp/mcp_warn.php | 4 +-
phpBB/includes/search/fulltext_native.php | 21 +++-
phpBB/includes/session.php | 22 ++--
phpBB/includes/ucp/ucp_pm_viewmessage.php | 12 +-
phpBB/index.php | 2 +-
phpBB/language/en/search.php | 2 +-
phpBB/memberlist.php | 28 +++--
phpBB/search.php | 98 ++++++++++++---
phpBB/viewtopic.php | 19 ++-
16 files changed, 293 insertions(+), 71 deletions(-)
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index da00033931..0073581ab7 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -258,7 +258,7 @@ span.corners-top span, span.corners-bottom span {
border-top: 1px solid #FFFFFF;
}
-#menu li a:hover span, #menu li#activemenu span {
+#menu li a:hover span, #menu li#activemenu span, #menu li a:hover {
text-decoration: none;
background-color: #FFA34F;
color: #FFFFFF;
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4227a8a9a3..02f1553c43 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2014,6 +2014,117 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
return $bump_time;
}
+/**
+* Generates a text with approx. the specified length which contains the specified words and their context
+*
+* @param string $text The full text from which context shall be extracted
+* @param string $words An array of words which should be contained in the result, * is allowed as a wildcard
+* @param int $length The desired length of the resulting text, however the result might be shorter or longer than this value
+*
+* @return string Context of the specified words seperated by "..."
+*/
+function get_context($text, $words, $length = 400)
+{
+ // first replace all whitespaces with single spaces
+ $text = preg_replace('/\s+/', ' ', $text);
+
+ $word_indizes = array();
+ if (sizeof($words))
+ {
+ $match = '';
+ // find the starting indizes of all words
+ foreach ($words as $word)
+ {
+ if (preg_match('#(?: |^)(' . str_replace('\*', '\w*?', preg_quote($word, '#')) . ')(?: |$)#i', $text, $match))
+ {
+ $pos = strpos($text, $match[1]);
+ if ($pos !== false)
+ {
+ $word_indizes[] = $pos;
+ }
+ }
+ }
+ unset($match);
+
+ if (sizeof($word_indizes))
+ {
+ $word_indizes = array_unique($word_indizes);
+ sort($word_indizes);
+
+ $wordnum = sizeof($word_indizes);
+ // number of characters on the right and left side of each word
+ $sequence_length = (int) ($length / (2 * $wordnum)) - 2;
+ $final_text = '';
+ $word = $j = 0;
+ $final_text_index = -1;
+
+ // cycle through every character in the original text
+ for ($i = $word_indizes[$word], $n = strlen($text); $i < $n; $i++)
+ {
+ // if the current position is the start of one of the words then append $sequence_length characters to the final text
+ if (isset($word_indizes[$word]) && ($i == $word_indizes[$word]))
+ {
+ if ($final_text_index < $i - $sequence_length - 1)
+ {
+ $final_text .= '... ' . preg_replace('#^([^ ]*)#', '', substr($text, $i - $sequence_length, $sequence_length));
+ }
+ else
+ {
+ // if the final text is already nearer to the current word than $sequence_length we only append the text
+ // from its current index on and distribute the unused length to all other sequenes
+ $sequence_length += (int) (($final_text_index - $i + $sequence_length + 1) / (2 * $wordnum));
+ $final_text .= substr($text, $final_text_index + 1, $i - $final_text_index - 1);
+ }
+ $final_text_index = $i - 1;
+
+ // add the following characters to the final text (see below)
+ $word++;
+ $j = 1;
+ }
+
+ if ($j > 0)
+ {
+ // add the character to the final text and increment the sequence counter
+ $final_text .= $text[$i];
+ $final_text_index++;
+ $j++;
+
+ // if this is a whitespace then check whether we are done with this sequence
+ if ($text[$i] == ' ')
+ {
+ // only check whether we have to exit the context generation completely if we haven't already reached the end anyway
+ if ($i + 4 < $n)
+ {
+ if (($j > $sequence_length && $word >= $wordnum) || strlen($final_text) > $length)
+ {
+ $final_text .= ' ...';
+ break;
+ }
+ }
+ else
+ {
+ // make sure the text really reaches the end
+ $j -= 4;
+ }
+
+ // stop context generation and wait for the next word
+ if ($j > $sequence_length)
+ {
+ $j = 0;
+ }
+ }
+ }
+ }
+ return $final_text;
+ }
+ }
+
+ if (!sizeof($words) || !sizeof($word_indizes))
+ {
+ return (strlen($text) >= $length + 3) ? substr($text, 0, $length) . '...' : $text;
+ }
+}
+
/**
* Decode text whereby text is coming from the db and expected to be pre-parsed content
* We are placing this outside of the message parser because we are often in need of it...
@@ -2052,6 +2163,33 @@ function decode_message(&$message, $bbcode_uid = '')
return;
}
+/**
+* Strips all bbcode from a text and returns the plain content
+*/
+function strip_bbcode(&$text, $uid = '')
+{
+ if (!$uid)
+ {
+ $uid = '[0-9a-z]{5,}';
+ }
+
+ $text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", ' ', $text);
+
+ $match = array(
+ '#.*? #',
+ '#.*? #',
+ '#.*? #',
+ '#.*? #',
+ '# ', censor_text($text));
+
// Parse bbcode if bbcode uid stored and bbcode enabled
if ($uid && ($flags & 1))
{
@@ -2074,7 +2214,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags)
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}
- if (empty($__bbcode))
+ if (empty($bbcode))
{
$bbcode = new bbcode($bitfield);
}
@@ -2087,7 +2227,6 @@ function generate_text_for_display($text, $uid, $bitfield, $flags)
}
$text = smiley_text($text, !($flags & 2));
- $text = str_replace("\n", ' ', censor_text($text));
return $text;
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 2ac732746e..a8c7078057 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -873,6 +873,8 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = $row['post_subject'];
$message = $row['post_text'];
+ $message = censor_text($message);
+ $message = str_replace("\n", ' ', $message);
$decoded_message = false;
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
@@ -892,14 +894,13 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$message = smiley_text($message, !$row['enable_smilies']);
$post_subject = censor_text($post_subject);
- $message = censor_text($message);
$template->assign_block_vars($mode . '_row', array(
'POSTER_NAME' => $poster,
'POST_SUBJECT' => $post_subject,
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
'POST_DATE' => $user->format_date($row['post_time']),
- 'MESSAGE' => str_replace("\n", ' ', $message),
+ 'MESSAGE' => $message,
'DECODED_MESSAGE' => $decoded_message,
'U_POST_ID' => $row['post_id'],
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 08bcc713f8..9cb3ec278b 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -95,6 +95,7 @@ function mcp_post_details($id, $mode, $action)
// Process message, leave it uncensored
$message = $post_info['post_text'];
+ $message = str_replace("\n", ' ', $message);
if ($post_info['bbcode_bitfield'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
@@ -102,7 +103,6 @@ function mcp_post_details($id, $mode, $action)
$bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
}
$message = smiley_text($message);
- $message = str_replace("\n", ' ', $message);
$template->assign_vars(array(
'U_MCP_ACTION' => "$url&i=main&quickmod=1", // Use this for mode paramaters
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 95e89fa9dc..3deeff6d1f 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -109,6 +109,7 @@ class mcp_queue
// Process message, leave it uncensored
$message = $post_info['post_text'];
+ $message = str_replace("\n", ' ', $message);
if ($post_info['bbcode_bitfield'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index a52bc02359..67af086292 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -117,6 +117,7 @@ class mcp_reports
// Process message, leave it uncensored
$message = $post_info['post_text'];
+ $message = str_replace("\n", ' ', $message);
if ($post_info['bbcode_bitfield'])
{
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 7f1bc2a0c4..466459415d 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -110,6 +110,7 @@ function mcp_topic_view($id, $mode, $action)
$message = $row['post_text'];
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
+ $message = str_replace("\n", ' ', $message);
if ($row['bbcode_bitfield'])
{
@@ -117,7 +118,6 @@ function mcp_topic_view($id, $mode, $action)
}
$message = smiley_text($message);
- $message = str_replace("\n", ' ', $message);
if (!$row['post_approved'])
{
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index bc428570ab..9a6ae1ab8f 100755
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -247,6 +247,7 @@ function mcp_warn_post_view($id, $mode, $action)
// We want to make the message available here as a reminder
// Parse the message and subject
$message = $userrow['post_text'];
+ $message = str_replace("\n", ' ', censor_text($message));
// Second parse bbcode here
if ($userrow['bbcode_bitfield'])
@@ -260,9 +261,6 @@ function mcp_warn_post_view($id, $mode, $action)
// Always process smilies after parsing bbcodes
$message = smiley_text($message);
- // Replace naughty words such as farty pants
- $message = str_replace("\n", ' ', censor_text($message));
-
// Generate the appropriate user information for the user we are looking at
$rank_title = $rank_img = '';
// get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img);
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index e4ff1f8fc2..90da8abcd1 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -119,6 +119,15 @@ class fulltext_native extends search_backend
// remove some useless bracket combinations which might be created by the previous regexps
$keywords = str_replace(array('()', ')|('), array('', '|'), $keywords);
+ $keywords = preg_replace_callback(
+ '#\((?:(?:[^)]*?) )*?[^)]*?\)#',
+ create_function(
+ '$matches',
+ 'return str_replace(" ", "|", $matches[0]);'
+ ),
+ $keywords
+ );
+
// $keywords input format: each word seperated by a space, words in a bracket are not seperated
// the user wants to search for any word, convert the search query
@@ -187,7 +196,7 @@ class fulltext_native extends search_backend
// a group of which at least one may not be in the resulting posts
if ($word[0] == '(')
{
- $word = explode('|', substr($word, 1, -1));
+ $word = array_unique(explode('|', substr($word, 1, -1)));
$mode = 'must_exclude_one';
}
// one word which should not be in the resulting posts
@@ -209,7 +218,7 @@ class fulltext_native extends search_backend
// a group of words of which at least one word should be in every resulting post
if ($word[0] == '(')
{
- $word = explode('|', substr($word, 1, -1));
+ $word = array_unique(explode('|', substr($word, 1, -1)));
}
$ignore_no_id = false;
$mode = 'must_contain';
@@ -880,7 +889,7 @@ class fulltext_native extends search_backend
// Do not index code
$match[] = '#\[code(?:=.*?)?(\:?[0-9a-z]{5,})\].*?\[\/code(\:?[0-9a-z]{5,})\]#is';
// BBcode
- $match[] = '#\[\/?[a-z\*\+\-]+(?:=.*?)?(\:?[0-9a-z]{5,})\]#';
+ $match[] = '#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?[0-9a-z]{5,})\]#';
$min = $config['fulltext_native_min_chars'];
$max = $config['fulltext_native_max_chars'];
@@ -890,7 +899,7 @@ class fulltext_native extends search_backend
/**
* Clean up the string, remove HTML tags, remove BBCodes
*/
- $word = strtok($this->cleanup(preg_replace($match, ' ', strip_tags($text)), '', $user->lang['ENCODING']), ' ');
+ $word = strtok($this->cleanup(preg_replace($match, ' ', strip_tags($text)), -1, $user->lang['ENCODING']), ' ');
while (isset($word[0]))
{
@@ -1146,14 +1155,14 @@ class fulltext_native extends search_backend
$destroy_cache_words = array();
- // Remove common (> 60% of posts ) words
+ // Remove common (> 20% of posts ) words
if ($config['num_posts'] >= 100)
{
// First, get the IDs of common words
$sql = 'SELECT word_id
FROM ' . SEARCH_WORDMATCH_TABLE . '
GROUP BY word_id
- HAVING COUNT(word_id) > ' . floor($config['num_posts'] * 0.6);
+ HAVING COUNT(word_id) > ' . floor($config['num_posts'] * 0.2);
$result = $db->sql_query($sql);
$sql_in = array();
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0e934edb8a..5441f7e556 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1340,13 +1340,15 @@ class user extends session
static $imgs;
global $phpbb_root_path;
- if (empty($imgs[$img . $suffix]) || $width !== false)
+ $img_data = $imgs[$img . $suffix];
+
+ if (empty($img_data) || $width !== false)
{
if (!isset($this->theme[$img]) || !$this->theme[$img])
{
// Do not fill the image to let designers decide what to do if the image is empty
- $imgs[$img . $suffix] = '';
- return $imgs[$img . $suffix];
+ $img_data = '';
+ return $img_data;
}
// Do not include dimensions?
@@ -1372,9 +1374,9 @@ class user extends session
$imgsrc = str_replace('{SUFFIX}', $suffix, $imgsrc);
}
- $imgs[$img . $suffix]['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
- $imgs[$img . $suffix]['width'] = $width;
- $imgs[$img . $suffix]['height'] = $height;
+ $img_data['src'] = $phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
+ $img_data['width'] = $width;
+ $img_data['height'] = $height;
}
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
@@ -1382,19 +1384,19 @@ class user extends session
switch ($type)
{
case 'src':
- return $imgs[$img . $suffix]['src'];
+ return $img_data['src'];
break;
case 'width':
- return $imgs[$img . $suffix]['width'];
+ return $img_data['width'];
break;
case 'height':
- return $imgs[$img . $suffix]['height'];
+ return $img_data['height'];
break;
default:
- return ' ';
+ return ' ';
break;
}
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index f0fa234944..3ffc19df55 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -54,6 +54,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Parse the message and subject
$message = $message_row['message_text'];
+ $message = str_replace("\n", ' ', censor_text($message));
// Second parse bbcode here
if ($message_row['bbcode_bitfield'])
@@ -66,7 +67,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Replace naughty words such as farty pants
$message_row['message_subject'] = censor_text($message_row['message_subject']);
- $message = str_replace("\n", ' ', censor_text($message));
// Editing information
if ($message_row['message_edit_count'] && $config['display_last_edited'])
@@ -146,6 +146,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// End signature parsing, only if needed
if ($signature)
{
+ $signature = censor_text($signature);
+ $signature = str_replace("\n", ' ', censor_text($signature));
+
if ($user_info['user_sig_bbcode_bitfield'])
{
if ($bbcode === false)
@@ -158,7 +161,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
$signature = smiley_text($signature);
- $signature = str_replace("\n", ' ', censor_text($signature));
}
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
@@ -318,6 +320,9 @@ function message_history($msg_id, $user_id, $message_row, $folder)
$subject = $row['message_subject'];
$message = $row['message_text'];
+ $message = censor_text($message);
+ $message = str_replace("\n", ' ', $message)
+
if ($row['bbcode_bitfield'])
{
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
@@ -326,7 +331,6 @@ function message_history($msg_id, $user_id, $message_row, $folder)
$message = smiley_text($message, !$row['enable_smilies']);
$subject = censor_text($subject);
- $message = censor_text($message);
if ($id == $msg_id)
{
@@ -339,7 +343,7 @@ function message_history($msg_id, $user_id, $message_row, $folder)
'AUTHOR_NAME' => $author,
'SUBJECT' => $subject,
'SENT_DATE' => $user->format_date($row['message_time']),
- 'MESSAGE' => str_replace("\n", ' ', $message),
+ 'MESSAGE' => $message,
'FOLDER' => implode(', ', $row['folder']),
'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
diff --git a/phpBB/index.php b/phpBB/index.php
index d1655267e4..23f29e6f37 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -54,7 +54,7 @@ $db->sql_freeresult($result);
$birthday_list = '';
if ($config['load_birthdays'])
{
- $now = getdate();
+ $now = getdate(time() + $this->timezone + $this->dst);
$sql = 'SELECT user_id, username, user_colour, user_birthday
FROM ' . USERS_TABLE . "
WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index 25d0000bb8..569c40a53d 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -38,7 +38,7 @@ $lang = array_merge($lang, array(
'FOUND_SEARCH_MATCHES' => 'Search found %d matches',
'FOUND_MORE_SEARCH_MATCHES' => 'Search found more than %d matches',
- 'GLOBAL' => 'Global topic',
+ 'GLOBAL' => 'Global announcement',
'IGNORED_TERMS' => 'ignored',
'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: %s ',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 218365c95f..fdb6e3adf2 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -396,16 +396,20 @@ switch ($mode)
$posts_per_day = $member['user_posts'] / $memberdays;
$percentage = ($config['num_posts']) ? min(100, ($member['user_posts'] / $config['num_posts']) * 100) : 0;
- if ($member['user_sig_bbcode_bitfield'] && $member['user_sig'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode();
- $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
- }
if ($member['user_sig'])
{
- $member['user_sig'] = censor_text(smiley_text($member['user_sig']));
+ $member['user_sig'] = censor_text($member['user_sig']);
+ $member['user_sig'] = str_replace("\n", ' ', $member['user_sig']);
+
+ if ($member['user_sig_bbcode_bitfield'])
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode();
+ $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
+ }
+
+ $member['user_sig'] = smiley_text($member['user_sig']);
}
$poster_avatar = '';
@@ -459,7 +463,7 @@ switch ($mode)
'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
'INTERESTS' => (!empty($member['user_interests'])) ? censor_text($member['user_interests']) : '',
- 'SIGNATURE' => (!empty($member['user_sig'])) ? str_replace("\n", ' ', $member['user_sig']) : '',
+ 'SIGNATURE' => $member['user_sig'],
'AVATAR_IMG' => $poster_avatar,
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
@@ -1329,19 +1333,19 @@ function show_profile($data)
if ($bday_year)
{
- $time = time() + $user->timezone + $user->dst;
+ $now = getdate(time() + $user->timezone + $user->dst);
- $diff = date('n', $time) - $bday_month;
+ $diff = $now['mon'] - $bday_month;
if ($diff == 0)
{
- $diff = (date('j', $time) - $bday_day < 0) ? 1 : 0;
+ $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
}
else
{
$diff = ($diff < 0) ? 1 : 0;
}
- $age = (int) (date('Y', $time) - $bday_year - $diff);
+ $age = (int) ($now['year'] - $bday_year - $diff);
}
}
diff --git a/phpBB/search.php b/phpBB/search.php
index 6fa500d761..e949cf3ce4 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -47,11 +47,6 @@ $sort_dir = request_var('sd', 'd');
$return_chars = request_var('ch', ($topic_id) ? -1 : 200);
$search_forum = request_var('fid', array(0));
-if ($search_forum == array(0))
-{
- $search_forum = array();
-}
-
// Is user able to search? Has search been disabled?
if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])
{
@@ -609,11 +604,55 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
else
{
+ $bbcode_bitfield = '';
+ $attach_list = array();
+
while ($row = $db->sql_fetchrow($result))
{
$rowset[] = $row;
+ if (($return_chars == -1) || (strlen($row['post_text']) < $return_chars + 3))
+ {
+ $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
+
+ // Does this post have an attachment? If so, add it to the list
+ if ($row['post_attachment'] && $config['allow_attachments'])
+ {
+ $attach_list[] = $row['post_id'];
+ }
+ }
}
$db->sql_freeresult($result);
+
+ // Instantiate BBCode if needed
+ if ($bbcode_bitfield !== '')
+ {
+ include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
+ $bbcode = new bbcode(base64_encode($bbcode_bitfield));
+ }
+
+ // Pull attachment data
+ if (sizeof($attach_list))
+ {
+ if ($auth->acl_gets('f_download', 'u_download', $forum_id))
+ {
+ $sql = 'SELECT *
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
+ AND in_message = 0
+ ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $attachments[$row['post_msg_id']][] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $display_notice = true;
+ }
+ }
}
if ($hilit)
@@ -727,28 +766,53 @@ if ($keywords || $author || $author_id || $search_id || $submit)
continue;
}
- decode_message($row['post_text'], $row['bbcode_uid']);
-
- if ($return_chars != -1)
- {
- $row['post_text'] = (strlen($row['post_text']) < $return_chars + 3) ? $row['post_text'] : substr($row['post_text'], 0, $return_chars) . '...';
- }
-
// Replace naughty words such as farty pants
$row['post_subject'] = censor_text($row['post_subject']);
- $row['post_text'] = str_replace("\n", ' ', censor_text($row['post_text']));
+ $message = $row['post_text'];
+
+
+ if (($return_chars != -1) && (strlen($message) >= $return_chars + 3))
+ {
+ $message = censor_text($message);
+ strip_bbcode($message, $row['bbcode_uid']);
+
+ // now find context for the searched words
+ $message = get_context($message, array_filter(explode('|', $hilit), 'strlen'), $return_chars);
+
+ $message = str_replace("\n", ' ', $message);
+ }
+ else
+ {
+ $message = censor_text($message);
+ $message = str_replace("\n", ' ', $message);
+
+ // Second parse bbcode here
+ if ($row['bbcode_bitfield'])
+ {
+ $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
+ }
+
+ if (isset($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]))
+ {
+ parse_inline_attachments($message, $attachments[$row['post_id']], $update_count, $forum_id);
+
+ // we only display inline attachments
+ unset($attachments[$row['post_id']]);
+ }
+
+ // Always process smilies after parsing bbcodes
+ $message = smiley_text($message);
+ }
// post highlighting
- $row['post_text'] = preg_replace('#(?!<.*)(?]*>)#i', '$1 ', $row['post_text']);
-
- $row['post_text'] = smiley_text($row['post_text']);
+ $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?]*(?:)#is', '$1 ', $message);
$tpl_ary = array(
'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],
'U_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['poster_id']) : '',
'POST_SUBJECT' => $row['post_subject'],
'POST_DATE' => (!empty($row['post_time'])) ? $user->format_date($row['post_time']) : '',
- 'MESSAGE' => $row['post_text']
+ 'MESSAGE' => $message
);
}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index f05030493c..6390b72876 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -717,6 +717,7 @@ if (!empty($topic_data['poll_start']))
for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++)
{
$poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']);
+ $poll_info[$i]['poll_option_text'] = str_replace("\n", ' ', $poll_info[$i]['poll_option_text']);
if ($poll_bbcode !== false)
{
@@ -724,17 +725,16 @@ if (!empty($topic_data['poll_start']))
}
$poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
- $poll_info[$i]['poll_option_text'] = str_replace("\n", ' ', $poll_info[$i]['poll_option_text']);
}
$topic_data['poll_title'] = censor_text($topic_data['poll_title']);
+ $topic_data['poll_title'] = str_replace("\n", ' ', $topic_data['poll_title']);
if ($poll_bbcode !== false)
{
$poll_bbcode->bbcode_second_pass($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield']);
}
$topic_data['poll_title'] = smiley_text($topic_data['poll_title']);
- $topic_data['poll_title'] = str_replace("\n", ' ', $topic_data['poll_title']);
unset($poll_bbcode);
@@ -862,8 +862,7 @@ $sql = $db->sql_build_query('SELECT', array(
$result = $db->sql_query($sql);
-$today = explode('-', date('j-n-Y', time() + $user->timezone + $user->dst));
-$today = array('day' => (int) $today[0], 'month' => (int) $today[1], 'year' => (int) $today[2]);
+$now = getdate(time() + $user->timezone + $user->dst);
// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
@@ -1087,17 +1086,17 @@ while ($row = $db->sql_fetchrow($result))
if ($bday_year)
{
- $diff = $today['month'] - $bday_month;
+ $diff = $now['mon'] - $bday_month;
if ($diff == 0)
{
- $diff = ($today['day'] - $bday_day < 0) ? 1 : 0;
+ $diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
}
else
{
$diff = ($diff < 0) ? 1 : 0;
}
- $user_cache[$poster_id]['age'] = (int) ($today['year'] - $bday_year - $diff);
+ $user_cache[$poster_id]['age'] = (int) ($now['year'] - $bday_year - $diff);
}
}
}
@@ -1248,6 +1247,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed']))
{
$user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);
+ $user_cache[$poster_id]['sig'] = str_replace("\n", ' ', $user_cache[$poster_id]['sig']);
if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
{
@@ -1255,12 +1255,12 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
}
$user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']);
- $user_cache[$poster_id]['sig'] = str_replace("\n", ' ', $user_cache[$poster_id]['sig']);
$user_cache[$poster_id]['sig_parsed'] = true;
}
// Parse the message and subject
$message = censor_text($row['post_text']);
+ $message = str_replace("\n", ' ', $message);
// Second parse bbcode here
if ($row['bbcode_bitfield'])
@@ -1285,12 +1285,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
// Highlight active words (primarily for search)
if ($highlight_match)
{
- $message = preg_replace('#(?!<.*)(?]*>)#i', '\1 ', $message);
+ $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?]*(?:)#is', '\1 ', $message);
}
// Replace naughty words such as farty pants
$row['post_subject'] = censor_text($row['post_subject']);
- $message = str_replace("\n", ' ', $message);
// Editing information
if (($row['post_edit_count'] && $config['display_last_edited']) || $row['post_edit_reason'])
From e59432cbc5e181bc97ba76bfb7564edd142a9a65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Mon, 28 Aug 2006 18:45:18 +0000
Subject: [PATCH 034/291] Hehehehe ...
git-svn-id: file:///svn/phpbb/trunk@6322 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/index.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/index.php b/phpBB/index.php
index 23f29e6f37..8cde84904f 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -54,7 +54,7 @@ $db->sql_freeresult($result);
$birthday_list = '';
if ($config['load_birthdays'])
{
- $now = getdate(time() + $this->timezone + $this->dst);
+ $now = getdate(time() + $user->timezone + $user->dst);
$sql = 'SELECT user_id, username, user_colour, user_birthday
FROM ' . USERS_TABLE . "
WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
From 4cf8487e8d8c149f546af283042c2d0a12042f47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Mon, 28 Aug 2006 20:11:48 +0000
Subject: [PATCH 035/291] Some language changes. Don't get too excited when I
submit stuff.
git-svn-id: file:///svn/phpbb/trunk@6323 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/language/en/common.php | 11 +++++++++--
phpBB/language/en/memberlist.php | 8 +-------
phpBB/language/en/posting.php | 2 +-
phpBB/language/en/viewtopic.php | 1 +
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 9d1146c13b..2262f5e4be 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -52,6 +52,7 @@ $lang = array_merge($lang, array(
'ADMINISTRATOR' => 'Administrator',
'ADMINISTRATORS' => 'Administrators',
'AGE' => 'Age',
+ 'AIM' => 'AIM',
'ALLOWED' => 'Allowed',
'ALL_FILES' => 'All files',
'ALL_FORUMS' => 'All forums',
@@ -141,6 +142,7 @@ $lang = array_merge($lang, array(
'ERR_CONNECTING_SERVER' => 'Error connecting to the server',
'ERR_UNABLE_TO_LOGIN' => 'Error on login. Supplied username or password wrong.',
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path entered seems to be not valid.',
+ 'EXPAND_VIEW' => 'Expand view',
'EXTENSION' => 'Extension',
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension %s has been deactivated and can no longer be displayed',
@@ -226,7 +228,8 @@ $lang = array_merge($lang, array(
'HOURS' => 'Hours',
'HOME' => 'Home',
- 'ICQ_STATUS' => 'ICQ status',
+ 'ICQ' => 'ICQ',
+ 'ICQ_STATUS' => 'ICQ status',
'IF' => 'if',
'IMAGE' => 'Image',
'IN' => 'in',
@@ -237,6 +240,7 @@ $lang = array_merge($lang, array(
'INVALID_EMAIL_LOG' => '%s possibly an invalid email address?',
'IP' => 'IP',
+ 'JABBER' => 'Jabber',
'JOINED' => 'Joined',
'JUMP_PAGE' => 'Enter the page number you wish to go to',
'JUMP_TO' => 'Jump to',
@@ -251,7 +255,7 @@ $lang = array_merge($lang, array(
'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server',
'LEGEND' => 'Legend',
'LOCATION' => 'Location',
- 'LOCK_POST' => 'Lock Post',
+ 'LOCK_POST' => 'Lock post',
'LOCK_POST_EXPLAIN' => 'Prevent editing',
'LOCK_TOPIC' => 'Lock topic',
'LOGIN' => 'Login',
@@ -432,8 +436,10 @@ $lang = array_merge($lang, array(
'SEARCHING_FORUMS' => 'Searching forums',
'SEARCH_ACTIVE_TOPICS' => 'View active topics',
'SEARCH_FOR' => 'Search for',
+ 'SEARCH_FORUM' => 'Search this forum',
'SEARCH_NEW' => 'View new posts',
'SEARCH_SELF' => 'View your posts',
+ 'SEARCH_TOPIC' => 'Search this topic',
'SEARCH_UNANSWERED' => 'View unanswered posts',
'SECONDS' => 'Seconds',
'SELECT' => 'Select',
@@ -589,6 +595,7 @@ $lang = array_merge($lang, array(
'YEAR' => 'Year',
'YES' => 'Yes',
+ 'YIM' => 'YIM',
'YOU_LAST_VISIT' => 'Last visit was: %s',
'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox',
'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index 37f937edda..f5ff5f75a1 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -34,8 +34,7 @@ $lang = array_merge($lang, array(
'ACTIVE_IN_TOPIC' => 'Most active topic',
'ADD_FOE' => 'Add foe',
'ADD_FRIEND' => 'Add friend',
- 'AFTER' => 'After',
- 'AIM' => 'AIM',
+ 'AFTER' => 'After',
'BEFORE' => 'Before',
@@ -62,7 +61,6 @@ $lang = array_merge($lang, array(
'HIDE_MEMBER_SEARCH' => 'Hide member search',
- 'ICQ' => 'ICQ',
'IM_ADD_CONTACT' => 'Add Contact',
'IM_AIM' => 'Please note that you need AOL Instant Messenger installed to use this.',
'IM_AIM_EXPRESS' => 'AIM Express',
@@ -80,8 +78,6 @@ $lang = array_merge($lang, array(
'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
'IM_USER' => 'Send an instant message',
- 'JABBER' => 'Jabber',
-
'LAST_ACTIVE' => 'Last active',
'LESS_THAN' => 'Less than',
'LIST_USER' => '1 user',
@@ -124,8 +120,6 @@ $lang = array_merge($lang, array(
'VISITED' => 'Last visited',
'WWW' => 'Website',
-
- 'YIM' => 'YIM',
));
?>
\ No newline at end of file
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 518b3ec672..f041460da6 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -29,7 +29,7 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ADD_ATTACHMENT' => 'Attachment uploading',
+ 'ADD_ATTACHMENT' => 'Upload attachment',
'ADD_ATTACHMENT_EXPLAIN' => 'If you wish to attach one or more files enter the details below',
'ADD_FILE' => 'Add the file',
'ADD_POLL' => 'Poll creation',
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index c82ea44678..c4ab86796a 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -70,6 +70,7 @@ $lang = array_merge($lang, array(
'NO_OLDER_TOPICS' => 'There are no older topics in this forum',
'NO_UNREAD_POSTS' => 'There are no new unread posts for this topic.',
'NO_VOTE_OPTION' => 'You must specify an option when voting.',
+ 'NO_VOTES' => 'No votes',
'POLL_ENDED_AT' => 'Poll ended at %s',
'POLL_RUN_TILL' => 'Poll runs till %s',
From 64dc59ac822b69ccf2898a1bf35ae3e20adb1f93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Mon, 28 Aug 2006 20:20:38 +0000
Subject: [PATCH 036/291] What is that you say? Coding guidelines? I don't know
no freaking coding guidelines!
git-svn-id: file:///svn/phpbb/trunk@6324 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/language/en/common.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 2262f5e4be..95e74d47d8 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -142,7 +142,7 @@ $lang = array_merge($lang, array(
'ERR_CONNECTING_SERVER' => 'Error connecting to the server',
'ERR_UNABLE_TO_LOGIN' => 'Error on login. Supplied username or password wrong.',
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path entered seems to be not valid.',
- 'EXPAND_VIEW' => 'Expand view',
+ 'EXPAND_VIEW' => 'Expand view',
'EXTENSION' => 'Extension',
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension %s has been deactivated and can no longer be displayed',
@@ -228,7 +228,7 @@ $lang = array_merge($lang, array(
'HOURS' => 'Hours',
'HOME' => 'Home',
- 'ICQ' => 'ICQ',
+ 'ICQ' => 'ICQ',
'ICQ_STATUS' => 'ICQ status',
'IF' => 'if',
'IMAGE' => 'Image',
@@ -246,7 +246,7 @@ $lang = array_merge($lang, array(
'JUMP_TO' => 'Jump to',
'JUMP_TO_PAGE' => 'Click to jump to page...',
- 'KB' => 'KB',
+ 'KB' => 'KB',
'LAST_POST' => 'Last post',
'LAST_UPDATED' => 'Last updated',
@@ -436,10 +436,10 @@ $lang = array_merge($lang, array(
'SEARCHING_FORUMS' => 'Searching forums',
'SEARCH_ACTIVE_TOPICS' => 'View active topics',
'SEARCH_FOR' => 'Search for',
- 'SEARCH_FORUM' => 'Search this forum',
+ 'SEARCH_FORUM' => 'Search this forum',
'SEARCH_NEW' => 'View new posts',
'SEARCH_SELF' => 'View your posts',
- 'SEARCH_TOPIC' => 'Search this topic',
+ 'SEARCH_TOPIC' => 'Search this topic',
'SEARCH_UNANSWERED' => 'View unanswered posts',
'SECONDS' => 'Seconds',
'SELECT' => 'Select',
@@ -595,7 +595,7 @@ $lang = array_merge($lang, array(
'YEAR' => 'Year',
'YES' => 'Yes',
- 'YIM' => 'YIM',
+ 'YIM' => 'YIM',
'YOU_LAST_VISIT' => 'Last visit was: %s',
'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox',
'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox',
From b4c095cb3e3df573cba09a524b16377258a740d0 Mon Sep 17 00:00:00 2001
From: Nils Adermann
Date: Mon, 28 Aug 2006 21:15:05 +0000
Subject: [PATCH 037/291] -forgot list items
git-svn-id: file:///svn/phpbb/trunk@6325 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/search.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/phpBB/search.php b/phpBB/search.php
index e949cf3ce4..ae3d9b73a3 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -770,10 +770,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$row['post_subject'] = censor_text($row['post_subject']);
$message = $row['post_text'];
-
if (($return_chars != -1) && (strlen($message) >= $return_chars + 3))
{
$message = censor_text($message);
+
+ // make list items visible as such
+ $message = str_replace('[*:' . $row['bbcode_uid'] . ']', '⋅ ', $message);
+
+ // do not display raw bbcode
strip_bbcode($message, $row['bbcode_uid']);
// now find context for the searched words
From 284cba438b4bca43352174ce97f5a455c229146c Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 29 Aug 2006 14:57:17 +0000
Subject: [PATCH 038/291] hopefully fixing bug #3966
git-svn-id: file:///svn/phpbb/trunk@6326 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/posting.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/phpBB/posting.php b/phpBB/posting.php
index fc3ce33c11..c763f0c333 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -420,6 +420,12 @@ if ($mode != 'post' && $config['allow_topic_notify'] && $user->data['is_register
$db->sql_freeresult($result);
}
+// If the user is replying or posting and not already watching this topic but set to always being notified we need to overwrite this setting
+if ($mode != 'edit' && $config['allow_topic_notify'] && $user->data['is_registered'] && !$post_data['notify_set'])
+{
+ $post_data['notify_set'] = $user->data['user_notify'];
+}
+
// Do we want to edit our post ?
if ($mode == 'edit' && $post_data['bbcode_uid'])
{
From 69983a2d4ea6e59361751efdf4a0aed78edd6370 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 29 Aug 2006 15:05:56 +0000
Subject: [PATCH 039/291] fixing bug #4078
git-svn-id: file:///svn/phpbb/trunk@6327 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/ucp/ucp_register.php | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 2a4e376f14..adfdb60ffe 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -322,10 +322,19 @@ class ucp_register
{
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
+ $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
+
+ // Also include founders
+ $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
+
+ if (sizeof($admin_ary))
+ {
+ $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
+ }
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
+ FROM ' . USERS_TABLE . ' ' .
+ $where_sql;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -381,10 +390,13 @@ class ucp_register
}
while ($row = $db->sql_fetchrow($result));
- $sql = 'DELETE FROM ' . CONFIRM_TABLE . '
- WHERE ' . $db->sql_in_set('session_id', $sql_in, true) . '
- AND confirm_type = ' . CONFIRM_REG;
- $db->sql_query($sql);
+ if (sizeof($sql_in))
+ {
+ $sql = 'DELETE FROM ' . CONFIRM_TABLE . '
+ WHERE ' . $db->sql_in_set('session_id', $sql_in, true) . '
+ AND confirm_type = ' . CONFIRM_REG;
+ $db->sql_query($sql);
+ }
}
$db->sql_freeresult($result);
From 1307146a931dcbd3c4d171d339865c650e11e28d Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 29 Aug 2006 15:52:05 +0000
Subject: [PATCH 040/291] small correction to the coding guidelines
git-svn-id: file:///svn/phpbb/trunk@6328 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/docs/coding-guidelines.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 5510a28b78..26211758c2 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -214,12 +214,12 @@ body {
Tabs vs Spaces:
-
In order to make this as simple as possible, we will be using tabs, not spaces. Feel free to set how many spaces your editor uses when it displays tabs, but make sure that when you save the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.
-
Additionally please check your editor for the indent size. If tabs are set to 4 spaces for example, the indent size needs to be 4 too:
-
+
In order to make this as simple as possible, we will be using tabs, not spaces. We enforce 4 (four) spaces for one tab - therefore you need to set your tab width within your editor to 4 spaces. Make sure that when you save the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.
+
Tabs in front of lines are no problem, but having them within the text can be a problem if you do not set it to the amount of spaces every one of us uses. Here is a short example of how it should look like:
+
-$mode{TAB}{TAB}= request_var('mode', '');
-$search_id{TAB}= request_var('search_id', '');
+{TAB}$mode{TAB}{TAB}= request_var('mode', '');
+{TAB}$search_id{TAB}= request_var('search_id', '');
If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.
From 1564013fdd427691df22fcba7b372c5e1f8922e4 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Tue, 29 Aug 2006 17:23:44 +0000
Subject: [PATCH 041/291] a script to update old bbcode bitfields to the new
format. ;)
git-svn-id: file:///svn/phpbb/trunk@6329 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/develop/adjust_bbcodes.php | 174 +++++++++++++++++++++++++++++++
1 file changed, 174 insertions(+)
create mode 100644 phpBB/develop/adjust_bbcodes.php
diff --git a/phpBB/develop/adjust_bbcodes.php b/phpBB/develop/adjust_bbcodes.php
new file mode 100644
index 0000000000..f06f0112ab
--- /dev/null
+++ b/phpBB/develop/adjust_bbcodes.php
@@ -0,0 +1,174 @@
+session_begin();
+$auth->acl($user->data);
+$user->setup();
+
+$echos = 0;
+
+// Adjust user signatures
+$message_parser = new parse_message();
+$message_parser->mode = 'sig';
+$message_parser->bbcode_init();
+
+$sql = 'SELECT user_id, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield
+ FROM ' . USERS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['user_sig_bbcode_uid'] && $row['user_sig'])
+ {
+ decode_message($row['user_sig'], $row['user_sig_bbcode_uid']);
+
+ $message_parser->message = $row['user_sig'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo ' ' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_sig_bbcode_bitfield = ''
+ WHERE user_id = " . $row['user_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+
+// Now adjust posts
+
+$message_parser = new parse_message();
+$message_parser->mode = 'post';
+$message_parser->bbcode_init();
+
+// Update posts
+$sql = 'SELECT post_id, post_text, bbcode_uid, enable_bbcode, enable_smilies, enable_sig
+ FROM ' . POSTS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['enable_bbcode'])
+ {
+ decode_message($row['post_text'], $row['bbcode_uid']);
+
+ $message_parser->message = $row['post_text'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo ' ' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . POSTS_TABLE . " SET bbcode_bitfield = ''
+ WHERE post_id = " . $row['post_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+// Now to the private messages
+$message_parser = new parse_message();
+$message_parser->mode = 'post';
+$message_parser->bbcode_init();
+
+// Update pms
+$sql = 'SELECT msg_id, message_text, bbcode_uid, enable_bbcode
+ FROM ' . PRIVMSGS_TABLE;
+$result = $db->sql_query($sql);
+
+while ($row = $db->sql_fetchrow($result))
+{
+ // Convert bbcodes back to their normal form
+ if ($row['enable_bbcode'])
+ {
+ decode_message($row['message_text'], $row['bbcode_uid']);
+
+ $message_parser->message = $row['message_text'];
+
+ $message_parser->prepare_bbcodes();
+ $message_parser->parse_bbcode();
+
+ $bitfield = $message_parser->bbcode_bitfield;
+
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = '" . $db->sql_escape($bitfield) . "'
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+
+ if ($echos > 200)
+ {
+ echo ' ' . "\n";
+ $echos = 0;
+ }
+
+ echo '.';
+ $echos++;
+
+ flush();
+ }
+ else
+ {
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . " SET bbcode_bitfield = ''
+ WHERE msg_id = " . $row['msg_id'];
+ $db->sql_query($sql);
+ }
+}
+$db->sql_freeresult($result);
+
+// Done
+$db->sql_close();
+
+?>
\ No newline at end of file
From 457078f2cfcd114e84b33c123e83eab79e350d0c Mon Sep 17 00:00:00 2001
From: Nils Adermann
Date: Tue, 29 Aug 2006 20:25:28 +0000
Subject: [PATCH 042/291] - only highlight when there is anything to highlight
git-svn-id: file:///svn/phpbb/trunk@6330 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/search.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/phpBB/search.php b/phpBB/search.php
index ae3d9b73a3..a2feeab37c 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -808,8 +808,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$message = smiley_text($message);
}
- // post highlighting
- $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?]*(?:)#is', '$1 ', $message);
+ if ($hilit)
+ {
+ // post highlighting
+ $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?]*(?:)#is', '$1 ', $message);
+ }
$tpl_ary = array(
'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],
From bd4391d4cac93a7e224230a8b8f8fe0b7c199043 Mon Sep 17 00:00:00 2001
From: David M
Date: Wed, 30 Aug 2006 00:52:14 +0000
Subject: [PATCH 043/291] - Bug #3978
git-svn-id: file:///svn/phpbb/trunk@6331 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/ucp/ucp_main.php | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 0dd69e4bcf..0bd49767a9 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -65,7 +65,7 @@ class ucp_main
if (sizeof($forum_ary))
{
- $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary);
+ $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
}
$result = $db->sql_query_limit($sql, 1);
$g_forum_id = (int) $db->sql_fetchfield('forum_id');
@@ -79,12 +79,16 @@ class ucp_main
$result = $db->sql_query($sql);
$topic_list = $rowset = array();
- while ($row = $db->sql_fetchrow($result))
+ // If the user can't see any forums, he can't read any posts because fid of 0 is invalid
+ if ($g_forum_id)
{
- $topic_list[] = $row['topic_id'];
- $rowset[$row['topic_id']] = $row;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ $rowset[$row['topic_id']] = $row;
+ }
+ $db->sql_freeresult($result);
}
- $db->sql_freeresult($result);
$topic_tracking_info = array();
if ($config['load_db_lastread'])
From bb3034eb263cf001be0ce002e4442b29dd2ed33f Mon Sep 17 00:00:00 2001
From: David M
Date: Wed, 30 Aug 2006 00:58:36 +0000
Subject: [PATCH 044/291] - Bug #4000
git-svn-id: file:///svn/phpbb/trunk@6332 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/search.php | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/phpBB/search.php b/phpBB/search.php
index a2feeab37c..d304e71f0d 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -956,10 +956,24 @@ $template->assign_vars(array(
'S_SELECT_SORT_DAYS' => $s_limit_days)
);
-$sql = 'SELECT search_time, search_keywords
- FROM ' . SEARCH_RESULTS_TABLE . '
- WHERE search_keywords <> \'\'
- ORDER BY search_time DESC';
+// Can't do comparisons w/ TEXT on MSSQL, CAST is good enough
+switch (SQL_LAYER)
+{
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE CAST(search_keywords AS varchar) <> \'\'
+ ORDER BY search_time DESC';
+ break;
+
+ default:
+ $sql = 'SELECT search_time, search_keywords
+ FROM ' . SEARCH_RESULTS_TABLE . '
+ WHERE search_keywords <> \'\'
+ ORDER BY search_time DESC';
+ break;
+}
$result = $db->sql_query_limit($sql, 5);
while ($row = $db->sql_fetchrow($result))
From 3f6318f2b10a1e5f8ede1d7a17a58409c1ddc1e6 Mon Sep 17 00:00:00 2001
From: David M
Date: Wed, 30 Aug 2006 01:15:40 +0000
Subject: [PATCH 045/291] - Bug #4028
git-svn-id: file:///svn/phpbb/trunk@6333 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_reasons.php | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 2234871bce..f94240b925 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -214,9 +214,17 @@ class acp_reasons
case 'mssql':
case 'mssql_odbc':
// Change the reports using this reason to 'other'
- $sql = 'UPDATE ' . REPORTS_TABLE . '
- SET reason_id = ' . $other_reason_id . ", report_text = '" . $db->sql_escape($reason_row['reason_description']) . "\n\n' + report_text
- WHERE reason_id = $reason_id";
+ $sql = "DECLARE @ptrval binary(16)
+
+ SELECT @ptrval = TEXTPTR(report_text)
+ FROM " . REPORTS_TABLE . "
+ WHERE reason_id = " . $reason_id . "
+
+ UPDATETEXT " . REPORTS_TABLE . ".report_text @ptrval 0 0 '" . $db->sql_escape($reason_row['reason_description']) . "\n\n'"
+
+ 'UPDATE ' . REPORTS_TABLE . '
+ SET reason_id = ' . $other_reason_id . "
+ WHERE reason_id = $reason_id";
break;
// Teh standard
From 733774d747997856993f141beb54156262dc738a Mon Sep 17 00:00:00 2001
From: David M
Date: Wed, 30 Aug 2006 01:31:50 +0000
Subject: [PATCH 046/291] - Bug #3986
git-svn-id: file:///svn/phpbb/trunk@6334 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/language/en/acp/posting.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index e1941b7f8d..457e65444e 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
'BBCODE_ADDED' => 'BBCode added successfully',
'BBCODE_EDITED' => 'BBCode edited successfully',
- 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected is invalid',
+ 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists',
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist',
'BBCODE_HELPLINE' => 'Helpline',
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouseover text of the BBCode',
From 239bd5e37ca32016714046f55f1a6afff3805dea Mon Sep 17 00:00:00 2001
From: David M
Date: Wed, 30 Aug 2006 13:15:36 +0000
Subject: [PATCH 047/291] oops :P
git-svn-id: file:///svn/phpbb/trunk@6335 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/ucp/ucp_main.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 0bd49767a9..4e3659de50 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -76,12 +76,13 @@ class ucp_main
WHERE t.forum_id = 0
AND t.topic_type = " . POST_GLOBAL . '
ORDER BY t.topic_last_post_time DESC';
- $result = $db->sql_query($sql);
$topic_list = $rowset = array();
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
if ($g_forum_id)
{
+ $result = $db->sql_query($sql);
+
while ($row = $db->sql_fetchrow($result))
{
$topic_list[] = $row['topic_id'];
From d64e44b8786ef0c219860838ca101bd7f44d4ece Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Wed, 30 Aug 2006 19:33:55 +0000
Subject: [PATCH 048/291] Error if no post in a forum
git-svn-id: file:///svn/phpbb/trunk@6336 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions_display.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 1fc6b63996..35c78189f4 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -314,7 +314,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
else
{
- $last_post_time = $last_poster = $last_poster_url = $last_post_url = '';
+ $last_post_time = $last_poster = $last_poster_colour = $last_poster_url = $last_post_url = '';
}
// Output moderator listing ... if applicable
From 996d946148e8d25c646dfc8380e0373e85aac2e7 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Wed, 30 Aug 2006 19:44:32 +0000
Subject: [PATCH 049/291] Correctly set IP address on initial post and user
profile
git-svn-id: file:///svn/phpbb/trunk@6337 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 287596497d..48058f4c0e 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1057,6 +1057,8 @@ class install_install extends module
$current_time = time();
+ $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
+
// Set default config and post data, this applies to all DB's
$sql_ary = array(
'INSERT INTO ' . $table_prefix . "config (config_name, config_value)
@@ -1142,7 +1144,7 @@ class install_install extends module
WHERE config_name = 'newest_username'",
'UPDATE ' . $table_prefix . "users
- SET username = '" . $db->sql_escape($admin_name) . "', user_password='" . $db->sql_escape(md5($admin_pass1)) . "', 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 = '" . (int) (crc32(strtolower($board_email1)) . strlen($board_email1)) . "'
+ 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 = '" . (int) (crc32(strtolower($board_email1)) . strlen($board_email1)) . "'
WHERE username = 'Admin'",
'UPDATE ' . $table_prefix . "moderator_cache
@@ -1162,7 +1164,7 @@ class install_install extends module
SET user_regdate = $current_time",
'UPDATE ' . $table_prefix . "posts
- SET post_time = $current_time",
+ SET post_time = $current_time, poster_ip = '" . $db->sql_escape($user_ip) . "'",
'UPDATE ' . $table_prefix . "topics
SET topic_time = $current_time, topic_last_post_time = $current_time",
From 4354729066572898465d3e6a9b4cc5f47ff4e927 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Wed, 30 Aug 2006 19:47:36 +0000
Subject: [PATCH 050/291] Some interface work on the ACP: - #3774 and more
git-svn-id: file:///svn/phpbb/trunk@6338 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/images/icon_delete_disabled.gif | Bin 0 -> 249 bytes
phpBB/adm/images/icon_down_disabled.gif | Bin 0 -> 166 bytes
phpBB/adm/images/icon_edit_disabled.gif | Bin 0 -> 239 bytes
phpBB/adm/images/icon_sync_disabled.gif | Bin 0 -> 246 bytes
phpBB/adm/images/icon_up_disabled.gif | Bin 0 -> 168 bytes
phpBB/adm/index.php | 15 ++++++++-----
phpBB/adm/style/acp_bbcodes.html | 2 +-
phpBB/adm/style/acp_forums.html | 25 +++++++++++++++++-----
phpBB/adm/style/acp_icons.html | 14 +++++++++---
phpBB/adm/style/acp_modules.html | 19 ++++++++++++----
phpBB/adm/style/acp_permission_roles.html | 23 ++++++++++++++------
phpBB/adm/style/acp_profile.html | 25 ++++++++++++++++------
phpBB/adm/style/acp_reasons.html | 20 +++++++++++++----
13 files changed, 108 insertions(+), 35 deletions(-)
create mode 100644 phpBB/adm/images/icon_delete_disabled.gif
create mode 100644 phpBB/adm/images/icon_down_disabled.gif
create mode 100644 phpBB/adm/images/icon_edit_disabled.gif
create mode 100644 phpBB/adm/images/icon_sync_disabled.gif
create mode 100644 phpBB/adm/images/icon_up_disabled.gif
diff --git a/phpBB/adm/images/icon_delete_disabled.gif b/phpBB/adm/images/icon_delete_disabled.gif
new file mode 100644
index 0000000000000000000000000000000000000000..da55bbbe445dfc0e71a24ca92c901ba292bbb6d1
GIT binary patch
literal 249
zcmZ?wbhEHb6krfwI3mPw^XAPfmo8nudiBYZCs(grxp(j0{rmTC-@JL}&Yc_AuRnV9
z=-IPp*RNl{a^=e7$B*yazWws$%S#t8{{R1-9ER$0FlKT^%7{*#G>%ZZ7
zY_8Lxjc)4TOVxbgn|`%|Y*ojrT@s%|-I1Y`h$lb@bFUq$Q2DCK+fcGFSrudTw>%
literal 0
HcmV?d00001
diff --git a/phpBB/adm/images/icon_sync_disabled.gif b/phpBB/adm/images/icon_sync_disabled.gif
new file mode 100644
index 0000000000000000000000000000000000000000..39985045c8b39f983d239922ac332da499d5bcc8
GIT binary patch
literal 246
zcmZ?wbhEHb6krfwI3mt)=+L1H7cN}6a^>pPt9S0)IePTylP6CeKYo1s_U%WH9vwMy
zEY^
fg@u@HtQiE9{Ka{=`$Tz_bHq6X1T_-06&b7n>9J!#
literal 0
HcmV?d00001
diff --git a/phpBB/adm/images/icon_up_disabled.gif b/phpBB/adm/images/icon_up_disabled.gif
new file mode 100644
index 0000000000000000000000000000000000000000..2797192574ae46632303240ad7c1837be1ed02a4
GIT binary patch
literal 168
zcmV;Z09XG "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
- 'ICON_MOVE_UP' => ' ',
- 'ICON_MOVE_DOWN' => ' ',
- 'ICON_EDIT' => ' ',
- 'ICON_DELETE' => ' ',
- 'ICON_SYNC' => ' ',
+ 'ICON_MOVE_UP' => ' ',
+ 'ICON_MOVE_UP_DISABLED' => ' ',
+ 'ICON_MOVE_DOWN' => ' ',
+ 'ICON_MOVE_DOWN_DISABLED' => ' ',
+ 'ICON_EDIT' => ' ',
+ 'ICON_EDIT_DISABLED' => ' ',
+ 'ICON_DELETE' => ' ',
+ 'ICON_DELETE_DISABLED' => ' ',
+ 'ICON_SYNC' => ' ',
+ 'ICON_SYNC_DISABLED' => ' ',
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html
index 162ee18c35..c1eb7e2193 100644
--- a/phpBB/adm/style/acp_bbcodes.html
+++ b/phpBB/adm/style/acp_bbcodes.html
@@ -96,7 +96,7 @@
{bbcodes.BBCODE_TAG}
- {ICON_EDIT} {ICON_DELETE}
+ {ICON_EDIT} {ICON_DELETE}
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index dff974e818..24febd120d 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -313,15 +313,30 @@
{forums.FOLDER_IMAGE}
- {forums.FORUM_NAME}{forums.FORUM_NAME}
+ {forums.FORUM_NAME}{forums.FORUM_NAME}
{forums.FORUM_DESCRIPTION}
{L_TOPICS}: {forums.FORUM_TOPICS} / {L_POSTS}: {forums.FORUM_POSTS}
-
- {ICON_MOVE_UP}
- {ICON_MOVE_DOWN}
+
+
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN_DISABLED}
+
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN_DISABLED}
+
{ICON_EDIT}
- {ICON_SYNC}
+
+ {ICON_SYNC}
+
+ {ICON_SYNC_DISABLED}
+
{ICON_DELETE}
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index ca4c39004a..e9d2e4823f 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -144,9 +144,17 @@
{items.CODE}
{items.EMOTION}
-
- {ICON_MOVE_UP}
- {ICON_MOVE_DOWN}
+
+
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN_DISABLED}
+
{ICON_EDIT}
{ICON_DELETE}
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 3f27c94be3..479058fd9b 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -143,11 +143,22 @@
{modules.MODULE_IMAGE}
- {modules.MODULE_TITLE} [{L_HIDDEN_MODULE}]
+ {modules.MODULE_TITLE} [{L_HIDDEN_MODULE}]
{L_DISABLE} {L_ENABLE}
-
- {ICON_MOVE_UP}
- {ICON_MOVE_DOWN}
+
+
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN}
+
+ {ICON_MOVE_UP}
+ {ICON_MOVE_DOWN_DISABLED}
+
+ {ICON_MOVE_UP_DISABLED}
+ {ICON_MOVE_DOWN_DISABLED}
+
{ICON_EDIT}
{ICON_DELETE}
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index 0eca7e9273..f5676b0986 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -173,10 +173,10 @@
{L_USERNAME}: {L_USERNAMES_EXPLAIN}
- [ {L_FIND_USERNAME} ]
+ [ {L_FIND_USERNAME} ]
diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html
index 3b73856650..a1ab29be6c 100644
--- a/phpBB/styles/subSilver/template/ucp_header.html
+++ b/phpBB/styles/subSilver/template/ucp_header.html
@@ -101,7 +101,7 @@
-
+
{pm_colour_info.IMG}
diff --git a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
index 92c2a1ef78..8f4d100b2d 100644
--- a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html
@@ -55,7 +55,7 @@
-
+
\ No newline at end of file
diff --git a/phpBB/styles/subSilver/template/ucp_main_drafts.html b/phpBB/styles/subSilver/template/ucp_main_drafts.html
index 50d56613a3..67a6648738 100644
--- a/phpBB/styles/subSilver/template/ucp_main_drafts.html
+++ b/phpBB/styles/subSilver/template/ucp_main_drafts.html
@@ -83,7 +83,7 @@
{L_FONT_LARGE}
{L_FONT_HUGE}
- {L_CLOSE_TAGS}
+ {L_CLOSE_TAGS}
diff --git a/phpBB/styles/subSilver/template/ucp_main_subscribed.html b/phpBB/styles/subSilver/template/ucp_main_subscribed.html
index ef4ab3234c..ec75fa7262 100644
--- a/phpBB/styles/subSilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/subSilver/template/ucp_main_subscribed.html
@@ -36,7 +36,7 @@
{PAGE_NUMBER}
[ {TOTAL_TOPICS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
@@ -72,6 +72,6 @@
-
+
\ No newline at end of file
diff --git a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html
index f0b6307789..082c5401d5 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_message_footer.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_message_footer.html
@@ -7,7 +7,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/ucp_pm_message_header.html b/phpBB/styles/subSilver/template/ucp_pm_message_header.html
index f499b82fd5..bb5a9eea22 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_message_header.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_message_header.html
@@ -22,7 +22,7 @@
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
diff --git a/phpBB/styles/subSilver/template/ucp_pm_options.html b/phpBB/styles/subSilver/template/ucp_pm_options.html
index 321c98be2a..4fbc908b5a 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_options.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_options.html
@@ -42,7 +42,7 @@
- [ {L_FIND_USERNAME} ]
+ [ {L_FIND_USERNAME} ]
{S_GROUP_OPTIONS} {L_NO_GROUPS}
diff --git a/phpBB/styles/subSilver/template/ucp_pm_popup.html b/phpBB/styles/subSilver/template/ucp_pm_popup.html
index f3d02b5ed9..6b13b186f7 100644
--- a/phpBB/styles/subSilver/template/ucp_pm_popup.html
+++ b/phpBB/styles/subSilver/template/ucp_pm_popup.html
@@ -26,7 +26,7 @@ function jump_to_inbox()
{MESSAGE} {CLICK_TO_VIEW}
- {L_CLOSE_WINDOW}
+ {L_CLOSE_WINDOW}
diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html
index 4cacc5ae81..da2cbecfb1 100644
--- a/phpBB/styles/subSilver/template/ucp_profile_signature.html
+++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html
@@ -56,9 +56,15 @@ d_help = "{LA_BBCODE_D_HELP}";
-
-
-
+
+
+
+
+
+
+
+
+
@@ -69,7 +75,7 @@ d_help = "{LA_BBCODE_D_HELP}";
{L_FONT_NORMAL}
{L_FONT_LARGE}
{L_FONT_HUGE}
- | {L_CLOSE_TAGS}
+ | {L_CLOSE_TAGS}
@@ -117,6 +123,9 @@ d_help = "{LA_BBCODE_D_HELP}";
{FLASH_STATUS}
+
+ {URL_STATUS}
+
{SMILIES_STATUS}
@@ -136,10 +145,12 @@ d_help = "{LA_BBCODE_D_HELP}";
{L_DISABLE_SMILIES}
-
-
- {L_DISABLE_MAGIC_URL}
-
+
+
+
+ {L_DISABLE_MAGIC_URL}
+
+
diff --git a/phpBB/styles/subSilver/template/ucp_register.html b/phpBB/styles/subSilver/template/ucp_register.html
index e57b1ed92b..ccbcb4505f 100644
--- a/phpBB/styles/subSilver/template/ucp_register.html
+++ b/phpBB/styles/subSilver/template/ucp_register.html
@@ -59,7 +59,7 @@
{L_LANGUAGE}:
- {S_LANG_OPTIONS}
+ {S_LANG_OPTIONS}
{L_TIMEZONE}:
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 3c312ae25d..f03553310e 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -112,7 +112,7 @@
{PAGE_NUMBER}
[ {TOTAL_TOPICS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
@@ -211,7 +211,7 @@
{POST_IMG}
{PAGE_NUMBER}
[ {TOTAL_TOPICS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
diff --git a/phpBB/styles/subSilver/template/viewonline_body.html b/phpBB/styles/subSilver/template/viewonline_body.html
index 510f12f57c..0fd31c66d9 100644
--- a/phpBB/styles/subSilver/template/viewonline_body.html
+++ b/phpBB/styles/subSilver/template/viewonline_body.html
@@ -8,7 +8,7 @@
@@ -38,7 +38,7 @@
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 6e523b5cc1..4236634522 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -35,7 +35,7 @@
{PAGE_NUMBER}
[ {TOTAL_POSTS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
@@ -297,7 +297,7 @@
{PAGE_NUMBER}
[ {TOTAL_POSTS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+ {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
diff --git a/phpBB/styles/subSilver/theme/images/index.htm b/phpBB/styles/subSilver/theme/images/index.htm
index 491b26dd23..29531416fe 100644
--- a/phpBB/styles/subSilver/theme/images/index.htm
+++ b/phpBB/styles/subSilver/theme/images/index.htm
@@ -8,7 +8,7 @@
-
+
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index a1c59f154e..4d41b27fa5 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -89,10 +89,10 @@ if (!$auth->acl_get('f_read', $forum_id))
// Is this forum a link? ... User got here either because the
// number of clicks is being tracked or they guessed the id
-if ($forum_data['forum_link'])
+if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
{
// Does it have click tracking enabled?
- if ($forum_data['forum_flags'] & 1)
+ if ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK)
{
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_posts = forum_posts + 1
@@ -139,7 +139,7 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
// Not postable forum or showing active topics?
-if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16) && $forum_data['forum_type'] == FORUM_CAT)))
+if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) && $forum_data['forum_type'] == FORUM_CAT)))
{
page_footer();
}
@@ -232,7 +232,7 @@ else
$post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LOCKED'] : $user->lang['POST_NEW_TOPIC'];
// Display active topics?
-$s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & 16)) ? true : false;
+$s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
$template->assign_vars(array(
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start),
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index d202ef949e..98f0fb47af 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -51,7 +51,7 @@ if ($mode == 'whois')
$whois = user_ipwhois($row['session_ip']);
$whois = preg_replace('#(\s)([\w\-\._\+]+@[\w\-\.]+)(\s)#', '\1\2 \3', $whois);
- $whois = preg_replace('#(\s)(http:/{2}[^\s]*)(\s)#', '\1\2 \3', $whois);
+ $whois = preg_replace('#(\s)(http:/{2}[^\s]*)(\s)#', '\1\2 \3', $whois);
$template->assign_vars(array(
'WHOIS' => trim($whois))
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index c4bac162cd..62a5b822f9 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1534,6 +1534,14 @@ if ($force_encoding != '')
$user->lang['ENCODING'] = $force_encoding;
}
+// We overwrite $_REQUEST['f'] if there is no forum specified
+// to be able to display the correct online list.
+// One downside is that the user currently viewing this topic/post is not taken into account.
+if (empty($_REQUEST['f']))
+{
+ $_REQUEST['f'] = $forum_id;
+}
+
// Output the page
page_header($user->lang['VIEW_TOPIC'] .' - ' . $topic_data['topic_title']);
From 665adc1722385e134ef20f8e470d5593a8be284b Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Wed, 13 Sep 2006 18:19:39 +0000
Subject: [PATCH 077/291] seems like i forgot something. :)
git-svn-id: file:///svn/phpbb/trunk@6365 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_attachments.php | 62 --------------------------
phpBB/includes/acp/acp_forums.php | 28 ++++++------
2 files changed, 14 insertions(+), 76 deletions(-)
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index acb1319c16..5fe58955f2 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1124,68 +1124,6 @@ class acp_attachments
return $group_select;
}
- /**
- * Upload already uploaded file... huh? are you kidding?
- function upload_file($post_id, $topic_id, $forum_id, $upload_dir, $filename)
- {
- global $message_parser, $db, $user, $phpbb_root_path;
-
- $message_parser->attachment_data = array();
- $message_parser->filename_data['filecomment'] = '';
-
- $filedata = upload_attachment('local', $forum_id, true, $phpbb_root_path . $upload_dir . '/' . basename($filename));
-
- if ($filedata['post_attach'] && !sizeof($filedata['error']))
- {
- $message_parser->attachment_data = array(
- 'post_msg_id' => $post_id,
- 'poster_id' => $user->data['user_id'],
- 'topic_id' => $topic_id,
- 'in_message' => 0,
- 'physical_filename' => $filedata['physical_filename'],
- 'real_filename' => $filedata['real_filename'],
- 'attach_comment' => $message_parser->filename_data['filecomment'],
- 'extension' => $filedata['extension'],
- 'mimetype' => $filedata['mimetype'],
- 'filesize' => $filedata['filesize'],
- 'filetime' => $filedata['filetime'],
- 'thumbnail' => $filedata['thumbnail']
- );
-
- $message_parser->filename_data['filecomment'] = '';
- $filedata['post_attach'] = false;
-
- // Submit Attachment
- $attach_sql = $message_parser->attachment_data;
-
- $db->sql_transaction('begin');
-
- $sql = 'INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $attach_sql);
- $db->sql_query($sql);
-
- $sql = 'UPDATE ' . POSTS_TABLE . "
- SET post_attachment = 1
- WHERE post_id = $post_id";
- $db->sql_query($sql);
-
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_attachment = 1
- WHERE topic_id = $topic_id";
- $db->sql_query($sql);
-
- $db->sql_transaction('commit');
-
- add_log('admin', 'LOG_ATTACH_FILEUPLOAD', $post_id, $filename);
-
- return true;
- }
- else if (sizeof($filedata['error']))
- {
- return sprintf($user->lang['ADMIN_UPLOAD_ERROR'], implode(' ', $filedata['error']));
- }
- }
- */
-
/**
* Search Imagick
*/
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 5f70a15fc7..9a819d97e1 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -110,7 +110,7 @@ class acp_forums
'forum_style' => request_var('forum_style', 0),
'display_on_index' => request_var('display_on_index', false),
'forum_topics_per_page' => request_var('topics_per_page', 0),
- 'enable_indexing' => request_var('enable_indexing',true),
+ 'enable_indexing' => request_var('enable_indexing', true),
'enable_icons' => request_var('enable_icons', false),
'enable_prune' => request_var('enable_prune', false),
'enable_post_review' => request_var('enable_post_review', true),
@@ -322,12 +322,12 @@ class acp_forums
if ($update)
{
$forum_data['forum_flags'] = 0;
- $forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? 1 : 0;
- $forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? 2 : 0;
- $forum_data['forum_flags'] += (request_var('prune_announce', false)) ? 4 : 0;
- $forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? 8 : 0;
- $forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0;
- $forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? 32 : 0;
+ $forum_data['forum_flags'] += (request_var('forum_link_track', false)) ? FORUM_FLAG_LINK_TRACK : 0;
+ $forum_data['forum_flags'] += (request_var('prune_old_polls', false)) ? FORUM_FLAG_PRUNE_POLL : 0;
+ $forum_data['forum_flags'] += (request_var('prune_announce', false)) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
+ $forum_data['forum_flags'] += (request_var('prune_sticky', false)) ? FORUM_FLAG_PRUNE_STICKY : 0;
+ $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
+ $forum_data['forum_flags'] += (request_var('enable_post_review', true)) ? FORUM_FLAG_POST_REVIEW : 0;
}
// Show form to create/modify a forum
@@ -389,7 +389,7 @@ class acp_forums
'prune_days' => 7,
'prune_viewed' => 7,
'prune_freq' => 1,
- 'forum_flags' => 0,
+ 'forum_flags' => FORUM_FLAG_POST_REVIEW,
'forum_password' => '',
'forum_password_confirm'=> '',
);
@@ -779,12 +779,12 @@ class acp_forums
// 16 = show active topics
// 32 = enable post review
$forum_data['forum_flags'] = 0;
- $forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? 1 : 0;
- $forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? 2 : 0;
- $forum_data['forum_flags'] += ($forum_data['prune_announce']) ? 4 : 0;
- $forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? 8 : 0;
- $forum_data['forum_flags'] += ($forum_data['show_active']) ? 16 : 0;
- $forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? 32 : 0;
+ $forum_data['forum_flags'] += ($forum_data['forum_link_track']) ? FORUM_FLAG_LINK_TRACK : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_old_polls']) ? FORUM_FLAG_PRUNE_POLL : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_announce']) ? FORUM_FLAG_PRUNE_ANNOUNCE : 0;
+ $forum_data['forum_flags'] += ($forum_data['prune_sticky']) ? FORUM_FLAG_PRUNE_STICKY : 0;
+ $forum_data['forum_flags'] += ($forum_data['show_active']) ? FORUM_FLAG_ACTIVE_TOPICS : 0;
+ $forum_data['forum_flags'] += ($forum_data['enable_post_review']) ? FORUM_FLAG_POST_REVIEW : 0;
// Unset data that are not database fields
$forum_data_sql = $forum_data;
From 79137c312c15638a380adacb18a2d7194f42f09d Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Thu, 14 Sep 2006 14:57:29 +0000
Subject: [PATCH 078/291] - Fix some bugs - fixed retrieving of permissions if
the LIKE statement is used as well as proper supporting (needs testing on
mssql)
git-svn-id: file:///svn/phpbb/trunk@6366 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_bots.php | 2 +-
phpBB/includes/acp/acp_groups.php | 8 +-
phpBB/includes/acp/acp_permissions.php | 30 +----
phpBB/includes/acp/auth.php | 4 +-
phpBB/includes/auth.php | 105 +++++++++++++-----
phpBB/includes/functions_admin.php | 26 +++++
phpBB/includes/functions_user.php | 68 +++++++++++-
phpBB/includes/template.php | 2 +-
phpBB/includes/ucp/ucp_register.php | 21 +++-
phpBB/index.php | 6 +-
.../subSilver/template/viewtopic_print.html | 23 +++-
11 files changed, 221 insertions(+), 74 deletions(-)
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 1cda4a3c78..5e633aaee2 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -143,7 +143,7 @@ class acp_bots
$bot_row['bot_ip'] = str_replace(' ', '', $bot_row['bot_ip']);
// Make sure the admin is not adding a bot with an user agent similar to his one
- if ($bot_row['bot_agent'] && substr($user->data['session_browser'], 0, 149) === substr($bot_row['bot_agent'])
+ if ($bot_row['bot_agent'] && substr($user->data['session_browser'], 0, 149) === substr($bot_row['bot_agent']))
{
$error[] = $user->lang['ERR_BOT_AGENT_MATCHES_UA'];
}
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 13e1c11cdf..5fccc565da 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -68,7 +68,7 @@ class acp_groups
}
// Approve, demote or promote
- group_user_attributes($action, $group_id, $mark_ary, false, ($group_id) ? $group_row['group_name'] : false);
+ group_user_attributes($action, $group_id, $mark_ary, false, $group_row['group_name']);
switch ($action)
{
@@ -85,6 +85,8 @@ class acp_groups
break;
}
+ group_update_listing($group_id);
+
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
break;
@@ -134,6 +136,8 @@ class acp_groups
group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
}
+ group_update_listing($group_id);
+
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
}
else
@@ -217,7 +221,7 @@ class acp_groups
trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING);
}
- $message = ($action == 'addleaders') ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
+ $message = ($leader) ? 'GROUP_MODS_ADDED' : 'GROUP_USERS_ADDED';
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
break;
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index de3948d551..fd99362f60 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -651,7 +651,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
- $this->update_foes();
+ update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
@@ -718,7 +718,7 @@ class acp_permissions
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
- $this->update_foes();
+ update_foes();
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
@@ -847,32 +847,6 @@ class acp_permissions
}
}
- /**
- * Update foes - remove moderators and administrators from foe lists...
- */
- function update_foes()
- {
- global $db, $auth;
-
- $perms = array();
- foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
- {
- foreach ($forum_ary as $auth_option => $user_ary)
- {
- $perms = array_merge($perms, $user_ary);
- }
- }
-
- if (sizeof($perms))
- {
- $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
- WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
- AND foe = 1';
- $db->sql_query($sql);
- }
- unset($perms);
- }
-
/**
* Display a complete trace tree for the selected permission to determine where settings are set/unset
*/
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 71d17bd40d..36fa5dbcea 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -1009,7 +1009,9 @@ class auth_admin extends auth
// Get permission type
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
+ WHERE auth_option LIKE '" . $db->sql_escape(str_replace('_', "\_", $permission_type)) . "%'";
+ $sql .= (SQL_LAYER == 'mssql' || SQL_LAYER == 'mssql_odbc') ? " ESCAPE '\\'" : '';
+
$result = $db->sql_query($sql);
$auth_id_ary = array();
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 4e6a8af1d8..c578881c3f 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -478,18 +478,11 @@ class auth
$sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? "user_id = $user_id" : $db->sql_in_set('user_id', $user_id)) : '';
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : '';
- $sql_opts = '';
+ $sql_opts = $sql_escape = '';
if ($opts !== false)
{
- if (!is_array($opts))
- {
- $sql_opts = (strpos($opts, '%') !== false) ? "AND ao.auth_option LIKE '" . $db->sql_escape($opts) . "'" : "AND ao.auth_option = '" . $db->sql_escape($opts) . "'";
- }
- else
- {
- $sql_opts = 'AND ' . $db->sql_in_set('ao.auth_option', $opts);
- }
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape);
}
$hold_ary = array();
@@ -519,7 +512,7 @@ class auth
'ORDER_BY' => 'a.forum_id, ao.auth_option'
));
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($sql . $sql_escape);
while ($row = $db->sql_fetchrow($result))
{
@@ -595,18 +588,11 @@ class auth
$sql_user = ($user_id !== false) ? ((!is_array($user_id)) ? "user_id = $user_id" : $db->sql_in_set('user_id', $user_id)) : '';
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : '';
- $sql_opts = '';
+ $sql_opts = $sql_escape = '';
if ($opts !== false)
{
- if (!is_array($opts))
- {
- $sql_opts = (strpos($opts, '%') !== false) ? "AND ao.auth_option LIKE '" . $db->sql_escape($opts) . "'" : "AND ao.auth_option = '" . $db->sql_escape($opts) . "'";
- }
- else
- {
- $sql_opts = 'AND ' . $db->sql_in_set('ao.auth_option', $opts);
- }
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape);
}
$hold_ary = array();
@@ -634,7 +620,7 @@ class auth
'ORDER_BY' => 'a.forum_id, ao.auth_option'
));
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($sql . $sql_escape);
while ($row = $db->sql_fetchrow($result))
{
@@ -656,16 +642,11 @@ class auth
$sql_group = ($group_id !== false) ? ((!is_array($group_id)) ? "group_id = $group_id" : $db->sql_in_set('group_id', $group_id)) : '';
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? "AND a.forum_id = $forum_id" : 'AND ' . $db->sql_in_set('a.forum_id', $forum_id)) : '';
+ $sql_opts = $sql_escape = '';
+
if ($opts !== false)
{
- if (!is_array($opts))
- {
- $sql_opts = (strpos($opts, '%') !== false) ? "AND ao.auth_option LIKE '" . $db->sql_escape($opts) . "'" : "AND ao.auth_option = '" . $db->sql_escape($opts) . "'";
- }
- else
- {
- $sql_opts = 'AND ' . $db->sql_in_set('ao.auth_option', $opts);
- }
+ $this->build_auth_option_statement('ao.auth_option', $opts, $sql_opts, $sql_escape);
}
$hold_ary = array();
@@ -693,7 +674,7 @@ class auth
'ORDER_BY' => 'a.forum_id, ao.auth_option'
));
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($sql . $sql_escape);
while ($row = $db->sql_fetchrow($result))
{
@@ -781,6 +762,72 @@ class auth
trigger_error('Authentication method not found', E_USER_ERROR);
}
+
+ /**
+ * Fill auth_option statement for later querying based on the supplied options
+ */
+ function build_auth_option_statement($key, $auth_options, &$sql_opts, &$sql_escape)
+ {
+ global $db;
+
+ if (!is_array($auth_options))
+ {
+ if (strpos($auth_options, '%') !== false)
+ {
+ if (strpos($auth_options, '_') !== false)
+ {
+ $sql_opts = "AND $key LIKE '" . $db->sql_escape(str_replace('_', "\_", $auth_options)) . "'";
+ $sql_escape = (SQL_LAYER == 'mssql' || SQL_LAYER == 'mssql_odbc') ? " ESCAPE '\\'" : '';
+ }
+ else
+ {
+ $sql_opts = "AND $key LIKE '" . $db->sql_escape($auth_options) . "'";
+ }
+ }
+ else
+ {
+ $sql_opts = "AND $key = '" . $db->sql_escape($auth_options) . "'";
+ }
+ }
+ else
+ {
+ $is_like_expression = $is_underline = false;
+
+ foreach ($auth_options as $option)
+ {
+ if (strpos($option, '%') !== false)
+ {
+ $is_like_expression = true;
+ }
+
+ if (strpos($option, '_') !== false)
+ {
+ $is_underline = true;
+ }
+ }
+
+ if (!$is_like_expression)
+ {
+ $sql_opts = 'AND ' . $db->sql_in_set($key, $auth_options);
+ }
+ else
+ {
+ $sql = array();
+
+ foreach ($auth_options as $option)
+ {
+ $sql[] = $key . " LIKE '" . $db->sql_escape(str_replace('_', "\_", $option)) . "'";
+ }
+
+ $sql_opts = 'AND (' . implode(' OR ', $sql) . ')';
+
+ if ($is_underline)
+ {
+ $sql_escape = (SQL_LAYER == 'mssql' || SQL_LAYER == 'mssql_odbc') ? " ESCAPE '\\'" : '';
+ }
+ }
+ }
+ }
}
?>
\ No newline at end of file
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 49bad121e1..2f2e333c78 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2304,6 +2304,32 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
return;
}
+/**
+* Update foes - remove moderators and administrators from foe lists...
+*/
+function update_foes()
+{
+ global $db, $auth;
+
+ $perms = array();
+ foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $user_ary)
+ {
+ $perms = array_merge($perms, $user_ary);
+ }
+ }
+
+ if (sizeof($perms))
+ {
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
+ AND foe = 1';
+ $db->sql_query($sql);
+ }
+ unset($perms);
+}
+
/**
* Lists warned users
*/
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index f25a521ed1..8970b7865e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1673,6 +1673,8 @@ function group_delete($group_id, $group_name = false)
/**
* Add user(s) to group
+*
+* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
*/
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
{
@@ -1769,13 +1771,18 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
add_log('admin', $log, $group_name, implode(', ', $username_ary));
- return ($leader) ? 'GROUP_LEADERS_ADDED' : 'GROUP_USERS_ADDED';
+ group_update_listings($group_id);
+
+ // Return false - no error
+ return false;
}
/**
* Remove a user/s from a given group. When we remove users we update their
* default group_id. We do this by examining which "special" groups they belong
* to. The selection is made based on a reasonable priority system
+*
+* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER'
*/
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
{
@@ -1885,7 +1892,8 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
add_log('admin', $log, $group_name, implode(', ', $username_ary));
- return 'GROUP_USERS_REMOVE';
+ // Return false - no error
+ return false;
}
/**
@@ -2172,4 +2180,60 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_
return $return;
}
+/**
+* Re-cache moderators and foes if group has a_ or m_ permissions
+*/
+function group_update_listings($group_id)
+{
+ global $auth;
+
+ $hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
+
+ if (!sizeof($hold_ary))
+ {
+ return;
+ }
+
+ $mod_permissions = $admin_permissions = false;
+
+ foreach ($hold_ary as $g_id => $forum_ary)
+ {
+ foreach ($forum_ary as $forum_id => $auth_ary)
+ {
+ foreach ($auth_ary as $auth_option => $setting)
+ {
+ if ($mod_permissions && $admin_permissions)
+ {
+ break 3;
+ }
+
+ if ($setting != ACL_YES)
+ {
+ continue;
+ }
+
+ if ($auth_option == 'm_')
+ {
+ $mod_permissions = true;
+ }
+
+ if ($auth_option == 'a_')
+ {
+ $admin_permissions = true;
+ }
+ }
+ }
+ }
+
+ if ($mod_permissions)
+ {
+ cache_moderators();
+ }
+
+ if ($mod_permissions || $admin_permissions)
+ {
+ update_foes();
+ }
+}
+
?>
\ No newline at end of file
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index abacd2d118..e3fa1195cb 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -43,7 +43,7 @@ class template
*/
function set_template()
{
- global $phpbb_root_path, $config, $user;
+ global $phpbb_root_path, $user;
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
{
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index adfdb60ffe..2638ea2ffe 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -37,12 +37,21 @@ class ucp_register
if ($change_lang)
{
- $submit = false;
- $lang = $change_lang;
- $user->lang_name = $lang = $change_lang;
- $user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
- $user->lang = array();
- $user->add_lang(array('common', 'ucp'));
+ $change_lang = basename($change_lang);
+
+ if (file_exists($phpbb_root_path . 'language/' . $change_lang . '/'))
+ {
+ $submit = false;
+
+ $user->lang_name = $lang = $change_lang;
+ $user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
+ $user->lang = array();
+ $user->add_lang(array('common', 'ucp'));
+ }
+ else
+ {
+ $change_lang = '';
+ }
}
$cp = new custom_profile();
diff --git a/phpBB/index.php b/phpBB/index.php
index 8cde84904f..af72cc0be1 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -83,9 +83,9 @@ $template->assign_vars(array(
'LEGEND' => $legend,
'BIRTHDAY_LIST' => $birthday_list,
- 'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'),
- 'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
- 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
+ 'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'),
+ 'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
+ 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
diff --git a/phpBB/styles/subSilver/template/viewtopic_print.html b/phpBB/styles/subSilver/template/viewtopic_print.html
index 69a51f42c8..7512d0f4ee 100644
--- a/phpBB/styles/subSilver/template/viewtopic_print.html
+++ b/phpBB/styles/subSilver/template/viewtopic_print.html
@@ -13,6 +13,10 @@ body {
font-size: 10pt;
}
+img {
+ border: 0;
+}
+
td {
font-family: Verdana,serif;
font-size: 10pt;
@@ -85,7 +89,24 @@ hr.sep {
{postrow.POST_SUBJECT}
- {postrow.MESSAGE}
+ {postrow.MESSAGE}
+
+
+
+
+
+
+ {L_ATTACHMENTS}:
+
+
+
+ {postrow.attachment.DISPLAY_ATTACHMENT}
+
+
+
+
+
+
From f9297794b644dc58d392932c5494e3e22a10b0fd Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Fri, 15 Sep 2006 14:08:48 +0000
Subject: [PATCH 079/291] implement bare-bone validation for config
variables...
git-svn-id: file:///svn/phpbb/trunk@6367 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/index.php | 78 ++++++
phpBB/adm/style/acp_board.html | 7 +
phpBB/adm/style/acp_forums.html | 16 +-
phpBB/includes/acp/acp_attachments.php | 50 ++--
phpBB/includes/acp/acp_board.php | 323 +++++++++++++------------
phpBB/includes/acp/acp_main.php | 2 +-
phpBB/includes/functions.php | 8 +-
phpBB/language/en/acp/common.php | 2 +
phpBB/search.php | 2 +-
9 files changed, 303 insertions(+), 185 deletions(-)
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index e84e1c5e36..5576098cef 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -376,4 +376,82 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
return $tpl;
}
+/**
+* Going through a config array and validate values, writing errors to $error.
+*/
+function validate_config_vars($config_vars, &$cfg_array, &$error)
+{
+ global $phpbb_root_path, $user;
+
+ foreach ($config_vars as $config_name => $config_definition)
+ {
+ if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
+ {
+ continue;
+ }
+
+ if (!isset($config_definition['validate']))
+ {
+ continue;
+ }
+
+ // Validate a bit. ;) String is already checked through request_var(), therefore we do not check this again
+ switch ($config_definition['validate'])
+ {
+ case 'bool':
+ $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
+ break;
+
+ case 'int':
+ $cfg_array[$config_name] = (int) $cfg_array[$config_name];
+ break;
+
+ case 'rpath':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $destination = $cfg_array[$config_name];
+
+ // Adjust destination path (no trailing slash)
+ if ($destination{(sizeof($destination)-1)} == '/' || $destination{(sizeof($destination)-1)} == '\\')
+ {
+ $destination = substr($destination, 0, sizeof($destination)-2);
+ }
+
+ $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
+ if ($destination && ($destination{0} == '/' || $destination{0} == "\\"))
+ {
+ $destination = '';
+ }
+
+ $cfg_array[$config_name] = $destination;
+
+ case 'path':
+
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $cfg_array[$config_name] = trim($cfg_array[$config_name]);
+
+ if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
+ }
+
+ if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
+ }
+
+ break;
+ }
+ }
+
+ return;
+}
+
?>
\ No newline at end of file
diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html
index 02cb055a74..dd29017cb1 100644
--- a/phpBB/adm/style/acp_board.html
+++ b/phpBB/adm/style/acp_board.html
@@ -6,6 +6,13 @@
{L_TITLE_EXPLAIN}
+
+
+
{L_WARNING}
+
{ERROR_MSG}
+
+
+
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 24febd120d..9b203023d4 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -96,6 +96,14 @@
+
+ {L_FORUM_PASSWORD}: {L_FORUM_PASSWORD_EXPLAIN}
+
+
+
+ {L_FORUM_PASSWORD_CONFIRM}: {L_FORUM_PASSWORD_CONFIRM_EXPLAIN}
+
+
{L_FORUM_STYLE}:
{L_DEFAULT_STYLE} {S_STYLES_OPTIONS}
@@ -149,14 +157,6 @@
{L_FORUM_TOPICS_PAGE}: {L_FORUM_TOPICS_PAGE_EXPLAIN}
-
- {L_FORUM_PASSWORD}: {L_FORUM_PASSWORD_EXPLAIN}
-
-
-
- {L_FORUM_PASSWORD_CONFIRM}: {L_FORUM_PASSWORD_CONFIRM_EXPLAIN}
-
-
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 5fe58955f2..36acaf0366 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -87,32 +87,42 @@ class acp_attachments
'img_max_width' => false, 'img_max_height' => false, 'img_link_width' => false, 'img_link_height' => false,
'legend1' => 'ACP_ATTACHMENT_SETTINGS',
- 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
- 'upload_path' => array('lang' => 'UPLOAD_DIR', 'type' => 'text:25:100', 'explain' => true),
- 'display_order' => array('lang' => 'DISPLAY_ORDER', 'type' => 'custom', 'method' => 'display_order', 'explain' => true),
- 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
- 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
- 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
- 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'type' => 'text:3:3', 'explain' => false),
- 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'type' => 'text:3:3', 'explain' => false),
- 'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'type' => 'radio:yes_no', 'explain' => true),
- 'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
- 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'upload_path' => array('lang' => 'UPLOAD_DIR', 'validate' => 'path', 'type' => 'text:25:100', 'explain' => true),
+ 'display_order' => array('lang' => 'DISPLAY_ORDER', 'validate' => 'bool', 'type' => 'custom', 'method' => 'display_order', 'explain' => true),
+ 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
+ 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
+ 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
+ 'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
+ 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => $l_legend_cat_images,
- 'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'type' => 'radio:yes_no', 'explain' => true),
- 'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'type' => 'radio:yes_no', 'explain' => true),
- 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
- 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
- 'img_imagick' => array('lang' => 'IMAGICK_PATH', 'type' => 'text:20:200', 'explain' => true, 'append' => ' [ ' . $user->lang['SEARCH_IMAGICK'] . ' ] '),
- 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
- 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
+ 'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
+ 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => ' [ ' . $user->lang['SEARCH_IMAGICK'] . ' ] '),
+ 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
+ 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
)
);
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => '')) : $this->new_config;
+ $error = array();
+
+ // We validate the complete config if whished
+ validate_config_vars($display_vars['vars'], $cfg_array, $error);
+
+ // Do not write values if there is an error
+ if (sizeof($error))
+ {
+ $submit = false;
+ }
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
@@ -199,7 +209,9 @@ class acp_attachments
$template->assign_vars(array(
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,
+ 'S_WARNING' => (sizeof($error)) ? true : false,
+ 'WARNING_MSG' => implode(' ', $error),
'DEFINED_IPS' => $defined_ips,
'L_SECURE_TITLE' => $user->lang['DEFINE_' . $allow_deny . '_IPS'],
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 5e181b6dd6..e5f363bca9 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -27,6 +27,7 @@ class acp_board
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
+ // Validation types are: string, int, bool, rpath, path
switch ($mode)
{
case 'settings':
@@ -34,19 +35,19 @@ class acp_board
'title' => 'ACP_BOARD_SETTINGS',
'vars' => array(
'legend1' => 'ACP_BOARD_SETTINGS',
- 'sitename' => array('lang' => 'SITE_NAME', 'type' => 'text:40:255', 'explain' => false),
- 'site_desc' => array('lang' => 'SITE_DESC', 'type' => 'text:40:255', 'explain' => false),
- 'board_disable' => array('lang' => 'DISABLE_BOARD', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
+ 'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
+ 'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
+ 'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'board_disable_msg' => false,
- 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
- 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
- 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
- 'board_dst' => array('lang' => 'SYSTEM_DST', 'type' => 'radio:yes_no', 'explain' => false),
- 'default_style' => array('lang' => 'DEFAULT_STYLE', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
- 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'type' => 'radio:yes_no', 'explain' => true),
+ 'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'string', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
+ 'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
+ 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
+ 'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
+ 'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'WARNINGS',
- 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'type' => 'text:3:4', 'explain' => true),
+ 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true),
)
);
break;
@@ -56,25 +57,25 @@ class acp_board
'title' => 'ACP_BOARD_FEATURES',
'vars' => array(
'legend1' => 'ACP_BOARD_FEATURES',
- 'allow_privmsg' => array('lang' => 'BOARD_PM', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'ACP_LOAD_SETTINGS',
- 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_moderators' => array('lang' => 'YES_MODERATORS', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
)
);
break;
@@ -86,14 +87,14 @@ class acp_board
'legend1' => 'ACP_AVATAR_SETTINGS',
'avatar_min_height' => false, 'avatar_min_width' => false, 'avatar_max_height' => false, 'avatar_max_width' => false,
- 'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'type' => 'radio:yes_no', 'explain' => false),
- 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
- 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
- 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'type' => 'dimension:3:4', 'explain' => true),
- 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'type' => 'text:20:255', 'explain' => true),
- 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'type' => 'text:20:255', 'explain' => true)
+ 'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
+ 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true),
+ 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true)
)
);
break;
@@ -104,23 +105,23 @@ class acp_board
'lang' => 'ucp',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
- 'allow_privmsg' => array('lang' => 'BOARD_PM', 'type' => 'radio:yes_no', 'explain' => true),
- 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'type' => 'text:4:4', 'explain' => true),
- 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'type' => 'text:4:4', 'explain' => true),
- 'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
- 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
+ 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'legend2' => 'GENERAL_OPTIONS',
- 'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'type' => 'radio:yes_no', 'explain' => false),
- 'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'type' => 'radio:yes_no', 'explain' => false)
+ 'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false)
)
);
break;
@@ -130,32 +131,32 @@ class acp_board
'title' => 'ACP_POST_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
- 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true),
- 'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'POSTING',
'bump_type' => false,
- 'edit_time' => array('lang' => 'EDIT_TIME', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
- 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'type' => 'radio:yes_no', 'explain' => true),
- 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'type' => 'text:3:4', 'explain' => true),
- 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
- 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false),
- 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'type' => 'text:3:4', 'explain' => false),
- 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'type' => 'text:3:4', 'explain' => false),
- 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'type' => 'text:4:4', 'explain' => false),
- 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'type' => 'text:4:6', 'explain' => true),
- 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'type' => 'text:4:4', 'explain' => true),
- 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'type' => 'text:5:4', 'explain' => true),
- 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
- 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'type' => 'text:4:4', 'explain' => true),
- 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'type' => 'text:5:4', 'explain' => true),
- 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'type' => 'text:5:4', 'explain' => true),
+ 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true),
+ 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
+ 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
+ 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
+ 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false),
+ 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => false),
+ 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int', 'type' => 'text:4:6', 'explain' => true),
+ 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
)
);
break;
@@ -165,20 +166,20 @@ class acp_board
'title' => 'ACP_SIGNATURE_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
- 'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'GENERAL_SETTINGS',
- 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
+ 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int', 'type' => 'text:5:4', 'explain' => true),
)
);
break;
@@ -191,24 +192,24 @@ class acp_board
'max_name_chars' => false,
'max_pass_chars' => false,
- 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
- 'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'type' => 'custom', 'method' => 'username_length', 'explain' => true),
- 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
- 'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
- 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
- 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'type' => 'text:3:3', 'explain' => true),
+ 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
+ 'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int', 'type' => 'custom', 'method' => 'username_length', 'explain' => true),
+ 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
+ 'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
+ 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
'legend2' => 'GENERAL_OPTIONS',
- 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'type' => 'radio:yes_no', 'explain' => true),
- 'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'type' => 'radio:yes_no', 'explain' => true),
- 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'type' => 'text:3:3', 'explain' => true),
- 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'type' => 'text:4:4', 'explain' => true),
+ 'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
+ 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
'legend3' => 'COPPA',
- 'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'type' => 'radio:yes_no', 'explain' => true),
- 'coppa_mail' => array('lang' => 'COPPA_MAIL', 'type' => 'textarea:5:40', 'explain' => true),
- 'coppa_fax' => array('lang' => 'COPPA_FAX', 'type' => 'text:25:100', 'explain' => false),
+ 'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
+ 'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
)
);
break;
@@ -218,10 +219,10 @@ class acp_board
'title' => 'ACP_COOKIE_SETTINGS',
'vars' => array(
'legend1' => 'ACP_COOKIE_SETTINGS',
- 'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'type' => 'text::255', 'explain' => false),
- 'cookie_name' => array('lang' => 'COOKIE_NAME', 'type' => 'text::16', 'explain' => false),
- 'cookie_path' => array('lang' => 'COOKIE_PATH', 'type' => 'text::255', 'explain' => false),
- 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'type' => 'radio:disabled_enabled', 'explain' => true)
+ 'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
+ 'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
+ 'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
+ 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true)
)
);
break;
@@ -231,28 +232,28 @@ class acp_board
'title' => 'ACP_LOAD_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
- 'limit_load' => array('lang' => 'LIMIT_LOAD', 'type' => 'text:4:4', 'explain' => true),
- 'session_length' => array('lang' => 'SESSION_LENGTH', 'type' => 'text:5:5', 'explain' => true),
- 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'type' => 'text:4:4', 'explain' => true),
- 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'type' => 'text:4:3', 'explain' => true),
+ 'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
+ 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int', 'type' => 'text:4:4', 'explain' => true),
+ 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int', 'type' => 'text:4:3', 'explain' => true),
'legend2' => 'GENERAL_OPTIONS',
- 'load_db_track' => array('lang' => 'YES_POST_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_online' => array('lang' => 'YES_ONLINE', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_moderators' => array('lang' => 'YES_MODERATORS', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_tplcompile' => array('lang' => 'RECOMPILE_TEMPLATES', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_tplcompile' => array('lang' => 'RECOMPILE_TEMPLATES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',
- 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'type' => 'radio:yes_no', 'explain' => false),
- 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
)
);
break;
@@ -262,7 +263,7 @@ class acp_board
'title' => 'ACP_AUTH_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AUTH_SETTINGS',
- 'auth_method' => array('lang' => 'AUTH_METHOD', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
+ 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
)
);
break;
@@ -272,20 +273,20 @@ class acp_board
'title' => 'ACP_SERVER_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SERVER_SETTINGS',
- 'send_encoding' => array('lang' => 'SEND_ENCODING', 'type' => 'radio:yes_no', 'explain' => true),
- 'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'type' => 'radio:yes_no', 'explain' => false),
+ 'send_encoding' => array('lang' => 'SEND_ENCODING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'legend2' => 'PATH_SETTINGS',
- 'smilies_path' => array('lang' => 'SMILIES_PATH', 'type' => 'text:20:255', 'explain' => true),
- 'icons_path' => array('lang' => 'ICONS_PATH', 'type' => 'text:20:255', 'explain' => true),
- 'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'type' => 'text:20:255', 'explain' => true),
- 'ranks_path' => array('lang' => 'RANKS_PATH', 'type' => 'text:20:255', 'explain' => true),
+ 'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ 'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'path', 'type' => 'text:20:255', 'explain' => true),
+ 'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'legend3' => 'SERVER_URL_SETTINGS',
- 'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'type' => 'radio:yes_no', 'explain' => true),
- 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true),
- 'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true),
- 'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true),
+ 'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
+ 'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
+ 'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
)
);
break;
@@ -295,14 +296,14 @@ class acp_board
'title' => 'ACP_SECURITY_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SECURITY_SETTINGS',
- 'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'type' => 'radio:yes_no', 'explain' => true),
- 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'type' => 'text:5:5', 'explain' => true),
- 'ip_check' => array('lang' => 'IP_VALID', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
- 'browser_check' => array('lang' => 'BROWSER_VALID', 'type' => 'radio:yes_no', 'explain' => true),
- 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
- 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'type' => 'text:3:3', 'explain' => true),
- 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'type' => 'text:3:3', 'explain' => true),
- 'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
+ 'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
+ 'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
+ 'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;
@@ -312,22 +313,22 @@ class acp_board
'title' => 'ACP_EMAIL_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
- 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true),
- 'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'type' => 'radio:enabled_disabled', 'explain' => true),
- 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'type' => 'text:20:50', 'explain' => true),
- 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'type' => 'text:5:5', 'explain' => true),
- 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => true),
- 'board_email' => array('lang' => 'ADMIN_EMAIL', 'type' => 'text:25:100', 'explain' => true),
- 'board_email_sig' => array('lang' => 'EMAIL_SIG', 'type' => 'textarea:5:30', 'explain' => true),
- 'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'type' => 'radio:yes_no', 'explain' => true),
+ 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+ 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
+ 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
+ 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
+ 'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
+ 'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
+ 'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'SMTP_SETTINGS',
- 'smtp_delivery' => array('lang' => 'USE_SMTP', 'type' => 'radio:yes_no', 'explain' => true),
- 'smtp_host' => array('lang' => 'SMTP_SERVER', 'type' => 'text:25:50', 'explain' => false),
- 'smtp_port' => array('lang' => 'SMTP_PORT', 'type' => 'text:4:5', 'explain' => true),
- 'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
- 'smtp_username' => array('lang' => 'SMTP_USERNAME', 'type' => 'text:25:255', 'explain' => true),
- 'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'type' => 'password:25:255', 'explain' => true)
+ 'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
+ 'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int', 'type' => 'text:4:5', 'explain' => true),
+ 'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
+ 'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
+ 'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true)
)
);
break;
@@ -344,6 +345,16 @@ class acp_board
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? request_var('config', array('' => ''), true) : $this->new_config;
+ $error = array();
+
+ // We validate the complete config if whished
+ validate_config_vars($display_vars['vars'], $cfg_array, $error);
+
+ // Do not write values if there is an error
+ if (sizeof($error))
+ {
+ $submit = false;
+ }
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
@@ -472,6 +483,10 @@ class acp_board
$template->assign_vars(array(
'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
+
+ 'S_ERROR' => (sizeof($error)) ? true : false,
+ 'ERROR_MSG' => implode(' ', $error),
+
'U_ACTION' => $this->u_action)
);
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 8b165160fd..f71965e375 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -406,7 +406,7 @@ class acp_main
$files_per_day = $total_files;
}
- $sql = 'SELECT COUNT(attach_id) total_orphan
+ $sql = 'SELECT COUNT(attach_id) AS total_orphan
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1';
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 620b64a54a..4aa4f4a2c0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1971,7 +1971,11 @@ function login_forum_box($forum_data)
$template->assign_var('LOGIN_ERROR', $user->lang['WRONG_PASSWORD']);
}
- page_header();
+ page_header($user->lang['LOGIN']);
+
+ $template->assign_vars(array(
+ 'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])))
+ );
$template->set_filenames(array(
'body' => 'login_forum.html')
@@ -2658,7 +2662,7 @@ function truncate_string($string, $max_length = 60)
$chars = array();
// split the multibyte characters first
- $string_ary = preg_split('#(&\#[0-9]+;)#', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
+ $string_ary = preg_split('/([0-9]+;)/', $string, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
// Now go through the array and split the other characters
foreach ($string_ary as $key => $value)
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index d0ed5857f0..50f09f156b 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -203,6 +203,8 @@ $lang = array_merge($lang, array(
'DEACTIVATE' => 'Deactivate',
'DIMENSIONS' => 'Dimensions',
+ 'DIRECTORY_DOES_NOT_EXIST' => 'The entered directory "%s" does not exist.',
+ 'DIRECTORY_NOT_DIR' => 'The entered path "%s" is not a directory.',
'DISABLE' => 'Disable',
'DOWNLOAD' => 'Download',
'DOWNLOAD_AS' => 'Download as',
diff --git a/phpBB/search.php b/phpBB/search.php
index 1787989048..7c82549b35 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -98,7 +98,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$reset_search_forum = true;
while ($row = $db->sql_fetchrow($result))
{
- if ($row['forum_password'] && ($row['user_id'] != $user->data['user_id']))
+ if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
{
$ex_fid_ary[] = (int) $row['forum_id'];
continue;
From 2a4c853f871b75a65df784c79f7859e97f44b92a Mon Sep 17 00:00:00 2001
From: David M
Date: Fri, 15 Sep 2006 22:15:10 +0000
Subject: [PATCH 080/291] new utf8_* stuff
git-svn-id: file:///svn/phpbb/trunk@6368 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/utf/utf_tools.php | 597 ++++++++++++++++++++++++++++++-
1 file changed, 579 insertions(+), 18 deletions(-)
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index a187253bca..058205e68a 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -14,12 +14,485 @@
* Whenever possible, these functions will try to use PHP's built-in functions or
* extensions, otherwise they will default to custom routines.
*
-* If we go with UTF-8 in 3.2, we will also need a Unicode-aware replacement
-* to strtolower()
-*
* @package phpBB3
*/
+// huge chunks of this code belong to the PHP UTF-8 project
+// TODO: document the functions!
+
+// utf8_encode and utf8_decode are both XML functions
+if (!extension_loaded('xml'))
+{
+ // This function exploits some nice things that ISO-8859-1 and UTF-8 have in common
+ function utf8_encode($str)
+ {
+ $out = '';
+ for ($i = 0, $len = strlen($str); $i < $len; $i++)
+ {
+ $letter = $str[$i];
+ $num = ord($letter);
+ if ($num < 0x80)
+ {
+ $out .= $letter;
+ }
+ else if ($num < 0xC0)
+ {
+ $out .= "\xC2$letter";
+ }
+ else
+ {
+ $chr = chr($num - 64);
+ $out .= "\xC3$chr";
+ }
+ }
+ return $out;
+ }
+
+ // "borrowed" from getID3
+ function utf8_decode($string)
+ {
+ $newcharstring = '';
+ $offset = 0;
+ $stringlength = strlen($string);
+ while ($offset < $stringlength)
+ {
+ $ord = ord($string{$offset});
+ if (($ord | 0x07) == 0xF7)
+ {
+ // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x07) << 18) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 12) &
+ ((ord($string{($offset + 2)}) & 0x3F) << 6) &
+ (ord($string{($offset + 3)}) & 0x3F);
+ $offset += 4;
+ }
+ else if (($ord | 0x0F) == 0xEF)
+ {
+ // 1110bbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x0F) << 12) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 6) &
+ (ord($string{($offset + 2)}) & 0x3F);
+ $offset += 3;
+ }
+ else if (($ord | 0x1F) == 0xDF)
+ {
+ // 110bbbbb 10bbbbbb
+ $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
+ (ord($string{($offset + 1)}) & 0x3F);
+ $offset += 2;
+ }
+ else if (($ord | 0x7F) == 0x7F)
+ {
+ // 0bbbbbbb
+ $charval = $ord;
+ $offset += 1;
+ }
+ else
+ {
+ // error? throw some kind of warning here?
+ $charval = false;
+ $offset += 1;
+ }
+ if ($charval !== false)
+ {
+ $newcharstring .= (($charval < 256) ? chr($charval) : '?');
+ }
+ }
+ return $newcharstring;
+ }
+}
+
+// mbstring is old and has it's functions around for older versions of PHP.
+// if mbstring is not loaded, we go into native mode.
+if (extension_loaded('mbstring'))
+{
+ function utf8_strrpos($str, $needle, $offset = null)
+ {
+ // offset for mb_strrpos was added in 5.2.0
+ if ($offset === false || version_compare(phpversion(), '5.2.0', '>='))
+ {
+ // Emulate behaviour of strrpos rather than raising warning
+ if (empty($str))
+ {
+ return false;
+ }
+ return mb_strrpos($str, $search);
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_WARNING);
+ return false;
+ }
+
+ $str = mb_substr($str, $offset);
+
+ if (false !== ($pos = mb_strrpos($str, $search)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+
+ function utf8_strpos($str, $needle, $offset = null)
+ {
+ if ($offset === false)
+ {
+ return mb_strpos($str, $needle);
+ }
+ else
+ {
+ return mb_strpos($str, $needle, $offset);
+ }
+ }
+
+ function utf8_strtolower($str)
+ {
+ return mb_strtolower($str);
+ }
+
+ function utf8_strtoupper($str)
+ {
+ return mb_strtoupper($str);
+ }
+
+ function utf8_substr($str, $offset, $length = null)
+ {
+ if ($length === false)
+ {
+ return mb_substr($str, $offset);
+ }
+ else
+ {
+ return mb_substr($str, $offset, $length);
+ }
+ }
+}
+else
+{
+ function utf8_strrpos($str, $needle, $offset = null)
+ {
+ if (is_null($offset))
+ {
+ $ar = explode($needle, $str);
+
+ if (count($ar) > 1)
+ {
+ // Pop off the end of the string where the last match was made
+ array_pop($ar);
+ $str = join($needle,$ar);
+ return utf8_strlen($str);
+ }
+ return false;
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_WARNING);
+ return false;
+ }
+
+ $str = utf8_substr($str, $offset);
+
+ if (false !== ($pos = utf8_strrpos($str, $needle)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+
+ function utf8_strpos($str, $needle, $offset = null)
+ {
+ // native
+ if (is_null($offset))
+ {
+ $ar = explode($needle, $str);
+ if (count($ar) > 1)
+ {
+ return utf8_strlen($ar[0]);
+ }
+ return false;
+ }
+ else
+ {
+ if (!is_int($offset))
+ {
+ trigger_error('utf8_strpos: Offset must be an integer', E_USER_ERROR);
+ return false;
+ }
+
+ $str = utf8_substr($str, $offset);
+
+ if (false !== ($pos = utf8_strpos($str, $needle)))
+ {
+ return $pos + $offset;
+ }
+
+ return false;
+ }
+ }
+
+$UTF8_UPPER_TO_LOWER = array(
+ 0x0041=>0x0061, 0x03A6=>0x03C6, 0x0162=>0x0163, 0x00C5=>0x00E5, 0x0042=>0x0062,
+ 0x0139=>0x013A, 0x00C1=>0x00E1, 0x0141=>0x0142, 0x038E=>0x03CD, 0x0100=>0x0101,
+ 0x0490=>0x0491, 0x0394=>0x03B4, 0x015A=>0x015B, 0x0044=>0x0064, 0x0393=>0x03B3,
+ 0x00D4=>0x00F4, 0x042A=>0x044A, 0x0419=>0x0439, 0x0112=>0x0113, 0x041C=>0x043C,
+ 0x015E=>0x015F, 0x0143=>0x0144, 0x00CE=>0x00EE, 0x040E=>0x045E, 0x042F=>0x044F,
+ 0x039A=>0x03BA, 0x0154=>0x0155, 0x0049=>0x0069, 0x0053=>0x0073, 0x1E1E=>0x1E1F,
+ 0x0134=>0x0135, 0x0427=>0x0447, 0x03A0=>0x03C0, 0x0418=>0x0438, 0x00D3=>0x00F3,
+ 0x0420=>0x0440, 0x0404=>0x0454, 0x0415=>0x0435, 0x0429=>0x0449, 0x014A=>0x014B,
+ 0x0411=>0x0431, 0x0409=>0x0459, 0x1E02=>0x1E03, 0x00D6=>0x00F6, 0x00D9=>0x00F9,
+ 0x004E=>0x006E, 0x0401=>0x0451, 0x03A4=>0x03C4, 0x0423=>0x0443, 0x015C=>0x015D,
+ 0x0403=>0x0453, 0x03A8=>0x03C8, 0x0158=>0x0159, 0x0047=>0x0067, 0x00C4=>0x00E4,
+ 0x0386=>0x03AC, 0x0389=>0x03AE, 0x0166=>0x0167, 0x039E=>0x03BE, 0x0164=>0x0165,
+ 0x0116=>0x0117, 0x0108=>0x0109, 0x0056=>0x0076, 0x00DE=>0x00FE, 0x0156=>0x0157,
+ 0x00DA=>0x00FA, 0x1E60=>0x1E61, 0x1E82=>0x1E83, 0x00C2=>0x00E2, 0x0118=>0x0119,
+ 0x0145=>0x0146, 0x0050=>0x0070, 0x0150=>0x0151, 0x042E=>0x044E, 0x0128=>0x0129,
+ 0x03A7=>0x03C7, 0x013D=>0x013E, 0x0422=>0x0442, 0x005A=>0x007A, 0x0428=>0x0448,
+ 0x03A1=>0x03C1, 0x1E80=>0x1E81, 0x016C=>0x016D, 0x00D5=>0x00F5, 0x0055=>0x0075,
+ 0x0176=>0x0177, 0x00DC=>0x00FC, 0x1E56=>0x1E57, 0x03A3=>0x03C3, 0x041A=>0x043A,
+ 0x004D=>0x006D, 0x016A=>0x016B, 0x0170=>0x0171, 0x0424=>0x0444, 0x00CC=>0x00EC,
+ 0x0168=>0x0169, 0x039F=>0x03BF, 0x004B=>0x006B, 0x00D2=>0x00F2, 0x00C0=>0x00E0,
+ 0x0414=>0x0434, 0x03A9=>0x03C9, 0x1E6A=>0x1E6B, 0x00C3=>0x00E3, 0x042D=>0x044D,
+ 0x0416=>0x0436, 0x01A0=>0x01A1, 0x010C=>0x010D, 0x011C=>0x011D, 0x00D0=>0x00F0,
+ 0x013B=>0x013C, 0x040F=>0x045F, 0x040A=>0x045A, 0x00C8=>0x00E8, 0x03A5=>0x03C5,
+ 0x0046=>0x0066, 0x00DD=>0x00FD, 0x0043=>0x0063, 0x021A=>0x021B, 0x00CA=>0x00EA,
+ 0x0399=>0x03B9, 0x0179=>0x017A, 0x00CF=>0x00EF, 0x01AF=>0x01B0, 0x0045=>0x0065,
+ 0x039B=>0x03BB, 0x0398=>0x03B8, 0x039C=>0x03BC, 0x040C=>0x045C, 0x041F=>0x043F,
+ 0x042C=>0x044C, 0x00DE=>0x00FE, 0x00D0=>0x00F0, 0x1EF2=>0x1EF3, 0x0048=>0x0068,
+ 0x00CB=>0x00EB, 0x0110=>0x0111, 0x0413=>0x0433, 0x012E=>0x012F, 0x00C6=>0x00E6,
+ 0x0058=>0x0078, 0x0160=>0x0161, 0x016E=>0x016F, 0x0391=>0x03B1, 0x0407=>0x0457,
+ 0x0172=>0x0173, 0x0178=>0x00FF, 0x004F=>0x006F, 0x041B=>0x043B, 0x0395=>0x03B5,
+ 0x0425=>0x0445, 0x0120=>0x0121, 0x017D=>0x017E, 0x017B=>0x017C, 0x0396=>0x03B6,
+ 0x0392=>0x03B2, 0x0388=>0x03AD, 0x1E84=>0x1E85, 0x0174=>0x0175, 0x0051=>0x0071,
+ 0x0417=>0x0437, 0x1E0A=>0x1E0B, 0x0147=>0x0148, 0x0104=>0x0105, 0x0408=>0x0458,
+ 0x014C=>0x014D, 0x00CD=>0x00ED, 0x0059=>0x0079, 0x010A=>0x010B, 0x038F=>0x03CE,
+ 0x0052=>0x0072, 0x0410=>0x0430, 0x0405=>0x0455, 0x0402=>0x0452, 0x0126=>0x0127,
+ 0x0136=>0x0137, 0x012A=>0x012B, 0x038A=>0x03AF, 0x042B=>0x044B, 0x004C=>0x006C,
+ 0x0397=>0x03B7, 0x0124=>0x0125, 0x0218=>0x0219, 0x00DB=>0x00FB, 0x011E=>0x011F,
+ 0x041E=>0x043E, 0x1E40=>0x1E41, 0x039D=>0x03BD, 0x0106=>0x0107, 0x03AB=>0x03CB,
+ 0x0426=>0x0446, 0x00DE=>0x00FE, 0x00C7=>0x00E7, 0x03AA=>0x03CA, 0x0421=>0x0441,
+ 0x0412=>0x0432, 0x010E=>0x010F, 0x00D8=>0x00F8, 0x0057=>0x0077, 0x011A=>0x011B,
+ 0x0054=>0x0074, 0x004A=>0x006A, 0x040B=>0x045B, 0x0406=>0x0456, 0x0102=>0x0103,
+ 0x039B=>0x03BB, 0x00D1=>0x00F1, 0x041D=>0x043D, 0x038C=>0x03CC, 0x00C9=>0x00E9,
+ 0x00D0=>0x00F0, 0x0407=>0x0457, 0x0122=>0x0123,
+ );
+
+$UTF8_LOWER_TO_UPPER = array(
+ 0x0061=>0x0041, 0x03C6=>0x03A6, 0x0163=>0x0162, 0x00E5=>0x00C5, 0x0062=>0x0042,
+ 0x013A=>0x0139, 0x00E1=>0x00C1, 0x0142=>0x0141, 0x03CD=>0x038E, 0x0101=>0x0100,
+ 0x0491=>0x0490, 0x03B4=>0x0394, 0x015B=>0x015A, 0x0064=>0x0044, 0x03B3=>0x0393,
+ 0x00F4=>0x00D4, 0x044A=>0x042A, 0x0439=>0x0419, 0x0113=>0x0112, 0x043C=>0x041C,
+ 0x015F=>0x015E, 0x0144=>0x0143, 0x00EE=>0x00CE, 0x045E=>0x040E, 0x044F=>0x042F,
+ 0x03BA=>0x039A, 0x0155=>0x0154, 0x0069=>0x0049, 0x0073=>0x0053, 0x1E1F=>0x1E1E,
+ 0x0135=>0x0134, 0x0447=>0x0427, 0x03C0=>0x03A0, 0x0438=>0x0418, 0x00F3=>0x00D3,
+ 0x0440=>0x0420, 0x0454=>0x0404, 0x0435=>0x0415, 0x0449=>0x0429, 0x014B=>0x014A,
+ 0x0431=>0x0411, 0x0459=>0x0409, 0x1E03=>0x1E02, 0x00F6=>0x00D6, 0x00F9=>0x00D9,
+ 0x006E=>0x004E, 0x0451=>0x0401, 0x03C4=>0x03A4, 0x0443=>0x0423, 0x015D=>0x015C,
+ 0x0453=>0x0403, 0x03C8=>0x03A8, 0x0159=>0x0158, 0x0067=>0x0047, 0x00E4=>0x00C4,
+ 0x03AC=>0x0386, 0x03AE=>0x0389, 0x0167=>0x0166, 0x03BE=>0x039E, 0x0165=>0x0164,
+ 0x0117=>0x0116, 0x0109=>0x0108, 0x0076=>0x0056, 0x00FE=>0x00DE, 0x0157=>0x0156,
+ 0x00FA=>0x00DA, 0x1E61=>0x1E60, 0x1E83=>0x1E82, 0x00E2=>0x00C2, 0x0119=>0x0118,
+ 0x0146=>0x0145, 0x0070=>0x0050, 0x0151=>0x0150, 0x044E=>0x042E, 0x0129=>0x0128,
+ 0x03C7=>0x03A7, 0x013E=>0x013D, 0x0442=>0x0422, 0x007A=>0x005A, 0x0448=>0x0428,
+ 0x03C1=>0x03A1, 0x1E81=>0x1E80, 0x016D=>0x016C, 0x00F5=>0x00D5, 0x0075=>0x0055,
+ 0x0177=>0x0176, 0x00FC=>0x00DC, 0x1E57=>0x1E56, 0x03C3=>0x03A3, 0x043A=>0x041A,
+ 0x006D=>0x004D, 0x016B=>0x016A, 0x0171=>0x0170, 0x0444=>0x0424, 0x00EC=>0x00CC,
+ 0x0169=>0x0168, 0x03BF=>0x039F, 0x006B=>0x004B, 0x00F2=>0x00D2, 0x00E0=>0x00C0,
+ 0x0434=>0x0414, 0x03C9=>0x03A9, 0x1E6B=>0x1E6A, 0x00E3=>0x00C3, 0x044D=>0x042D,
+ 0x0436=>0x0416, 0x01A1=>0x01A0, 0x010D=>0x010C, 0x011D=>0x011C, 0x00F0=>0x00D0,
+ 0x013C=>0x013B, 0x045F=>0x040F, 0x045A=>0x040A, 0x00E8=>0x00C8, 0x03C5=>0x03A5,
+ 0x0066=>0x0046, 0x00FD=>0x00DD, 0x0063=>0x0043, 0x021B=>0x021A, 0x00EA=>0x00CA,
+ 0x03B9=>0x0399, 0x017A=>0x0179, 0x00EF=>0x00CF, 0x01B0=>0x01AF, 0x0065=>0x0045,
+ 0x03BB=>0x039B, 0x03B8=>0x0398, 0x03BC=>0x039C, 0x045C=>0x040C, 0x043F=>0x041F,
+ 0x044C=>0x042C, 0x00FE=>0x00DE, 0x00F0=>0x00D0, 0x1EF3=>0x1EF2, 0x0068=>0x0048,
+ 0x00EB=>0x00CB, 0x0111=>0x0110, 0x0433=>0x0413, 0x012F=>0x012E, 0x00E6=>0x00C6,
+ 0x0078=>0x0058, 0x0161=>0x0160, 0x016F=>0x016E, 0x03B1=>0x0391, 0x0457=>0x0407,
+ 0x0173=>0x0172, 0x00FF=>0x0178, 0x006F=>0x004F, 0x043B=>0x041B, 0x03B5=>0x0395,
+ 0x0445=>0x0425, 0x0121=>0x0120, 0x017E=>0x017D, 0x017C=>0x017B, 0x03B6=>0x0396,
+ 0x03B2=>0x0392, 0x03AD=>0x0388, 0x1E85=>0x1E84, 0x0175=>0x0174, 0x0071=>0x0051,
+ 0x0437=>0x0417, 0x1E0B=>0x1E0A, 0x0148=>0x0147, 0x0105=>0x0104, 0x0458=>0x0408,
+ 0x014D=>0x014C, 0x00ED=>0x00CD, 0x0079=>0x0059, 0x010B=>0x010A, 0x03CE=>0x038F,
+ 0x0072=>0x0052, 0x0430=>0x0410, 0x0455=>0x0405, 0x0452=>0x0402, 0x0127=>0x0126,
+ 0x0137=>0x0136, 0x012B=>0x012A, 0x03AF=>0x038A, 0x044B=>0x042B, 0x006C=>0x004C,
+ 0x03B7=>0x0397, 0x0125=>0x0124, 0x0219=>0x0218, 0x00FB=>0x00DB, 0x011F=>0x011E,
+ 0x043E=>0x041E, 0x1E41=>0x1E40, 0x03BD=>0x039D, 0x0107=>0x0106, 0x03CB=>0x03AB,
+ 0x0446=>0x0426, 0x00FE=>0x00DE, 0x00E7=>0x00C7, 0x03CA=>0x03AA, 0x0441=>0x0421,
+ 0x0432=>0x0412, 0x010F=>0x010E, 0x00F8=>0x00D8, 0x0077=>0x0057, 0x011B=>0x011A,
+ 0x0074=>0x0054, 0x006A=>0x004A, 0x045B=>0x040B, 0x0456=>0x0406, 0x0103=>0x0102,
+ 0x03BB=>0x039B, 0x00F1=>0x00D1, 0x043D=>0x041D, 0x03CC=>0x038C, 0x00E9=>0x00C9,
+ 0x00F0=>0x00D0, 0x0457=>0x0407, 0x0123=>0x0122,
+ );
+
+ function utf8_strtolower($string)
+ {
+ global $UTF8_UPPER_TO_LOWER;
+ $uni = utf8_to_unicode($string);
+ if (!$uni)
+ {
+ return false;
+ }
+
+ $cnt = count($uni);
+ for ($i = 0; $i < $cnt; $i++)
+ {
+ if (isset($UTF8_UPPER_TO_LOWER[$uni[$i]]))
+ {
+ $uni[$i] = $UTF8_UPPER_TO_LOWER[$uni[$i]];
+ }
+ }
+
+ return utf8_from_unicode($uni);
+ }
+
+ function utf8_strtoupper($str)
+ {
+ global $UTF8_LOWER_TO_UPPER;
+ $uni = utf8_to_unicode($string);
+ if (!$uni)
+ {
+ return false;
+ }
+
+ $cnt = count($uni);
+ for ($i = 0; $i < $cnt; $i++)
+ {
+ if (isset($UTF8_LOWER_TO_UPPER[$uni[$i]]))
+ {
+ $uni[$i] = $UTF8_LOWER_TO_UPPER[$uni[$i]];
+ }
+ }
+
+ return utf8_from_unicode($uni);
+ }
+
+ function utf8_substr($str, $offset, $length = null)
+ {
+ if ($offset >= 0 && $length >= 0)
+ {
+ if ($length === null)
+ {
+ $length = '*';
+ }
+ else
+ {
+ if (!preg_match('/^[0-9]+$/', $length))
+ {
+ trigger_error('utf8_substr expects parameter 3 to be long', E_USER_WARNING);
+ return false;
+ }
+
+ $strlen = strlen(utf8_decode($str));
+ if ($offset > $strlen)
+ {
+ return '';
+ }
+
+ if (($offset + $length) > $strlen)
+ {
+ $length = '*';
+ }
+ else
+ {
+ $length = '{' . $length . '}';
+ }
+ }
+
+ if (!preg_match('/^[0-9]+$/', $offset))
+ {
+ trigger_error('utf8_substr expects parameter 2 to be long', E_USER_WARNING);
+ return false;
+ }
+
+ $pattern = '/^.{' . $offset . '}(.' . $length . ')/us';
+
+ preg_match($pattern, $str, $matches);
+
+ if (isset($matches[1]))
+ {
+ return $matches[1];
+ }
+
+ return false;
+ }
+ else
+ {
+ // Handle negatives using different, slower technique
+ // From: http://www.php.net/manual/en/function.substr.php#44838
+ preg_match_all('/./u', $str, $ar);
+ if ($length !== null)
+ {
+ return join('', array_slice($ar[0], $offset, $length));
+ }
+ else
+ {
+ return join('', array_slice($ar[0], $offset));
+ }
+ }
+ }
+}
+
+function utf8_str_split($str, $split_len = 1)
+{
+ if (!preg_match('/^[0-9]+$/', $split_len) || $split_len < 1)
+ {
+ return false;
+ }
+
+ $len = utf8_strlen($str);
+ if ($len <= $split_len)
+ {
+ return array($str);
+ }
+
+ preg_match_all('/.{' . $split_len . '}|[^\x00]{1,' . $split_len . '}$/us', $str, $ar);
+ return $ar[0];
+}
+
+function utf8_strspn($str, $mask, $start = null, $length = null)
+{
+ $mask = preg_replace('!([\\\\\\-\\]\\[/^])!', '\\\${1}', $mask);
+
+ if ($start !== null || $length !== null)
+ {
+ $str = utf8_substr($str, $start, $length);
+ }
+
+ preg_match('/^[' . $mask . ']+/u', $str, $matches);
+
+ if (isset($matches[0]))
+ {
+ return utf8_strlen($matches[0]);
+ }
+
+ return 0;
+}
+
+function utf8_ucfirst($str)
+{
+ switch (utf8_strlen($str))
+ {
+ case 0:
+ return '';
+ break;
+
+ case 1:
+ return utf8_strtoupper($str);
+ break;
+
+ default:
+ preg_match('/^(.{1})(.*)$/us', $str, $matches);
+ return utf8_strtoupper($matches[1]) . $matches[2];
+ break;
+ }
+}
+
/**
* Return the length (in characters) of a UTF-8 string
*
@@ -60,7 +533,8 @@ function utf8_recode($string, $encoding)
return $string;
}
- // PHP has a built-in function for encoding from iso-8859-1, let's use that
+
+ // start with something simple
if ($encoding == 'iso-8859-1')
{
return utf8_encode($string);
@@ -137,23 +611,52 @@ function utf8_encode_ncr($text)
*/
function utf8_encode_ncr_callback($m)
{
- switch (strlen($m[0]))
+ return utf8_ord($m[0]);
+}
+
+function utf8_ord($chr)
+{
+ switch (strlen($chr))
{
case 1:
- return '' . ord($m[0]) . ';';
+ return ord($chr);
+ break;
case 2:
- return '' . (((ord($m[0][0]) & 0x1F) << 6) | (ord($m[0][1]) & 0x3F)) . ';';
+ return ((ord($chr[0]) & 0x1F) << 6) | (ord($chr[1]) & 0x3F);
+ break;
case 3:
- return '' . (((ord($m[0][0]) & 0x0F) << 12) | ((ord($m[0][1]) & 0x3F) << 6) | (ord($m[0][2]) & 0x3F)) . ';';
+ return ((ord($chr[0]) & 0x0F) << 12) | ((ord($chr[1]) & 0x3F) << 6) | (ord($chr[2]) & 0x3F);
+ break;
case 4:
- return '' . (((ord($m[0][0]) & 0x07) << 18) | ((ord($m[0][1]) & 0x3F) << 12) | ((ord($m[0][2]) & 0x3F) << 6) | (ord($m[0][3]) & 0x3F)) . ';';
+ return ((ord($chr[0]) & 0x07) << 18) | ((ord($chr[1]) & 0x3F) << 12) | ((ord($chr[2]) & 0x3F) << 6) | (ord($chr[3]) & 0x3F);
+ break;
default:
- return $m[0];
- }
+ return $m;
+ }
+}
+
+function utf8_chr($cp)
+{
+ if ($cp > 0xFFFF)
+ {
+ return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ elseif ($cp > 0x7FF)
+ {
+ return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ }
+ elseif ($cp > 0x7F)
+ {
+ return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ }
+ else
+ {
+ return chr($cp);
+ }
}
/**
@@ -185,22 +688,80 @@ function utf8_decode_ncr_callback($m)
{
$cp = (strncasecmp($m[1], 'x', 1)) ? $m[1] : hexdec(substr($m[1], 1));
- if ($cp > 0xFFFF)
+ return utf8_chr($cp);
+}
+
+/**
+ * Takes an UTF-8 string and returns an array of ints representing the
+ * Unicode characters.
+ * @param string UTF-8 encoded string
+ */
+function utf8_to_unicode($$string)
+{
+ $unicode = array();
+ $offset = 0;
+ $stringlength = strlen($string);
+ while ($offset < $stringlength)
{
- return chr(0xF0 | ($cp >> 18)) . chr(0x80 | (($cp >> 12) & 0x3F)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ $ord = ord($string{$offset});
+ if (($ord | 0x07) == 0xF7)
+ {
+ // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x07) << 18) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 12) &
+ ((ord($string{($offset + 2)}) & 0x3F) << 6) &
+ (ord($string{($offset + 3)}) & 0x3F);
+ $offset += 4;
+ }
+ else if (($ord | 0x0F) == 0xEF)
+ {
+ // 1110bbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x0F) << 12) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 6) &
+ (ord($string{($offset + 2)}) & 0x3F);
+ $offset += 3;
}
- else if ($cp > 0x7FF)
+ else if (($ord | 0x1F) == 0xDF)
{
- return chr(0xE0 | ($cp >> 12)) . chr(0x80 | (($cp >> 6) & 0x3F)) . chr(0x80 | ($cp & 0x3F));
+ // 110bbbbb 10bbbbbb
+ $charval = (($ord & 0x1F) << 6) &
+ (ord($string{($offset + 1)}) & 0x3F);
+ $offset += 2;
}
- else if ($cp > 0x7F)
+ else if (($ord | 0x7F) == 0x7F)
{
- return chr(0xC0 | ($cp >> 6)) . chr(0x80 | ($cp & 0x3F));
+ // 0bbbbbbb
+ $charval = $ord;
+ $offset += 1;
}
else
{
- return chr($cp);
+ // error? throw some kind of warning here?
+ $charval = false;
+ $offset += 1;
+ }
+ if ($charval !== false)
+ {
+ $unicode[] = $charval;
+ }
+ }
+ return $unicode;
+}
+
+/**
+ * Takes an array of ints representing the Unicode characters and returns
+ * a UTF-8 string.
+ *
+ * @param array of unicode code points representing a string
+ */
+function utf8_from_unicode($array)
+{
+ $str = '';
+ foreach ($array as $value)
+ {
+ $str .= utf8_chr($value);
}
+ return $str;
}
?>
\ No newline at end of file
From ccaaa3a307badb2abf70425722e216c916351a3c Mon Sep 17 00:00:00 2001
From: David M
Date: Fri, 15 Sep 2006 22:24:41 +0000
Subject: [PATCH 081/291] whitespace :P
git-svn-id: file:///svn/phpbb/trunk@6369 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/utf/utf_tools.php | 158 +++++++++++++++----------------
1 file changed, 79 insertions(+), 79 deletions(-)
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 058205e68a..8a99f0b2b5 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -51,54 +51,54 @@ if (!extension_loaded('xml'))
// "borrowed" from getID3
function utf8_decode($string)
{
- $newcharstring = '';
- $offset = 0;
- $stringlength = strlen($string);
- while ($offset < $stringlength)
+ $newcharstring = '';
+ $offset = 0;
+ $stringlength = strlen($string);
+ while ($offset < $stringlength)
{
- $ord = ord($string{$offset});
- if (($ord | 0x07) == 0xF7)
+ $ord = ord($string{$offset});
+ if (($ord | 0x07) == 0xF7)
{
- // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
- $charval = (($ord & 0x07) << 18) &
- ((ord($string{($offset + 1)}) & 0x3F) << 12) &
- ((ord($string{($offset + 2)}) & 0x3F) << 6) &
- (ord($string{($offset + 3)}) & 0x3F);
- $offset += 4;
- }
+ // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x07) << 18) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 12) &
+ ((ord($string{($offset + 2)}) & 0x3F) << 6) &
+ (ord($string{($offset + 3)}) & 0x3F);
+ $offset += 4;
+ }
else if (($ord | 0x0F) == 0xEF)
{
- // 1110bbbb 10bbbbbb 10bbbbbb
- $charval = (($ord & 0x0F) << 12) &
- ((ord($string{($offset + 1)}) & 0x3F) << 6) &
- (ord($string{($offset + 2)}) & 0x3F);
- $offset += 3;
- }
+ // 1110bbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x0F) << 12) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 6) &
+ (ord($string{($offset + 2)}) & 0x3F);
+ $offset += 3;
+ }
else if (($ord | 0x1F) == 0xDF)
{
- // 110bbbbb 10bbbbbb
- $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
- (ord($string{($offset + 1)}) & 0x3F);
- $offset += 2;
- }
+ // 110bbbbb 10bbbbbb
+ $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
+ (ord($string{($offset + 1)}) & 0x3F);
+ $offset += 2;
+ }
else if (($ord | 0x7F) == 0x7F)
{
- // 0bbbbbbb
- $charval = $ord;
- $offset += 1;
- }
+ // 0bbbbbbb
+ $charval = $ord;
+ $offset += 1;
+ }
else
{
- // error? throw some kind of warning here?
- $charval = false;
- $offset += 1;
- }
- if ($charval !== false)
+ // error? throw some kind of warning here?
+ $charval = false;
+ $offset += 1;
+ }
+ if ($charval !== false)
{
- $newcharstring .= (($charval < 256) ? chr($charval) : '?');
- }
- }
- return $newcharstring;
+ $newcharstring .= (($charval < 256) ? chr($charval) : '?');
+ }
+ }
+ return $newcharstring;
}
}
@@ -698,54 +698,54 @@ function utf8_decode_ncr_callback($m)
*/
function utf8_to_unicode($$string)
{
- $unicode = array();
- $offset = 0;
- $stringlength = strlen($string);
- while ($offset < $stringlength)
+ $unicode = array();
+ $offset = 0;
+ $stringlength = strlen($string);
+ while ($offset < $stringlength)
{
- $ord = ord($string{$offset});
- if (($ord | 0x07) == 0xF7)
+ $ord = ord($string{$offset});
+ if (($ord | 0x07) == 0xF7)
{
- // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
- $charval = (($ord & 0x07) << 18) &
- ((ord($string{($offset + 1)}) & 0x3F) << 12) &
- ((ord($string{($offset + 2)}) & 0x3F) << 6) &
- (ord($string{($offset + 3)}) & 0x3F);
- $offset += 4;
- }
+ // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x07) << 18) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 12) &
+ ((ord($string{($offset + 2)}) & 0x3F) << 6) &
+ (ord($string{($offset + 3)}) & 0x3F);
+ $offset += 4;
+ }
else if (($ord | 0x0F) == 0xEF)
{
- // 1110bbbb 10bbbbbb 10bbbbbb
- $charval = (($ord & 0x0F) << 12) &
- ((ord($string{($offset + 1)}) & 0x3F) << 6) &
- (ord($string{($offset + 2)}) & 0x3F);
- $offset += 3;
- }
+ // 1110bbbb 10bbbbbb 10bbbbbb
+ $charval = (($ord & 0x0F) << 12) &
+ ((ord($string{($offset + 1)}) & 0x3F) << 6) &
+ (ord($string{($offset + 2)}) & 0x3F);
+ $offset += 3;
+ }
else if (($ord | 0x1F) == 0xDF)
- {
- // 110bbbbb 10bbbbbb
- $charval = (($ord & 0x1F) << 6) &
- (ord($string{($offset + 1)}) & 0x3F);
- $offset += 2;
- }
- else if (($ord | 0x7F) == 0x7F)
- {
- // 0bbbbbbb
- $charval = $ord;
- $offset += 1;
- }
- else
- {
- // error? throw some kind of warning here?
- $charval = false;
- $offset += 1;
- }
- if ($charval !== false)
{
- $unicode[] = $charval;
- }
- }
- return $unicode;
+ // 110bbbbb 10bbbbbb
+ $charval = (($ord & 0x1F) << 6) &
+ (ord($string{($offset + 1)}) & 0x3F);
+ $offset += 2;
+ }
+ else if (($ord | 0x7F) == 0x7F)
+ {
+ // 0bbbbbbb
+ $charval = $ord;
+ $offset += 1;
+ }
+ else
+ {
+ // error? throw some kind of warning here?
+ $charval = false;
+ $offset += 1;
+ }
+ if ($charval !== false)
+ {
+ $unicode[] = $charval;
+ }
+ }
+ return $unicode;
}
/**
From 9479bc428f10e166682087e8e61c19efcbbe2751 Mon Sep 17 00:00:00 2001
From: David M
Date: Fri, 15 Sep 2006 22:38:42 +0000
Subject: [PATCH 082/291] yet another oops...
git-svn-id: file:///svn/phpbb/trunk@6370 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/utf/utf_tools.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 8a99f0b2b5..84ae0d2dd2 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -394,7 +394,7 @@ $UTF8_LOWER_TO_UPPER = array(
return '';
}
- if (($offset + $length) > $strlen)
+ if (($offset + $length) > $strlen)
{
$length = '*';
}
@@ -611,7 +611,7 @@ function utf8_encode_ncr($text)
*/
function utf8_encode_ncr_callback($m)
{
- return utf8_ord($m[0]);
+ return '' . utf8_ord($m[0]) . ';';
}
function utf8_ord($chr)
From fe1367b31e7711b52f103ade06eec538823d467c Mon Sep 17 00:00:00 2001
From: David M
Date: Sat, 16 Sep 2006 06:07:06 +0000
Subject: [PATCH 083/291] bug fixes schema changes i really hope nothing went
wrong
git-svn-id: file:///svn/phpbb/trunk@6371 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_captcha.html | 6 +-
phpBB/develop/create_schema_files.php | 311 +++--
phpBB/includes/db/mysql4.php | 1 -
phpBB/includes/db/oracle.php | 2 +-
phpBB/includes/db/postgres.php | 7 -
phpBB/includes/functions_compress.php | 3 +-
phpBB/includes/message_parser.php | 11 +-
phpBB/install/install_install.php | 81 +-
phpBB/install/schemas/firebird_schema.sql | 108 +-
phpBB/install/schemas/mssql_schema.sql | 190 +--
.../{mysql_schema.sql => mysql_40_schema.sql} | 46 +-
phpBB/install/schemas/mysql_41_schema.sql | 1069 +++++++++++++++++
phpBB/install/schemas/oracle_schema.sql | 2 +-
phpBB/install/schemas/postgres_schema.sql | 2 +-
phpBB/install/schemas/sqlite_schema.sql | 2 +-
phpBB/language/en/install.php | 4 +-
16 files changed, 1525 insertions(+), 320 deletions(-)
rename phpBB/install/schemas/{mysql_schema.sql => mysql_40_schema.sql} (97%)
create mode 100644 phpBB/install/schemas/mysql_41_schema.sql
diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
index 2fc22d6371..b5524f26e1 100644
--- a/phpBB/adm/style/acp_captcha.html
+++ b/phpBB/adm/style/acp_captcha.html
@@ -30,7 +30,7 @@
{L_OVERLAP_NOISE_PIXEL}:
- selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
+ selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
{L_OVERLAP_NOISE_LINE}:
@@ -48,7 +48,7 @@
{L_ENTROPY_NOISE_PIXEL}:
- selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
+ selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
@@ -67,7 +67,7 @@
{L_SHAPE_NOISE_PIXEL}:
- selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
+ selected="selected">{L_NO_NOISE} selected="selected">{L_LIGHT} selected="selected">{L_MEDIUM} selected="selected">{L_HEAVY}
{L_SHAPE_NOISE_LINE}:
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index e7c7b7756f..2e40616b17 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -25,7 +25,7 @@ if (!is_writeable($schema_path))
$schema_data = get_schema_struct();
$dbms_type_map = array(
- 'mysql' => array(
+ 'mysql_41' => array(
'INT:' => 'int(%d)',
'BINT' => 'bigint(20)',
'UINT' => 'mediumint(8) UNSIGNED',
@@ -37,12 +37,44 @@ $dbms_type_map = array(
'VCHAR:' => 'varchar(%d)',
'CHAR:' => 'char(%d)',
'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'text',
'STEXT' => 'text',
+ 'STEXT_UNI' => 'text',
'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
'TIMESTAMP' => 'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
- 'VCHAR_BIN' => 'varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(252)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'text',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'text',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')),
'VCHAR_CI' => 'varchar(252)',
'VARBINARY' => 'varbinary(255)',
),
@@ -62,10 +94,15 @@ $dbms_type_map = array(
'STEXT' => 'BLOB SUB_TYPE TEXT',
'TEXT' => 'BLOB SUB_TYPE TEXT',
'MTEXT' => 'BLOB SUB_TYPE TEXT',
+ 'XSTEXT_UNI'=> 'BLOB SUB_TYPE TEXT',
+ 'STEXT_UNI' => 'BLOB SUB_TYPE TEXT',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT',
'TIMESTAMP' => 'INTEGER',
'DECIMAL' => 'DOUBLE PRECISION',
- 'VCHAR_BIN' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
- 'VCHAR_CI' => 'VARCHAR(252)',
+ 'VCHAR_UNI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
+ 'VCHAR_UNI:'=> array('VARCHAR(%d) CHARACTER SET UNICODE_FSS', 'rule' => array('div', 3)),
+ 'VCHAR_CI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
'VARBINARY' => 'CHAR(255)',
),
@@ -84,10 +121,15 @@ $dbms_type_map = array(
'STEXT' => '[varchar] (3000)',
'TEXT' => '[varchar] (8000)',
'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[nvarchar] (1000)',
+ 'STEXT_UNI' => '[nvarchar] (3000)',
+ 'TEXT_UNI' => '[nvarchar] (8000)',
+ 'MTEXT_UNI' => '[ntext]',
'TIMESTAMP' => '[int]',
'DECIMAL' => '[float]',
- 'VCHAR_BIN' => '[nvarchar] (252)',
- 'VCHAR_CI' => '[varchar] (252)',
+ 'VCHAR_UNI' => '[nvarchar] (255)',
+ 'VCHAR_UNI:'=> '[nvarchar] (%d)',
+ 'VCHAR_CI' => '[nvarchar] (252)',
'VARBINARY' => '[varbinary] (255)',
),
@@ -106,9 +148,14 @@ $dbms_type_map = array(
'STEXT' => 'varchar2(3000)',
'TEXT' => 'clob',
'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(1000)',
+ 'STEXT_UNI' => 'varchar2(3000)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
'TIMESTAMP' => 'number(11)',
'DECIMAL' => 'number(5, 2)',
- 'VCHAR_BIN' => 'nvarchar2(252)',
+ 'VCHAR_UNI' => 'varchar2(255)',
+ 'VCHAR_UNI:'=> 'varchar2(%d)',
'VCHAR_CI' => 'varchar2(252)',
'VARBINARY' => 'raw(255)',
),
@@ -128,9 +175,14 @@ $dbms_type_map = array(
'STEXT' => 'text(65535)',
'TEXT' => 'text(65535)',
'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
- 'VCHAR_BIN' => 'nvarchar(252)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
'VCHAR_CI' => 'varchar(252)',
'VARBINARY' => 'blob',
),
@@ -150,9 +202,14 @@ $dbms_type_map = array(
'STEXT' => 'varchar(3000)',
'TEXT' => 'varchar(8000)',
'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(1000)',
+ 'STEXT_UNI' => 'varchar(3000)',
+ 'TEXT_UNI' => 'varchar(8000)',
+ 'MTEXT_UNI' => 'TEXT',
'TIMESTAMP' => 'INT4', // unsigned
'DECIMAL' => 'decimal(5,2)',
- 'VCHAR_BIN' => 'varchar(252)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
'VCHAR_CI' => 'varchar_ci',
'VARBINARY' => 'bytea',
),
@@ -160,7 +217,7 @@ $dbms_type_map = array(
// A list of types being unsigned for better reference in some db's
$unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
-$supported_dbms = array('firebird', 'mssql', 'mysql', 'oracle', 'postgres', 'sqlite');
+$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
foreach ($supported_dbms as $dbms)
{
@@ -171,7 +228,8 @@ foreach ($supported_dbms as $dbms)
// Write Header
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$line = "#\n# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n";
break;
@@ -209,7 +267,8 @@ foreach ($supported_dbms as $dbms)
// Write comment about table
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
case 'firebird':
case 'sqlite':
fwrite($fp, "# Table: '{$table_name}'\n");
@@ -228,7 +287,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
case 'firebird':
case 'oracle':
case 'sqlite':
@@ -248,8 +308,42 @@ foreach ($supported_dbms as $dbms)
if (strpos($column_data[0], ':') !== false)
{
list($orig_column_type, $column_length) = explode(':', $column_data[0]);
+ if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
- $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
+ }
+ else
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
$orig_column_type .= ':';
}
else
@@ -266,7 +360,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$line .= "\t{$column_name} {$column_type} ";
// For hexadecimal values do not use single quotes
@@ -412,7 +507,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
case 'postgres':
$line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
break;
@@ -493,7 +589,8 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$line .= ($key_data[0] == 'INDEX') ? "\tKEY" : '';
$line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : '';
$line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n";
@@ -544,12 +641,18 @@ foreach ($supported_dbms as $dbms)
switch ($dbms)
{
- case 'mysql':
+ case 'mysql_40':
// Remove last line delimiter...
$line = substr($line, 0, -2);
$line .= "\n);\n\n";
break;
+ case 'mysql_41':
+ // Remove last line delimiter...
+ $line = substr($line, 0, -2);
+ $line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;\n\n";
+ break;
+
// Create Generator
case 'firebird':
if ($generator !== false)
@@ -632,7 +735,7 @@ foreach ($supported_dbms as $dbms)
* VCHAR:x => varchar(x)
* TIMESTAMP => int(11) UNSIGNED
* DECIMAL => decimal number (5,2)
-* VCHAR_BIN => varchar(252) BINARY
+* VCHAR_UNI => varchar(252) BINARY
* VCHAR_CI => varchar_ci for postgresql, others VCHAR
*/
function get_schema_struct()
@@ -650,7 +753,7 @@ function get_schema_struct()
'physical_filename' => array('VCHAR', ''),
'real_filename' => array('VCHAR', ''),
'download_count' => array('UINT', 0),
- 'attach_comment' => array('TEXT', ''),
+ 'attach_comment' => array('TEXT_UNI', ''),
'extension' => array('VCHAR:100', ''),
'mimetype' => array('VCHAR:100', ''),
'filesize' => array('UINT:20', 0),
@@ -698,8 +801,8 @@ function get_schema_struct()
$schema_data['phpbb_acl_roles'] = array(
'COLUMNS' => array(
'role_id' => array('UINT', NULL, 'auto_increment'),
- 'role_name' => array('VCHAR', ''),
- 'role_description' => array('TEXT', ''),
+ 'role_name' => array('VCHAR_UNI', ''),
+ 'role_description' => array('TEXT_UNI', ''),
'role_type' => array('VCHAR:10', ''),
'role_order' => array('USINT', 0),
),
@@ -738,7 +841,7 @@ function get_schema_struct()
'ban_id' => array('UINT', NULL, 'auto_increment'),
'ban_userid' => array('UINT', 0),
'ban_ip' => array('VCHAR:40', ''),
- 'ban_email' => array('VCHAR:100', ''),
+ 'ban_email' => array('VCHAR_UNI:100', ''),
'ban_start' => array('TIMESTAMP', 0),
'ban_end' => array('TIMESTAMP', 0),
'ban_exclude' => array('BOOL', 0),
@@ -789,7 +892,7 @@ function get_schema_struct()
'COLUMNS' => array(
'bot_id' => array('UINT', NULL, 'auto_increment'),
'bot_active' => array('BOOL', 1),
- 'bot_name' => array('STEXT', ''),
+ 'bot_name' => array('STEXT_UNI', ''),
'user_id' => array('UINT', 0),
'bot_agent' => array('VCHAR', ''),
'bot_ip' => array('VCHAR', ''),
@@ -828,7 +931,7 @@ function get_schema_struct()
$schema_data['phpbb_disallow'] = array(
'COLUMNS' => array(
'disallow_id' => array('UINT', NULL, 'auto_increment'),
- 'disallow_username' => array('VCHAR:252', ''),
+ 'disallow_username' => array('VCHAR_UNI:252', ''),
),
'PRIMARY_KEY' => 'disallow_id',
);
@@ -840,8 +943,8 @@ function get_schema_struct()
'topic_id' => array('UINT', 0),
'forum_id' => array('UINT', 0),
'save_time' => array('TIMESTAMP', 0),
- 'draft_subject' => array('XSTEXT', ''),
- 'draft_message' => array('MTEXT', ''),
+ 'draft_subject' => array('XSTEXT_UNI', ''),
+ 'draft_message' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'draft_id',
'KEYS' => array(
@@ -861,7 +964,7 @@ function get_schema_struct()
$schema_data['phpbb_extension_groups'] = array(
'COLUMNS' => array(
'group_id' => array('UINT', NULL, 'auto_increment'),
- 'group_name' => array('VCHAR', ''),
+ 'group_name' => array('VCHAR_UNI', ''),
'cat_id' => array('TINT:2', 0),
'allow_group' => array('BOOL', 0),
'download_mode' => array('BOOL', 1),
@@ -880,17 +983,17 @@ function get_schema_struct()
'left_id' => array('UINT', 0),
'right_id' => array('UINT', 0),
'forum_parents' => array('MTEXT', ''),
- 'forum_name' => array('STEXT', ''),
- 'forum_desc' => array('TEXT', ''),
+ 'forum_name' => array('STEXT_UNI', ''),
+ 'forum_desc' => array('TEXT_UNI', ''),
'forum_desc_bitfield' => array('VCHAR:252', ''),
'forum_desc_options' => array('UINT:11', 0),
'forum_desc_uid' => array('VCHAR:5', ''),
- 'forum_link' => array('VCHAR', ''),
- 'forum_password' => array('VCHAR:40', ''),
+ 'forum_link' => array('VCHAR_UNI', ''),
+ 'forum_password' => array('VCHAR_UNI:40', ''),
'forum_style' => array('TINT:4', 0),
'forum_image' => array('VCHAR', ''),
- 'forum_rules' => array('TEXT', ''),
- 'forum_rules_link' => array('VCHAR', ''),
+ 'forum_rules' => array('TEXT_UNI', ''),
+ 'forum_rules_link' => array('VCHAR_UNI', ''),
'forum_rules_bitfield' => array('VCHAR:252', ''),
'forum_rules_options' => array('UINT:11', 0),
'forum_rules_uid' => array('VCHAR:5', ''),
@@ -902,9 +1005,9 @@ function get_schema_struct()
'forum_topics_real' => array('UINT', 0),
'forum_last_post_id' => array('UINT', 0),
'forum_last_poster_id' => array('UINT', 0),
- 'forum_last_post_subject' => array('XSTEXT', ''),
+ 'forum_last_post_subject' => array('XSTEXT_UNI', ''),
'forum_last_post_time' => array('TIMESTAMP', 0),
- 'forum_last_poster_name'=> array('VCHAR', ''),
+ 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
'forum_last_poster_colour'=> array('VCHAR:6', ''),
'forum_flags' => array('TINT:4', 32),
'display_on_index' => array('BOOL', 1),
@@ -959,7 +1062,7 @@ function get_schema_struct()
'group_id' => array('UINT', NULL, 'auto_increment'),
'group_type' => array('TINT:4', 1),
'group_name' => array('VCHAR_CI', ''),
- 'group_desc' => array('TEXT', ''),
+ 'group_desc' => array('TEXT_UNI', ''),
'group_desc_bitfield' => array('VCHAR:252', ''),
'group_desc_options' => array('UINT:11', 0),
'group_desc_uid' => array('VCHAR:5', ''),
@@ -1001,9 +1104,9 @@ function get_schema_struct()
'lang_id' => array('TINT:4', NULL, 'auto_increment'),
'lang_iso' => array('VCHAR:30', ''),
'lang_dir' => array('VCHAR:30', ''),
- 'lang_english_name' => array('VCHAR:100', ''),
- 'lang_local_name' => array('VCHAR:255', ''),
- 'lang_author' => array('VCHAR:255', ''),
+ 'lang_english_name' => array('VCHAR_UNI:100', ''),
+ 'lang_local_name' => array('VCHAR_UNI:255', ''),
+ 'lang_author' => array('VCHAR_UNI:255', ''),
),
'PRIMARY_KEY' => 'lang_id',
'KEYS' => array(
@@ -1021,8 +1124,8 @@ function get_schema_struct()
'reportee_id' => array('UINT', 0),
'log_ip' => array('VCHAR:40', ''),
'log_time' => array('TIMESTAMP', 0),
- 'log_operation' => array('TEXT', ''),
- 'log_data' => array('MTEXT', ''),
+ 'log_operation' => array('TEXT_UNI', ''),
+ 'log_data' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'log_id',
'KEYS' => array(
@@ -1038,9 +1141,9 @@ function get_schema_struct()
'COLUMNS' => array(
'forum_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
- 'username' => array('VCHAR:252', ''),
+ 'username' => array('VCHAR_UNI:252', ''),
'group_id' => array('UINT', 0),
- 'group_name' => array('VCHAR', ''),
+ 'group_name' => array('VCHAR_UNI', ''),
'display_on_index' => array('BOOL', 1),
),
'KEYS' => array(
@@ -1075,7 +1178,7 @@ function get_schema_struct()
'COLUMNS' => array(
'poll_option_id' => array('TINT:4', 0),
'topic_id' => array('UINT', 0),
- 'poll_option_text' => array('TEXT', ''),
+ 'poll_option_text' => array('TEXT_UNI', ''),
'poll_option_total' => array('UINT', 0),
),
'KEYS' => array(
@@ -1113,9 +1216,9 @@ function get_schema_struct()
'enable_smilies' => array('BOOL', 1),
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
- 'post_username' => array('VCHAR:252', ''),
- 'post_subject' => array('XSTEXT', ''),
- 'post_text' => array('MTEXT', ''),
+ 'post_username' => array('VCHAR_UNI:252', ''),
+ 'post_subject' => array('XSTEXT_UNI', ''),
+ 'post_text' => array('MTEXT_UNI', ''),
'post_checksum' => array('VCHAR:32', ''),
'post_encoding' => array('VCHAR:20', 'iso-8859-1'),
'post_attachment' => array('BOOL', 0),
@@ -1123,7 +1226,7 @@ function get_schema_struct()
'bbcode_uid' => array('VCHAR:5', ''),
'post_postcount' => array('BOOL', 1),
'post_edit_time' => array('TIMESTAMP', 0),
- 'post_edit_reason' => array('STEXT', ''),
+ 'post_edit_reason' => array('STEXT_UNI', ''),
'post_edit_user' => array('UINT', 0),
'post_edit_count' => array('USINT', 0),
'post_edit_locked' => array('BOOL', 0),
@@ -1152,9 +1255,9 @@ function get_schema_struct()
'enable_smilies' => array('BOOL', 1),
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
- 'message_subject' => array('XSTEXT', ''),
- 'message_text' => array('MTEXT', ''),
- 'message_edit_reason' => array('STEXT', ''),
+ 'message_subject' => array('XSTEXT_UNI', ''),
+ 'message_text' => array('MTEXT_UNI', ''),
+ 'message_edit_reason' => array('STEXT_UNI', ''),
'message_edit_user' => array('UINT', 0),
'message_encoding' => array('VCHAR:20', 'iso-8859-1'),
'message_attachment' => array('BOOL', 0),
@@ -1162,8 +1265,8 @@ function get_schema_struct()
'bbcode_uid' => array('VCHAR:5', ''),
'message_edit_time' => array('TIMESTAMP', 0),
'message_edit_count' => array('USINT', 0),
- 'to_address' => array('TEXT', ''),
- 'bcc_address' => array('TEXT', ''),
+ 'to_address' => array('TEXT_UNI', ''),
+ 'bcc_address' => array('TEXT_UNI', ''),
),
'PRIMARY_KEY' => 'msg_id',
'KEYS' => array(
@@ -1178,7 +1281,7 @@ function get_schema_struct()
'COLUMNS' => array(
'folder_id' => array('UINT', NULL, 'auto_increment'),
'user_id' => array('UINT', 0),
- 'folder_name' => array('VCHAR', ''),
+ 'folder_name' => array('VCHAR_UNI', ''),
'pm_count' => array('UINT', 0),
),
'PRIMARY_KEY' => 'folder_id',
@@ -1193,7 +1296,7 @@ function get_schema_struct()
'user_id' => array('UINT', 0),
'rule_check' => array('UINT', 0),
'rule_connection' => array('UINT', 0),
- 'rule_string' => array('VCHAR', ''),
+ 'rule_string' => array('VCHAR_UNI', ''),
'rule_user_id' => array('UINT', 0),
'rule_group_id' => array('UINT', 0),
'rule_action' => array('UINT', 0),
@@ -1228,15 +1331,15 @@ function get_schema_struct()
$schema_data['phpbb_profile_fields'] = array(
'COLUMNS' => array(
'field_id' => array('UINT', NULL, 'auto_increment'),
- 'field_name' => array('VCHAR', ''),
+ 'field_name' => array('VCHAR_UNI', ''),
'field_type' => array('TINT:4', 0),
'field_ident' => array('VCHAR:20', ''),
'field_length' => array('VCHAR:20', ''),
'field_minlen' => array('VCHAR', ''),
'field_maxlen' => array('VCHAR', ''),
- 'field_novalue' => array('VCHAR', ''),
- 'field_default_value' => array('VCHAR', ''),
- 'field_validation' => array('VCHAR:20', ''),
+ 'field_novalue' => array('VCHAR_UNI', ''),
+ 'field_default_value' => array('VCHAR_UNI', ''),
+ 'field_validation' => array('VCHAR_UNI:20', ''),
'field_required' => array('BOOL', 0),
'field_show_on_reg' => array('BOOL', 0),
'field_hide' => array('BOOL', 0),
@@ -1264,7 +1367,7 @@ function get_schema_struct()
'lang_id' => array('UINT', 0),
'option_id' => array('UINT', 0),
'field_type' => array('TINT:4', 0),
- 'lang_value' => array('VCHAR', ''),
+ 'lang_value' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
);
@@ -1273,9 +1376,9 @@ function get_schema_struct()
'COLUMNS' => array(
'field_id' => array('UINT', 0),
'lang_id' => array('UINT', 0),
- 'lang_name' => array('VCHAR', ''),
- 'lang_explain' => array('TEXT', ''),
- 'lang_default_value' => array('VCHAR', ''),
+ 'lang_name' => array('VCHAR_UNI', ''),
+ 'lang_explain' => array('TEXT_UNI', ''),
+ 'lang_default_value' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => array('field_id', 'lang_id'),
);
@@ -1283,7 +1386,7 @@ function get_schema_struct()
$schema_data['phpbb_ranks'] = array(
'COLUMNS' => array(
'rank_id' => array('UINT', NULL, 'auto_increment'),
- 'rank_title' => array('VCHAR', ''),
+ 'rank_title' => array('VCHAR_UNI', ''),
'rank_min' => array('UINT', 0),
'rank_special' => array('BOOL', 0),
'rank_image' => array('VCHAR', ''),
@@ -1300,7 +1403,7 @@ function get_schema_struct()
'user_notify' => array('BOOL', 0),
'report_closed' => array('BOOL', 0),
'report_time' => array('TIMESTAMP', 0),
- 'report_text' => array('MTEXT', ''),
+ 'report_text' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'report_id',
);
@@ -1308,8 +1411,8 @@ function get_schema_struct()
$schema_data['phpbb_reports_reasons'] = array(
'COLUMNS' => array(
'reason_id' => array('USINT', NULL, 'auto_increment'),
- 'reason_title' => array('VCHAR', ''),
- 'reason_description' => array('MTEXT', ''),
+ 'reason_title' => array('VCHAR_UNI', ''),
+ 'reason_description' => array('MTEXT_UNI', ''),
'reason_order' => array('USINT', 0),
),
'PRIMARY_KEY' => 'reason_id',
@@ -1319,7 +1422,7 @@ function get_schema_struct()
'COLUMNS' => array(
'search_key' => array('VCHAR:32', ''),
'search_time' => array('TIMESTAMP', 0),
- 'search_keywords' => array('MTEXT', ''),
+ 'search_keywords' => array('MTEXT_UNI', ''),
'search_authors' => array('MTEXT', ''),
),
'PRIMARY_KEY' => 'search_key',
@@ -1328,7 +1431,7 @@ function get_schema_struct()
$schema_data['phpbb_search_wordlist'] = array(
'COLUMNS' => array(
'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word_text' => array('VCHAR_BIN', ''),
+ 'word_text' => array('VCHAR_UNI', ''),
'word_common' => array('BOOL', 0),
),
'PRIMARY_KEY' => 'word_id',
@@ -1358,7 +1461,7 @@ function get_schema_struct()
'session_time' => array('TIMESTAMP', 0),
'session_ip' => array('VCHAR:40', ''),
'session_browser' => array('VCHAR:150', ''),
- 'session_page' => array('VCHAR', ''),
+ 'session_page' => array('VCHAR_UNI', ''),
'session_viewonline' => array('BOOL', 1),
'session_autologin' => array('BOOL', 0),
'session_admin' => array('BOOL', 0),
@@ -1396,8 +1499,8 @@ function get_schema_struct()
$schema_data['phpbb_smilies'] = array(
'COLUMNS' => array(
'smiley_id' => array('UINT', NULL, 'auto_increment'),
- 'code' => array('VCHAR:50', ''),
- 'emotion' => array('VCHAR:50', ''),
+ 'code' => array('VCHAR_UNI:50', ''),
+ 'emotion' => array('VCHAR_UNI:50', ''),
'smiley_url' => array('VCHAR:50', ''),
'smiley_width' => array('USINT', 0),
'smiley_height' => array('USINT', 0),
@@ -1413,8 +1516,8 @@ function get_schema_struct()
$schema_data['phpbb_styles'] = array(
'COLUMNS' => array(
'style_id' => array('TINT:4', NULL, 'auto_increment'),
- 'style_name' => array('VCHAR:252', ''),
- 'style_copyright' => array('VCHAR', ''),
+ 'style_name' => array('VCHAR_UNI:252', ''),
+ 'style_copyright' => array('VCHAR_UNI', ''),
'style_active' => array('BOOL', 1),
'template_id' => array('TINT:4', 0),
'theme_id' => array('TINT:4', 0),
@@ -1432,8 +1535,8 @@ function get_schema_struct()
$schema_data['phpbb_styles_template'] = array(
'COLUMNS' => array(
'template_id' => array('TINT:4', NULL, 'auto_increment'),
- 'template_name' => array('VCHAR:252', ''),
- 'template_copyright' => array('VCHAR', ''),
+ 'template_name' => array('VCHAR_UNI:252', ''),
+ 'template_copyright' => array('VCHAR_UNI', ''),
'template_path' => array('VCHAR:100', ''),
'bbcode_bitfield' => array('VCHAR:252', 'kNg='),
'template_storedb' => array('BOOL', 0),
@@ -1450,7 +1553,7 @@ function get_schema_struct()
'template_filename' => array('VCHAR:100', ''),
'template_included' => array('TEXT', ''),
'template_mtime' => array('TIMESTAMP', 0),
- 'template_data' => array('MTEXT', ''),
+ 'template_data' => array('MTEXT_UNI', ''),
),
'KEYS' => array(
'tid' => array('INDEX', 'template_id'),
@@ -1461,12 +1564,12 @@ function get_schema_struct()
$schema_data['phpbb_styles_theme'] = array(
'COLUMNS' => array(
'theme_id' => array('TINT:4', NULL, 'auto_increment'),
- 'theme_name' => array('VCHAR:252', ''),
- 'theme_copyright' => array('VCHAR', ''),
+ 'theme_name' => array('VCHAR_UNI:252', ''),
+ 'theme_copyright' => array('VCHAR_UNI', ''),
'theme_path' => array('VCHAR:100', ''),
'theme_storedb' => array('BOOL', 0),
'theme_mtime' => array('TIMESTAMP', 0),
- 'theme_data' => array('MTEXT', ''),
+ 'theme_data' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'theme_id',
'KEYS' => array(
@@ -1477,8 +1580,8 @@ function get_schema_struct()
$schema_data['phpbb_styles_imageset'] = array(
'COLUMNS' => array(
'imageset_id' => array('TINT:4', NULL, 'auto_increment'),
- 'imageset_name' => array('VCHAR:252', ''),
- 'imageset_copyright' => array('VCHAR', ''),
+ 'imageset_name' => array('VCHAR_UNI:252', ''),
+ 'imageset_copyright' => array('VCHAR_UNI', ''),
'imageset_path' => array('VCHAR:100', ''),
'site_logo' => array('VCHAR:200', ''),
@@ -1604,7 +1707,7 @@ function get_schema_struct()
'topic_attachment' => array('BOOL', 0),
'topic_approved' => array('BOOL', 1),
'topic_reported' => array('BOOL', 0),
- 'topic_title' => array('XSTEXT', ''),
+ 'topic_title' => array('XSTEXT_UNI', ''),
'topic_poster' => array('UINT', 0),
'topic_time' => array('TIMESTAMP', 0),
'topic_time_limit' => array('TIMESTAMP', 0),
@@ -1614,19 +1717,19 @@ function get_schema_struct()
'topic_status' => array('TINT:3', 0),
'topic_type' => array('TINT:3', 0),
'topic_first_post_id' => array('UINT', 0),
- 'topic_first_poster_name' => array('VCHAR', ''),
+ 'topic_first_poster_name' => array('VCHAR_UNI', ''),
'topic_first_poster_colour' => array('VCHAR:6', ''),
'topic_last_post_id' => array('UINT', 0),
'topic_last_poster_id' => array('UINT', 0),
- 'topic_last_poster_name' => array('VCHAR', ''),
+ 'topic_last_poster_name' => array('VCHAR_UNI', ''),
'topic_last_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_subject' => array('XSTEXT', ''),
+ 'topic_last_post_subject' => array('XSTEXT_UNI', ''),
'topic_last_post_time' => array('TIMESTAMP', 0),
'topic_last_view_time' => array('TIMESTAMP', 0),
'topic_moved_id' => array('UINT', 0),
'topic_bumped' => array('BOOL', 0),
'topic_bumper' => array('UINT', 0),
- 'poll_title' => array('XSTEXT', ''),
+ 'poll_title' => array('XSTEXT_UNI', ''),
'poll_start' => array('TIMESTAMP', 0),
'poll_length' => array('TIMESTAMP', 0),
'poll_max_options' => array('TINT:4', 1),
@@ -1701,15 +1804,15 @@ function get_schema_struct()
'user_ip' => array('VCHAR:40', ''),
'user_regdate' => array('TIMESTAMP', 0),
'username' => array('VCHAR_CI', ''),
- 'user_password' => array('VCHAR:40', ''),
+ 'user_password' => array('VCHAR_UNI:40', ''),
'user_passchg' => array('TIMESTAMP', 0),
- 'user_email' => array('VCHAR:100', ''),
+ 'user_email' => array('VCHAR_UNI:100', ''),
'user_email_hash' => array('BINT', 0),
'user_birthday' => array('VCHAR:10', ''),
'user_lastvisit' => array('TIMESTAMP', 0),
'user_lastmark' => array('TIMESTAMP', 0),
'user_lastpost_time' => array('TIMESTAMP', 0),
- 'user_lastpage' => array('VCHAR:200', ''),
+ 'user_lastpage' => array('VCHAR_UNI:200', ''),
'user_last_confirm_key' => array('VCHAR:10', ''),
'user_last_search' => array('TIMESTAMP', 0),
'user_warnings' => array('TINT:4', 0),
@@ -1719,7 +1822,7 @@ function get_schema_struct()
'user_lang' => array('VCHAR:30', ''),
'user_timezone' => array('DECIMAL', 0),
'user_dst' => array('BOOL', 0),
- 'user_dateformat' => array('VCHAR:30', 'd M Y H:i'),
+ 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
'user_style' => array('TINT:4', 0),
'user_rank' => array('UINT', 0),
'user_colour' => array('VCHAR:6', ''),
@@ -1748,20 +1851,20 @@ function get_schema_struct()
'user_avatar_type' => array('TINT:2', 0),
'user_avatar_width' => array('USINT', 0),
'user_avatar_height' => array('USINT', 0),
- 'user_sig' => array('MTEXT', ''),
+ 'user_sig' => array('MTEXT_UNI', ''),
'user_sig_bbcode_uid' => array('VCHAR:5', ''),
'user_sig_bbcode_bitfield' => array('VCHAR:252', ''),
- 'user_from' => array('VCHAR:100', ''),
+ 'user_from' => array('VCHAR_UNI:100', ''),
'user_icq' => array('VCHAR:15', ''),
- 'user_aim' => array('VCHAR', ''),
- 'user_yim' => array('VCHAR', ''),
- 'user_msnm' => array('VCHAR', ''),
- 'user_jabber' => array('VCHAR', ''),
- 'user_website' => array('VCHAR:200', ''),
- 'user_occ' => array('VCHAR', ''),
- 'user_interests' => array('TEXT', ''),
+ 'user_aim' => array('VCHAR_UNI', ''),
+ 'user_yim' => array('VCHAR_UNI', ''),
+ 'user_msnm' => array('VCHAR_UNI', ''),
+ 'user_jabber' => array('VCHAR_UNI', ''),
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ 'user_occ' => array('VCHAR_UNI', ''),
+ 'user_interests' => array('TEXT_UNI', ''),
'user_actkey' => array('VCHAR:32', ''),
- 'user_newpasswd' => array('VCHAR:32', ''),
+ 'user_newpasswd' => array('VCHAR_UNI:32', ''),
),
'PRIMARY_KEY' => 'user_id',
'KEYS' => array(
@@ -1786,8 +1889,8 @@ function get_schema_struct()
$schema_data['phpbb_words'] = array(
'COLUMNS' => array(
'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word' => array('VCHAR', ''),
- 'replacement' => array('VCHAR', ''),
+ 'word' => array('VCHAR_UNI', ''),
+ 'replacement' => array('VCHAR_UNI', ''),
),
'PRIMARY_KEY' => 'word_id',
);
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index dd89de5e5c..3740d22669 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -27,7 +27,6 @@ if (!defined('SQL_LAYER'))
/**
* MySQL4 Database Abstraction Layer
* Compatible with:
-* MySQL 4.0+
* MySQL 4.1+
* MySQL 5.0+
* @package dbal
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index e87b7aa1f9..b988bc6a3c 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -42,7 +42,7 @@ class dbal_oracle extends dbal
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
- $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server) : @ocinlogon($this->user, $sqlpassword, $this->server);
+ $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->server, 'UTF8');
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index a91a8e81bb..ff58269f51 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -268,13 +268,6 @@ class dbal_postgres extends dbal
}
$row = @pg_fetch_assoc($query_id, null);
- if ($row)
- {
- foreach ($row as $key => $value)
- {
- $row[$key] = (strpos($key, 'bitfield') === false) ? $value : pg_unescape_bytea($value);
- }
- }
return ($query_id) ? $row : false;
}
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index 09ad1f4e8f..cbada8a76d 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -322,8 +322,7 @@ class compress_zip extends compress
{
$name = str_replace('\\', '/', $name);
- $dtime = dechex($this->unix_to_dos_time($stat[9]));
- $hexdtime = pack('H8', $dtime[6] . $dtime[7] . $dtime[4] . $dtime[5] . $dtime[2] . $dtime[3] . $dtime[0] . $dtime[1]);
+ $hexdtime = pack('V', $this->unix_to_dos_time($stat[9]));
if ($is_dir)
{
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 70d6e13f4d..f6b3302dc1 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -505,7 +505,8 @@ class bbcode_firstpass extends bbcode
do
{
$pos = strlen($in);
- for ($i = 0; $i < strlen($tok); ++$i)
+ $tok_len = strlen($tok);
+ for ($i = 0; $i < $tok_len; ++$i)
{
$tmp_pos = strpos($in, $tok{$i});
@@ -523,7 +524,7 @@ class bbcode_firstpass extends bbcode
if ($tok == ']')
{
// if $tok is ']' the buffer holds a tag
- if ($buffer == '/list' && sizeof($list_end_tags))
+ if (strtolower($buffer) == '/list' && sizeof($list_end_tags))
{
$out .= array_pop($list_end_tags) . ']';
$tok = '[';
@@ -539,6 +540,12 @@ class bbcode_firstpass extends bbcode
{
array_push($list_end_tags, '/list:o:' . $this->bbcode_uid);
}
+
+ if (strtolower(substr($buffer, 0, 4)) == 'list')
+ {
+ $buffer = 'list' . substr($buffer, 4, $pos);
+ }
+
$out .= $buffer . ':' . $this->bbcode_uid . ']';
$tok = '[';
}
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 066e7852a1..bdf3be7697 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -991,25 +991,6 @@ class install_install extends module
$sql_query = @file_get_contents($dbms_schema);
- switch ($dbms)
- {
- case 'mysql':
- case 'mysql4':
- // We don't want MySQL mixing up collations
- if (version_compare(mysql_get_server_info(), '4.1.2', '>='))
- {
- $sql_query = preg_replace('/^\);$/m', ') DEFAULT CHARACTER SET latin1;', $sql_query);
- }
-
- break;
-
- case 'mysqli':
- // mysqli only works with MySQL > 4.1.3 so we'll just do a straight replace if using this DBMS
- $sql_query = preg_replace('/^\);$/m', ') DEFAULT CHARACTER SET latin1;', $sql_query);
-
- break;
- }
-
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$remove_remarks($sql_query);
@@ -1768,7 +1749,7 @@ class install_install extends module
switch ($dbms)
{
case 'mysql4':
- if (version_compare(mysql_get_server_info($db->db_connect_id), '4.0.0', '<'))
+ if (version_compare(mysql_get_server_info($db->db_connect_id), '4.1.3', '<'))
{
$error[] = $lang['INST_ERR_DB_NO_MYSQL4'];
}
@@ -1781,6 +1762,58 @@ class install_install extends module
$error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
}
+ case 'oracle':
+ $sql = "SELECT *
+ FROM NLS_DATABASE_PARAMETERS
+ WHERE PARAMETER = 'NLS_RDBMS_VERSION'
+ OR PARAMETER = 'NLS_CHARACTERSET';";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $stats[$row['parameter']] = $row['value'];
+ }
+
+ $db->sql_freeresult($result);
+
+ if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_ORACLE'];
+ }
+ break;
+
+ case 'oracle':
+ $sql = "SELECT *
+ FROM NLS_DATABASE_PARAMETERS
+ WHERE PARAMETER = 'NLS_RDBMS_VERSION'
+ OR PARAMETER = 'NLS_CHARACTERSET';";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $stats[$row['parameter']] = $row['value'];
+ }
+
+ $db->sql_freeresult($result);
+
+ if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_ORACLE'];
+ }
+ break;
+
+ case 'postgres':
+ $sql = "SHOW server_encoding;";
+ $result = $db->sql_query($sql);
+
+ $row = $db->sql_fetchrow($result);
+
+ $db->sql_freeresult($result);
+
+ if ($row['server_encoding'] !== 'UNICODE' && $row['server_encoding'] !== 'UTF8')
+ {
+ $error[] = $lang['INST_ERR_DB_NO_POSTGRES'];
+ }
break;
}
@@ -1890,21 +1923,21 @@ class install_install extends module
),
'mysqli' => array(
'LABEL' => 'MySQL 4.1.x/5.x (MySQLi)',
- 'SCHEMA' => 'mysql',
+ 'SCHEMA' => 'mysql_41',
'MODULE' => 'mysqli',
'DELIM' => ';',
'COMMENTS' => 'remove_remarks'
),
'mysql4' => array(
- 'LABEL' => 'MySQL 4.x/5.x',
- 'SCHEMA' => 'mysql',
+ 'LABEL' => 'MySQL 4.1.x/5.x',
+ 'SCHEMA' => 'mysql_41',
'MODULE' => 'mysql',
'DELIM' => ';',
'COMMENTS' => 'remove_remarks'
),
'mysql' => array(
'LABEL' => 'MySQL',
- 'SCHEMA' => 'mysql',
+ 'SCHEMA' => 'mysql_40',
'MODULE' => 'mysql',
'DELIM' => ';',
'COMMENTS' => 'remove_remarks'
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index c63790ad29..10fb3ea574 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -97,7 +97,7 @@ END;;
# Table: 'phpbb_acl_roles'
CREATE TABLE phpbb_acl_roles (
role_id INTEGER NOT NULL,
- role_name VARCHAR(255) DEFAULT '' NOT NULL,
+ role_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
role_description BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
role_type VARCHAR(10) DEFAULT '' NOT NULL,
role_order INTEGER DEFAULT 0 NOT NULL
@@ -146,7 +146,7 @@ CREATE TABLE phpbb_banlist (
ban_id INTEGER NOT NULL,
ban_userid INTEGER DEFAULT 0 NOT NULL,
ban_ip VARCHAR(40) DEFAULT '' NOT NULL,
- ban_email VARCHAR(100) DEFAULT '' NOT NULL,
+ ban_email VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
ban_start INTEGER DEFAULT 0 NOT NULL,
ban_end INTEGER DEFAULT 0 NOT NULL,
ban_exclude INTEGER DEFAULT 0 NOT NULL,
@@ -251,7 +251,7 @@ CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);;
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
disallow_id INTEGER NOT NULL,
- disallow_username VARCHAR(252) DEFAULT '' NOT NULL
+ disallow_username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
@@ -318,7 +318,7 @@ END;;
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id INTEGER NOT NULL,
- group_name VARCHAR(255) DEFAULT '' NOT NULL,
+ group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
cat_id INTEGER DEFAULT 0 NOT NULL,
allow_group INTEGER DEFAULT 0 NOT NULL,
download_mode INTEGER DEFAULT 1 NOT NULL,
@@ -354,12 +354,12 @@ CREATE TABLE phpbb_forums (
forum_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
forum_desc_options INTEGER DEFAULT 0 NOT NULL,
forum_desc_uid VARCHAR(5) DEFAULT '' NOT NULL,
- forum_link VARCHAR(255) DEFAULT '' NOT NULL,
- forum_password VARCHAR(40) DEFAULT '' NOT NULL,
+ forum_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ forum_password VARCHAR(14) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
forum_style INTEGER DEFAULT 0 NOT NULL,
forum_image VARCHAR(255) DEFAULT '' NOT NULL,
forum_rules BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
- forum_rules_link VARCHAR(255) DEFAULT '' NOT NULL,
+ forum_rules_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
forum_rules_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
forum_rules_options INTEGER DEFAULT 0 NOT NULL,
forum_rules_uid VARCHAR(5) DEFAULT '' NOT NULL,
@@ -373,7 +373,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
forum_last_post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
- forum_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ forum_last_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
forum_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
forum_flags INTEGER DEFAULT 32 NOT NULL,
display_on_index INTEGER DEFAULT 1 NOT NULL,
@@ -437,7 +437,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status)
CREATE TABLE phpbb_groups (
group_id INTEGER NOT NULL,
group_type INTEGER DEFAULT 1 NOT NULL,
- group_name VARCHAR(252) DEFAULT '' NOT NULL,
+ group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
group_desc BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
group_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
group_desc_options INTEGER DEFAULT 0 NOT NULL,
@@ -500,9 +500,9 @@ CREATE TABLE phpbb_lang (
lang_id INTEGER NOT NULL,
lang_iso VARCHAR(30) DEFAULT '' NOT NULL,
lang_dir VARCHAR(30) DEFAULT '' NOT NULL,
- lang_english_name VARCHAR(100) DEFAULT '' NOT NULL,
- lang_local_name VARCHAR(255) DEFAULT '' NOT NULL,
- lang_author VARCHAR(255) DEFAULT '' NOT NULL
+ lang_english_name VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ lang_local_name VARCHAR(85) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ lang_author VARCHAR(85) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);;
@@ -557,9 +557,9 @@ END;;
CREATE TABLE phpbb_moderator_cache (
forum_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(252) DEFAULT '' NOT NULL,
+ username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
group_id INTEGER DEFAULT 0 NOT NULL,
- group_name VARCHAR(255) DEFAULT '' NOT NULL,
+ group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
display_on_index INTEGER DEFAULT 1 NOT NULL
);;
@@ -636,7 +636,7 @@ CREATE TABLE phpbb_posts (
enable_smilies INTEGER DEFAULT 1 NOT NULL,
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
enable_sig INTEGER DEFAULT 1 NOT NULL,
- post_username VARCHAR(252) DEFAULT '' NOT NULL,
+ post_username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
post_text BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
post_checksum VARCHAR(32) DEFAULT '' NOT NULL,
@@ -721,7 +721,7 @@ END;;
CREATE TABLE phpbb_privmsgs_folder (
folder_id INTEGER NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- folder_name VARCHAR(255) DEFAULT '' NOT NULL,
+ folder_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
pm_count INTEGER DEFAULT 0 NOT NULL
);;
@@ -746,7 +746,7 @@ CREATE TABLE phpbb_privmsgs_rules (
user_id INTEGER DEFAULT 0 NOT NULL,
rule_check INTEGER DEFAULT 0 NOT NULL,
rule_connection INTEGER DEFAULT 0 NOT NULL,
- rule_string VARCHAR(255) DEFAULT '' NOT NULL,
+ rule_string VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
rule_user_id INTEGER DEFAULT 0 NOT NULL,
rule_group_id INTEGER DEFAULT 0 NOT NULL,
rule_action INTEGER DEFAULT 0 NOT NULL,
@@ -789,15 +789,15 @@ CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder
# Table: 'phpbb_profile_fields'
CREATE TABLE phpbb_profile_fields (
field_id INTEGER NOT NULL,
- field_name VARCHAR(255) DEFAULT '' NOT NULL,
+ field_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
field_type INTEGER DEFAULT 0 NOT NULL,
field_ident VARCHAR(20) DEFAULT '' NOT NULL,
field_length VARCHAR(20) DEFAULT '' NOT NULL,
field_minlen VARCHAR(255) DEFAULT '' NOT NULL,
field_maxlen VARCHAR(255) DEFAULT '' NOT NULL,
- field_novalue VARCHAR(255) DEFAULT '' NOT NULL,
- field_default_value VARCHAR(255) DEFAULT '' NOT NULL,
- field_validation VARCHAR(20) DEFAULT '' NOT NULL,
+ field_novalue VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ field_default_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ field_validation VARCHAR(7) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
field_required INTEGER DEFAULT 0 NOT NULL,
field_show_on_reg INTEGER DEFAULT 0 NOT NULL,
field_hide INTEGER DEFAULT 0 NOT NULL,
@@ -836,7 +836,7 @@ CREATE TABLE phpbb_profile_fields_lang (
lang_id INTEGER DEFAULT 0 NOT NULL,
option_id INTEGER DEFAULT 0 NOT NULL,
field_type INTEGER DEFAULT 0 NOT NULL,
- lang_value VARCHAR(255) DEFAULT '' NOT NULL
+ lang_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
@@ -846,9 +846,9 @@ ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option
CREATE TABLE phpbb_profile_lang (
field_id INTEGER DEFAULT 0 NOT NULL,
lang_id INTEGER DEFAULT 0 NOT NULL,
- lang_name VARCHAR(255) DEFAULT '' NOT NULL,
+ lang_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
lang_explain BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
- lang_default_value VARCHAR(255) DEFAULT '' NOT NULL
+ lang_default_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
@@ -857,7 +857,7 @@ ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id INTEGER NOT NULL,
- rank_title VARCHAR(255) DEFAULT '' NOT NULL,
+ rank_title VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
rank_min INTEGER DEFAULT 0 NOT NULL,
rank_special INTEGER DEFAULT 0 NOT NULL,
rank_image VARCHAR(255) DEFAULT '' NOT NULL
@@ -906,7 +906,7 @@ END;;
# Table: 'phpbb_reports_reasons'
CREATE TABLE phpbb_reports_reasons (
reason_id INTEGER NOT NULL,
- reason_title VARCHAR(255) DEFAULT '' NOT NULL,
+ reason_title VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
reason_description BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
reason_order INTEGER DEFAULT 0 NOT NULL
);;
@@ -977,7 +977,7 @@ CREATE TABLE phpbb_sessions (
session_time INTEGER DEFAULT 0 NOT NULL,
session_ip VARCHAR(40) DEFAULT '' NOT NULL,
session_browser VARCHAR(150) DEFAULT '' NOT NULL,
- session_page VARCHAR(255) DEFAULT '' NOT NULL,
+ session_page VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
session_viewonline INTEGER DEFAULT 1 NOT NULL,
session_autologin INTEGER DEFAULT 0 NOT NULL,
session_admin INTEGER DEFAULT 0 NOT NULL
@@ -1025,8 +1025,8 @@ END;;
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smiley_id INTEGER NOT NULL,
- code VARCHAR(50) DEFAULT '' NOT NULL,
- emotion VARCHAR(50) DEFAULT '' NOT NULL,
+ code VARCHAR(17) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ emotion VARCHAR(17) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
smiley_url VARCHAR(50) DEFAULT '' NOT NULL,
smiley_width INTEGER DEFAULT 0 NOT NULL,
smiley_height INTEGER DEFAULT 0 NOT NULL,
@@ -1052,8 +1052,8 @@ END;;
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id INTEGER NOT NULL,
- style_name VARCHAR(252) DEFAULT '' NOT NULL,
- style_copyright VARCHAR(255) DEFAULT '' NOT NULL,
+ style_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ style_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
style_active INTEGER DEFAULT 1 NOT NULL,
template_id INTEGER DEFAULT 0 NOT NULL,
theme_id INTEGER DEFAULT 0 NOT NULL,
@@ -1081,8 +1081,8 @@ END;;
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
template_id INTEGER NOT NULL,
- template_name VARCHAR(252) DEFAULT '' NOT NULL,
- template_copyright VARCHAR(255) DEFAULT '' NOT NULL,
+ template_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ template_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
template_path VARCHAR(100) DEFAULT '' NOT NULL,
bbcode_bitfield VARCHAR(252) DEFAULT 'kNg=' NOT NULL,
template_storedb INTEGER DEFAULT 0 NOT NULL
@@ -1129,8 +1129,8 @@ END;;
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
theme_id INTEGER NOT NULL,
- theme_name VARCHAR(252) DEFAULT '' NOT NULL,
- theme_copyright VARCHAR(255) DEFAULT '' NOT NULL,
+ theme_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ theme_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
theme_path VARCHAR(100) DEFAULT '' NOT NULL,
theme_storedb INTEGER DEFAULT 0 NOT NULL,
theme_mtime INTEGER DEFAULT 0 NOT NULL,
@@ -1155,8 +1155,8 @@ END;;
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
imageset_id INTEGER NOT NULL,
- imageset_name VARCHAR(252) DEFAULT '' NOT NULL,
- imageset_copyright VARCHAR(255) DEFAULT '' NOT NULL,
+ imageset_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ imageset_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
imageset_path VARCHAR(100) DEFAULT '' NOT NULL,
site_logo VARCHAR(200) DEFAULT '' NOT NULL,
upload_bar VARCHAR(200) DEFAULT '' NOT NULL,
@@ -1287,11 +1287,11 @@ CREATE TABLE phpbb_topics (
topic_status INTEGER DEFAULT 0 NOT NULL,
topic_type INTEGER DEFAULT 0 NOT NULL,
topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
- topic_first_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ topic_first_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
topic_first_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
- topic_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL,
+ topic_last_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
topic_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL,
topic_last_post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
@@ -1379,16 +1379,16 @@ CREATE TABLE phpbb_users (
user_perm_from INTEGER DEFAULT 0 NOT NULL,
user_ip VARCHAR(40) DEFAULT '' NOT NULL,
user_regdate INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(252) DEFAULT '' NOT NULL,
- user_password VARCHAR(40) DEFAULT '' NOT NULL,
+ username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_password VARCHAR(14) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
user_passchg INTEGER DEFAULT 0 NOT NULL,
- user_email VARCHAR(100) DEFAULT '' NOT NULL,
+ user_email VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
user_birthday VARCHAR(10) DEFAULT '' NOT NULL,
user_lastvisit INTEGER DEFAULT 0 NOT NULL,
user_lastmark INTEGER DEFAULT 0 NOT NULL,
user_lastpost_time INTEGER DEFAULT 0 NOT NULL,
- user_lastpage VARCHAR(200) DEFAULT '' NOT NULL,
+ user_lastpage VARCHAR(67) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
user_last_confirm_key VARCHAR(10) DEFAULT '' NOT NULL,
user_last_search INTEGER DEFAULT 0 NOT NULL,
user_warnings INTEGER DEFAULT 0 NOT NULL,
@@ -1398,7 +1398,7 @@ CREATE TABLE phpbb_users (
user_lang VARCHAR(30) DEFAULT '' NOT NULL,
user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL,
user_dst INTEGER DEFAULT 0 NOT NULL,
- user_dateformat VARCHAR(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_dateformat VARCHAR(10) CHARACTER SET UNICODE_FSS DEFAULT 'd M Y H:i' NOT NULL,
user_style INTEGER DEFAULT 0 NOT NULL,
user_rank INTEGER DEFAULT 0 NOT NULL,
user_colour VARCHAR(6) DEFAULT '' NOT NULL,
@@ -1430,17 +1430,17 @@ CREATE TABLE phpbb_users (
user_sig BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
user_sig_bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
- user_from VARCHAR(100) DEFAULT '' NOT NULL,
+ user_from VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
user_icq VARCHAR(15) DEFAULT '' NOT NULL,
- user_aim VARCHAR(255) DEFAULT '' NOT NULL,
- user_yim VARCHAR(255) DEFAULT '' NOT NULL,
- user_msnm VARCHAR(255) DEFAULT '' NOT NULL,
- user_jabber VARCHAR(255) DEFAULT '' NOT NULL,
- user_website VARCHAR(200) DEFAULT '' NOT NULL,
- user_occ VARCHAR(255) DEFAULT '' NOT NULL,
+ user_aim VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_yim VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_msnm VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_jabber VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_website VARCHAR(67) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ user_occ VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
user_interests BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
user_actkey VARCHAR(32) DEFAULT '' NOT NULL,
- user_newpasswd VARCHAR(32) DEFAULT '' NOT NULL
+ user_newpasswd VARCHAR(11) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);;
@@ -1487,8 +1487,8 @@ END;;
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id INTEGER NOT NULL,
- word VARCHAR(255) DEFAULT '' NOT NULL,
- replacement VARCHAR(255) DEFAULT '' NOT NULL
+ word VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
+ replacement VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 7a2a8bf26b..64652762d5 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -21,7 +21,7 @@ CREATE TABLE [phpbb_attachments] (
[physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
[real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
[download_count] [int] DEFAULT (0) NOT NULL ,
- [attach_comment] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [attach_comment] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[extension] [varchar] (100) DEFAULT ('') NOT NULL ,
[mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
[filesize] [int] DEFAULT (0) NOT NULL ,
@@ -100,8 +100,8 @@ GO
*/
CREATE TABLE [phpbb_acl_roles] (
[role_id] [int] IDENTITY (1, 1) NOT NULL ,
- [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [role_description] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [role_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [role_description] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
[role_order] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
@@ -166,7 +166,7 @@ CREATE TABLE [phpbb_banlist] (
[ban_id] [int] IDENTITY (1, 1) NOT NULL ,
[ban_userid] [int] DEFAULT (0) NOT NULL ,
[ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [ban_email] [nvarchar] (100) DEFAULT ('') NOT NULL ,
[ban_start] [int] DEFAULT (0) NOT NULL ,
[ban_end] [int] DEFAULT (0) NOT NULL ,
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
@@ -246,7 +246,7 @@ GO
CREATE TABLE [phpbb_bots] (
[bot_id] [int] IDENTITY (1, 1) NOT NULL ,
[bot_active] [int] DEFAULT (1) NOT NULL ,
- [bot_name] [varchar] (3000) DEFAULT ('') NOT NULL ,
+ [bot_name] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
[bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
@@ -313,7 +313,7 @@ GO
*/
CREATE TABLE [phpbb_disallow] (
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
- [disallow_username] [varchar] (252) DEFAULT ('') NOT NULL
+ [disallow_username] [nvarchar] (252) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -334,9 +334,9 @@ CREATE TABLE [phpbb_drafts] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[forum_id] [int] DEFAULT (0) NOT NULL ,
[save_time] [int] DEFAULT (0) NOT NULL ,
- [draft_subject] [varchar] (1000) DEFAULT ('') NOT NULL ,
- [draft_message] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [draft_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [draft_message] [ntext] DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
@@ -373,7 +373,7 @@ GO
*/
CREATE TABLE [phpbb_extension_groups] (
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[cat_id] [int] DEFAULT (0) NOT NULL ,
[allow_group] [int] DEFAULT (0) NOT NULL ,
[download_mode] [int] DEFAULT (1) NOT NULL ,
@@ -401,17 +401,17 @@ CREATE TABLE [phpbb_forums] (
[left_id] [int] DEFAULT (0) NOT NULL ,
[right_id] [int] DEFAULT (0) NOT NULL ,
[forum_parents] [text] DEFAULT ('') NOT NULL ,
- [forum_name] [varchar] (3000) DEFAULT ('') NOT NULL ,
- [forum_desc] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [forum_name] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
+ [forum_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[forum_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[forum_desc_options] [int] DEFAULT (0) NOT NULL ,
[forum_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
- [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [forum_link] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_password] [nvarchar] (40) DEFAULT ('') NOT NULL ,
[forum_style] [int] DEFAULT (0) NOT NULL ,
[forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_rules] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [forum_rules_link] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[forum_rules_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[forum_rules_options] [int] DEFAULT (0) NOT NULL ,
[forum_rules_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
@@ -423,9 +423,9 @@ CREATE TABLE [phpbb_forums] (
[forum_topics_real] [int] DEFAULT (0) NOT NULL ,
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [forum_last_post_subject] [varchar] (1000) DEFAULT ('') NOT NULL ,
+ [forum_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
[forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
- [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[forum_flags] [int] DEFAULT (32) NOT NULL ,
[display_on_index] [int] DEFAULT (1) NOT NULL ,
@@ -518,8 +518,8 @@ GO
CREATE TABLE [phpbb_groups] (
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
[group_type] [int] DEFAULT (1) NOT NULL ,
- [group_name] [varchar] (252) DEFAULT ('') NOT NULL ,
- [group_desc] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [group_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [group_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[group_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[group_desc_options] [int] DEFAULT (0) NOT NULL ,
[group_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
@@ -579,9 +579,9 @@ CREATE TABLE [phpbb_lang] (
[lang_id] [int] IDENTITY (1, 1) NOT NULL ,
[lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
[lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
- [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
- [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [lang_author] [varchar] (255) DEFAULT ('') NOT NULL
+ [lang_english_name] [nvarchar] (100) DEFAULT ('') NOT NULL ,
+ [lang_local_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_author] [nvarchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -608,9 +608,9 @@ CREATE TABLE [phpbb_log] (
[reportee_id] [int] DEFAULT (0) NOT NULL ,
[log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[log_time] [int] DEFAULT (0) NOT NULL ,
- [log_operation] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [log_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [log_operation] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [log_data] [ntext] DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_log] WITH NOCHECK ADD
@@ -642,9 +642,9 @@ GO
CREATE TABLE [phpbb_moderator_cache] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [username] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
[group_id] [int] DEFAULT (0) NOT NULL ,
- [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[display_on_index] [int] DEFAULT (1) NOT NULL
) ON [PRIMARY]
GO
@@ -697,7 +697,7 @@ GO
CREATE TABLE [phpbb_poll_options] (
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
[topic_id] [int] DEFAULT (0) NOT NULL ,
- [poll_option_text] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [poll_option_text] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[poll_option_total] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
@@ -747,9 +747,9 @@ CREATE TABLE [phpbb_posts] (
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
- [post_username] [varchar] (252) DEFAULT ('') NOT NULL ,
- [post_subject] [varchar] (1000) DEFAULT ('') NOT NULL ,
- [post_text] [text] DEFAULT ('') NOT NULL ,
+ [post_username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [post_text] [ntext] DEFAULT ('') NOT NULL ,
[post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
[post_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL ,
[post_attachment] [int] DEFAULT (0) NOT NULL ,
@@ -757,11 +757,11 @@ CREATE TABLE [phpbb_posts] (
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[post_postcount] [int] DEFAULT (1) NOT NULL ,
[post_edit_time] [int] DEFAULT (0) NOT NULL ,
- [post_edit_reason] [varchar] (3000) DEFAULT ('') NOT NULL ,
+ [post_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
[post_edit_locked] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
@@ -807,9 +807,9 @@ CREATE TABLE [phpbb_privmsgs] (
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
- [message_subject] [varchar] (1000) DEFAULT ('') NOT NULL ,
- [message_text] [text] DEFAULT ('') NOT NULL ,
- [message_edit_reason] [varchar] (3000) DEFAULT ('') NOT NULL ,
+ [message_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [message_text] [ntext] DEFAULT ('') NOT NULL ,
+ [message_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
[message_edit_user] [int] DEFAULT (0) NOT NULL ,
[message_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL ,
[message_attachment] [int] DEFAULT (0) NOT NULL ,
@@ -817,9 +817,9 @@ CREATE TABLE [phpbb_privmsgs] (
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[message_edit_time] [int] DEFAULT (0) NOT NULL ,
[message_edit_count] [int] DEFAULT (0) NOT NULL ,
- [to_address] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [bcc_address] [varchar] (8000) DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [to_address] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [bcc_address] [nvarchar] (8000) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
@@ -848,7 +848,7 @@ GO
CREATE TABLE [phpbb_privmsgs_folder] (
[folder_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [folder_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[pm_count] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
@@ -872,7 +872,7 @@ CREATE TABLE [phpbb_privmsgs_rules] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[rule_check] [int] DEFAULT (0) NOT NULL ,
[rule_connection] [int] DEFAULT (0) NOT NULL ,
- [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rule_string] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[rule_user_id] [int] DEFAULT (0) NOT NULL ,
[rule_group_id] [int] DEFAULT (0) NOT NULL ,
[rule_action] [int] DEFAULT (0) NOT NULL ,
@@ -923,15 +923,15 @@ GO
*/
CREATE TABLE [phpbb_profile_fields] (
[field_id] [int] IDENTITY (1, 1) NOT NULL ,
- [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[field_type] [int] DEFAULT (0) NOT NULL ,
[field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
[field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_novalue] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [field_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [field_validation] [nvarchar] (20) DEFAULT ('') NOT NULL ,
[field_required] [int] DEFAULT (0) NOT NULL ,
[field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
[field_hide] [int] DEFAULT (0) NOT NULL ,
@@ -979,7 +979,7 @@ CREATE TABLE [phpbb_profile_fields_lang] (
[lang_id] [int] DEFAULT (0) NOT NULL ,
[option_id] [int] DEFAULT (0) NOT NULL ,
[field_type] [int] DEFAULT (0) NOT NULL ,
- [lang_value] [varchar] (255) DEFAULT ('') NOT NULL
+ [lang_value] [nvarchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -999,9 +999,9 @@ GO
CREATE TABLE [phpbb_profile_lang] (
[field_id] [int] DEFAULT (0) NOT NULL ,
[lang_id] [int] DEFAULT (0) NOT NULL ,
- [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [lang_explain] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
+ [lang_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_explain] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [lang_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -1019,7 +1019,7 @@ GO
*/
CREATE TABLE [phpbb_ranks] (
[rank_id] [int] IDENTITY (1, 1) NOT NULL ,
- [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rank_title] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[rank_min] [int] DEFAULT (0) NOT NULL ,
[rank_special] [int] DEFAULT (0) NOT NULL ,
[rank_image] [varchar] (255) DEFAULT ('') NOT NULL
@@ -1045,8 +1045,8 @@ CREATE TABLE [phpbb_reports] (
[user_notify] [int] DEFAULT (0) NOT NULL ,
[report_closed] [int] DEFAULT (0) NOT NULL ,
[report_time] [int] DEFAULT (0) NOT NULL ,
- [report_text] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [report_text] [ntext] DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
@@ -1062,10 +1062,10 @@ GO
*/
CREATE TABLE [phpbb_reports_reasons] (
[reason_id] [int] IDENTITY (1, 1) NOT NULL ,
- [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
- [reason_description] [text] DEFAULT ('') NOT NULL ,
+ [reason_title] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [reason_description] [ntext] DEFAULT ('') NOT NULL ,
[reason_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
@@ -1082,7 +1082,7 @@ GO
CREATE TABLE [phpbb_search_results] (
[search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
[search_time] [int] DEFAULT (0) NOT NULL ,
- [search_keywords] [text] DEFAULT ('') NOT NULL ,
+ [search_keywords] [ntext] DEFAULT ('') NOT NULL ,
[search_authors] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -1100,7 +1100,7 @@ GO
*/
CREATE TABLE [phpbb_search_wordlist] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word_text] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [word_text] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[word_common] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
@@ -1144,7 +1144,7 @@ CREATE TABLE [phpbb_sessions] (
[session_time] [int] DEFAULT (0) NOT NULL ,
[session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
- [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [session_page] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[session_viewonline] [int] DEFAULT (1) NOT NULL ,
[session_autologin] [int] DEFAULT (0) NOT NULL ,
[session_admin] [int] DEFAULT (0) NOT NULL
@@ -1212,8 +1212,8 @@ GO
*/
CREATE TABLE [phpbb_smilies] (
[smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
- [code] [varchar] (50) DEFAULT ('') NOT NULL ,
- [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [code] [nvarchar] (50) DEFAULT ('') NOT NULL ,
+ [emotion] [nvarchar] (50) DEFAULT ('') NOT NULL ,
[smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
[smiley_width] [int] DEFAULT (0) NOT NULL ,
[smiley_height] [int] DEFAULT (0) NOT NULL ,
@@ -1238,8 +1238,8 @@ GO
*/
CREATE TABLE [phpbb_styles] (
[style_id] [int] IDENTITY (1, 1) NOT NULL ,
- [style_name] [varchar] (252) DEFAULT ('') NOT NULL ,
- [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [style_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [style_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[style_active] [int] DEFAULT (1) NOT NULL ,
[template_id] [int] DEFAULT (0) NOT NULL ,
[theme_id] [int] DEFAULT (0) NOT NULL ,
@@ -1272,8 +1272,8 @@ GO
*/
CREATE TABLE [phpbb_styles_template] (
[template_id] [int] IDENTITY (1, 1) NOT NULL ,
- [template_name] [varchar] (252) DEFAULT ('') NOT NULL ,
- [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [template_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [template_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('kNg=') NOT NULL ,
[template_storedb] [int] DEFAULT (0) NOT NULL
@@ -1299,8 +1299,8 @@ CREATE TABLE [phpbb_styles_template_data] (
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
[template_mtime] [int] DEFAULT (0) NOT NULL ,
- [template_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [template_data] [ntext] DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
@@ -1315,13 +1315,13 @@ GO
*/
CREATE TABLE [phpbb_styles_theme] (
[theme_id] [int] IDENTITY (1, 1) NOT NULL ,
- [theme_name] [varchar] (252) DEFAULT ('') NOT NULL ,
- [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [theme_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [theme_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[theme_storedb] [int] DEFAULT (0) NOT NULL ,
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
- [theme_data] [text] DEFAULT ('') NOT NULL
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ [theme_data] [ntext] DEFAULT ('') NOT NULL
+) ON [PRIMARY]
GO
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
@@ -1340,8 +1340,8 @@ GO
*/
CREATE TABLE [phpbb_styles_imageset] (
[imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
- [imageset_name] [varchar] (252) DEFAULT ('') NOT NULL ,
- [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [imageset_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [imageset_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[imageset_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[site_logo] [varchar] (200) DEFAULT ('') NOT NULL ,
[upload_bar] [varchar] (200) DEFAULT ('') NOT NULL ,
@@ -1461,7 +1461,7 @@ CREATE TABLE [phpbb_topics] (
[topic_attachment] [int] DEFAULT (0) NOT NULL ,
[topic_approved] [int] DEFAULT (1) NOT NULL ,
[topic_reported] [int] DEFAULT (0) NOT NULL ,
- [topic_title] [varchar] (1000) DEFAULT ('') NOT NULL ,
+ [topic_title] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
[topic_poster] [int] DEFAULT (0) NOT NULL ,
[topic_time] [int] DEFAULT (0) NOT NULL ,
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
@@ -1471,19 +1471,19 @@ CREATE TABLE [phpbb_topics] (
[topic_status] [int] DEFAULT (0) NOT NULL ,
[topic_type] [int] DEFAULT (0) NOT NULL ,
[topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
- [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_first_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
[topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
[topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [topic_last_post_subject] [varchar] (1000) DEFAULT ('') NOT NULL ,
+ [topic_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
[topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
[topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
[topic_moved_id] [int] DEFAULT (0) NOT NULL ,
[topic_bumped] [int] DEFAULT (0) NOT NULL ,
[topic_bumper] [int] DEFAULT (0) NOT NULL ,
- [poll_title] [varchar] (1000) DEFAULT ('') NOT NULL ,
+ [poll_title] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
[poll_start] [int] DEFAULT (0) NOT NULL ,
[poll_length] [int] DEFAULT (0) NOT NULL ,
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
@@ -1606,16 +1606,16 @@ CREATE TABLE [phpbb_users] (
[user_perm_from] [int] DEFAULT (0) NOT NULL ,
[user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[user_regdate] [int] DEFAULT (0) NOT NULL ,
- [username] [varchar] (252) DEFAULT ('') NOT NULL ,
- [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [user_password] [nvarchar] (40) DEFAULT ('') NOT NULL ,
[user_passchg] [int] DEFAULT (0) NOT NULL ,
- [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_email] [nvarchar] (100) DEFAULT ('') NOT NULL ,
[user_email_hash] [float] DEFAULT (0) NOT NULL ,
[user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
[user_lastvisit] [int] DEFAULT (0) NOT NULL ,
[user_lastmark] [int] DEFAULT (0) NOT NULL ,
[user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
- [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_lastpage] [nvarchar] (200) DEFAULT ('') NOT NULL ,
[user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
[user_last_search] [int] DEFAULT (0) NOT NULL ,
[user_warnings] [int] DEFAULT (0) NOT NULL ,
@@ -1625,7 +1625,7 @@ CREATE TABLE [phpbb_users] (
[user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
[user_timezone] [float] DEFAULT (0) NOT NULL ,
[user_dst] [int] DEFAULT (0) NOT NULL ,
- [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
+ [user_dateformat] [nvarchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
[user_style] [int] DEFAULT (0) NOT NULL ,
[user_rank] [int] DEFAULT (0) NOT NULL ,
[user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
@@ -1654,20 +1654,20 @@ CREATE TABLE [phpbb_users] (
[user_avatar_type] [int] DEFAULT (0) NOT NULL ,
[user_avatar_width] [int] DEFAULT (0) NOT NULL ,
[user_avatar_height] [int] DEFAULT (0) NOT NULL ,
- [user_sig] [text] DEFAULT ('') NOT NULL ,
+ [user_sig] [ntext] DEFAULT ('') NOT NULL ,
[user_sig_bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[user_sig_bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
- [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_from] [nvarchar] (100) DEFAULT ('') NOT NULL ,
[user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
- [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
- [user_occ] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_interests] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [user_aim] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [user_yim] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [user_msnm] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [user_jabber] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [user_website] [nvarchar] (200) DEFAULT ('') NOT NULL ,
+ [user_occ] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [user_interests] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
[user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
- [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL
+ [user_newpasswd] [nvarchar] (32) DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -1716,8 +1716,8 @@ GO
*/
CREATE TABLE [phpbb_words] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word] [varchar] (255) DEFAULT ('') NOT NULL ,
- [replacement] [varchar] (255) DEFAULT ('') NOT NULL
+ [word] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [replacement] [nvarchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
similarity index 97%
rename from phpBB/install/schemas/mysql_schema.sql
rename to phpBB/install/schemas/mysql_40_schema.sql
index c3c2be3f4f..d71cf7c5d9 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -93,7 +93,7 @@ CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ban_ip varchar(40) DEFAULT '' NOT NULL,
- ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_email text DEFAULT '' NOT NULL,
ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -171,7 +171,7 @@ CREATE TABLE phpbb_confirm (
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- disallow_username varchar(252) DEFAULT '' NOT NULL,
+ disallow_username text DEFAULT '' NOT NULL,
PRIMARY KEY (disallow_id)
);
@@ -227,7 +227,7 @@ CREATE TABLE phpbb_forums (
forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
- forum_password varchar(40) DEFAULT '' NOT NULL,
+ forum_password varchar(120) DEFAULT '' NOT NULL,
forum_style tinyint(4) DEFAULT '0' NOT NULL,
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules text DEFAULT '' NOT NULL,
@@ -334,9 +334,9 @@ CREATE TABLE phpbb_lang (
lang_id tinyint(4) NOT NULL auto_increment,
lang_iso varchar(30) DEFAULT '' NOT NULL,
lang_dir varchar(30) DEFAULT '' NOT NULL,
- lang_english_name varchar(100) DEFAULT '' NOT NULL,
- lang_local_name varchar(255) DEFAULT '' NOT NULL,
- lang_author varchar(255) DEFAULT '' NOT NULL,
+ lang_english_name text DEFAULT '' NOT NULL,
+ lang_local_name text DEFAULT '' NOT NULL,
+ lang_author text DEFAULT '' NOT NULL,
PRIMARY KEY (lang_id),
KEY lang_iso (lang_iso)
);
@@ -367,7 +367,7 @@ CREATE TABLE phpbb_log (
CREATE TABLE phpbb_moderator_cache (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- username varchar(252) DEFAULT '' NOT NULL,
+ username text DEFAULT '' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_name varchar(255) DEFAULT '' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
@@ -434,7 +434,7 @@ CREATE TABLE phpbb_posts (
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_username varchar(252) DEFAULT '' NOT NULL,
+ post_username text DEFAULT '' NOT NULL,
post_subject text DEFAULT '' NOT NULL,
post_text mediumtext DEFAULT '' NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
@@ -547,7 +547,7 @@ CREATE TABLE phpbb_profile_fields (
field_maxlen varchar(255) DEFAULT '' NOT NULL,
field_novalue varchar(255) DEFAULT '' NOT NULL,
field_default_value varchar(255) DEFAULT '' NOT NULL,
- field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_validation varchar(60) DEFAULT '' NOT NULL,
field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -637,7 +637,7 @@ CREATE TABLE phpbb_search_results (
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word_text varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY DEFAULT '' NOT NULL,
+ word_text varchar(255) DEFAULT '' NOT NULL,
word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (word_id),
UNIQUE wrd_txt (word_text)
@@ -697,8 +697,8 @@ CREATE TABLE phpbb_sitelist (
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- code varchar(50) DEFAULT '' NOT NULL,
- emotion varchar(50) DEFAULT '' NOT NULL,
+ code varchar(150) DEFAULT '' NOT NULL,
+ emotion varchar(150) DEFAULT '' NOT NULL,
smiley_url varchar(50) DEFAULT '' NOT NULL,
smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
@@ -712,7 +712,7 @@ CREATE TABLE phpbb_smilies (
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id tinyint(4) NOT NULL auto_increment,
- style_name varchar(252) DEFAULT '' NOT NULL,
+ style_name text 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,
@@ -729,7 +729,7 @@ CREATE TABLE phpbb_styles (
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
template_id tinyint(4) NOT NULL auto_increment,
- template_name varchar(252) DEFAULT '' NOT NULL,
+ template_name text DEFAULT '' NOT NULL,
template_copyright varchar(255) DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT 'kNg=' NOT NULL,
@@ -754,7 +754,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_name varchar(252) DEFAULT '' NOT NULL,
+ theme_name text DEFAULT '' NOT NULL,
theme_copyright varchar(255) DEFAULT '' NOT NULL,
theme_path varchar(100) DEFAULT '' NOT NULL,
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -768,7 +768,7 @@ CREATE TABLE phpbb_styles_theme (
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
imageset_id tinyint(4) NOT NULL auto_increment,
- imageset_name varchar(252) DEFAULT '' NOT NULL,
+ imageset_name text DEFAULT '' NOT NULL,
imageset_copyright varchar(255) DEFAULT '' NOT NULL,
imageset_path varchar(100) DEFAULT '' NOT NULL,
site_logo varchar(200) DEFAULT '' NOT NULL,
@@ -967,15 +967,15 @@ CREATE TABLE phpbb_users (
user_ip varchar(40) DEFAULT '' NOT NULL,
user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(252) DEFAULT '' NOT NULL,
- user_password varchar(40) DEFAULT '' NOT NULL,
+ user_password varchar(120) DEFAULT '' NOT NULL,
user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email text DEFAULT '' NOT NULL,
user_email_hash bigint(20) DEFAULT '0' NOT NULL,
user_birthday varchar(10) DEFAULT '' NOT NULL,
user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_lastpage text DEFAULT '' NOT NULL,
user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_warnings tinyint(4) DEFAULT '0' NOT NULL,
@@ -985,7 +985,7 @@ CREATE TABLE phpbb_users (
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_dateformat varchar(90) DEFAULT 'd M Y H:i' NOT NULL,
user_style tinyint(4) DEFAULT '0' NOT NULL,
user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_colour varchar(6) DEFAULT '' NOT NULL,
@@ -1017,17 +1017,17 @@ CREATE TABLE phpbb_users (
user_sig mediumtext DEFAULT '' NOT NULL,
user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
- user_from varchar(100) DEFAULT '' NOT NULL,
+ user_from text DEFAULT '' NOT NULL,
user_icq varchar(15) DEFAULT '' NOT NULL,
user_aim varchar(255) DEFAULT '' NOT NULL,
user_yim varchar(255) DEFAULT '' NOT NULL,
user_msnm varchar(255) DEFAULT '' NOT NULL,
user_jabber varchar(255) DEFAULT '' NOT NULL,
- user_website varchar(200) DEFAULT '' NOT NULL,
+ user_website text DEFAULT '' NOT NULL,
user_occ varchar(255) DEFAULT '' NOT NULL,
user_interests text DEFAULT '' NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL,
- user_newpasswd varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(96) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id),
KEY user_birthday (user_birthday),
KEY user_email_hash (user_email_hash),
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
new file mode 100644
index 0000000000..8fda313642
--- /dev/null
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -0,0 +1,1069 @@
+#
+# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005
+#
+# $Id$
+#
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ physical_filename varchar(255) DEFAULT '' NOT NULL,
+ real_filename varchar(255) DEFAULT '' NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ attach_comment text DEFAULT '' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ mimetype varchar(100) DEFAULT '' NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id),
+ KEY filetime (filetime),
+ KEY post_msg_id (post_msg_id),
+ KEY topic_id (topic_id),
+ KEY poster_id (poster_id),
+ KEY is_orphan (is_orphan)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY group_id (group_id),
+ KEY auth_opt_id (auth_option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ auth_option varchar(50) DEFAULT '' NOT NULL,
+ is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auth_option_id),
+ KEY auth_option (auth_option)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ role_name varchar(255) DEFAULT '' NOT NULL,
+ role_description text DEFAULT '' NOT NULL,
+ role_type varchar(10) DEFAULT '' NOT NULL,
+ role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id),
+ KEY role_type (role_type),
+ KEY role_order (role_order)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY auth_option_id (auth_option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_ip varchar(40) DEFAULT '' NOT NULL,
+ ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_reason text DEFAULT '' NOT NULL,
+ ban_give_reason text DEFAULT '' NOT NULL,
+ PRIMARY KEY (ban_id),
+ KEY ban_end (ban_end),
+ KEY ban_user (ban_userid, ban_exclude),
+ KEY ban_email (ban_email, ban_exclude),
+ KEY ban_ip (ban_ip, ban_exclude)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
+ bbcode_tag varchar(16) DEFAULT '' NOT NULL,
+ bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_match text DEFAULT '' NOT NULL,
+ bbcode_tpl mediumtext DEFAULT '' NOT NULL,
+ first_pass_match mediumtext DEFAULT '' NOT NULL,
+ first_pass_replace mediumtext DEFAULT '' NOT NULL,
+ second_pass_match mediumtext DEFAULT '' NOT NULL,
+ second_pass_replace mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (bbcode_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY order_id (order_id),
+ KEY topic_user_id (topic_id, user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ bot_name text DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ bot_agent varchar(255) DEFAULT '' NOT NULL,
+ bot_ip varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id),
+ KEY bot_active (bot_active)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varchar(252) DEFAULT '' NOT NULL,
+ config_value varchar(255) DEFAULT '' NOT NULL,
+ is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ confirm_type tinyint(3) DEFAULT '0' NOT NULL,
+ code varchar(8) DEFAULT '' NOT NULL,
+ PRIMARY KEY (session_id, confirm_id),
+ KEY confirm_type (confirm_type)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username varchar(252) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ draft_subject text DEFAULT '' NOT NULL,
+ draft_message mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (draft_id),
+ KEY save_time (save_time)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ cat_id tinyint(2) DEFAULT '0' NOT NULL,
+ allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ upload_icon varchar(255) DEFAULT '' NOT NULL,
+ max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ allowed_forums text DEFAULT '' NOT NULL,
+ allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_parents mediumtext DEFAULT '' NOT NULL,
+ forum_name text DEFAULT '' NOT NULL,
+ forum_desc text DEFAULT '' NOT NULL,
+ forum_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ 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_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules text DEFAULT '' NOT NULL,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield varchar(252) DEFAULT '' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
+ forum_type tinyint(4) DEFAULT '0' NOT NULL,
+ forum_status tinyint(4) DEFAULT '0' NOT NULL,
+ forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_subject text DEFAULT '' NOT NULL,
+ forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ forum_flags tinyint(4) DEFAULT '32' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_days tinyint(4) DEFAULT '0' NOT NULL,
+ prune_viewed tinyint(4) DEFAULT '0' NOT NULL,
+ prune_freq tinyint(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_lastpost_id (forum_last_post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY forum_id (forum_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_name varchar(252) DEFAULT '' NOT NULL,
+ group_desc text DEFAULT '' NOT NULL,
+ group_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ 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_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,
+ group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend (group_legend)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ icons_url varchar(255) DEFAULT '' NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' NOT NULL,
+ icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id),
+ KEY display_on_posting (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id tinyint(4) NOT NULL auto_increment,
+ lang_iso varchar(30) DEFAULT '' NOT NULL,
+ lang_dir varchar(30) DEFAULT '' NOT NULL,
+ lang_english_name varchar(100) DEFAULT '' NOT NULL,
+ lang_local_name varchar(255) DEFAULT '' NOT NULL,
+ lang_author varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (lang_id),
+ KEY lang_iso (lang_iso)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ log_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_ip varchar(40) DEFAULT '' NOT NULL,
+ log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ log_operation text DEFAULT '' NOT NULL,
+ log_data mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (log_id),
+ KEY log_type (log_type),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY reportee_id (reportee_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(252) DEFAULT '' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY disp_idx (display_on_index),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_basename varchar(255) DEFAULT '' NOT NULL,
+ module_class varchar(10) DEFAULT '' NOT NULL,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ module_langname varchar(255) DEFAULT '' NOT NULL,
+ module_mode varchar(255) DEFAULT '' NOT NULL,
+ module_auth varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id),
+ KEY left_right_id (left_id, right_id),
+ KEY module_enabled (module_enabled),
+ KEY class_left_id (module_class, left_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_text text DEFAULT '' NOT NULL,
+ poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY poll_opt_id (poll_option_id),
+ KEY topic_id (topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ vote_user_ip varchar(40) DEFAULT '' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY vote_user_id (vote_user_id),
+ KEY vote_user_ip (vote_user_ip)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varchar(40) DEFAULT '' NOT NULL,
+ post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_username varchar(252) DEFAULT '' NOT NULL,
+ post_subject text DEFAULT '' NOT NULL,
+ post_text mediumtext DEFAULT '' NOT NULL,
+ post_checksum varchar(32) DEFAULT '' NOT NULL,
+ post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
+ post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(5) DEFAULT '' NOT NULL,
+ post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_reason text DEFAULT '' NOT NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (post_id),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY poster_ip (poster_ip),
+ KEY poster_id (poster_id),
+ KEY post_approved (post_approved),
+ KEY post_postcount (post_postcount),
+ KEY post_time (post_time)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ message_subject text DEFAULT '' NOT NULL,
+ message_text mediumtext DEFAULT '' NOT NULL,
+ message_edit_reason text DEFAULT '' NOT NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
+ message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(5) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ to_address text DEFAULT '' NOT NULL,
+ bcc_address text DEFAULT '' NOT NULL,
+ PRIMARY KEY (msg_id),
+ KEY author_ip (author_ip),
+ KEY message_time (message_time),
+ KEY author_id (author_id),
+ KEY root_level (root_level)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_name varchar(255) DEFAULT '' NOT NULL,
+ pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (folder_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id int(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(4) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY author_id (author_id),
+ KEY usr_flder_id (user_id, folder_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_ident varchar(20) DEFAULT '' NOT NULL,
+ field_length varchar(20) DEFAULT '' NOT NULL,
+ field_minlen varchar(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar(255) DEFAULT '' NOT NULL,
+ field_novalue varchar(255) DEFAULT '' NOT NULL,
+ field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY fld_type (field_type),
+ KEY fld_ordr (field_order)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ lang_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain text DEFAULT '' NOT NULL,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_image varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ report_text mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (report_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description mediumtext DEFAULT '' NOT NULL,
+ reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) DEFAULT '' NOT NULL,
+ search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ search_keywords mediumtext DEFAULT '' NOT NULL,
+ search_authors mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (search_key)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word_text varchar(255) DEFAULT '' NOT NULL,
+ word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (word_id),
+ UNIQUE wrd_txt (word_text)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY word_id (word_id),
+ KEY post_id (post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_ip varchar(40) DEFAULT '' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_page varchar(255) DEFAULT '' NOT NULL,
+ session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ last_ip varchar(40) DEFAULT '' NOT NULL,
+ last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (key_id, user_id),
+ KEY last_login (last_login)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ site_ip varchar(40) DEFAULT '' NOT NULL,
+ site_hostname varchar(255) DEFAULT '' NOT NULL,
+ ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ code varchar(50) DEFAULT '' NOT NULL,
+ emotion varchar(50) DEFAULT '' NOT NULL,
+ smiley_url varchar(50) DEFAULT '' NOT NULL,
+ smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id tinyint(4) NOT NULL auto_increment,
+ style_name varchar(252) 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,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name),
+ KEY template_id (template_id),
+ KEY theme_id (theme_id),
+ KEY imageset_id (imageset_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_styles_template'
+CREATE TABLE phpbb_styles_template (
+ template_id tinyint(4) NOT NULL auto_increment,
+ template_name varchar(252) DEFAULT '' NOT NULL,
+ template_copyright varchar(255) DEFAULT '' NOT NULL,
+ template_path varchar(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varchar(252) DEFAULT 'kNg=' NOT NULL,
+ template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (template_id),
+ UNIQUE tmplte_nm (template_name)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_styles_template_data'
+CREATE TABLE phpbb_styles_template_data (
+ template_id tinyint(4) NOT NULL auto_increment,
+ template_filename varchar(100) DEFAULT '' NOT NULL,
+ template_included text DEFAULT '' NOT NULL,
+ template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ template_data mediumtext DEFAULT '' NOT NULL,
+ KEY tid (template_id),
+ KEY tfn (template_filename)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_styles_theme'
+CREATE TABLE phpbb_styles_theme (
+ theme_id tinyint(4) NOT NULL auto_increment,
+ theme_name varchar(252) DEFAULT '' NOT NULL,
+ theme_copyright varchar(255) DEFAULT '' NOT NULL,
+ theme_path varchar(100) DEFAULT '' NOT NULL,
+ theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ theme_data mediumtext DEFAULT '' NOT NULL,
+ PRIMARY KEY (theme_id),
+ UNIQUE theme_name (theme_name)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_styles_imageset'
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id tinyint(4) NOT NULL auto_increment,
+ imageset_name varchar(252) DEFAULT '' NOT NULL,
+ imageset_copyright varchar(255) DEFAULT '' NOT NULL,
+ imageset_path varchar(100) DEFAULT '' NOT NULL,
+ site_logo varchar(200) DEFAULT '' NOT NULL,
+ upload_bar varchar(200) DEFAULT '' NOT NULL,
+ poll_left varchar(200) DEFAULT '' NOT NULL,
+ poll_center varchar(200) DEFAULT '' NOT NULL,
+ poll_right varchar(200) DEFAULT '' NOT NULL,
+ icon_friend varchar(200) DEFAULT '' NOT NULL,
+ icon_foe varchar(200) DEFAULT '' NOT NULL,
+ forum_link varchar(200) DEFAULT '' NOT NULL,
+ forum_read varchar(200) DEFAULT '' NOT NULL,
+ forum_read_locked varchar(200) DEFAULT '' NOT NULL,
+ forum_read_subforum varchar(200) DEFAULT '' NOT NULL,
+ forum_unread varchar(200) DEFAULT '' NOT NULL,
+ forum_unread_locked varchar(200) DEFAULT '' NOT NULL,
+ forum_unread_subforum varchar(200) DEFAULT '' NOT NULL,
+ topic_moved varchar(200) DEFAULT '' NOT NULL,
+ topic_read varchar(200) DEFAULT '' NOT NULL,
+ topic_read_mine varchar(200) DEFAULT '' NOT NULL,
+ topic_read_hot varchar(200) DEFAULT '' NOT NULL,
+ topic_read_hot_mine varchar(200) DEFAULT '' NOT NULL,
+ topic_read_locked varchar(200) DEFAULT '' NOT NULL,
+ topic_read_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ topic_unread varchar(200) DEFAULT '' NOT NULL,
+ topic_unread_mine varchar(200) DEFAULT '' NOT NULL,
+ topic_unread_hot varchar(200) DEFAULT '' NOT NULL,
+ topic_unread_hot_mine varchar(200) DEFAULT '' NOT NULL,
+ topic_unread_locked varchar(200) DEFAULT '' NOT NULL,
+ topic_unread_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ sticky_read varchar(200) DEFAULT '' NOT NULL,
+ sticky_read_mine varchar(200) DEFAULT '' NOT NULL,
+ sticky_read_locked varchar(200) DEFAULT '' NOT NULL,
+ sticky_read_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ sticky_unread varchar(200) DEFAULT '' NOT NULL,
+ sticky_unread_mine varchar(200) DEFAULT '' NOT NULL,
+ sticky_unread_locked varchar(200) DEFAULT '' NOT NULL,
+ sticky_unread_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ announce_read varchar(200) DEFAULT '' NOT NULL,
+ announce_read_mine varchar(200) DEFAULT '' NOT NULL,
+ announce_read_locked varchar(200) DEFAULT '' NOT NULL,
+ announce_read_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ announce_unread varchar(200) DEFAULT '' NOT NULL,
+ announce_unread_mine varchar(200) DEFAULT '' NOT NULL,
+ announce_unread_locked varchar(200) DEFAULT '' NOT NULL,
+ announce_unread_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ global_read varchar(200) DEFAULT '' NOT NULL,
+ global_read_mine varchar(200) DEFAULT '' NOT NULL,
+ global_read_locked varchar(200) DEFAULT '' NOT NULL,
+ global_read_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ global_unread varchar(200) DEFAULT '' NOT NULL,
+ global_unread_mine varchar(200) DEFAULT '' NOT NULL,
+ global_unread_locked varchar(200) DEFAULT '' NOT NULL,
+ global_unread_locked_mine varchar(200) DEFAULT '' NOT NULL,
+ pm_read varchar(200) DEFAULT '' NOT NULL,
+ pm_unread varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_aim varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_email varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_icq varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_jabber varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_msnm varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_pm varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_yahoo varchar(200) DEFAULT '' NOT NULL,
+ icon_contact_www varchar(200) DEFAULT '' NOT NULL,
+ icon_post_delete varchar(200) DEFAULT '' NOT NULL,
+ icon_post_edit varchar(200) DEFAULT '' NOT NULL,
+ icon_post_info varchar(200) DEFAULT '' NOT NULL,
+ icon_post_quote varchar(200) DEFAULT '' NOT NULL,
+ icon_post_report varchar(200) DEFAULT '' NOT NULL,
+ icon_post_target varchar(200) DEFAULT '' NOT NULL,
+ icon_post_target_unread varchar(200) DEFAULT '' NOT NULL,
+ icon_topic_attach varchar(200) DEFAULT '' NOT NULL,
+ icon_topic_latest varchar(200) DEFAULT '' NOT NULL,
+ icon_topic_newest varchar(200) DEFAULT '' NOT NULL,
+ icon_topic_reported varchar(200) DEFAULT '' NOT NULL,
+ icon_topic_unapproved varchar(200) DEFAULT '' NOT NULL,
+ icon_user_online varchar(200) DEFAULT '' NOT NULL,
+ icon_user_offline varchar(200) DEFAULT '' NOT NULL,
+ icon_user_profile varchar(200) DEFAULT '' NOT NULL,
+ icon_user_search varchar(200) DEFAULT '' NOT NULL,
+ icon_user_warn varchar(200) DEFAULT '' NOT NULL,
+ button_pm_forward varchar(200) DEFAULT '' NOT NULL,
+ button_pm_new varchar(200) DEFAULT '' NOT NULL,
+ button_pm_reply varchar(200) DEFAULT '' NOT NULL,
+ button_topic_locked varchar(200) DEFAULT '' NOT NULL,
+ button_topic_new varchar(200) DEFAULT '' NOT NULL,
+ button_topic_reply varchar(200) DEFAULT '' NOT NULL,
+ user_icon1 varchar(200) DEFAULT '' NOT NULL,
+ user_icon2 varchar(200) DEFAULT '' NOT NULL,
+ user_icon3 varchar(200) DEFAULT '' NOT NULL,
+ user_icon4 varchar(200) DEFAULT '' NOT NULL,
+ user_icon5 varchar(200) DEFAULT '' NOT NULL,
+ user_icon6 varchar(200) DEFAULT '' NOT NULL,
+ user_icon7 varchar(200) DEFAULT '' NOT NULL,
+ user_icon8 varchar(200) DEFAULT '' NOT NULL,
+ user_icon9 varchar(200) DEFAULT '' NOT NULL,
+ user_icon10 varchar(200) DEFAULT '' NOT NULL,
+ PRIMARY KEY (imageset_id),
+ UNIQUE imgset_nm (imageset_name)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_title text DEFAULT '' NOT NULL,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_status tinyint(3) DEFAULT '0' NOT NULL,
+ topic_type tinyint(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject text DEFAULT '' NOT NULL,
+ topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_title text DEFAULT '' NOT NULL,
+ poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id),
+ KEY forum_id (forum_id),
+ KEY forum_id_type (forum_id, topic_type),
+ KEY last_post_time (topic_last_post_time),
+ KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
+ user_permissions mediumtext DEFAULT '' NOT NULL,
+ user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(252) DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NOT NULL,
+ user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
+ user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_warnings tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
+ user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style tinyint(4) 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,
+ user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_full_folder int(11) DEFAULT '-3' NOT NULL,
+ user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_email tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_options int(11) UNSIGNED DEFAULT '893' NOT NULL,
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig mediumtext DEFAULT '' NOT NULL,
+ user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
+ user_from varchar(100) DEFAULT '' NOT NULL,
+ user_icq varchar(15) DEFAULT '' NOT NULL,
+ user_aim varchar(255) DEFAULT '' NOT NULL,
+ user_yim varchar(255) DEFAULT '' NOT NULL,
+ user_msnm varchar(255) DEFAULT '' NOT NULL,
+ user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_website varchar(200) DEFAULT '' NOT NULL,
+ user_occ varchar(255) DEFAULT '' NOT NULL,
+ user_interests text DEFAULT '' NOT NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ KEY username (username)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (warning_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word varchar(255) DEFAULT '' NOT NULL,
+ replacement varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (word_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY zebra_id (zebra_id)
+) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
+
+
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 6cfb6d5bcd..74c37acacd 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1232,7 +1232,7 @@ CREATE TABLE phpbb_search_results (
*/
CREATE TABLE phpbb_search_wordlist (
word_id number(8) NOT NULL,
- word_text nvarchar2(252) DEFAULT '' ,
+ word_text varchar2(255) DEFAULT '' ,
word_common number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 89cd209547..147df5875b 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -847,7 +847,7 @@ CREATE SEQUENCE phpbb_search_wordlist_seq;
CREATE TABLE phpbb_search_wordlist (
word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'),
- word_text varchar(252) DEFAULT '' NOT NULL,
+ word_text varchar(255) DEFAULT '' NOT NULL,
word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0),
PRIMARY KEY (word_id)
);
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 0161ef60ad..6750113dce 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -616,7 +616,7 @@ CREATE TABLE phpbb_search_results (
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id INTEGER PRIMARY KEY NOT NULL ,
- word_text nvarchar(252) NOT NULL DEFAULT '',
+ word_text varchar(255) NOT NULL DEFAULT '',
word_common INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 0c0fdb0274..811d5414bb 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -157,7 +157,9 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your forum directory tree. You should put this file in a non web-accessible location',
'INST_ERR_DB_NO_ERROR' => 'No error message given',
'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.x/5.x" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.',
- 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 4.x/5.x" or "MySQL 3.23.x/4.x" option instead.',
+ 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.',
+ 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the NLS_CHARACTERSET parameter to UTF8. Either upgrade your installation to 9.2+ or change the parameter.',
+ 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding',
'INST_ERR_DB_NO_NAME' => 'No database name specified',
'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid',
'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.',
From a46a0c10c9ac2044fc0551af6493acdb63c8c7ea Mon Sep 17 00:00:00 2001
From: David M
Date: Sat, 16 Sep 2006 13:25:31 +0000
Subject: [PATCH 084/291] drat
git-svn-id: file:///svn/phpbb/trunk@6372 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/utf/utf_tools.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 84ae0d2dd2..1e7e25c43f 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -696,7 +696,7 @@ function utf8_decode_ncr_callback($m)
* Unicode characters.
* @param string UTF-8 encoded string
*/
-function utf8_to_unicode($$string)
+function utf8_to_unicode($string)
{
$unicode = array();
$offset = 0;
From b1aa00769367e4e2c241179612e66636e80b30a5 Mon Sep 17 00:00:00 2001
From: David M
Date: Sat, 16 Sep 2006 13:27:21 +0000
Subject: [PATCH 085/291] oops
git-svn-id: file:///svn/phpbb/trunk@6373 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index bdf3be7697..bea2296bfe 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1761,6 +1761,7 @@ class install_install extends module
{
$error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
}
+ break;
case 'oracle':
$sql = "SELECT *
From 26d4694071964ea48501b2126a679a3a9065bc0a Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 16 Sep 2006 14:04:20 +0000
Subject: [PATCH 086/291] Extra check on table prefix for mysql
git-svn-id: file:///svn/phpbb/trunk@6374 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 27 ++++++---------------------
phpBB/language/en/install.php | 3 ++-
2 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index bea2296bfe..47f3ab5565 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1643,12 +1643,17 @@ class install_install extends module
return false;
}
- // Check the prefix length to ensure that index names are not too long
+ // Check the prefix length to ensure that index names are not too long and does not contain invalid characters
switch ($dbms)
{
case 'mysql':
case 'mysql4':
case 'mysqli':
+ if (stristr($table_prefix, '-') !== false)
+ {
+ $error[] = $lang['INST_ERR_PREFIX_INVALID'];
+ return false;
+ }
case 'postgres':
$prefix_length = 36;
@@ -1783,26 +1788,6 @@ class install_install extends module
}
break;
- case 'oracle':
- $sql = "SELECT *
- FROM NLS_DATABASE_PARAMETERS
- WHERE PARAMETER = 'NLS_RDBMS_VERSION'
- OR PARAMETER = 'NLS_CHARACTERSET';";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $stats[$row['parameter']] = $row['value'];
- }
-
- $db->sql_freeresult($result);
-
- if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8')
- {
- $error[] = $lang['INST_ERR_DB_NO_ORACLE'];
- }
- break;
-
case 'postgres':
$sql = "SHOW server_encoding;";
$result = $db->sql_query($sql);
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 811d5414bb..90092804f7 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -61,7 +61,7 @@ $lang = array_merge($lang, array(
'CONTINUE_LAST' => 'Continue last statements',
'CONVERT' => 'Convert',
'CONVERT_COMPLETE' => 'Conversion completed',
- 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and access your forum . Remember that help on using phpBB is available online via the Userguide and the Beta support forum ',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and access your forum . Remember that help on using phpBB is available online via the Userguide and the Beta support forum ',
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.',
'CONVERT_NOT_EXIST' => 'The specified convertor does not exist',
@@ -173,6 +173,7 @@ $lang = array_merge($lang, array(
'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.',
'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.',
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
+ 'INST_ERR_PREFIX_INVALID' => 'The table prefix you have specified is invalid for your database. Please try another, removing characters such as the hyphen',
'INST_ERR_PREFIX_TOO_LONG' => 'The table prefix you have specified is too long. The maximum length is %d characters.',
'INST_ERR_USER_TOO_LONG' => 'The username you entered is too long. The maximum length is 20 characters.',
'INST_ERR_USER_TOO_SHORT' => 'The username you entered is too short. The minimum length is 3 characters.',
From bbc4a0c3feb12bdd2b8231f2bb052be974b16f4a Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 16 Sep 2006 19:36:48 +0000
Subject: [PATCH 087/291] * Fix default language option if more than one pack
is present * Fix moderator roles to match their description * Add new forum
role for closer mapping of converted permissions
git-svn-id: file:///svn/phpbb/trunk@6375 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 2 ++
phpBB/install/schemas/schema_data.sql | 16 ++++++++++------
phpBB/language/en/acp/permissions.php | 1 +
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 47f3ab5565..9bc0e78bba 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -559,6 +559,8 @@ class install_install extends module
$s_hidden_fields = ($img_imagick) ? ' ' : '';
$passed = false;
+ $default_lang = ($default_lang !== '') ? $default_lang : $language;
+
if (isset($_POST['check']))
{
$error = array();
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index dcf9e39ba3..115772a11c 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -371,14 +371,15 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Standard Moderator', 'ROLE_DESCRIPTION_MOD_STANDARD', 'm_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Simple Moderator', 'ROLE_DESCRIPTION_MOD_SIMPLE', 'm_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Queue Moderator', 'ROLE_DESCRIPTION_MOD_QUEUE', 'm_', 4);
-INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Full Access', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 6);
-INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Standard Access', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 4);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Full Access', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 7);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Standard Access', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 5);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('No Access', 'ROLE_DESCRIPTION_FORUM_NOACCESS', 'f_', 1);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Read Only Access', 'ROLE_DESCRIPTION_FORUM_READONLY', 'f_', 2);
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Limited Access', 'ROLE_DESCRIPTION_FORUM_LIMITED', 'f_', 3);
-INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Bot Access', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 8);
-INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('On Moderation Queue', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 7);
-INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Standard Access + Polls', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 5);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Bot Access', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 9);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('On Moderation Queue', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 8);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Standard Access + Polls', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 6);
+INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('Limited Access + Polls', 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS', 'f_', 4);
# -- phpbb_styles
@@ -458,7 +459,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 10, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%';
# Standard Moderator (m_)
-INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_approve', 'm_ban', 'm_chgposter', 'm_delete');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
# Simple Moderator (m_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_delete', 'm_edit', 'm_info', 'm_report', 'm_warn');
@@ -491,6 +492,9 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
# Standard Access + Polls (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_delete', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
+# Limited Access + Polls (f_)
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
+
# Permissions
# GUESTS - u_download and u_search ability
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
index 1b0513b2f3..07ee227486 100644
--- a/phpBB/language/en/acp/permissions.php
+++ b/phpBB/language/en/acp/permissions.php
@@ -150,6 +150,7 @@ $lang = array_merge($lang, array(
'ROLE_DESCRIPTION_FORUM_BOT' => 'This role is recommended for bots and search spiders.',
'ROLE_DESCRIPTION_FORUM_FULL' => 'Can use all forum features, including posting of announcements and stickies. Can also ignore the flood limit. Not recommended for normal users.',
'ROLE_DESCRIPTION_FORUM_LIMITED' => 'Can use some forum features, but cannot attach files or use post icons.',
+ 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS' => 'Like Limited Access but can also create polls.',
'ROLE_DESCRIPTION_FORUM_NOACCESS' => 'Can neither see nor access the forum.',
'ROLE_DESCRIPTION_FORUM_ONQUEUE' => 'Can use most forum features including attachments, but posts and topics need to be approved by a moderator.',
'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.',
From c6c3df2a730bb825a315c21cdd6c38988d683062 Mon Sep 17 00:00:00 2001
From: David M
Date: Sun, 17 Sep 2006 02:52:19 +0000
Subject: [PATCH 088/291] commenting some code :D
git-svn-id: file:///svn/phpbb/trunk@6376 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/utf/utf_tools.php | 216 ++++++++++++++++++++++++++-----
1 file changed, 187 insertions(+), 29 deletions(-)
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 1e7e25c43f..2f7c8de69a 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -17,13 +17,15 @@
* @package phpBB3
*/
-// huge chunks of this code belong to the PHP UTF-8 project
-// TODO: document the functions!
-
-// utf8_encode and utf8_decode are both XML functions
if (!extension_loaded('xml'))
{
- // This function exploits some nice things that ISO-8859-1 and UTF-8 have in common
+ /**
+ * Implementation of PHP's native utf8_encode for people without XML support
+ * This function exploits some nice things that ISO-8859-1 and UTF-8 have in common
+ *
+ * @param string $str ISO-8859-1 encoded data
+ * @return string UTF-8 encoded data
+ */
function utf8_encode($str)
{
$out = '';
@@ -48,7 +50,13 @@ if (!extension_loaded('xml'))
return $out;
}
- // "borrowed" from getID3
+ /**
+ * Implementation of PHP's native utf8_decode for people without XML support
+ *
+ * @author GetID3()
+ * @param string $string UTF-8 encoded data
+ * @return string ISO-8859-1 encoded data
+ */
function utf8_decode($string)
{
$newcharstring = '';
@@ -106,6 +114,16 @@ if (!extension_loaded('xml'))
// if mbstring is not loaded, we go into native mode.
if (extension_loaded('mbstring'))
{
+ /**
+ * UTF-8 aware alternative to strrpos
+ * Find position of last occurrence of a char in a string
+ *
+ * @author Harry Fuecks
+ * @param string haystack
+ * @param string needle
+ * @param integer (optional) offset (from left)
+ * @return mixed integer position or FALSE on failure
+ */
function utf8_strrpos($str, $needle, $offset = null)
{
// offset for mb_strrpos was added in 5.2.0
@@ -137,6 +155,16 @@ if (extension_loaded('mbstring'))
}
}
+ /**
+ * UTF-8 aware alternative to strpos
+ * Find position of first occurrence of a string
+ *
+ * @author Harry Fuecks
+ * @param string haystack
+ * @param string needle
+ * @param integer offset in characters (from left)
+ * @return mixed integer position or FALSE on failure
+ */
function utf8_strpos($str, $needle, $offset = null)
{
if ($offset === false)
@@ -149,16 +177,50 @@ if (extension_loaded('mbstring'))
}
}
+ /**
+ * UTF-8 aware alternative to strtolower
+ * Make a string lowercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @author Andreas Gohr
+ * @param string
+ * @return mixed either string in lowercase or FALSE is UTF-8 invalid
+ */
function utf8_strtolower($str)
{
return mb_strtolower($str);
}
+ /**
+ * UTF-8 aware alternative to strtoupper
+ * Make a string uppercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @author Andreas Gohr
+ * @param string
+ * @return mixed either string in lowercase or FALSE is UTF-8 invalid
+ */
function utf8_strtoupper($str)
{
return mb_strtoupper($str);
}
+ /**
+ * UTF-8 aware alternative to substr
+ * Return part of a string given character offset (and optionally length)
+ *
+ * @author Harry Fuecks
+ * @param string
+ * @param integer number of UTF-8 characters offset (from left)
+ * @param integer (optional) length in UTF-8 characters from offset
+ * @return mixed string or FALSE if failure
+ */
function utf8_substr($str, $offset, $length = null)
{
if ($length === false)
@@ -170,9 +232,30 @@ if (extension_loaded('mbstring'))
return mb_substr($str, $offset, $length);
}
}
+
+ /**
+ * Return the length (in characters) of a UTF-8 string
+ *
+ * @param string $text UTF-8 string
+ * @return integer Length (in chars) of given string
+ */
+ function utf8_strlen($text)
+ {
+ return mb_strlen($text, 'utf-8');
+ }
}
else
{
+ /**
+ * UTF-8 aware alternative to strrpos
+ * Find position of last occurrence of a char in a string
+ *
+ * @author Harry Fuecks
+ * @param string haystack
+ * @param string needle
+ * @param integer (optional) offset (from left)
+ * @return mixed integer position or FALSE on failure
+ */
function utf8_strrpos($str, $needle, $offset = null)
{
if (is_null($offset))
@@ -207,6 +290,16 @@ else
}
}
+ /**
+ * UTF-8 aware alternative to strpos
+ * Find position of first occurrence of a string
+ *
+ * @author Harry Fuecks
+ * @param string haystack
+ * @param string needle
+ * @param integer offset in characters (from left)
+ * @return mixed integer position or FALSE on failure
+ */
function utf8_strpos($str, $needle, $offset = null)
{
// native
@@ -330,6 +423,18 @@ $UTF8_LOWER_TO_UPPER = array(
0x00F0=>0x00D0, 0x0457=>0x0407, 0x0123=>0x0122,
);
+ /**
+ * UTF-8 aware alternative to strtolower
+ * Make a string lowercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @author Andreas Gohr
+ * @param string
+ * @return mixed either string in lowercase or FALSE is UTF-8 invalid
+ */
function utf8_strtolower($string)
{
global $UTF8_UPPER_TO_LOWER;
@@ -351,6 +456,18 @@ $UTF8_LOWER_TO_UPPER = array(
return utf8_from_unicode($uni);
}
+ /**
+ * UTF-8 aware alternative to strtoupper
+ * Make a string uppercase
+ * Note: The concept of a characters "case" only exists is some alphabets
+ * such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
+ * not exist in the Chinese alphabet, for example. See Unicode Standard
+ * Annex #21: Case Mappings
+ *
+ * @author Andreas Gohr
+ * @param string
+ * @return mixed either string in lowercase or FALSE is UTF-8 invalid
+ */
function utf8_strtoupper($str)
{
global $UTF8_LOWER_TO_UPPER;
@@ -372,6 +489,16 @@ $UTF8_LOWER_TO_UPPER = array(
return utf8_from_unicode($uni);
}
+ /**
+ * UTF-8 aware alternative to substr
+ * Return part of a string given character offset (and optionally length)
+ *
+ * @author Harry Fuecks
+ * @param string
+ * @param integer number of UTF-8 characters offset (from left)
+ * @param integer (optional) length in UTF-8 characters from offset
+ * @return mixed string or FALSE if failure
+ */
function utf8_substr($str, $offset, $length = null)
{
if ($offset >= 0 && $length >= 0)
@@ -436,8 +563,30 @@ $UTF8_LOWER_TO_UPPER = array(
}
}
}
+
+ /**
+ * Return the length (in characters) of a UTF-8 string
+ *
+ * @param string $text UTF-8 string
+ * @return integer Length (in chars) of given string
+ */
+ function utf8_strlen($text)
+ {
+ // Since utf8_decode is replacing multibyte characters to ? strlen works fine
+ return strlen(utf8_decode($text));
+ }
+
}
+/**
+* UTF-8 aware alternative to str_split
+* Convert a string to an array
+*
+* @author Harry Fuecks
+* @param string UTF-8 encoded
+* @param int number to characters to split string by
+* @return string characters in string reverses
+*/
function utf8_str_split($str, $split_len = 1)
{
if (!preg_match('/^[0-9]+$/', $split_len) || $split_len < 1)
@@ -455,6 +604,14 @@ function utf8_str_split($str, $split_len = 1)
return $ar[0];
}
+/**
+* UTF-8 aware alternative to strcspn
+* Find length of initial segment not matching mask
+*
+* @author Harry Fuecks
+* @param string
+* @return int
+*/
function utf8_strspn($str, $mask, $start = null, $length = null)
{
$mask = preg_replace('!([\\\\\\-\\]\\[/^])!', '\\\${1}', $mask);
@@ -474,6 +631,14 @@ function utf8_strspn($str, $mask, $start = null, $length = null)
return 0;
}
+/**
+* UTF-8 aware alternative to ucfirst
+* Make a string's first character uppercase
+*
+* @author Harry Fuecks
+* @param string
+* @return string with first character as upper case (if applicable)
+*/
function utf8_ucfirst($str)
{
switch (utf8_strlen($str))
@@ -493,28 +658,6 @@ function utf8_ucfirst($str)
}
}
-/**
-* Return the length (in characters) of a UTF-8 string
-*
-* @param string $text UTF-8 string
-* @return integer Length (in chars) of given string
-*/
-function utf8_strlen($text)
-{
- if (function_exists('iconv_strlen'))
- {
- return iconv_strlen($text, 'utf-8');
- }
-
- if (function_exists('mb_strlen'))
- {
- return mb_strlen($text, 'utf-8');
- }
-
- // Since utf8_decode is replacing multibyte characters to ? strlen works fine
- return strlen(utf8_decode($text));
-}
-
/**
* Recode a string to UTF-8
*
@@ -614,6 +757,12 @@ function utf8_encode_ncr_callback($m)
return '' . utf8_ord($m[0]) . ';';
}
+/**
+ * Enter description here...
+ *
+ * @param string $chr UTF-8 char
+ * @return integer UNICODE code point
+ */
function utf8_ord($chr)
{
switch (strlen($chr))
@@ -639,6 +788,12 @@ function utf8_ord($chr)
}
}
+/**
+ * Converts an NCR to a UTF-8 char
+ *
+ * @param integer $cp UNICODE code point
+ * @return string UTF-8 char
+ */
function utf8_chr($cp)
{
if ($cp > 0xFFFF)
@@ -694,7 +849,9 @@ function utf8_decode_ncr_callback($m)
/**
* Takes an UTF-8 string and returns an array of ints representing the
* Unicode characters.
+ *
* @param string UTF-8 encoded string
+ * @return array array of UNICODE code points
*/
function utf8_to_unicode($string)
{
@@ -752,7 +909,8 @@ function utf8_to_unicode($string)
* Takes an array of ints representing the Unicode characters and returns
* a UTF-8 string.
*
- * @param array of unicode code points representing a string
+ * @param array $array array of unicode code points representing a string
+ * @return string UTF-8 character string
*/
function utf8_from_unicode($array)
{
From e43b9d2f9baf0a4d92f9e9b70ab766fd248f7180 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sun, 17 Sep 2006 14:43:49 +0000
Subject: [PATCH 089/291] removed debug_extra notice other fixes state that
mysql.php shouldn't be used for mysql 4.1+ (actually, it should deny using
it)
git-svn-id: file:///svn/phpbb/trunk@6377 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_main.html | 7 -
phpBB/includes/acm/acm_file.php | 2 +-
phpBB/includes/acp/acp_main.php | 6 -
phpBB/includes/db/mysql.php | 2 +-
phpBB/install/database_update.php | 247 +++++++++++++++++++-
phpBB/language/en/acp/common.php | 2 -
phpBB/language/en/acp/permissions_phpbb.php | 9 +-
7 files changed, 240 insertions(+), 35 deletions(-)
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index f9a74e23c6..364525e860 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -14,13 +14,6 @@
{L_ADMIN_INTRO}
-
-
-
{L_WARNING}
-
{L_DEBUG_EXTRA_WARNING}
-
-
-
{L_WARNING}
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index f74ab2707f..b8aed9bcb7 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -371,7 +371,7 @@ class acm
}
$db->sql_freeresult($query_result);
- fwrite($fp, " " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$this->sql_rowset[\$query_id] = array(" . implode(',', $lines) . ') ?>');
+ fwrite($fp, " " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\n\$this->sql_rowset[\$query_id] = array(" . implode(',', $lines) . ') ?>');
@flock($fp, LOCK_UN);
fclose($fp);
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index f71965e375..b1331fa1ae 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -489,12 +489,6 @@ class acp_main
);
}
- // Display debug_extra notice
- if (defined('DEBUG_EXTRA'))
- {
- $template->assign_var('S_DEBUG_EXTRA', true);
- }
-
// Warn if install is still present
if (file_exists($phpbb_root_path . 'install'))
{
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 48ae9e9773..099e1cf11a 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -26,7 +26,7 @@ if (!defined('SQL_LAYER'))
/**
* MySQL Database Abstraction Layer
-* Minimum Requirement is 3.23+/4.0+/4.1+
+* Minimum Requirement is 3.23+/4.0+ (NOT 4.1+/5.0+)
* @package dbal
*/
class dbal_mysql extends dbal
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 73507455cd..793780aa6b 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -87,12 +87,194 @@ include($phpbb_root_path . 'language/' . $row['config_value'] . '/install.' . $p
// Database column types mapping
$dbms_type_map = array(
- 'mysql' => array('INT:' => 'int(%d)', 'BINT' => 'bigint(20)', 'UINT' => 'mediumint(8) UNSIGNED', 'UINT:' => 'int(%d) UNSIGNED', 'TINT:' => 'tinyint(%d)', 'USINT' => 'smallint(4) UNSIGNED', 'BOOL' => 'tinyint(1) UNSIGNED', 'VCHAR' => 'varchar(255)', 'VCHAR:' => 'varchar(%d)', 'CHAR:' => 'char(%d)', 'XSTEXT' => 'text', 'STEXT' => 'text', 'TEXT' => 'text', 'MTEXT' => 'mediumtext', 'TIMESTAMP' => 'int(11) UNSIGNED', 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY', 'VCHAR_CI' => 'varchar(252)', 'VARBINARY' => 'varbinary(255)'),
- 'firebird' => array('INT:' => 'INTEGER', 'BINT' => 'DOUBLE PRECISION', 'UINT' => 'INTEGER', 'UINT:' => 'INTEGER', 'TINT:' => 'INTEGER', 'USINT' => 'INTEGER', 'BOOL' => 'INTEGER', 'VCHAR' => 'VARCHAR(255)', 'VCHAR:' => 'VARCHAR(%d)', 'CHAR:' => 'CHAR(%d)', 'XSTEXT' => 'BLOB SUB_TYPE TEXT', 'STEXT' => 'BLOB SUB_TYPE TEXT','TEXT' => 'BLOB SUB_TYPE TEXT', 'MTEXT' => 'BLOB SUB_TYPE TEXT', 'TIMESTAMP' => 'INTEGER', 'DECIMAL' => 'DOUBLE PRECISION','VCHAR_BIN' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS', 'VCHAR_CI' => 'VARCHAR(252)', 'VARBINARY' => 'CHAR(255)'),
- 'mssql' => array('INT:' => '[int]', 'BINT' => '[float]', 'UINT' => '[int]', 'UINT:' => '[int]', 'TINT:' => '[int]', 'USINT' => '[int]', 'BOOL' => '[int]', 'VCHAR' => '[varchar] (255)', 'VCHAR:' => '[varchar] (%d)', 'CHAR:' => '[char] (%d)', 'XSTEXT' => '[varchar] (1000)', 'STEXT' => '[varchar] (3000)', 'TEXT' => '[varchar] (8000)', 'MTEXT' => '[text]', 'TIMESTAMP' => '[int]', 'DECIMAL' => '[float]', 'VCHAR_BIN' => '[nvarchar] (252)', 'VCHAR_CI' => '[varchar] (252)','VARBINARY' => '[varbinary] (255)'),
- 'oracle' => array('INT:' => 'number(%d)','BINT' => 'number(20)', 'UINT' => 'number(8)', 'UINT:' => 'number(%d)', 'TINT:' => 'number(%d)', 'USINT' => 'number(4)', 'BOOL' => 'number(1)', 'VCHAR' => 'varchar2(255)', 'VCHAR:' => 'varchar2(%d)', 'CHAR:' => 'char(%d)', 'XSTEXT' => 'varchar2(1000)', 'STEXT' => 'varchar2(3000)', 'TEXT' => 'clob', 'MTEXT' => 'clob', 'TIMESTAMP' => 'number(11)', 'DECIMAL' => 'number(5, 2)', 'VCHAR_BIN' => 'nvarchar2(252)', 'VCHAR_CI' => 'varchar2(252)', 'VARBINARY' => 'raw(255)'),
- 'sqlite' => array('INT:' => 'int(%d)', 'BINT' => 'bigint(20)', 'UINT' => 'INTEGER UNSIGNED', 'UINT:' => 'INTEGER UNSIGNED', 'TINT:' => 'tinyint(%d)', 'USINT' => 'INTEGER UNSIGNED', 'BOOL' => 'INTEGER UNSIGNED', 'VCHAR' => 'varchar(255)', 'VCHAR:' => 'varchar(%d)', 'CHAR:' => 'char(%d)', 'XSTEXT' => 'text(65535)', 'STEXT' => 'text(65535)', 'TEXT' => 'text(65535)', 'MTEXT' => 'mediumtext(16777215)', 'TIMESTAMP' => 'INTEGER UNSIGNED', 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'nvarchar(252)', 'VCHAR_CI' => 'varchar(252)', 'VARBINARY' => 'blob'),
- 'postgres' => array('INT:' => 'INT4', 'BINT' => 'INT8', 'UINT' => 'INT4', 'UINT:' => 'INT4', 'TINT:' => 'INT2', 'USINT' => 'INT2', 'BOOL' => 'INT2', 'VCHAR' => 'varchar(255)', 'VCHAR:' => 'varchar(%d)', 'CHAR:' => 'char(%d)', 'XSTEXT' => 'varchar(1000)', 'STEXT' => 'varchar(3000)', 'TEXT' => 'varchar(8000)', 'MTEXT' => 'TEXT', 'TIMESTAMP' => 'INT4', 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'varchar(252)', 'VCHAR_CI' => 'varchar_ci', 'VARBINARY' => 'bytea'),
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'text',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'text',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(252)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'text',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'text',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')),
+ 'VCHAR_CI' => 'varchar(252)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'firebird' => array(
+ 'INT:' => 'INTEGER',
+ 'BINT' => 'DOUBLE PRECISION',
+ 'UINT' => 'INTEGER',
+ 'UINT:' => 'INTEGER',
+ 'TINT:' => 'INTEGER',
+ 'USINT' => 'INTEGER',
+ 'BOOL' => 'INTEGER',
+ 'VCHAR' => 'VARCHAR(255)',
+ 'VCHAR:' => 'VARCHAR(%d)',
+ 'CHAR:' => 'CHAR(%d)',
+ 'XSTEXT' => 'BLOB SUB_TYPE TEXT',
+ 'STEXT' => 'BLOB SUB_TYPE TEXT',
+ 'TEXT' => 'BLOB SUB_TYPE TEXT',
+ 'MTEXT' => 'BLOB SUB_TYPE TEXT',
+ 'XSTEXT_UNI'=> 'BLOB SUB_TYPE TEXT',
+ 'STEXT_UNI' => 'BLOB SUB_TYPE TEXT',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT',
+ 'TIMESTAMP' => 'INTEGER',
+ 'DECIMAL' => 'DOUBLE PRECISION',
+ 'VCHAR_UNI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
+ 'VCHAR_UNI:'=> array('VARCHAR(%d) CHARACTER SET UNICODE_FSS', 'rule' => array('div', 3)),
+ 'VCHAR_CI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS',
+ 'VARBINARY' => 'CHAR(255)',
+ ),
+
+ 'mssql' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[nvarchar] (1000)',
+ 'STEXT_UNI' => '[nvarchar] (3000)',
+ 'TEXT_UNI' => '[nvarchar] (8000)',
+ 'MTEXT_UNI' => '[ntext]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'VCHAR_UNI' => '[nvarchar] (255)',
+ 'VCHAR_UNI:'=> '[nvarchar] (%d)',
+ 'VCHAR_CI' => '[nvarchar] (252)',
+ 'VARBINARY' => '[varbinary] (255)',
+ ),
+
+ 'oracle' => array(
+ 'INT:' => 'number(%d)',
+ 'BINT' => 'number(20)',
+ 'UINT' => 'number(8)',
+ 'UINT:' => 'number(%d)',
+ 'TINT:' => 'number(%d)',
+ 'USINT' => 'number(4)',
+ 'BOOL' => 'number(1)',
+ 'VCHAR' => 'varchar2(255)',
+ 'VCHAR:' => 'varchar2(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar2(1000)',
+ 'STEXT' => 'varchar2(3000)',
+ 'TEXT' => 'clob',
+ 'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(1000)',
+ 'STEXT_UNI' => 'varchar2(3000)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
+ 'TIMESTAMP' => 'number(11)',
+ 'DECIMAL' => 'number(5, 2)',
+ 'VCHAR_UNI' => 'varchar2(255)',
+ 'VCHAR_UNI:'=> 'varchar2(%d)',
+ 'VCHAR_CI' => 'varchar2(252)',
+ 'VARBINARY' => 'raw(255)',
+ ),
+
+ 'sqlite' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text(65535)',
+ 'STEXT' => 'text(65535)',
+ 'TEXT' => 'text(65535)',
+ 'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(252)',
+ 'VARBINARY' => 'blob',
+ ),
+
+ 'postgres' => array(
+ 'INT:' => 'INT4',
+ 'BINT' => 'INT8',
+ 'UINT' => 'INT4', // unsigned
+ 'UINT:' => 'INT4', // unsigned
+ 'USINT' => 'INT2', // unsigned
+ 'BOOL' => 'INT2', // unsigned
+ 'TINT:' => 'INT2',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar(1000)',
+ 'STEXT' => 'varchar(3000)',
+ 'TEXT' => 'varchar(8000)',
+ 'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(1000)',
+ 'STEXT_UNI' => 'varchar(3000)',
+ 'TEXT_UNI' => 'varchar(8000)',
+ 'MTEXT_UNI' => 'TEXT',
+ 'TIMESTAMP' => 'INT4', // unsigned
+ 'DECIMAL' => 'decimal(5,2)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar_ci',
+ 'VARBINARY' => 'bytea',
+ ),
);
// A list of types being unsigned for better reference in some db's
@@ -127,9 +309,12 @@ $map_dbms = SQL_LAYER;
switch (SQL_LAYER)
{
case 'mysql':
+ $map_dbms = 'mysql_40';
+ break;
+
case 'mysql4':
case 'mysqli':
- $map_dbms = 'mysql';
+ $map_dbms = 'mysql_41';
break;
case 'mssql':
@@ -441,12 +626,47 @@ function prepare_column_data($dbms, $column_data)
{
global $dbms_type_map, $unsigned_types;
- // Get final column type...
+ // Get type
if (strpos($column_data[0], ':') !== false)
{
list($orig_column_type, $column_length) = explode(':', $column_data[0]);
- $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
+ if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
+
+ if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
+ {
+ switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
+ }
+ else
+ {
+ $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
$orig_column_type .= ':';
}
else
@@ -495,7 +715,8 @@ function prepare_column_data($dbms, $column_data)
$sql .= 'NOT NULL';
break;
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$sql .= " {$column_type} ";
// For hexadecimal values do not use single quotes
@@ -560,7 +781,8 @@ function sql_column_add($dbms, $table_name, $column_name, $column_data)
_sql($sql, $errored, $error_ary);
break;
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$sql = 'ALTER TABLE `' . $table_name . '` ADD COLUMN `' . $column_name . '` ' . $column_data['column_type_sql'];
_sql($sql, $errored, $error_ary);
break;
@@ -658,7 +880,8 @@ function sql_column_change($dbms, $table_name, $column_name, $column_data)
_sql($sql, $errored, $error_ary);
break;
- case 'mysql':
+ case 'mysql_40':
+ case 'mysql_41':
$sql = 'ALTER TABLE `' . $table_name . '` CHANGE `' . $column_name . '` `' . $column_name . '` ' . $column_data['column_type_sql'];
_sql($sql, $errored, $error_ary);
break;
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 50f09f156b..269cea8254 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -262,8 +262,6 @@ $lang = array_merge($lang, array(
'USER_CONTROL_PANEL' => 'User Control Panel',
'WARNING' => 'Warning',
-
- 'DEBUG_EXTRA_WARNING' => 'The DEBUG_EXTRA constant is defined which is only meant for development purposes by the developers.
The board is running additional code to display sql reports, which slows down the board in a significant manner. Additionally sql errors are always displayed with a full backtrace to all users instead of displaying it solely to administrators, which is the default setting.
With this said, please be aware that you are currently running your installation in
Debug Mode and should you take this board live, please remove the constant from the config file.',
));
// PHP info
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index b0bc770a74..8577210862 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -8,6 +8,7 @@
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
+* @todo You are able to put your permission sets into a seperate file too by prefixing it with permissions_ and putting it into the acp language folder.
*/
/**
@@ -34,20 +35,16 @@ if (empty($lang) || !is_array($lang))
Please add your permission settings this way:
// Adding new category
- $lang['permission_cats']['bugs'] = 'Bugs';
+ $lang['permission_cat']['bugs'] = 'Bugs';
// Adding new permission set
- $lang['permission_sets']['bug_'] = 'Bug Permissions';
+ $lang['permission_type']['bug_'] = 'Bug Permissions';
// Adding the permissions
$lang = array_merge($lang, array(
'acl_bug_view' => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
'acl_bug_post' => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
));
-
- TODO:
- You are able to put your permission sets into a seperate file too by
- prefixing it with permissions_ and putting it into the acp language folder.
*/
// Define categories and permission types
From 8b70eca57c6d820de51b515575d815ba37609957 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sun, 17 Sep 2006 14:45:52 +0000
Subject: [PATCH 090/291] *** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@6378 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/images/avatars/gallery/index.htm | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 phpBB/images/avatars/gallery/index.htm
diff --git a/phpBB/images/avatars/gallery/index.htm b/phpBB/images/avatars/gallery/index.htm
new file mode 100644
index 0000000000..ee1f723a7d
--- /dev/null
+++ b/phpBB/images/avatars/gallery/index.htm
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
From e2ac2f9d7dda112adb9a548c8913108f83fb6391 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sun, 17 Sep 2006 15:22:01 +0000
Subject: [PATCH 091/291] Confirm zebra removal...... I mean friend/foe
deletion :P
git-svn-id: file:///svn/phpbb/trunk@6379 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/ucp/ucp_zebra.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index 2cf6edcac4..ac46e80b98 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -197,6 +197,8 @@ class ucp_zebra
WHERE user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
$db->sql_query($sql);
+
+ $updated = true;
}
if ($updated)
From ea065f3e67ee0c0cb28c88569042461dd8cf2c27 Mon Sep 17 00:00:00 2001
From: Nils Adermann
Date: Sun, 17 Sep 2006 22:02:28 +0000
Subject: [PATCH 092/291] - no more encoding mixture, say hello to UTF-8 (I'll
add a validation solution for PHP 4.3.3/4 ASAP) [side effect: fixes Bug
#3762] - take local server time into consideration for birthday/age
calculation - faster active topic search - allow changing active topic time
frame [Bug #4150] - reload stylesheet on language change [Bug #4222]
git-svn-id: file:///svn/phpbb/trunk@6380 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/index.php | 6 +-
phpBB/common.php | 1 +
phpBB/develop/create_schema_files.php | 2 -
phpBB/includes/acp/acp_search.php | 4 +-
phpBB/includes/db/firebird.php | 2 +-
phpBB/includes/functions.php | 36 +++-
phpBB/includes/functions_jabber.php | 67 -------
phpBB/includes/functions_messenger.php | 40 ++---
phpBB/includes/functions_posting.php | 4 +-
phpBB/includes/functions_privmsgs.php | 2 -
phpBB/includes/mcp/mcp_main.php | 1 -
phpBB/includes/search/fulltext_mysql.php | 2 +-
phpBB/includes/search/fulltext_native.php | 163 +++++++++++-------
phpBB/includes/ucp/ucp_prefs.php | 2 +-
phpBB/includes/utf/utf_tools.php | 2 +-
phpBB/index.php | 2 +-
phpBB/install/index.php | 7 +-
phpBB/install/schemas/firebird_schema.sql | 2 -
phpBB/install/schemas/mssql_schema.sql | 2 -
phpBB/install/schemas/mysql_40_schema.sql | 2 -
phpBB/install/schemas/mysql_41_schema.sql | 2 -
phpBB/install/schemas/oracle_schema.sql | 2 -
phpBB/install/schemas/postgres_schema.sql | 2 -
phpBB/install/schemas/sqlite_schema.sql | 2 -
phpBB/language/en/acp/attachments.php | 4 +-
phpBB/language/en/acp/ban.php | 4 +-
phpBB/language/en/acp/email.php | 4 +-
phpBB/language/en/acp/forums.php | 4 +-
phpBB/language/en/acp/groups.php | 4 +-
phpBB/language/en/acp/language.php | 4 +-
phpBB/language/en/acp/modules.php | 4 +-
phpBB/language/en/acp/permissions.php | 4 +-
phpBB/language/en/acp/permissions_phpbb.php | 4 +-
phpBB/language/en/acp/posting.php | 4 +-
phpBB/language/en/acp/profile.php | 4 +-
phpBB/language/en/acp/prune.php | 4 +-
phpBB/language/en/acp/search.php | 4 +-
phpBB/language/en/acp/styles.php | 4 +-
phpBB/language/en/acp/users.php | 4 +-
phpBB/language/en/common.php | 3 +-
phpBB/language/en/email/admin_activate.txt | 1 -
phpBB/language/en/email/admin_send_email.txt | 1 -
.../en/email/admin_welcome_activated.txt | 1 -
.../en/email/admin_welcome_inactive.txt | 1 -
.../en/email/coppa_resend_inactive.txt | 1 -
.../en/email/coppa_welcome_inactive.txt | 1 -
phpBB/language/en/email/email_notify.txt | 1 -
phpBB/language/en/email/forum_notify.txt | 1 -
phpBB/language/en/email/group_added.txt | 1 -
phpBB/language/en/email/group_approved.txt | 1 -
phpBB/language/en/email/group_request.txt | 1 -
phpBB/language/en/email/installed.txt | 1 -
phpBB/language/en/email/newtopic_notify.txt | 1 -
phpBB/language/en/email/post_approved.txt | 1 -
phpBB/language/en/email/post_disapproved.txt | 1 -
phpBB/language/en/email/privmsg_notify.txt | 1 -
.../language/en/email/profile_send_email.txt | 1 -
phpBB/language/en/email/profile_send_im.txt | 1 -
phpBB/language/en/email/report_closed.txt | 1 -
phpBB/language/en/email/report_deleted.txt | 1 -
phpBB/language/en/email/topic_approved.txt | 1 -
phpBB/language/en/email/topic_disapproved.txt | 1 -
phpBB/language/en/email/topic_notify.txt | 1 -
phpBB/language/en/email/user_activate.txt | 1 -
.../en/email/user_activate_inactive.txt | 1 -
.../en/email/user_activate_passwd.txt | 1 -
.../en/email/user_remind_inactive.txt | 1 -
.../en/email/user_resend_inactive.txt | 1 -
phpBB/language/en/email/user_welcome.txt | 1 -
.../en/email/user_welcome_inactive.txt | 1 -
phpBB/language/en/groups.php | 4 +-
phpBB/language/en/help_bbcode.php | 4 +-
phpBB/language/en/help_faq.php | 4 +-
phpBB/language/en/install.php | 2 +
phpBB/language/en/mcp.php | 2 +
phpBB/language/en/memberlist.php | 4 +-
phpBB/language/en/posting.php | 4 +-
phpBB/language/en/search.php | 4 +-
phpBB/language/en/ucp.php | 2 +
phpBB/language/en/viewforum.php | 4 +-
phpBB/language/en/viewtopic.php | 3 +-
phpBB/memberlist.php | 2 +-
phpBB/search.php | 37 ++--
.../subSilver/template/viewtopic_body.html | 6 -
phpBB/viewtopic.php | 17 +-
85 files changed, 256 insertions(+), 293 deletions(-)
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 5576098cef..95539bd45d 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -148,14 +148,14 @@ function adm_page_header($page_title)
'ICON_SYNC_DISABLED' => ' ',
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
- 'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'])
);
- if (!empty($config['send_encoding']))
+ if ($config['send_encoding'])
{
- header('Content-type: text/html; charset: ' . $user->lang['ENCODING']);
+ header('Content-type: text/html; charset=UTF-8');
}
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
diff --git a/phpBB/common.php b/phpBB/common.php
index f5e81ad1a6..ccebe5de2e 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -178,6 +178,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Set PHP error handler to ours
set_error_handler('msg_handler');
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 2e40616b17..98a4e14740 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1220,7 +1220,6 @@ function get_schema_struct()
'post_subject' => array('XSTEXT_UNI', ''),
'post_text' => array('MTEXT_UNI', ''),
'post_checksum' => array('VCHAR:32', ''),
- 'post_encoding' => array('VCHAR:20', 'iso-8859-1'),
'post_attachment' => array('BOOL', 0),
'bbcode_bitfield' => array('VCHAR:252', ''),
'bbcode_uid' => array('VCHAR:5', ''),
@@ -1259,7 +1258,6 @@ function get_schema_struct()
'message_text' => array('MTEXT_UNI', ''),
'message_edit_reason' => array('STEXT_UNI', ''),
'message_edit_user' => array('UINT', 0),
- 'message_encoding' => array('VCHAR:20', 'iso-8859-1'),
'message_attachment' => array('BOOL', 0),
'bbcode_bitfield' => array('VCHAR:252', ''),
'bbcode_uid' => array('VCHAR:5', ''),
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index b3caae028e..2ff1b778bb 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -320,7 +320,7 @@ class acp_search
}
else
{
- $sql = 'SELECT post_id, post_subject, post_text, post_encoding, poster_id, forum_id
+ $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id < ' . (int) ($post_counter + $this->batch_size);
@@ -328,7 +328,7 @@ class acp_search
while ($row = $db->sql_fetchrow($result))
{
- $this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['post_encoding'], $row['poster_id'], $row['forum_id']);
+ $this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 3446513e19..44bbcb4eb3 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -355,7 +355,7 @@ class dbal_firebird extends dbal
*/
function sql_escape($msg)
{
- return (@ini_get('magic_quotes_sybase') || strtolower(@ini_get('magic_quotes_sybase')) == 'on') ? str_replace('\\\'', '\'', addslashes($msg)) : str_replace('\'', '\'\'', stripslashes($msg));
+ return (@ini_get('magic_quotes_sybase') == 1 || strtolower(@ini_get('magic_quotes_sybase')) == 'on') ? str_replace('\\\'', '\'', addslashes($msg)) : str_replace('\'', '\'\'', stripslashes($msg));
}
/**
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4aa4f4a2c0..d7a594eeeb 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -24,14 +24,26 @@ function set_var(&$result, $var, $type, $multibyte = false)
if ($type == 'string')
{
- $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r"), array("\n", "\n"), $result)));
- $result = (STRIP) ? stripslashes($result) : $result;
+ $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r"), array("\n", "\n"), $result), ENT_QUOTES, 'UTF-8'));
- // Check for possible multibyte characters to save a preg_replace call if nothing is in there...
- if ($multibyte && strpos($result, '&#') !== false)
+ if (!empty($result))
{
- $result = preg_replace('#&(\#[0-9]+;)#', '&\1', $result);
+ // Make sure multibyte characters are wellformed
+ if ($multibyte)
+ {
+ if (!preg_match('/^./u', $result))
+ {
+ $result = '';
+ }
+ }
+ else
+ {
+ // no multibyte, allow only ASCII (0-127)
+ $result = preg_replace('/[\x80-\xFF]/', '?', $result);
+ }
}
+
+ $result = (STRIP) ? stripslashes($result) : $result;
}
}
@@ -2039,7 +2051,7 @@ function get_context($text, $words, $length = 400)
// find the starting indizes of all words
foreach ($words as $word)
{
- if (preg_match('#(?: |^)(' . str_replace('\*', '\w*?', preg_quote($word, '#')) . ')(?: |$)#i', $text, $match))
+ if (preg_match('#(?:[^\w]|^)(' . str_replace('\*', '\w*?', preg_quote($word, '#')) . ')(?:[^\w]|$)#i', $text, $match))
{
$pos = strpos($text, $match[1]);
if ($pos !== false)
@@ -2363,6 +2375,12 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_
{
global $config, $user;
+ if (!function_exists('display_attachments'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include_once("{$phpbb_root_path}includes/functions_display.$phpEx");
+ }
+
$attachments = display_attachments($forum_id, NULL, $attachments, $update_count, false, true);
$tpl_size = sizeof($attachments);
@@ -3143,7 +3161,7 @@ function page_header($page_title = '', $display_online_list = true)
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
'S_USERNAME' => $user->data['username'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
- 'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
@@ -3164,7 +3182,7 @@ function page_header($page_title = '', $display_online_list = true)
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
- 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'],
+ 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'],
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'T_THEME_DATA' => (!$user->theme['theme_storedb']) ? '' : $user->theme['theme_data'],
@@ -3173,7 +3191,7 @@ function page_header($page_title = '', $display_online_list = true)
if ($config['send_encoding'])
{
- header('Content-type: text/html; charset=' . $user->lang['ENCODING']);
+ header('Content-type: text/html; charset=UTF-8');
}
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 96d2e686e4..9efe17dc6b 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -25,7 +25,6 @@
*/
class jabber
{
- var $encoding;
var $server;
var $port;
var $username;
@@ -68,8 +67,6 @@ class jabber
$this->packet_queue = $this->subscription_queue = array();
$this->iq_sleep_timer = $this->delay_disconnect = 1;
- $this->encoding = 'UTF-8';
-
$this->returned_keep_alive = true;
$this->txnid = 0;
@@ -454,7 +451,6 @@ class jabber
}
$this->_array_xmlspecialchars($content);
- $this->_array_conv_utf8($content);
$xml = "\n";
@@ -795,69 +791,6 @@ class jabber
$string = str_replace(array('&', '>', '<', '"', '\''), array('&', '>', '<', '"', '''), $string);
}
- /**
- * Recursively converts all elements in an array to UTF-8 from the encoding stored in {@link encoding the encoding attribute}.
- * @access private
- */
- function _array_conv_utf8(&$array)
- {
- // no need to do anything if the encoding already is UTF-8
- if (strtoupper($this->encoding) == 'UTF-8')
- {
- return true;
- }
-
- if (is_array($array))
- {
- foreach ($array as $k => $v)
- {
- if (is_array($v))
- {
- $this->_array_conv_utf8($array[$k]);
- }
- else
- {
- $this->_conv_utf8($array[$k]);
- }
- }
- }
- }
-
- /**
- * Converts a string to utf8 encoding.
- *
- * @param string $string has to have the same encoding as {@link encoding the encoding attribute} is set to.
- *
- * @return boolean True on success, false on failure.
- *
- * @access private
- */
- function _conv_utf8(&$string)
- {
- // no need to do anything if the encoding already is UTF-8
- if (strtoupper($this->encoding) == 'UTF-8')
- {
- return true;
- }
-
- // first try iconv then mb_convert_encoding and as a last fall back try recode_string
- if (function_exists('iconv') && (($string = iconv($this->encoding, 'UTF-8', $string)) !== false))
- {
- return true;
- }
- elseif (function_exists('mb_convert_encoding') && (($string = mb_convert_encoding($string, 'UTF-8', $this->encoding)) !== false))
- {
- return true;
- }
- elseif (function_exists('recode_string') && (($string = recode_string($this->encoding . '..UTF-8', $string)) !== false))
- {
- return true;
- }
-
- // if everything fails we will just have to live with what we have, good luck!
- return false;
- }
-
// ======================================================================
// parsers
// ======================================================================
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index d8dfb2837e..d5d9c8dd5e 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -14,7 +14,7 @@
*/
class messenger
{
- var $vars, $msg, $extra_headers, $replyto, $from, $subject, $encoding;
+ var $vars, $msg, $extra_headers, $replyto, $from, $subject;
var $addresses = array();
var $mail_priority = MAIL_NORMAL_PRIORITY;
@@ -45,7 +45,7 @@ class messenger
function reset()
{
$this->addresses = array();
- $this->vars = $this->msg = $this->extra_headers = $this->replyto = $this->from = $this->encoding = '';
+ $this->vars = $this->msg = $this->extra_headers = $this->replyto = $this->from = '';
$this->mail_priority = MAIL_NORMAL_PRIORITY;
}
@@ -221,16 +221,6 @@ class messenger
$this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_SUBJECT']);
}
- if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
- {
- $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($user->lang['ENCODING']);
- $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
- }
- else
- {
- $this->encoding = trim($user->lang['ENCODING']);
- }
-
if ($drop_header)
{
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
@@ -324,7 +314,7 @@ class messenger
foreach ($address_ary as $which_ary)
{
- $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name'], $this->encoding) . '" <' . $which_ary['email'] . '>' : $which_ary['email']);
+ $$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? '"' . mail_encode($which_ary['name']) . '" <' . $which_ary['email'] . '>' : $which_ary['email']);
}
}
@@ -348,7 +338,7 @@ class messenger
$headers .= "MIME-Version: 1.0\n";
$headers .= 'Message-ID: <' . md5(unique_id(time())) . "@" . $config['server_name'] . ">\n";
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s T', time()) . "\n";
- $headers .= "Content-type: text/plain; charset={$this->encoding}\n";
+ $headers .= "Content-type: text/plain; charset=UTF-8\n";
$headers .= "Content-transfer-encoding: 8bit\n";
$headers .= "X-Priority: {$this->mail_priority}\n";
$headers .= 'X-MSMail-Priority: ' . (($this->mail_priority == MAIL_LOW_PRIORITY) ? 'Low' : (($this->mail_priority == MAIL_NORMAL_PRIORITY) ? 'Normal' : 'High')) . "\n";
@@ -357,7 +347,7 @@ class messenger
$headers .= "X-phpBB-Origin: phpbb://" . str_replace(array('http://', 'https://'), array('', ''), generate_board_url()) . "\n";
$headers .= ($this->extra_headers != '') ? $this->extra_headers : '';
- // Send message ... removed $this->encode() from subject for time being
+ // Send message ...
if (!$use_queue)
{
$mail_to = ($to == '') ? 'Undisclosed-Recipient:;' : $to;
@@ -365,7 +355,7 @@ class messenger
if ($config['smtp_delivery'])
{
- $result = smtpmail($this->addresses, $this->subject, wordwrap($this->msg), $err_msg, $this->encoding, $headers);
+ $result = smtpmail($this->addresses, $this->subject, wordwrap($this->msg), $err_msg, $headers);
}
else
{
@@ -387,7 +377,6 @@ class messenger
'addresses' => $this->addresses,
'subject' => $this->subject,
'msg' => $this->msg,
- 'encoding' => $this->encoding,
'headers' => $headers)
);
}
@@ -435,7 +424,6 @@ class messenger
$this->jabber->username = $config['jab_username'];
$this->jabber->password = $config['jab_password'];
$this->jabber->resource = ($config['jab_resource']) ? $config['jab_resource'] : '';
- $this->jabber->encoding = $this->encoding;
if (!$this->jabber->connect())
{
@@ -607,7 +595,7 @@ class queue
$err_msg = '';
$to = (!$to) ? 'Undisclosed-Recipient:;' : $to;
- $result = ($config['smtp_delivery']) ? smtpmail($addresses, $subject, wordwrap($msg), $err_msg, $encoding, $headers) : @$config['email_function_name']($to, $subject, implode("\n", preg_split("/\r?\n/", wordwrap($msg))), $headers);
+ $result = ($config['smtp_delivery']) ? smtpmail($addresses, $subject, wordwrap($msg), $err_msg, $headers) : @$config['email_function_name']($to, $subject, implode("\n", preg_split("/\r?\n/", wordwrap($msg))), $headers);
if (!$result)
{
@@ -739,7 +727,7 @@ class queue
/**
* Replacement or substitute for PHP's mail command
*/
-function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers = '')
+function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
{
global $config, $user;
@@ -794,7 +782,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers
{
foreach ($addresses['to'] as $which_ary)
{
- $mail_to[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']), $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
+ $mail_to[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
$mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>';
}
}
@@ -811,7 +799,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers
{
foreach ($addresses['cc'] as $which_ary)
{
- $mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']), $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
+ $mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name'])) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
$mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>';
}
}
@@ -1363,12 +1351,12 @@ class smtp_class
}
/**
-* Encodes the given string for proper display for this encoding ... nabbed
+* Encodes the given string for proper display in UTF-8 ... nabbed
* from php.net and modified. There is an alternative encoding method which
* may produce less output but it's questionable as to its worth in this
-* scenario IMO
+* scenario.
*/
-function mail_encode($str, $encoding)
+function mail_encode($str)
{
if ($encoding == '')
{
@@ -1377,7 +1365,7 @@ function mail_encode($str, $encoding)
// define start delimimter, end delimiter and spacer
$end = "?=";
- $start = "=?$encoding?B?";
+ $start = "=?UTF-8?B?";
$spacer = "$end\r\n $start";
// determine length of encoded text within chunks and ensure length is even
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4a46dc1062..1518f1d1e5 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1414,7 +1414,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'post_subject' => $subject,
'post_text' => $data['message'],
'post_checksum' => $data['message_md5'],
- 'post_encoding' => $user->lang['ENCODING'],
'post_attachment' => (sizeof($data['attachment_data'])) ? 1 : 0,
'bbcode_bitfield' => $data['bbcode_bitfield'],
'bbcode_uid' => $data['bbcode_uid'],
@@ -1468,7 +1467,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'post_edit_reason' => $data['post_edit_reason'],
'post_edit_user' => (int) $data['post_edit_user'],
'post_checksum' => $data['message_md5'],
- 'post_encoding' => $user->lang['ENCODING'],
'post_attachment' => (sizeof($data['attachment_data'])) ? 1 : 0,
'bbcode_bitfield' => $data['bbcode_bitfield'],
'bbcode_uid' => $data['bbcode_uid'],
@@ -1911,7 +1909,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
trigger_error($error);
}
- $search->index($mode, $data['post_id'], $data['message'], $subject, $user->lang['ENCODING'], $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
+ $search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
}
$db->sql_transaction('commit');
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 94b6368493..1f53dc4511 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1323,7 +1323,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
'enable_sig' => $data['enable_sig'],
'message_subject' => $subject,
'message_text' => $data['message'],
- 'message_encoding' => $user->lang['ENCODING'],
'message_attachment'=> (sizeof($data['attachment_data'])) ? 1 : 0,
'bbcode_bitfield' => $data['bbcode_bitfield'],
'bbcode_uid' => $data['bbcode_uid'],
@@ -1342,7 +1341,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
'enable_sig' => $data['enable_sig'],
'message_subject' => $subject,
'message_text' => $data['message'],
- 'message_encoding' => $user->lang['ENCODING'],
'message_attachment'=> (sizeof($data['attachment_data'])) ? 1 : 0,
'bbcode_bitfield' => $data['bbcode_bitfield'],
'bbcode_uid' => $data['bbcode_uid']
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index fe1047db79..2d298a4108 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -893,7 +893,6 @@ function mcp_fork_topic($topic_ids)
'post_edit_reason' => (string) $row['post_edit_reason'],
'post_edit_user' => (int) $row['post_edit_user'],
'post_checksum' => (string) $row['post_checksum'],
- 'post_encoding' => (string) $row['post_encoding'],
'post_attachment' => (int) $row['post_attachment'],
'bbcode_bitfield' => $row['bbcode_bitfield'],
'bbcode_uid' => (string) $row['bbcode_uid'],
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 4a9a57df34..f4bf0d9eaf 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -561,7 +561,7 @@ class fulltext_mysql extends search_backend
*
* @param string $mode contains the post mode: edit, post, reply, quote ...
*/
- function index($mode, $post_id, &$message, &$subject, $encoding, $poster_id, $forum_id)
+ function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
global $db;
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 90da8abcd1..1dcb599718 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -56,10 +56,6 @@ class fulltext_native extends search_backend
{
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
- if (!function_exists('utf8_strlen'))
- {
- include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
- }
$error = false;
@@ -86,47 +82,89 @@ class fulltext_native extends search_backend
{
global $db, $config, $user;
- // Clean up the query search
+ $keywords = trim($this->cleanup($keywords, '+-|()*'));
+
+ // allow word|word|word without brackets
+ if ((strpos($keywords, ' ') === false) && (strpos($keywords, '|') !== false) && (strpos($keywords, '(') === false))
+ {
+ $keywords = '(' . $keywords . ')';
+ }
+
+ $open_bracket = $space = false;
+ for ($i = 0, $n = strlen($keywords); $i < $n; $i++)
+ {
+ if ($open_bracket !== false)
+ {
+ switch ($keywords[$i])
+ {
+ case ')':
+ if ($open_bracket + 1 == $i)
+ {
+ $keywords[$i - 1] = '|';
+ $keywords[$i] = '|';
+ }
+ $open_bracket = false;
+ break;
+ case '(':
+ $keywords[$i] = '|';
+ break;
+ case '+':
+ case '-':
+ case ' ':
+ $keywords[$i] = '|';
+ break;
+ }
+ }
+ else
+ {
+ switch ($keywords[$i])
+ {
+ case ')':
+ $keywords[$i] = ' ';
+ break;
+ case '(':
+ $open_bracket = $i;
+ break;
+ case '|':
+ $keywords[$i] = ' ';
+ break;
+ case '-':
+ case '+':
+ $space = $keywords[$i];
+ break;
+ case ' ':
+ if ($space !== false)
+ {
+ $keywords[$i] = $space;
+ }
+ break;
+ default:
+ $space = false;
+ }
+ }
+ }
+
+ if ($open_bracket)
+ {
+ $keywords .= ')';
+ }
+
$match = array(
- // Replace multiple spaces with a single space
'# +#',
-
- // Strip spaces after: +-|(
- '#([+\\-|(]) #',
-
- // Strip spaces before: |*)
- '# ([|*)])#',
-
- // Make word|word|word work without brackets
- '#^[^()]*\\|[^()]*$#',
-
- // Remove nested brackets
- '#(\\([^()]*)(?=\\()#',
- '#\\)([^()]*)(?=\\))#',
+ '#\|\|+#',
+ '#(\+|\-)(?:\+|\-)+#',
+ '#\(\|#',
+ '#\|\)#',
);
-
$replace = array(
' ',
+ '|',
'$1',
- '$1',
- '($0)',
- '$1)',
- '$1',
+ '(',
+ ')',
);
- $keywords = trim(preg_replace($match, $replace, $this->cleanup($keywords, '+-|()*', $user->lang['ENCODING'])));
-
- // remove some useless bracket combinations which might be created by the previous regexps
- $keywords = str_replace(array('()', ')|('), array('', '|'), $keywords);
-
- $keywords = preg_replace_callback(
- '#\((?:(?:[^)]*?) )*?[^)]*?\)#',
- create_function(
- '$matches',
- 'return str_replace(" ", "|", $matches[0]);'
- ),
- $keywords
- );
+ $keywords = preg_replace($match, $replace, $keywords);
// $keywords input format: each word seperated by a space, words in a bracket are not seperated
@@ -143,7 +181,7 @@ class fulltext_native extends search_backend
}
// set the search_query which is shown to the user
- $this->search_query = utf8_encode_ncr($keywords, ENT_QUOTES);
+ $this->search_query = $keywords;
$exact_words = array();
preg_match_all('#([^\\s+\\-|*()]+)(?:$|[\\s+\\-|()])#', $keywords, $exact_words);
@@ -224,6 +262,11 @@ class fulltext_native extends search_backend
$mode = 'must_contain';
}
+ if (empty($word))
+ {
+ continue;
+ }
+
// if this is an array of words then retrieve an id for each
if (is_array($word))
{
@@ -255,7 +298,7 @@ class fulltext_native extends search_backend
// throw an error if we shall not ignore unexistant words
else if (!$ignore_no_id)
{
- trigger_error(sprintf($user->lang['WORDS_IN_NO_POST'], utf8_encode_ncr(implode(', ', $word))));
+ trigger_error(sprintf($user->lang['WORDS_IN_NO_POST'], implode(', ', $word)));
}
}
// else we only need one id
@@ -273,7 +316,7 @@ class fulltext_native extends search_backend
// throw an error if we shall not ignore unexistant words
else if (!$ignore_no_id)
{
- trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], utf8_encode_ncr($word)));
+ trigger_error(sprintf($user->lang['WORD_IN_NO_POST'], $word));
}
}
@@ -558,9 +601,16 @@ class fulltext_native extends search_backend
case 'mysql':
case 'mysql4':
case 'mysqli':
- $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
- $is_mysql = true;
- break;
+ // 3.x does not support SQL_CALC_FOUND_ROWS
+ if (SQL_LAYER != 'mysql' || $db->sql_server_info[6] != '3')
+ {
+ $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
+ $is_mysql = true;
+
+ // that's everything for MySQL >= 4.0
+ break;
+ }
+ // no break for MySQL 3.x
case 'sqlite':
$sql_array_count['SELECT'] = ($type == 'posts') ? 'DISTINCT p.post_id' : 'DISTINCT p.topic_id';
@@ -871,7 +921,7 @@ class fulltext_native extends search_backend
*
* NOTE: duplicates are NOT removed from the return array
*
- * @param string $text Text to split, encoded in user's encoding
+ * @param string $text Text to split, encoded in UTF-8
* @return array Array of UTF-8 words
*
* @access private
@@ -899,7 +949,7 @@ class fulltext_native extends search_backend
/**
* Clean up the string, remove HTML tags, remove BBCodes
*/
- $word = strtok($this->cleanup(preg_replace($match, ' ', strip_tags($text)), -1, $user->lang['ENCODING']), ' ');
+ $word = strtok($this->cleanup(preg_replace($match, ' ', strip_tags($text)), -1), ' ');
while (isset($word[0]))
{
@@ -952,13 +1002,12 @@ class fulltext_native extends search_backend
* @param int $post_id The id of the post which is modified/created
* @param string $message New or updated post content
* @param string $subject New or updated post subject
- * @param string $encoding The post content's encoding
* @param int $poster_id Post author's user id
* @param int $forum_id The id of the forum in which the post is located
*
* @access public
*/
- function index($mode, $post_id, &$message, &$subject, $encoding, $poster_id, $forum_id)
+ function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
global $config, $db, $user;
@@ -1103,22 +1152,6 @@ class fulltext_native extends search_backend
unset($cur_words);
}
- /**
- * Used by index() to sort strings by string length, longest first
- */
- function strlencmp($a, $b)
- {
- $len_a = strlen($a);
- $len_b = strlen($b);
-
- if ($len_a == $len_b)
- {
- return 0;
- }
-
- return ($len_a > $len_b) ? -1 : 1;
- }
-
/**
* Removes entries from the wordmatch table for the specified post_ids
*/
@@ -1278,7 +1311,7 @@ class fulltext_native extends search_backend
* @param string $encoding Text encoding
* @return string Cleaned up text, only alphanumeric chars are left
*/
- function cleanup($text, $allowed_chars = null, $encoding = 'iso-8859-1')
+ function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
{
global $phpbb_root_path, $phpEx;
static $conv = array(), $conv_loaded = array();
@@ -1537,7 +1570,7 @@ class fulltext_native extends search_backend
// These are fields required in the config table
return array(
'tpl' => $tpl,
- 'config' => array('fulltext_native_load_upd' => 'bool', 'fulltext_native_min_chars' => 'integer:0:252', 'fulltext_native_max_chars' => 'integer:0:252')
+ 'config' => array('fulltext_native_load_upd' => 'bool', 'fulltext_native_min_chars' => 'integer:0:252', 'fulltext_native_max_chars' => 'integer:0:255')
);
}
}
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index ff8df44148..60ed5dc360 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -61,7 +61,7 @@ class ucp_prefs
$var_ary = array(
'dateformat' => array('string', false, 3, 30),
- 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
+ 'lang' => array('match', false, '#^[a-z0-9_\-]{2,}$#i'),
'tz' => array('num', false, -14, 14),
);
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 2f7c8de69a..a4de83ab0f 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -741,7 +741,7 @@ function utf8_recode($string, $encoding)
*/
function utf8_encode_ncr($text)
{
- return preg_replace_callback('#[\\xC2-\\xF4][\\x80-\\xBF]+#', 'utf8_encode_ncr_callback', $text);
+ return preg_replace_callback('#[\\xC2-\\xF4][\\x80-\\xBF]?[\\x80-\\xBF]?[\\x80-\\xBF]+#', 'utf8_encode_ncr_callback', $text);
}
/**
diff --git a/phpBB/index.php b/phpBB/index.php
index af72cc0be1..442a94c34c 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -54,7 +54,7 @@ $db->sql_freeresult($result);
$birthday_list = '';
if ($config['load_birthdays'])
{
- $now = getdate(time() + $user->timezone + $user->dst);
+ $now = getdate(time() + $user->timezone + $user->dst - (date('H', time()) - gmdate('H', time())) * 3600);
$sql = 'SELECT user_id, username, user_colour, user_birthday
FROM ' . USERS_TABLE . "
WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 6668416c7d..ee8ec90fdf 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -320,16 +320,13 @@ class module
'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
- 'S_CONTENT_ENCODING' => $lang['ENCODING'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
)
);
- if (!empty($lang['ENCODING']))
- {
- header('Content-type: text/html; charset: ' . $lang['ENCODING']);
- }
+ header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 10fb3ea574..25dd4dcf33 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -640,7 +640,6 @@ CREATE TABLE phpbb_posts (
post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
post_text BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
post_checksum VARCHAR(32) DEFAULT '' NOT NULL,
- post_encoding VARCHAR(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment INTEGER DEFAULT 0 NOT NULL,
bbcode_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
@@ -689,7 +688,6 @@ CREATE TABLE phpbb_privmsgs (
message_text BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
message_edit_reason BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
message_edit_user INTEGER DEFAULT 0 NOT NULL,
- message_encoding VARCHAR(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment INTEGER DEFAULT 0 NOT NULL,
bbcode_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 64652762d5..5f2f889e57 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -751,7 +751,6 @@ CREATE TABLE [phpbb_posts] (
[post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
[post_text] [ntext] DEFAULT ('') NOT NULL ,
[post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
- [post_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL ,
[post_attachment] [int] DEFAULT (0) NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
@@ -811,7 +810,6 @@ CREATE TABLE [phpbb_privmsgs] (
[message_text] [ntext] DEFAULT ('') NOT NULL ,
[message_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
[message_edit_user] [int] DEFAULT (0) NOT NULL ,
- [message_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL ,
[message_attachment] [int] DEFAULT (0) NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index d71cf7c5d9..f2be2243a2 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -438,7 +438,6 @@ CREATE TABLE phpbb_posts (
post_subject text DEFAULT '' NOT NULL,
post_text mediumtext DEFAULT '' NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
- post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
@@ -475,7 +474,6 @@ CREATE TABLE phpbb_privmsgs (
message_text mediumtext DEFAULT '' NOT NULL,
message_edit_reason text DEFAULT '' NOT NULL,
message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 8fda313642..593980ea9b 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -438,7 +438,6 @@ CREATE TABLE phpbb_posts (
post_subject text DEFAULT '' NOT NULL,
post_text mediumtext DEFAULT '' NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
- post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
@@ -475,7 +474,6 @@ CREATE TABLE phpbb_privmsgs (
message_text mediumtext DEFAULT '' NOT NULL,
message_edit_reason text DEFAULT '' NOT NULL,
message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 74c37acacd..adc86f7b26 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -848,7 +848,6 @@ CREATE TABLE phpbb_posts (
post_subject varchar2(1000) DEFAULT '' ,
post_text clob DEFAULT '' ,
post_checksum varchar2(32) DEFAULT '' ,
- post_encoding varchar2(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment number(1) DEFAULT '0' NOT NULL,
bbcode_bitfield varchar2(252) DEFAULT '' ,
bbcode_uid varchar2(5) DEFAULT '' ,
@@ -911,7 +910,6 @@ CREATE TABLE phpbb_privmsgs (
message_text clob DEFAULT '' ,
message_edit_reason varchar2(3000) DEFAULT '' ,
message_edit_user number(8) DEFAULT '0' NOT NULL,
- message_encoding varchar2(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment number(1) DEFAULT '0' NOT NULL,
bbcode_bitfield varchar2(252) DEFAULT '' ,
bbcode_uid varchar2(5) DEFAULT '' ,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 147df5875b..a4e71e8acf 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -606,7 +606,6 @@ CREATE TABLE phpbb_posts (
post_subject varchar(1000) DEFAULT '' NOT NULL,
post_text TEXT DEFAULT '' NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
- post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0),
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
@@ -647,7 +646,6 @@ CREATE TABLE phpbb_privmsgs (
message_text TEXT DEFAULT '' NOT NULL,
message_edit_reason varchar(3000) DEFAULT '' NOT NULL,
message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0),
- message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0),
bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
bbcode_uid varchar(5) DEFAULT '' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 6750113dce..adbffb4d0e 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -425,7 +425,6 @@ CREATE TABLE phpbb_posts (
post_subject text(65535) NOT NULL DEFAULT '',
post_text mediumtext(16777215) NOT NULL DEFAULT '',
post_checksum varchar(32) NOT NULL DEFAULT '',
- post_encoding varchar(20) NOT NULL DEFAULT 'iso-8859-1',
post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_bitfield varchar(252) NOT NULL DEFAULT '',
bbcode_uid varchar(5) NOT NULL DEFAULT '',
@@ -461,7 +460,6 @@ CREATE TABLE phpbb_privmsgs (
message_text mediumtext(16777215) NOT NULL DEFAULT '',
message_edit_reason text(65535) NOT NULL DEFAULT '',
message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
- message_encoding varchar(20) NOT NULL DEFAULT 'iso-8859-1',
message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_bitfield varchar(252) NOT NULL DEFAULT '',
bbcode_uid varchar(5) NOT NULL DEFAULT '',
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 407de35837..2b25e0b0aa 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php
index 60b1035028..cc9d184d57 100644
--- a/phpBB/language/en/acp/ban.php
+++ b/phpBB/language/en/acp/ban.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index 73f061c1db..097909b9a4 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index 3c72dc688b..89848d4b24 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 03c02b97fc..1e8dfa3f59 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php
index 9aa8c06b9a..e735cd8dae 100644
--- a/phpBB/language/en/acp/language.php
+++ b/phpBB/language/en/acp/language.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php
index b5055570c1..0eefb59753 100644
--- a/phpBB/language/en/acp/modules.php
+++ b/phpBB/language/en/acp/modules.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
index 07ee227486..089e157707 100644
--- a/phpBB/language/en/acp/permissions.php
+++ b/phpBB/language/en/acp/permissions.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index 8577210862..4d550965a5 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -19,7 +19,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 457e65444e..a6c1f0aad8 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index cf40fd1e3d..229b93591a 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php
index 71f4169fbb..0788eb4fdc 100644
--- a/phpBB/language/en/acp/prune.php
+++ b/phpBB/language/en/acp/prune.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index ab6e55a0d4..9766729f35 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index abf3685cf0..9b875d28ab 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
index 3f36325ab5..70e1520e0b 100644
--- a/phpBB/language/en/acp/users.php
+++ b/phpBB/language/en/acp/users.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index b0fb089d2b..717064b936 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -20,6 +20,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
@@ -30,7 +32,6 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'TRANSLATION_INFO' => '',
- 'ENCODING' => 'iso-8859-1',
'DIRECTION' => 'ltr',
'LEFT' => 'left',
'RIGHT' => 'right',
diff --git a/phpBB/language/en/email/admin_activate.txt b/phpBB/language/en/email/admin_activate.txt
index ea0af53880..04c8275491 100644
--- a/phpBB/language/en/email/admin_activate.txt
+++ b/phpBB/language/en/email/admin_activate.txt
@@ -1,5 +1,4 @@
Subject: New user account
-Charset: iso-8859-1
Hello,
diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt
index 5fd5592f7c..b778496258 100644
--- a/phpBB/language/en/email/admin_send_email.txt
+++ b/phpBB/language/en/email/admin_send_email.txt
@@ -1,4 +1,3 @@
-Charset: iso-8859-1
The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
diff --git a/phpBB/language/en/email/admin_welcome_activated.txt b/phpBB/language/en/email/admin_welcome_activated.txt
index 3b7aa48362..abd1391df8 100644
--- a/phpBB/language/en/email/admin_welcome_activated.txt
+++ b/phpBB/language/en/email/admin_welcome_activated.txt
@@ -1,5 +1,4 @@
Subject: Account Activated
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt
index 905e71696b..a9cd4e5db0 100644
--- a/phpBB/language/en/email/admin_welcome_inactive.txt
+++ b/phpBB/language/en/email/admin_welcome_inactive.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt
index d65367e31b..8c8b8795ce 100644
--- a/phpBB/language/en/email/coppa_resend_inactive.txt
+++ b/phpBB/language/en/email/coppa_resend_inactive.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt
index 4aac4ce5bd..71431a2712 100644
--- a/phpBB/language/en/email/coppa_welcome_inactive.txt
+++ b/phpBB/language/en/email/coppa_welcome_inactive.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt
index 0543165627..4f65f17566 100644
--- a/phpBB/language/en/email/email_notify.txt
+++ b/phpBB/language/en/email/email_notify.txt
@@ -1,5 +1,4 @@
Subject: {SITENAME} - Email a friend
-Charset: iso-8859-1
Hello {TO_USERNAME},
diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt
index af9e9e3bab..e69046f921 100644
--- a/phpBB/language/en/email/forum_notify.txt
+++ b/phpBB/language/en/email/forum_notify.txt
@@ -1,5 +1,4 @@
Subject: Forum Post Notification - {FORUM_NAME}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/group_added.txt b/phpBB/language/en/email/group_added.txt
index 4f07fdb9cd..e2a6d22ec0 100644
--- a/phpBB/language/en/email/group_added.txt
+++ b/phpBB/language/en/email/group_added.txt
@@ -1,5 +1,4 @@
Subject: You have been added to this usergroup
-Charset: iso-8859-1
Congratulations,
diff --git a/phpBB/language/en/email/group_approved.txt b/phpBB/language/en/email/group_approved.txt
index b2134f86f9..bc31d88b3e 100644
--- a/phpBB/language/en/email/group_approved.txt
+++ b/phpBB/language/en/email/group_approved.txt
@@ -1,5 +1,4 @@
Subject: Your request has been approved
-Charset: iso-8859-1
Congratulations,
diff --git a/phpBB/language/en/email/group_request.txt b/phpBB/language/en/email/group_request.txt
index 7b51823067..5b6bbcb33f 100644
--- a/phpBB/language/en/email/group_request.txt
+++ b/phpBB/language/en/email/group_request.txt
@@ -1,5 +1,4 @@
Subject: A request to join your group has been made
-Charset: iso-8859-1
Dear {USERNAME},
diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt
index b69e9189ae..cb6944ceef 100644
--- a/phpBB/language/en/email/installed.txt
+++ b/phpBB/language/en/email/installed.txt
@@ -1,5 +1,4 @@
Subject: phpBB Installed
-Charset: iso-8859-1
Congratulations,
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index 93c62fe9e2..3a7dd72a11 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -1,5 +1,4 @@
Subject: New Topic Notification - {FORUM_NAME}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/post_approved.txt b/phpBB/language/en/email/post_approved.txt
index 3d7c4902c5..5b39c9a236 100644
--- a/phpBB/language/en/email/post_approved.txt
+++ b/phpBB/language/en/email/post_approved.txt
@@ -1,5 +1,4 @@
Subject: Post Approved - {POST_SUBJECT}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/post_disapproved.txt b/phpBB/language/en/email/post_disapproved.txt
index c6055cb28e..6004abd0df 100644
--- a/phpBB/language/en/email/post_disapproved.txt
+++ b/phpBB/language/en/email/post_disapproved.txt
@@ -1,5 +1,4 @@
Subject: Post Disapproved - {POST_SUBJECT}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/privmsg_notify.txt b/phpBB/language/en/email/privmsg_notify.txt
index 7dae75ecc9..731a7a3ecb 100644
--- a/phpBB/language/en/email/privmsg_notify.txt
+++ b/phpBB/language/en/email/privmsg_notify.txt
@@ -1,5 +1,4 @@
Subject: New Private Message has arrived
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt
index 00dcde1e46..5dd8fd0e9c 100644
--- a/phpBB/language/en/email/profile_send_email.txt
+++ b/phpBB/language/en/email/profile_send_email.txt
@@ -1,4 +1,3 @@
-Charset: iso-8859-1
Hello {TO_USERNAME},
diff --git a/phpBB/language/en/email/profile_send_im.txt b/phpBB/language/en/email/profile_send_im.txt
index 5220bdd906..d2fea692a0 100644
--- a/phpBB/language/en/email/profile_send_im.txt
+++ b/phpBB/language/en/email/profile_send_im.txt
@@ -1,4 +1,3 @@
-Charset: iso-8859-1
Hello {TO_USERNAME},
diff --git a/phpBB/language/en/email/report_closed.txt b/phpBB/language/en/email/report_closed.txt
index 7da2026fb3..9880aaadeb 100644
--- a/phpBB/language/en/email/report_closed.txt
+++ b/phpBB/language/en/email/report_closed.txt
@@ -1,5 +1,4 @@
Subject: Report Closed - {POST_SUBJECT}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/report_deleted.txt b/phpBB/language/en/email/report_deleted.txt
index 9fed2a590f..9a851ff980 100644
--- a/phpBB/language/en/email/report_deleted.txt
+++ b/phpBB/language/en/email/report_deleted.txt
@@ -1,5 +1,4 @@
Subject: Report Closed - {POST_SUBJECT}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/topic_approved.txt b/phpBB/language/en/email/topic_approved.txt
index 28927b5a29..371017fb80 100644
--- a/phpBB/language/en/email/topic_approved.txt
+++ b/phpBB/language/en/email/topic_approved.txt
@@ -1,5 +1,4 @@
Subject: Topic Approved - {TOPIC_TITLE}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/topic_disapproved.txt b/phpBB/language/en/email/topic_disapproved.txt
index 52c1578861..52aea1a60b 100644
--- a/phpBB/language/en/email/topic_disapproved.txt
+++ b/phpBB/language/en/email/topic_disapproved.txt
@@ -1,5 +1,4 @@
Subject: Topic Disapproved - {TOPIC_TITLE}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt
index 274fe0995a..d5ea583ebe 100644
--- a/phpBB/language/en/email/topic_notify.txt
+++ b/phpBB/language/en/email/topic_notify.txt
@@ -1,5 +1,4 @@
Subject: Topic Reply Notification - {TOPIC_TITLE}
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/user_activate.txt b/phpBB/language/en/email/user_activate.txt
index 0adeb5bff2..7d7960c4c5 100644
--- a/phpBB/language/en/email/user_activate.txt
+++ b/phpBB/language/en/email/user_activate.txt
@@ -1,5 +1,4 @@
Subject: Reactivate your account
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/user_activate_inactive.txt b/phpBB/language/en/email/user_activate_inactive.txt
index 439437940f..cbef5c780c 100644
--- a/phpBB/language/en/email/user_activate_inactive.txt
+++ b/phpBB/language/en/email/user_activate_inactive.txt
@@ -1,5 +1,4 @@
Subject: Your account has been deactivated
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/user_activate_passwd.txt b/phpBB/language/en/email/user_activate_passwd.txt
index 0c2adc82ec..019ee963f7 100644
--- a/phpBB/language/en/email/user_activate_passwd.txt
+++ b/phpBB/language/en/email/user_activate_passwd.txt
@@ -1,5 +1,4 @@
Subject: New password activation
-Charset: iso-8859-1
Hello {USERNAME}
diff --git a/phpBB/language/en/email/user_remind_inactive.txt b/phpBB/language/en/email/user_remind_inactive.txt
index be0cf3e76b..806f9f3a63 100644
--- a/phpBB/language/en/email/user_remind_inactive.txt
+++ b/phpBB/language/en/email/user_remind_inactive.txt
@@ -1,5 +1,4 @@
Subject: Inactive account reminder
-Charset: iso-8859-1
Hello {USERNAME},
diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt
index bc4dd02d2d..29393323a4 100644
--- a/phpBB/language/en/email/user_resend_inactive.txt
+++ b/phpBB/language/en/email/user_resend_inactive.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt
index 42dc56df3b..963be09048 100644
--- a/phpBB/language/en/email/user_welcome.txt
+++ b/phpBB/language/en/email/user_welcome.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt
index 6ece2d4faf..726abf4d60 100644
--- a/phpBB/language/en/email/user_welcome_inactive.txt
+++ b/phpBB/language/en/email/user_welcome_inactive.txt
@@ -1,5 +1,4 @@
Subject: Welcome to {SITENAME} Forums
-Charset: iso-8859-1
{WELCOME_MSG}
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
index 07b566f3fe..8bdf31168c 100644
--- a/phpBB/language/en/groups.php
+++ b/phpBB/language/en/groups.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
index aa6f8d8463..afdd8226f6 100644
--- a/phpBB/language/en/help_bbcode.php
+++ b/phpBB/language/en/help_bbcode.php
@@ -13,7 +13,9 @@
/**
*/
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index 31d9a8f5fd..e90db8a1de 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -13,7 +13,9 @@
/**
*/
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 90092804f7..6ffb4d9a2b 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -20,6 +20,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index 46c9b90418..bdb64075cc 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -20,6 +20,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index ec3f044785..08cc977111 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 05d58bb4b3..7623583d31 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index 569c40a53d..b8aa018380 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index db73d763e4..cf71cfb996 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -20,6 +20,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php
index 99d2d446d6..f995aa4d78 100644
--- a/phpBB/language/en/viewforum.php
+++ b/phpBB/language/en/viewforum.php
@@ -18,7 +18,9 @@ if (empty($lang) || !is_array($lang))
$lang = array();
}
-// DEVELOPERS PLEASE NOTE
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index c4ab86796a..3f37d1b265 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -20,6 +20,8 @@ if (empty($lang) || !is_array($lang))
// DEVELOPERS PLEASE NOTE
//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
@@ -75,7 +77,6 @@ $lang = array_merge($lang, array(
'POLL_ENDED_AT' => 'Poll ended at %s',
'POLL_RUN_TILL' => 'Poll runs till %s',
'POLL_VOTED_OPTION' => 'You voted for this option',
- 'POST_ENCODING' => 'This post by %1$s was made in a character set different to yours. %2$sView this post in its proper encoding%3$s.',
'PRINT_TOPIC' => 'Print view',
'QUICK_MOD' => 'Quick-mod tools',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 63d1966623..9a0a7be418 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1333,7 +1333,7 @@ function show_profile($data)
if ($bday_year)
{
- $now = getdate(time() + $user->timezone + $user->dst);
+ $now = getdate(time() + $user->timezone + $user->dst - (date('H', time()) - gmdate('H', time())) * 3600);
$diff = $now['mon'] - $bday_month;
if ($diff == 0)
diff --git a/phpBB/search.php b/phpBB/search.php
index 7c82549b35..933072e4de 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -254,24 +254,23 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$sort_key = 't';
$sort_dir = 'd';
$sort_by_sql['t'] = 't.topic_last_post_time';
- $sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
if (!$sort_days)
{
- $sort_days = 1;
+ $sort_days = 3;
}
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
- $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ $s_sort_key = $s_sort_dir = '';
+ $u_sort_param = 'st=' . $sort_days;
$last_post_time = (time() - ($sort_days * 24 * 3600));
- $sql = 'SELECT DISTINCT t.topic_last_post_time, t.topic_id
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
- WHERE p.post_time > $last_post_time
+ $sql = 'SELECT t.topic_last_post_time, t.topic_id
+ FROM ' . TOPICS_TABLE . " t
+ WHERE t.topic_last_post_time > $last_post_time
AND t.topic_moved_id = 0
- AND p.topic_id = t.topic_id
- $m_approve_fid_sql
- " . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . '
+ " . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . '
ORDER BY t.topic_last_post_time DESC';
$field = 'topic_id';
break;
@@ -286,6 +285,15 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$sort_join = ($sort_key == 'f') ? FORUMS_TABLE . ' f, ' : '';
$sql_sort = ($sort_key == 'f') ? ' AND f.forum_id = p.forum_id ' . $sql_sort : $sql_sort;
+ if ($sort_days)
+ {
+ $last_post_time = 'AND p.post_time > ' . (time() - ($sort_days * 24 * 3600));
+ }
+ else
+ {
+ $last_post_time = '';
+ }
+
if ($show_results == 'posts')
{
if ($sort_key == 'a')
@@ -298,6 +306,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
WHERE t.topic_replies = 0
AND p.topic_id = t.topic_id
+ $last_post_time
$m_approve_fid_sql
" . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
@@ -310,6 +319,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
WHERE t.topic_replies = 0
AND t.topic_moved_id = 0
AND p.topic_id = t.topic_id
+ $last_post_time
$m_approve_fid_sql
" . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
@@ -325,10 +335,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$sort_by_sql['t'] = ($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time';
$sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
- if (!$sort_days)
- {
- $sort_days = 1;
- }
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
$s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
@@ -935,6 +941,11 @@ while ($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result);
unset($pad_store);
+if (!$s_forums)
+{
+ trigger_error($user->lang['NO_SEARCH']);
+}
+
// Number of chars returned
$s_characters = '' . $user->lang['ALL_AVAILABLE'] . ' ';
$s_characters .= '0 ';
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 4236634522..9050f3109e 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -133,12 +133,6 @@
{postrow.L_IGNORE_POST}
-
- {postrow.FORCE_ENCODING}
-
-
-
-
{postrow.POSTER_NAME}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 62a5b822f9..a22aedf651 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -804,7 +804,7 @@ else
// Container for user details, only process once
$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
$has_attachments = $display_notice = false;
-$bbcode_bitfield = $force_encoding = '';
+$bbcode_bitfield = '';
$i = $i_total = 0;
// Go ahead and pull all data for this topic
@@ -862,7 +862,7 @@ $sql = $db->sql_build_query('SELECT', array(
$result = $db->sql_query($sql);
-$now = getdate(time() + $user->timezone + $user->dst);
+$now = getdate(time() + $user->timezone + $user->dst - (date('H', time()) - gmdate('H', time())) * 3600);
// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
@@ -922,7 +922,6 @@ while ($row = $db->sql_fetchrow($result))
'post_approved' => $row['post_approved'],
'post_reported' => $row['post_reported'],
'post_text' => $row['post_text'],
- 'post_encoding' => $row['post_encoding'],
'bbcode_uid' => $row['bbcode_uid'],
'bbcode_bitfield' => $row['bbcode_bitfield'],
'enable_smilies' => $row['enable_smilies'],
@@ -1238,10 +1237,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
continue;
}
- else if ($row['post_encoding'] != $user->lang['ENCODING'] && $view == 'encoding' && $post_id == $row['post_id'])
- {
- $force_encoding = $row['post_encoding'];
- }
// End signature parsing, only if needed
if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed']))
@@ -1398,8 +1393,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
- 'FORCE_ENCODING' => ($row['post_encoding'] != $user->lang['ENCODING']) ? sprintf($user->lang['POST_ENCODING'], $row['poster'], '', ' ') : '',
-
'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '',
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '',
@@ -1528,12 +1521,6 @@ else if (!$all_marked_read)
}
}
-// Change encoding if appropriate
-if ($force_encoding != '')
-{
- $user->lang['ENCODING'] = $force_encoding;
-}
-
// We overwrite $_REQUEST['f'] if there is no forum specified
// to be able to display the correct online list.
// One downside is that the user currently viewing this topic/post is not taken into account.
From b7dab9cdab72b6463121856d26dcfea0eb0df376 Mon Sep 17 00:00:00 2001
From: David M
Date: Tue, 19 Sep 2006 04:50:02 +0000
Subject: [PATCH 093/291] - Oracle now works with large amounts of text - MSSQL
now works :P (sans UTF-8 support) - The current schema files work well enough
to install, etc. but must be tightened. Will get to it when I get some
time...
git-svn-id: file:///svn/phpbb/trunk@6381 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/develop/create_schema_files.php | 32 ++--
phpBB/includes/db/mssql.php | 3 +
phpBB/includes/db/oracle.php | 58 ++++++-
phpBB/install/install_install.php | 2 +-
phpBB/install/schemas/mssql_schema.sql | 206 ++++++++++++-------------
5 files changed, 180 insertions(+), 121 deletions(-)
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 98a4e14740..c655a2245a 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -73,9 +73,9 @@ $dbms_type_map = array(
'MTEXT_UNI' => 'mediumtext',
'TIMESTAMP' => 'int(11) UNSIGNED',
'DECIMAL' => 'decimal(5,2)',
- 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI' => 'text',
'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')),
- 'VCHAR_CI' => 'varchar(252)',
+ 'VCHAR_CI' => 'text',
'VARBINARY' => 'varbinary(255)',
),
@@ -121,16 +121,16 @@ $dbms_type_map = array(
'STEXT' => '[varchar] (3000)',
'TEXT' => '[varchar] (8000)',
'MTEXT' => '[text]',
- 'XSTEXT_UNI'=> '[nvarchar] (1000)',
- 'STEXT_UNI' => '[nvarchar] (3000)',
- 'TEXT_UNI' => '[nvarchar] (8000)',
- 'MTEXT_UNI' => '[ntext]',
+ 'XSTEXT_UNI'=> '[text]',
+ 'STEXT_UNI' => '[text]',
+ 'TEXT_UNI' => '[text]',
+ 'MTEXT_UNI' => '[text]',
'TIMESTAMP' => '[int]',
'DECIMAL' => '[float]',
- 'VCHAR_UNI' => '[nvarchar] (255)',
- 'VCHAR_UNI:'=> '[nvarchar] (%d)',
- 'VCHAR_CI' => '[nvarchar] (252)',
- 'VARBINARY' => '[varbinary] (255)',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (252)',
+ 'VARBINARY' => '[varchar] (255)',
),
'oracle' => array(
@@ -863,12 +863,12 @@ function get_schema_struct()
'bbcode_tag' => array('VCHAR:16', ''),
'bbcode_helpline' => array('VCHAR', ''),
'display_on_posting' => array('BOOL', 0),
- 'bbcode_match' => array('TEXT', ''),
- 'bbcode_tpl' => array('MTEXT', ''),
- 'first_pass_match' => array('MTEXT', ''),
- 'first_pass_replace' => array('MTEXT', ''),
- 'second_pass_match' => array('MTEXT', ''),
- 'second_pass_replace' => array('MTEXT', ''),
+ 'bbcode_match' => array('TEXT_UNI', ''),
+ 'bbcode_tpl' => array('MTEXT_UNI', ''),
+ 'first_pass_match' => array('MTEXT_UNI', ''),
+ 'first_pass_replace' => array('MTEXT_UNI', ''),
+ 'second_pass_match' => array('MTEXT_UNI', ''),
+ 'second_pass_replace' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'bbcode_id',
'KEYS' => array(
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index 11548998ba..52f442f4fa 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -122,6 +122,9 @@ class dbal_mssql extends dbal
$this->sql_report('start', $query);
}
+ // For now, MSSQL has no real UTF-8 support
+ $query = utf8_decode($query);
+
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index b988bc6a3c..1d14d7b793 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -116,7 +116,63 @@ class dbal_oracle extends dbal
$in_transaction = true;
}
+ $array = array();
+
+ // We overcome Oracle's 4000 char limit by binding vars
+ if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\(([^()]+)\\)$/', $query, $regs))
+ {
+ if (strlen($regs[3]) > 4000)
+ {
+ $cols = explode(', ', $regs[2]);
+ $vals = explode(', ', $regs[3]);
+ foreach ($vals as $key => $value)
+ {
+ if (strlen($value) > 4002) // check to see if this thing is greater than the max + 'x2
+ {
+ $vals[$key] = ':' . strtoupper($cols[$key]);
+ $array[$vals[$key]] = substr($value, 1, -1);
+ }
+ }
+ $query = $regs[1] . '(' . implode(', ', $cols) . ') VALUES (' . implode(', ', $vals) . ')';
+ }
+ }
+ else if (preg_match('/^(UPDATE.*?)SET (.*)(\\sWHERE.*)$/s', $query, $regs))
+ {
+ if (strlen($regs[2]) > 4000)
+ {
+ $args = explode(', ', $regs[2]);
+ $cols = array();
+ foreach ($args as $value)
+ {
+ $temp_array = explode('=', $value);
+ $cols[$temp_array[0]] = $temp_array[1];
+ }
+
+ foreach ($cols as $col => $val)
+ {
+ if (strlen($val) > 4003) // check to see if this thing is greater than the max + 'x2 + a space
+ {
+ $cols[$col] = ' :' . strtoupper(rtrim($col));
+ $array[ltrim($cols[$col])] = substr(trim($val), 2, -1);
+ }
+ }
+
+ $art = array();
+ foreach ($cols as $col => $val)
+ {
+ $art[] = $col . '=' . $val;
+ }
+ $query = $regs[1] . 'SET ' . implode(', ', $art) . $regs[3];
+ }
+ }
+
$this->query_result = @ociparse($this->db_connect_id, $query);
+
+ foreach ($array as $key => $value)
+ {
+ @ocibindbyname($this->query_result, $key, $array[$key], -1);
+ }
+
$success = @ociexecute($this->query_result, OCI_DEFAULT);
if (!$success)
@@ -383,7 +439,7 @@ class dbal_oracle extends dbal
{
$query = 'SELECT ' . $tablename[1] . '_seq.currval FROM DUAL';
$stmt = @ociparse($this->db_connect_id, $query);
- @ociexecute($stmt, OCI_DEFAULT );
+ @ociexecute($stmt, OCI_DEFAULT);
$temp_result = @ocifetchinto($stmt, $temp_array, OCI_ASSOC + OCI_RETURN_NULLS);
@ocifreestatement($stmt);
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 9bc0e78bba..aec12abb5a 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1774,7 +1774,7 @@ class install_install extends module
$sql = "SELECT *
FROM NLS_DATABASE_PARAMETERS
WHERE PARAMETER = 'NLS_RDBMS_VERSION'
- OR PARAMETER = 'NLS_CHARACTERSET';";
+ OR PARAMETER = 'NLS_CHARACTERSET'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 5f2f889e57..0b9b55824d 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -21,13 +21,13 @@ CREATE TABLE [phpbb_attachments] (
[physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
[real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
[download_count] [int] DEFAULT (0) NOT NULL ,
- [attach_comment] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [attach_comment] [text] DEFAULT ('') NOT NULL ,
[extension] [varchar] (100) DEFAULT ('') NOT NULL ,
[mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
[filesize] [int] DEFAULT (0) NOT NULL ,
[filetime] [int] DEFAULT (0) NOT NULL ,
[thumbnail] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
@@ -100,11 +100,11 @@ GO
*/
CREATE TABLE [phpbb_acl_roles] (
[role_id] [int] IDENTITY (1, 1) NOT NULL ,
- [role_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [role_description] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [role_description] [text] DEFAULT ('') NOT NULL ,
[role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
[role_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
@@ -166,7 +166,7 @@ CREATE TABLE [phpbb_banlist] (
[ban_id] [int] IDENTITY (1, 1) NOT NULL ,
[ban_userid] [int] DEFAULT (0) NOT NULL ,
[ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [ban_email] [nvarchar] (100) DEFAULT ('') NOT NULL ,
+ [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
[ban_start] [int] DEFAULT (0) NOT NULL ,
[ban_end] [int] DEFAULT (0) NOT NULL ,
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
@@ -203,7 +203,7 @@ CREATE TABLE [phpbb_bbcodes] (
[bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
[bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
[display_on_posting] [int] DEFAULT (0) NOT NULL ,
- [bbcode_match] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [bbcode_match] [text] DEFAULT ('') NOT NULL ,
[bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
[first_pass_match] [text] DEFAULT ('') NOT NULL ,
[first_pass_replace] [text] DEFAULT ('') NOT NULL ,
@@ -246,11 +246,11 @@ GO
CREATE TABLE [phpbb_bots] (
[bot_id] [int] IDENTITY (1, 1) NOT NULL ,
[bot_active] [int] DEFAULT (1) NOT NULL ,
- [bot_name] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
+ [bot_name] [text] DEFAULT ('') NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
[bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
[bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
@@ -313,7 +313,7 @@ GO
*/
CREATE TABLE [phpbb_disallow] (
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
- [disallow_username] [nvarchar] (252) DEFAULT ('') NOT NULL
+ [disallow_username] [varchar] (252) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -334,9 +334,9 @@ CREATE TABLE [phpbb_drafts] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[forum_id] [int] DEFAULT (0) NOT NULL ,
[save_time] [int] DEFAULT (0) NOT NULL ,
- [draft_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
- [draft_message] [ntext] DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [draft_subject] [text] DEFAULT ('') NOT NULL ,
+ [draft_message] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
@@ -373,7 +373,7 @@ GO
*/
CREATE TABLE [phpbb_extension_groups] (
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[cat_id] [int] DEFAULT (0) NOT NULL ,
[allow_group] [int] DEFAULT (0) NOT NULL ,
[download_mode] [int] DEFAULT (1) NOT NULL ,
@@ -401,17 +401,17 @@ CREATE TABLE [phpbb_forums] (
[left_id] [int] DEFAULT (0) NOT NULL ,
[right_id] [int] DEFAULT (0) NOT NULL ,
[forum_parents] [text] DEFAULT ('') NOT NULL ,
- [forum_name] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
- [forum_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [forum_name] [text] DEFAULT ('') NOT NULL ,
+ [forum_desc] [text] DEFAULT ('') NOT NULL ,
[forum_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[forum_desc_options] [int] DEFAULT (0) NOT NULL ,
[forum_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
- [forum_link] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [forum_password] [nvarchar] (40) DEFAULT ('') NOT NULL ,
+ [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
[forum_style] [int] DEFAULT (0) NOT NULL ,
[forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_rules] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
- [forum_rules_link] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules] [text] DEFAULT ('') NOT NULL ,
+ [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_rules_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[forum_rules_options] [int] DEFAULT (0) NOT NULL ,
[forum_rules_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
@@ -423,9 +423,9 @@ CREATE TABLE [phpbb_forums] (
[forum_topics_real] [int] DEFAULT (0) NOT NULL ,
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [forum_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [forum_last_post_subject] [text] DEFAULT ('') NOT NULL ,
[forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
- [forum_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[forum_flags] [int] DEFAULT (32) NOT NULL ,
[display_on_index] [int] DEFAULT (1) NOT NULL ,
@@ -518,8 +518,8 @@ GO
CREATE TABLE [phpbb_groups] (
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
[group_type] [int] DEFAULT (1) NOT NULL ,
- [group_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [group_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [group_name] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [group_desc] [text] DEFAULT ('') NOT NULL ,
[group_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[group_desc_options] [int] DEFAULT (0) NOT NULL ,
[group_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
@@ -534,7 +534,7 @@ CREATE TABLE [phpbb_groups] (
[group_receive_pm] [int] DEFAULT (0) NOT NULL ,
[group_message_limit] [int] DEFAULT (0) NOT NULL ,
[group_legend] [int] DEFAULT (1) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
@@ -579,9 +579,9 @@ CREATE TABLE [phpbb_lang] (
[lang_id] [int] IDENTITY (1, 1) NOT NULL ,
[lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
[lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
- [lang_english_name] [nvarchar] (100) DEFAULT ('') NOT NULL ,
- [lang_local_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [lang_author] [nvarchar] (255) DEFAULT ('') NOT NULL
+ [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_author] [varchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -608,9 +608,9 @@ CREATE TABLE [phpbb_log] (
[reportee_id] [int] DEFAULT (0) NOT NULL ,
[log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[log_time] [int] DEFAULT (0) NOT NULL ,
- [log_operation] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
- [log_data] [ntext] DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [log_operation] [text] DEFAULT ('') NOT NULL ,
+ [log_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_log] WITH NOCHECK ADD
@@ -642,9 +642,9 @@ GO
CREATE TABLE [phpbb_moderator_cache] (
[forum_id] [int] DEFAULT (0) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
+ [username] [varchar] (252) DEFAULT ('') NOT NULL ,
[group_id] [int] DEFAULT (0) NOT NULL ,
- [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[display_on_index] [int] DEFAULT (1) NOT NULL
) ON [PRIMARY]
GO
@@ -697,9 +697,9 @@ GO
CREATE TABLE [phpbb_poll_options] (
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
[topic_id] [int] DEFAULT (0) NOT NULL ,
- [poll_option_text] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [poll_option_text] [text] DEFAULT ('') NOT NULL ,
[poll_option_total] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
@@ -747,20 +747,20 @@ CREATE TABLE [phpbb_posts] (
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
- [post_username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
- [post_text] [ntext] DEFAULT ('') NOT NULL ,
+ [post_username] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [post_subject] [text] DEFAULT ('') NOT NULL ,
+ [post_text] [text] DEFAULT ('') NOT NULL ,
[post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
[post_attachment] [int] DEFAULT (0) NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[post_postcount] [int] DEFAULT (1) NOT NULL ,
[post_edit_time] [int] DEFAULT (0) NOT NULL ,
- [post_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
+ [post_edit_reason] [text] DEFAULT ('') NOT NULL ,
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
[post_edit_locked] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
@@ -806,18 +806,18 @@ CREATE TABLE [phpbb_privmsgs] (
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
- [message_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
- [message_text] [ntext] DEFAULT ('') NOT NULL ,
- [message_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL ,
+ [message_subject] [text] DEFAULT ('') NOT NULL ,
+ [message_text] [text] DEFAULT ('') NOT NULL ,
+ [message_edit_reason] [text] DEFAULT ('') NOT NULL ,
[message_edit_user] [int] DEFAULT (0) NOT NULL ,
[message_attachment] [int] DEFAULT (0) NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
[bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[message_edit_time] [int] DEFAULT (0) NOT NULL ,
[message_edit_count] [int] DEFAULT (0) NOT NULL ,
- [to_address] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
- [bcc_address] [nvarchar] (8000) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [to_address] [text] DEFAULT ('') NOT NULL ,
+ [bcc_address] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
@@ -846,7 +846,7 @@ GO
CREATE TABLE [phpbb_privmsgs_folder] (
[folder_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] DEFAULT (0) NOT NULL ,
- [folder_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[pm_count] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
@@ -870,7 +870,7 @@ CREATE TABLE [phpbb_privmsgs_rules] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[rule_check] [int] DEFAULT (0) NOT NULL ,
[rule_connection] [int] DEFAULT (0) NOT NULL ,
- [rule_string] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
[rule_user_id] [int] DEFAULT (0) NOT NULL ,
[rule_group_id] [int] DEFAULT (0) NOT NULL ,
[rule_action] [int] DEFAULT (0) NOT NULL ,
@@ -921,15 +921,15 @@ GO
*/
CREATE TABLE [phpbb_profile_fields] (
[field_id] [int] IDENTITY (1, 1) NOT NULL ,
- [field_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[field_type] [int] DEFAULT (0) NOT NULL ,
[field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
[field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_novalue] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [field_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [field_validation] [nvarchar] (20) DEFAULT ('') NOT NULL ,
+ [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
[field_required] [int] DEFAULT (0) NOT NULL ,
[field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
[field_hide] [int] DEFAULT (0) NOT NULL ,
@@ -977,7 +977,7 @@ CREATE TABLE [phpbb_profile_fields_lang] (
[lang_id] [int] DEFAULT (0) NOT NULL ,
[option_id] [int] DEFAULT (0) NOT NULL ,
[field_type] [int] DEFAULT (0) NOT NULL ,
- [lang_value] [nvarchar] (255) DEFAULT ('') NOT NULL
+ [lang_value] [varchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
@@ -997,10 +997,10 @@ GO
CREATE TABLE [phpbb_profile_lang] (
[field_id] [int] DEFAULT (0) NOT NULL ,
[lang_id] [int] DEFAULT (0) NOT NULL ,
- [lang_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [lang_explain] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
- [lang_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_explain] [text] DEFAULT ('') NOT NULL ,
+ [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
@@ -1017,7 +1017,7 @@ GO
*/
CREATE TABLE [phpbb_ranks] (
[rank_id] [int] IDENTITY (1, 1) NOT NULL ,
- [rank_title] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
[rank_min] [int] DEFAULT (0) NOT NULL ,
[rank_special] [int] DEFAULT (0) NOT NULL ,
[rank_image] [varchar] (255) DEFAULT ('') NOT NULL
@@ -1043,8 +1043,8 @@ CREATE TABLE [phpbb_reports] (
[user_notify] [int] DEFAULT (0) NOT NULL ,
[report_closed] [int] DEFAULT (0) NOT NULL ,
[report_time] [int] DEFAULT (0) NOT NULL ,
- [report_text] [ntext] DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [report_text] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
@@ -1060,10 +1060,10 @@ GO
*/
CREATE TABLE [phpbb_reports_reasons] (
[reason_id] [int] IDENTITY (1, 1) NOT NULL ,
- [reason_title] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [reason_description] [ntext] DEFAULT ('') NOT NULL ,
+ [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [reason_description] [text] DEFAULT ('') NOT NULL ,
[reason_order] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
@@ -1080,7 +1080,7 @@ GO
CREATE TABLE [phpbb_search_results] (
[search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
[search_time] [int] DEFAULT (0) NOT NULL ,
- [search_keywords] [ntext] DEFAULT ('') NOT NULL ,
+ [search_keywords] [text] DEFAULT ('') NOT NULL ,
[search_authors] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -1098,7 +1098,7 @@ GO
*/
CREATE TABLE [phpbb_search_wordlist] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word_text] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
[word_common] [int] DEFAULT (0) NOT NULL
) ON [PRIMARY]
GO
@@ -1142,7 +1142,7 @@ CREATE TABLE [phpbb_sessions] (
[session_time] [int] DEFAULT (0) NOT NULL ,
[session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
- [session_page] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
[session_viewonline] [int] DEFAULT (1) NOT NULL ,
[session_autologin] [int] DEFAULT (0) NOT NULL ,
[session_admin] [int] DEFAULT (0) NOT NULL
@@ -1210,8 +1210,8 @@ GO
*/
CREATE TABLE [phpbb_smilies] (
[smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
- [code] [nvarchar] (50) DEFAULT ('') NOT NULL ,
- [emotion] [nvarchar] (50) DEFAULT ('') NOT NULL ,
+ [code] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
[smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
[smiley_width] [int] DEFAULT (0) NOT NULL ,
[smiley_height] [int] DEFAULT (0) NOT NULL ,
@@ -1236,8 +1236,8 @@ GO
*/
CREATE TABLE [phpbb_styles] (
[style_id] [int] IDENTITY (1, 1) NOT NULL ,
- [style_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [style_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [style_name] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[style_active] [int] DEFAULT (1) NOT NULL ,
[template_id] [int] DEFAULT (0) NOT NULL ,
[theme_id] [int] DEFAULT (0) NOT NULL ,
@@ -1270,8 +1270,8 @@ GO
*/
CREATE TABLE [phpbb_styles_template] (
[template_id] [int] IDENTITY (1, 1) NOT NULL ,
- [template_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [template_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [template_name] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[bbcode_bitfield] [varchar] (252) DEFAULT ('kNg=') NOT NULL ,
[template_storedb] [int] DEFAULT (0) NOT NULL
@@ -1297,8 +1297,8 @@ CREATE TABLE [phpbb_styles_template_data] (
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
[template_mtime] [int] DEFAULT (0) NOT NULL ,
- [template_data] [ntext] DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [template_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
@@ -1313,13 +1313,13 @@ GO
*/
CREATE TABLE [phpbb_styles_theme] (
[theme_id] [int] IDENTITY (1, 1) NOT NULL ,
- [theme_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [theme_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [theme_name] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[theme_storedb] [int] DEFAULT (0) NOT NULL ,
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
- [theme_data] [ntext] DEFAULT ('') NOT NULL
-) ON [PRIMARY]
+ [theme_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
@@ -1338,8 +1338,8 @@ GO
*/
CREATE TABLE [phpbb_styles_imageset] (
[imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
- [imageset_name] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [imageset_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [imageset_name] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
[imageset_path] [varchar] (100) DEFAULT ('') NOT NULL ,
[site_logo] [varchar] (200) DEFAULT ('') NOT NULL ,
[upload_bar] [varchar] (200) DEFAULT ('') NOT NULL ,
@@ -1459,7 +1459,7 @@ CREATE TABLE [phpbb_topics] (
[topic_attachment] [int] DEFAULT (0) NOT NULL ,
[topic_approved] [int] DEFAULT (1) NOT NULL ,
[topic_reported] [int] DEFAULT (0) NOT NULL ,
- [topic_title] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [topic_title] [text] DEFAULT ('') NOT NULL ,
[topic_poster] [int] DEFAULT (0) NOT NULL ,
[topic_time] [int] DEFAULT (0) NOT NULL ,
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
@@ -1469,25 +1469,25 @@ CREATE TABLE [phpbb_topics] (
[topic_status] [int] DEFAULT (0) NOT NULL ,
[topic_type] [int] DEFAULT (0) NOT NULL ,
[topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
- [topic_first_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
[topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
[topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [topic_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [topic_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [topic_last_post_subject] [text] DEFAULT ('') NOT NULL ,
[topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
[topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
[topic_moved_id] [int] DEFAULT (0) NOT NULL ,
[topic_bumped] [int] DEFAULT (0) NOT NULL ,
[topic_bumper] [int] DEFAULT (0) NOT NULL ,
- [poll_title] [nvarchar] (1000) DEFAULT ('') NOT NULL ,
+ [poll_title] [text] DEFAULT ('') NOT NULL ,
[poll_start] [int] DEFAULT (0) NOT NULL ,
[poll_length] [int] DEFAULT (0) NOT NULL ,
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
[poll_vote_change] [int] DEFAULT (0) NOT NULL
-) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
@@ -1604,16 +1604,16 @@ CREATE TABLE [phpbb_users] (
[user_perm_from] [int] DEFAULT (0) NOT NULL ,
[user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
[user_regdate] [int] DEFAULT (0) NOT NULL ,
- [username] [nvarchar] (252) DEFAULT ('') NOT NULL ,
- [user_password] [nvarchar] (40) DEFAULT ('') NOT NULL ,
+ [username] [varchar] (252) DEFAULT ('') NOT NULL ,
+ [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
[user_passchg] [int] DEFAULT (0) NOT NULL ,
- [user_email] [nvarchar] (100) DEFAULT ('') NOT NULL ,
+ [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
[user_email_hash] [float] DEFAULT (0) NOT NULL ,
[user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
[user_lastvisit] [int] DEFAULT (0) NOT NULL ,
[user_lastmark] [int] DEFAULT (0) NOT NULL ,
[user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
- [user_lastpage] [nvarchar] (200) DEFAULT ('') NOT NULL ,
+ [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
[user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
[user_last_search] [int] DEFAULT (0) NOT NULL ,
[user_warnings] [int] DEFAULT (0) NOT NULL ,
@@ -1623,7 +1623,7 @@ CREATE TABLE [phpbb_users] (
[user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
[user_timezone] [float] DEFAULT (0) NOT NULL ,
[user_dst] [int] DEFAULT (0) NOT NULL ,
- [user_dateformat] [nvarchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
+ [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
[user_style] [int] DEFAULT (0) NOT NULL ,
[user_rank] [int] DEFAULT (0) NOT NULL ,
[user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
@@ -1652,20 +1652,20 @@ CREATE TABLE [phpbb_users] (
[user_avatar_type] [int] DEFAULT (0) NOT NULL ,
[user_avatar_width] [int] DEFAULT (0) NOT NULL ,
[user_avatar_height] [int] DEFAULT (0) NOT NULL ,
- [user_sig] [ntext] DEFAULT ('') NOT NULL ,
+ [user_sig] [text] DEFAULT ('') NOT NULL ,
[user_sig_bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[user_sig_bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
- [user_from] [nvarchar] (100) DEFAULT ('') NOT NULL ,
+ [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
[user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
- [user_aim] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [user_yim] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [user_msnm] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [user_jabber] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [user_website] [nvarchar] (200) DEFAULT ('') NOT NULL ,
- [user_occ] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [user_interests] [nvarchar] (8000) DEFAULT ('') NOT NULL ,
+ [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_occ] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_interests] [text] DEFAULT ('') NOT NULL ,
[user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
- [user_newpasswd] [nvarchar] (32) DEFAULT ('') NOT NULL
+ [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -1714,8 +1714,8 @@ GO
*/
CREATE TABLE [phpbb_words] (
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word] [nvarchar] (255) DEFAULT ('') NOT NULL ,
- [replacement] [nvarchar] (255) DEFAULT ('') NOT NULL
+ [word] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [replacement] [varchar] (255) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
From 587ec3fa77d90819148cdeda2b490bbf82632114 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Wed, 20 Sep 2006 13:20:18 +0000
Subject: [PATCH 094/291] #4406
git-svn-id: file:///svn/phpbb/trunk@6382 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions_display.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 8e7edea1e2..217befd5fa 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -652,7 +652,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
$folder = 'topic_read';
$folder_new = 'topic_unread';
- if ($config['hot_threshold'] && $replies >= $config['hot_threshold'])
+ if ($config['hot_threshold'] && $replies >= $config['hot_threshold'] && $topic_row['topic_status'] != ITEM_LOCKED)
{
$folder .= '_hot';
$folder_new .= '_hot';
From 1d7e3e0fd95fb5baf92937d1f911649cb1a665e9 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Fri, 22 Sep 2006 22:14:05 +0000
Subject: [PATCH 095/291] some tiny fixes here and there
git-svn-id: file:///svn/phpbb/trunk@6383 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_main.html | 2 +
phpBB/adm/style/acp_search.html | 6 +--
phpBB/develop/create_schema_files.php | 6 +--
phpBB/includes/acp/acp_forums.php | 4 +-
phpBB/includes/acp/acp_groups.php | 4 +-
phpBB/includes/acp/acp_main.php | 20 ++++---
phpBB/includes/functions.php | 3 +-
phpBB/includes/functions_display.php | 78 ++++++++-------------------
phpBB/includes/functions_user.php | 3 +-
phpBB/includes/session.php | 2 +-
phpBB/language/en/common.php | 2 +-
phpBB/language/en/install.php | 2 +-
12 files changed, 55 insertions(+), 77 deletions(-)
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index 364525e860..af1623146e 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -77,12 +77,14 @@
{L_GZIP_COMPRESSION}:
{GZIP_COMPRESSION}
+
{L_NUMBER_ORPHAN}:
{TOTAL_ORPHAN}
+
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index eda1b256ab..11f022ecbc 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -82,7 +82,7 @@
{L_ACP_SEARCH_INDEX_EXPLAIN}
- {L_CONTINUE}
+ {L_CONTINUE}
{L_CONTINUE_EXPLAIN}
@@ -121,9 +121,9 @@
-
+
-
+
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index c655a2245a..2477b4aea5 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -986,7 +986,7 @@ function get_schema_struct()
'forum_name' => array('STEXT_UNI', ''),
'forum_desc' => array('TEXT_UNI', ''),
'forum_desc_bitfield' => array('VCHAR:252', ''),
- 'forum_desc_options' => array('UINT:11', 0),
+ 'forum_desc_options' => array('UINT:11', 7),
'forum_desc_uid' => array('VCHAR:5', ''),
'forum_link' => array('VCHAR_UNI', ''),
'forum_password' => array('VCHAR_UNI:40', ''),
@@ -995,7 +995,7 @@ function get_schema_struct()
'forum_rules' => array('TEXT_UNI', ''),
'forum_rules_link' => array('VCHAR_UNI', ''),
'forum_rules_bitfield' => array('VCHAR:252', ''),
- 'forum_rules_options' => array('UINT:11', 0),
+ 'forum_rules_options' => array('UINT:11', 7),
'forum_rules_uid' => array('VCHAR:5', ''),
'forum_topics_per_page' => array('TINT:4', 0),
'forum_type' => array('TINT:4', 0),
@@ -1064,7 +1064,7 @@ function get_schema_struct()
'group_name' => array('VCHAR_CI', ''),
'group_desc' => array('TEXT_UNI', ''),
'group_desc_bitfield' => array('VCHAR:252', ''),
- 'group_desc_options' => array('UINT:11', 0),
+ 'group_desc_options' => array('UINT:11', 7),
'group_desc_uid' => array('VCHAR:5', ''),
'group_display' => array('BOOL', 0),
'group_avatar' => array('VCHAR', ''),
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 9a819d97e1..042f5c4e48 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -99,11 +99,11 @@ class acp_forums
'forum_link_track' => request_var('forum_link_track', false),
'forum_desc' => request_var('forum_desc', '', true),
'forum_desc_uid' => '',
- 'forum_desc_options' => 0,
+ 'forum_desc_options' => 7,
'forum_desc_bitfield' => '',
'forum_rules' => request_var('forum_rules', '', true),
'forum_rules_uid' => '',
- 'forum_rules_options' => 0,
+ 'forum_rules_options' => 7,
'forum_rules_bitfield' => '',
'forum_rules_link' => request_var('forum_rules_link', ''),
'forum_image' => request_var('forum_image', ''),
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 5fccc565da..600d596370 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -85,7 +85,7 @@ class acp_groups
break;
}
- group_update_listing($group_id);
+ group_update_listings($group_id);
trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
break;
@@ -136,7 +136,7 @@ class acp_groups
group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
}
- group_update_listing($group_id);
+ group_update_listings($group_id);
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
}
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index b1331fa1ae..b0c12c7928 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -406,12 +406,19 @@ class acp_main
$files_per_day = $total_files;
}
- $sql = 'SELECT COUNT(attach_id) AS total_orphan
- FROM ' . ATTACHMENTS_TABLE . '
- WHERE is_orphan = 1';
- $result = $db->sql_query($sql);
- $total_orphan = (int) $db->sql_fetchfield('total_orphan');
- $db->sql_freeresult($result);
+ if ($config['allow_attachments'] || $config['allow_pm_attach'])
+ {
+ $sql = 'SELECT COUNT(attach_id) AS total_orphan
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 1';
+ $result = $db->sql_query($sql);
+ $total_orphan = (int) $db->sql_fetchfield('total_orphan');
+ $db->sql_freeresult($result);
+ }
+ else
+ {
+ $total_orphan = false;
+ }
$dbsize = get_database_size();
$s_action_options = build_select(array('online' => 'RESET_ONLINE', 'date' => 'RESET_DATE', 'stats' => 'RESYNC_STATS', 'user' => 'RESYNC_POSTCOUNTS', 'db_track' => 'RESYNC_POST_MARKING'));
@@ -430,6 +437,7 @@ class acp_main
'DBSIZE' => $dbsize,
'UPLOAD_DIR_SIZE' => $upload_dir_size,
'TOTAL_ORPHAN' => $total_orphan,
+ 'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'],
'DATABASE_INFO' => $db->sql_server_info(),
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index d7a594eeeb..4fa041bfd1 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2236,8 +2236,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
{
global $phpbb_root_path, $phpEx;
- $uid = '';
- $bitfield = '';
+ $uid = $bitfield = '';
if (!$text)
{
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 217befd5fa..2c82fda5ed 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1018,24 +1018,11 @@ function display_user_activity(&$userdata)
global $auth, $template, $db, $user;
global $phpbb_root_path, $phpEx;
- // Init new auth class if user is different
- if ($user->data['user_id'] != $userdata['user_id'])
- {
- $auth2 = new auth();
- $auth2->acl($userdata);
-
- $post_count_ary = $auth2->acl_getf('!f_postcount');
- }
- else
- {
- $post_count_ary = $auth->acl_getf('!f_postcount');
- }
-
- $forum_read_ary = $auth->acl_getf('!f_read');
-
$forum_ary = array();
// Do not include those forums the user is not having read access to...
+ $forum_read_ary = $auth->acl_getf('!f_read');
+
foreach ($forum_read_ary as $forum_id => $not_allowed)
{
if ($not_allowed['f_read'])
@@ -1044,40 +1031,27 @@ function display_user_activity(&$userdata)
}
}
- // Now do not include those forums where the posts do not count...
- foreach ($post_count_ary as $forum_id => $not_counted)
- {
- if ($not_counted['f_postcount'])
- {
- $forum_ary[] = (int) $forum_id;
- }
- }
-
$forum_ary = array_unique($forum_ary);
- $post_count_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('f.forum_id', $forum_ary, true) : '';
+ $forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
+
+ // Obtain active forum
+ $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . "
+ AND post_postcount = 1
+ $forum_sql
+ GROUP BY forum_id";
// Firebird does not support ORDER BY on aliased columns
// MySQL does not support ORDER BY on functions
switch (SQL_LAYER)
{
case 'firebird':
- $sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $userdata['user_id'] . "
- AND f.forum_id = p.forum_id
- $post_count_sql
- GROUP BY f.forum_id
- ORDER BY COUNT(p.post_id) DESC";
+ $sql .= ' ORDER BY COUNT(post_id) DESC';
break;
default:
- $sql = 'SELECT f.forum_id, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $userdata['user_id'] . "
- AND f.forum_id = p.forum_id
- $post_count_sql
- GROUP BY f.forum_id
- ORDER BY num_posts DESC";
+ $sql .= ' ORDER BY num_posts DESC';
break;
}
@@ -1095,30 +1069,24 @@ function display_user_activity(&$userdata)
$db->sql_freeresult($result);
}
+ // Obtain active topic
+ $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . "
+ AND post_postcount = 1
+ $forum_sql
+ GROUP BY topic_id";
+
// Firebird does not support ORDER BY on aliased columns
// MySQL does not support ORDER BY on functions
switch (SQL_LAYER)
{
case 'firebird':
- $sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $userdata['user_id'] . "
- AND t.topic_id = p.topic_id
- AND f.forum_id = t.forum_id
- $post_count_sql
- GROUP BY t.topic_id
- ORDER BY COUNT(p.post_id) DESC";
+ $sql .= ' ORDER BY COUNT(post_id) DESC';
break;
default:
- $sql = 'SELECT t.topic_id, COUNT(p.post_id) AS num_posts
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
- WHERE p.poster_id = ' . $userdata['user_id'] . "
- AND t.topic_id = p.topic_id
- AND f.forum_id = t.forum_id
- $post_count_sql
- GROUP BY t.topic_id
- ORDER BY num_posts DESC";
+ $sql .= ' ORDER BY num_posts DESC';
break;
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 8970b7865e..07701f27ac 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -156,6 +156,7 @@ function user_add($user_row, $cp_data = false)
'user_actkey' => '',
'user_ip' => '',
'user_regdate' => time(),
+ 'user_passchg' => time(),
'user_lastmark' => time(),
'user_lastvisit' => 0,
@@ -255,6 +256,7 @@ function user_add($user_row, $cp_data = false)
function user_delete($mode, $user_id, $post_username = false)
{
global $config, $db, $user, $auth;
+ global $phpbb_root_path, $phpEx;
$db->sql_transaction('begin');
@@ -286,7 +288,6 @@ function user_delete($mode, $user_id, $post_username = false)
if (!function_exists('delete_posts'))
{
- global $phpbb_root_path, $phpEx;
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
}
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 458eb44b40..9af770e240 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1202,7 +1202,7 @@ class user extends session
// Does the user need to change their password? If so, redirect to the
// ucp profile reg_details page ... of course do not redirect if we're already in the ucp
- if (!defined('IN_ADMIN') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
+ if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && $this->data['is_registered'] && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
{
if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx")
{
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 717064b936..17fc170d21 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -402,7 +402,7 @@ $lang = array_merge($lang, array(
'REG_USER_ONLINE' => 'There is %d registered user and ',
'REG_USER_TOTAL' => '%d registered, ',
'REMOVE' => 'Remove',
- 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
+ 'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.',
'REPLIES' => 'Replies',
'REPLY_WITH_QUOTE' => 'Reply with quote',
'REPLYING_GLOBAL_ANNOUNCE' => 'Replying to Global Announcement',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 6ffb4d9a2b..57c6c12965 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -136,7 +136,7 @@ $lang = array_merge($lang, array(
'INITIAL_CONFIG' => 'Basic Configuration',
'INITIAL_CONFIG_EXPLAIN' => 'Now that install has determined your server can run phpBB you need to supply some specific information. If you do not know how to connect to your database please contact your hosting provider (in the first instance) or use the phpBB support forums. When entering data please ensure you check it thoroughly before continuing.',
'INSTALL_CONGRATS' => 'Congratulations',
- 'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Userguide and the Beta support forum , see the %sREADME%s for further information. Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the ACP will be accessible.',
+ 'INSTALL_CONGRATS_EXPLAIN' => 'You have now successfully installed phpBB 3.0. Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the Userguide and the Beta support forum , see the %sREADME%s for further information.Please now delete, move or rename the install directory before you use your forum. If this directory is still present, only the Administration Control Panel (ACP) will be accessible. ',
'INSTALL_INTRO' => 'Welcome to Installation',
'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.In order to proceed, you will need the following information to hand:
From 0f8630e077b0713fe80470957ab96f6aa73159ba Mon Sep 17 00:00:00 2001
From: David M
Date: Sat, 23 Sep 2006 02:46:43 +0000
Subject: [PATCH 096/291] the tokenizer is buggy across several versions of
PHP. The regex that is always used complies strictly with what the internal
lexer uses, we are safe.
git-svn-id: file:///svn/phpbb/trunk@6384 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/functions_template.php | 73 +++------------------------
1 file changed, 7 insertions(+), 66 deletions(-)
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index dacfafefa6..d8f73a8479 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -82,73 +82,14 @@ class template_compile
*/
function remove_php_tags(&$code)
{
- if (!function_exists('token_get_all'))
- {
- /**
- * If the tokenizer extension is not available, try to load it and if
- * it's still not available we fall back to some pattern replacement.
- *
- * Note that the pattern replacement may affect the well-formedness
- * of the HTML if a PHP tag is found because even if we escape PHP
- * opening tags we do NOT escape PHP closing tags and cannot do so
- * reliably without the use of a full-blown tokenizer.
- *
- * The bottom line is, a template should NEVER contain PHP because it
- * would comprise the security of the installation, that's why we
- * prevent it from being executed. Our job is to secure the installation,
- * not fix unsecure templates. if a template contains some PHP then it
- * should not be used at all.
- */
- @dl('tokenizer');
+ // This matches the information gathered from the internal PHP lexer
+ $match = array(
+ '#<([\?%])=?.*?\1>#s',
+ '##s',
+ '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'
+ );
- if (!function_exists('token_get_all'))
- {
- // This matches the information gathered from the internal PHP lexer
- $match = array(
- '#<([\?%])=?.*?\1>#s',
- '##s',
- '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'
- );
-
- $code = preg_replace($match, '', $code);
- return;
- }
- }
-
- do
- {
- $tokens = token_get_all('' . $code);
- $code = '';
- $php_found = false;
-
- foreach ($tokens as $i => $token)
- {
- if (!is_array($token))
- {
- $code .= $token;
- }
- else if ($token[0] == T_OPEN_TAG || $token[0] == T_OPEN_TAG_WITH_ECHO || $token[0] == T_CLOSE_TAG)
- {
- if ($i > 1)
- {
- $code .= htmlspecialchars($token[1]);
- $php_found = true;
- }
- }
- else
- {
- $code .= $token[1];
- }
- }
- unset($tokens);
-
- // Fix for a tokenizer oddity
- if (!strncmp($code, '
Date: Sat, 23 Sep 2006 02:54:17 +0000
Subject: [PATCH 097/291] SET NAMES on the MySQL 4.1.2+ DBs
git-svn-id: file:///svn/phpbb/trunk@6385 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/db/mysql4.php | 1 +
phpBB/includes/db/mysqli.php | 1 +
2 files changed, 2 insertions(+)
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index 3740d22669..821fc777da 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -49,6 +49,7 @@ class dbal_mysql4 extends dbal
{
if (@mysql_select_db($this->dbname))
{
+ @mysql_query("SET NAMES 'utf8'");
return $this->db_connect_id;
}
}
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index 66bbd9beda..a8773892f7 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -50,6 +50,7 @@ class dbal_mysqli extends dbal
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
+ @mysqli_query("SET NAMES 'utf8'");
return $this->db_connect_id;
}
}
From 2069aa0f83c4aea8493104cc53dfc3c313ea4b51 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sat, 23 Sep 2006 09:51:18 +0000
Subject: [PATCH 098/291] hopefully fixes bug #3135
git-svn-id: file:///svn/phpbb/trunk@6386 89ea8834-ac86-4346-8a33-228a782c2dd0
---
.../subSilver/template/posting_body.html | 6 ++++-
.../subSilver/template/posting_smilies.html | 23 ++++---------------
2 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html
index b82331f82c..8a868825e9 100644
--- a/phpBB/styles/subSilver/template/posting_body.html
+++ b/phpBB/styles/subSilver/template/posting_body.html
@@ -226,7 +226,11 @@ function checkForm()
{L_SMILIES}
-
+
+
+
+
+
diff --git a/phpBB/styles/subSilver/template/posting_smilies.html b/phpBB/styles/subSilver/template/posting_smilies.html
index 22b95125d3..7bfc1cc6cb 100644
--- a/phpBB/styles/subSilver/template/posting_smilies.html
+++ b/phpBB/styles/subSilver/template/posting_smilies.html
@@ -2,26 +2,13 @@
+
From 02c875ebb4482db554be742013e8fdcccd11a674 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sat, 23 Sep 2006 10:08:05 +0000
Subject: [PATCH 099/291] #3802
git-svn-id: file:///svn/phpbb/trunk@6387 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/editor.js | 4 ++--
phpBB/styles/subSilver/template/editor.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
index 8e098f4eab..9591fc67d1 100644
--- a/phpBB/adm/style/editor.js
+++ b/phpBB/adm/style/editor.js
@@ -33,7 +33,7 @@ function getarraysize(thearray)
{
for (i = 0; i < thearray.length; i++)
{
- if (thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
+ if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
{
return i;
}
@@ -208,7 +208,7 @@ function addquote(post_id, username)
theSelection = document.selection.createRange().text;
}
- if (theSelection == '')
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
{
if (document.all)
{
diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js
index a3bd341ab0..e93ca0e51d 100644
--- a/phpBB/styles/subSilver/template/editor.js
+++ b/phpBB/styles/subSilver/template/editor.js
@@ -33,7 +33,7 @@ function getarraysize(thearray)
{
for (i = 0; i < thearray.length; i++)
{
- if (thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
+ if (typeof thearray[i] == 'undefined' || thearray[i] == '' || thearray[i] == null)
{
return i;
}
@@ -208,7 +208,7 @@ function addquote(post_id, username)
theSelection = document.selection.createRange().text;
}
- if (theSelection == '')
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
{
if (divarea.innerHTML)
{
From 7542fabaa708677a015ab968724f5b337105702b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sat, 23 Sep 2006 10:48:20 +0000
Subject: [PATCH 100/291] Bug #4322
git-svn-id: file:///svn/phpbb/trunk@6388 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/styles/subSilver/template/viewforum_body.html | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index f03553310e..0042c6ac0c 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -52,12 +52,17 @@
[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]
- {topicrow.TOPIC_AUTHOR_LINK}
+ style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR} {topicrow.TOPIC_AUTHOR}
{topicrow.REPLIES}
{topicrow.VIEWS}
{topicrow.LAST_POST_TIME}
- {topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_AUTHOR}
+
+
+ style="color: {topicrow.LAST_POST_AUTHOR_COLOUR}">{topicrow.LAST_POST_AUTHOR}
+
+ {topicrow.LAST_POST_AUTHOR}
+
{LAST_POST_IMG}
@@ -173,7 +178,7 @@
[ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ]
- style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR} {topicrow.TOPIC_AUTHOR}
+ style="font-weight: bold; color: {topicrow.TOPIC_AUTHOR_COLOUR}">{topicrow.TOPIC_AUTHOR} {topicrow.TOPIC_AUTHOR}
{topicrow.REPLIES}
{topicrow.VIEWS}
From 6d08ef7b3ab9e481cc56b94865bb07ade34a80ef Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sat, 23 Sep 2006 11:10:37 +0000
Subject: [PATCH 101/291] made sql_rowseek consistent with the dbal methods as
well as fixing sql_query_limit for mssql, especially if sql_query_limit($sql,
0, 0) is given...
git-svn-id: file:///svn/phpbb/trunk@6389 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_bots.html | 2 +-
phpBB/includes/acm/acm_file.php | 2 +-
phpBB/includes/db/firebird.php | 2 +-
phpBB/includes/db/mssql.php | 34 +++++++++++------------
phpBB/includes/db/mssql_odbc.php | 37 +++++++++++---------------
phpBB/includes/db/mysql.php | 4 +--
phpBB/includes/db/mysql4.php | 4 +--
phpBB/includes/db/mysqli.php | 2 +-
phpBB/includes/db/oracle.php | 2 +-
phpBB/includes/db/postgres.php | 2 +-
phpBB/includes/db/sqlite.php | 2 +-
phpBB/includes/functions_messenger.php | 5 ----
phpBB/includes/mcp/mcp_reports.php | 2 +-
13 files changed, 42 insertions(+), 58 deletions(-)
diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html
index 1924133bfd..bc6c657490 100644
--- a/phpBB/adm/style/acp_bots.html
+++ b/phpBB/adm/style/acp_bots.html
@@ -89,7 +89,7 @@
-
+
{S_BOT_OPTIONS}
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index b8aed9bcb7..8ba51780eb 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -424,7 +424,7 @@ class acm
/**
* Seek a specific row in an a cached database result (database)
*/
- function sql_rowseek($query_id, $rownum)
+ function sql_rowseek($rownum, $query_id)
{
if ($rownum >= sizeof($this->sql_rowset[$query_id]))
{
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 44bbcb4eb3..c58b4efb99 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -281,7 +281,7 @@ class dbal_firebird extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index 52f442f4fa..96716a8814 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -172,30 +172,26 @@ class dbal_mssql extends dbal
{
$this->query_result = false;
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
+ // Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
+ if ($total)
{
- $total = -1;
- }
-
- $row_offset = ($total) ? $offset : '';
- $num_rows = ($total) ? $total : $offset;
-
- if (strpos($query, 'SELECT DISTINCT') === 0)
- {
- $query = 'SELECT DISTINCT TOP ' . ($row_offset + $num_rows) . ' ' . substr($query, 15);
- }
- else
- {
- $query = 'SELECT TOP ' . ($row_offset + $num_rows) . ' ' . substr($query, 6);
+ // We need to grab the total number of rows + the offset number of rows to get the correct result
+ if (strpos($query, 'SELECT DISTINCT') === 0)
+ {
+ $query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
+ }
+ else
+ {
+ $query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
+ }
}
$result = $this->sql_query($query, $cache_ttl);
- // Seek by $row_offset rows
- if ($row_offset)
+ // Seek by $offset rows
+ if ($offset)
{
- $this->sql_rowseek($result, $row_offset);
+ $this->sql_rowseek($offset, $result);
}
return $result;
@@ -313,7 +309,7 @@ class dbal_mssql extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @mssql_data_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index 54655c389a..09437a1780 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -168,33 +168,26 @@ class dbal_mssql_odbc extends dbal
{
$this->query_result = false;
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
+ // Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
+ if ($total)
{
- $total = -1;
- }
-
- $row_offset = ($total) ? $offset : 0;
- $num_rows = ($total) ? $total : $offset;
-
- if (strpos($query, 'SELECT DISTINCT') === 0)
- {
- $query = 'SELECT DISTINCT TOP ' . ($row_offset + $num_rows) . ' ' . substr($query, 15);
- }
- else
- {
- $query = 'SELECT TOP ' . ($row_offset + $num_rows) . ' ' . substr($query, 6);
+ // We need to grab the total number of rows + the offset number of rows to get the correct result
+ if (strpos($query, 'SELECT DISTINCT') === 0)
+ {
+ $query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
+ }
+ else
+ {
+ $query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
+ }
}
$result = $this->sql_query($query, $cache_ttl);
- // Seek by $row_offset rows
- if ($row_offset)
+ // Seek by $offset rows
+ if ($offset)
{
- for ($i = 0; $i < $row_offset; $i++)
- {
- $this->sql_fetchrow($result);
- }
+ $this->sql_rowseek($offset, $result);
}
return $result;
@@ -301,7 +294,7 @@ class dbal_mssql_odbc extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
$this->sql_freeresult($query_id);
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 099e1cf11a..6aadd812a4 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -249,7 +249,7 @@ class dbal_mysql extends dbal
{
if (isset($cache->sql_rowset[$query_id]))
{
- $cache->sql_rowseek($query_id, $rownum);
+ $cache->sql_rowseek($rownum, $query_id);
return $cache->sql_fetchfield($query_id, $field);
}
@@ -275,7 +275,7 @@ class dbal_mysql extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index 821fc777da..cd1d7f9cf8 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -252,7 +252,7 @@ class dbal_mysql4 extends dbal
{
if (isset($cache->sql_rowset[$query_id]))
{
- $cache->sql_rowseek($query_id, $rownum);
+ $cache->sql_rowseek($rownum, $query_id);
return $cache->sql_fetchfield($query_id, $field);
}
@@ -278,7 +278,7 @@ class dbal_mysql4 extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index a8773892f7..554d9ddb60 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -270,7 +270,7 @@ class dbal_mysqli extends dbal
if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @mysqli_data_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 1d14d7b793..a1dc33c566 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -403,7 +403,7 @@ class dbal_oracle extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
if (!$query_id)
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index ff58269f51..4714f29a00 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -319,7 +319,7 @@ class dbal_postgres extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @pg_result_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 65be2fef64..6204131175 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -266,7 +266,7 @@ class dbal_sqlite extends dbal
if (isset($cache->sql_rowset[$query_id]))
{
- return $cache->sql_rowseek($query_id, $rownum);
+ return $cache->sql_rowseek($rownum, $query_id);
}
return ($query_id) ? @sqlite_seek($query_id, $rownum) : false;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index d5d9c8dd5e..983ec7f0a5 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1358,11 +1358,6 @@ class smtp_class
*/
function mail_encode($str)
{
- if ($encoding == '')
- {
- return $str;
- }
-
// define start delimimter, end delimiter and spacer
$end = "?=";
$start = "=?UTF-8?B?";
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 67af086292..56d5fdedba 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -364,7 +364,7 @@ function close_report($post_id_list, $mode, $action)
trigger_error('NOT_AUTHORIZED');
}
- if (($action == 'delete') && (strpos($user->data['session_page'], 'mode=report_details') !== false))
+ if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false)
{
$redirect = request_var('redirect', build_url(array('mode')) . '&mode=reports');
}
From d62e93ee30ad69f627e9ef9ba586caecf1ed7106 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sat, 23 Sep 2006 11:17:03 +0000
Subject: [PATCH 102/291] Bug #3876
No need to have the forum list twice in the templates. Goodbye viewbody_subfourm, you served us well!
git-svn-id: file:///svn/phpbb/trunk@6390 89ea8834-ac86-4346-8a33-228a782c2dd0
---
...orum_subforum.html => forumlist_body.html} | 38 +++++------
.../styles/subSilver/template/index_body.html | 66 +------------------
.../subSilver/template/viewforum_body.html | 3 +-
3 files changed, 22 insertions(+), 85 deletions(-)
rename phpBB/styles/subSilver/template/{viewforum_subforum.html => forumlist_body.html} (61%)
diff --git a/phpBB/styles/subSilver/template/viewforum_subforum.html b/phpBB/styles/subSilver/template/forumlist_body.html
similarity index 61%
rename from phpBB/styles/subSilver/template/viewforum_subforum.html
rename to phpBB/styles/subSilver/template/forumlist_body.html
index 46f8ede834..238474c02a 100644
--- a/phpBB/styles/subSilver/template/viewforum_subforum.html
+++ b/phpBB/styles/subSilver/template/forumlist_body.html
@@ -1,13 +1,12 @@
-
-
\ No newline at end of file
diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html
index 4374c44c3d..87788d9a07 100644
--- a/phpBB/styles/subSilver/template/index_body.html
+++ b/phpBB/styles/subSilver/template/index_body.html
@@ -8,71 +8,7 @@
-
+
{L_DELETE_COOKIES} | {L_THE_TEAM}
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 0042c6ac0c..28a6379629 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -88,7 +88,8 @@
-
+
+
From 70dffaacbd0e42c6d67bca24b45fd3125c715e85 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sat, 23 Sep 2006 11:37:05 +0000
Subject: [PATCH 103/291] fix custom bbcode html replacement to correctly
replace references It failed if there was a number directly after the token,
resulting in $12345, where $1 was needed. Fixed by using ${x}
also made sure that newlines within the html replacement are not replaced with .
git-svn-id: file:///svn/phpbb/trunk@6391 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_bbcodes.php | 4 ++--
phpBB/includes/bbcode.php | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index f37d9b1aef..e0c04528cf 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -290,7 +290,7 @@ class acp_bbcodes
if (preg_match_all('/(?sql_fetchrow($result))
{
+ // To circumvent replacing newlines with for the generated html,
+ // we just remove newlines here. We do not do this within the admin panel to
+ // let the admin lay out his html code nicely
+ $row['bbcode_tpl'] = str_replace(array("\n", "\r"), '', $row['bbcode_tpl']);
+ $row['second_pass_replace'] = str_replace(array("\n", "\r"), '', $row['second_pass_replace']);
+
$rowset[$row['bbcode_id']] = $row;
}
$db->sql_freeresult($result);
From 1ab3494b444136ddba445cb9eefc051c3d044ee4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sat, 23 Sep 2006 11:40:21 +0000
Subject: [PATCH 104/291] Bug #3592
This changes the layout for links without redirect count a little but it stops breaking the layout in certain situations.
git-svn-id: file:///svn/phpbb/trunk@6392 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/styles/subSilver/template/forumlist_body.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subSilver/template/forumlist_body.html
index 238474c02a..aa1c56c3dd 100644
--- a/phpBB/styles/subSilver/template/forumlist_body.html
+++ b/phpBB/styles/subSilver/template/forumlist_body.html
@@ -17,12 +17,14 @@
{forumrow.FORUM_FOLDER_IMG}
-
+
{forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{L_REDIRECTS}: {forumrow.CLICKS}
+
+
From 36fa521f9230d2b2a8bbb6dc79185cfc17112f39 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sat, 23 Sep 2006 11:49:27 +0000
Subject: [PATCH 105/291] #4428
git-svn-id: file:///svn/phpbb/trunk@6393 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/mcp/mcp_queue.php | 8 +++++---
phpBB/includes/mcp/mcp_reports.php | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 3deeff6d1f..1dc2ab122e 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -182,13 +182,15 @@ class mcp_queue
$forum_list[] = $row['forum_id'];
}
- $global_id = $forum_list[0];
-
- if (!($forum_list = implode(', ', $forum_list)))
+ if (!sizeof($forum_list))
{
trigger_error('NOT_MODERATOR');
}
+ $global_id = $forum_list[0];
+
+ $forum_list = implode(', ', $forum_list);
+
$sql = 'SELECT SUM(forum_topics) as sum_forum_topics
FROM ' . FORUMS_TABLE . "
WHERE forum_id IN (0, $forum_list)";
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 56d5fdedba..4ede1ab416 100755
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -201,13 +201,13 @@ class mcp_reports
$forum_list[] = $row['forum_id'];
}
- $global_id = $forum_list[0];
-
if (!sizeof($forum_list))
{
trigger_error('NOT_MODERATOR');
}
+ $global_id = $forum_list[0];
+
$sql = 'SELECT SUM(forum_topics) as sum_forum_topics
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
From cbece78f7b180253af95071ab859c468ed061ff5 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 23 Sep 2006 12:27:51 +0000
Subject: [PATCH 106/291] A reworking of how we handle inactive users
git-svn-id: file:///svn/phpbb/trunk@6394 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_inactive.html | 75 +++++++++
phpBB/adm/style/acp_main.html | 25 +--
phpBB/includes/acp/acp_inactive.php | 195 +++++++++++++++++++++++
phpBB/includes/acp/acp_main.php | 133 ++--------------
phpBB/includes/acp/acp_prune.php | 2 +-
phpBB/includes/acp/acp_users.php | 4 +-
phpBB/includes/acp/info/acp_inactive.php | 37 +++++
phpBB/includes/constants.php | 4 +
phpBB/includes/functions_admin.php | 46 ++++++
phpBB/includes/functions_user.php | 8 +-
phpBB/includes/ucp/ucp_activate.php | 2 +-
phpBB/includes/ucp/ucp_profile.php | 6 +-
phpBB/includes/ucp/ucp_register.php | 26 +--
phpBB/install/install_install.php | 6 +-
phpBB/language/en/acp/common.php | 35 ++--
15 files changed, 433 insertions(+), 171 deletions(-)
create mode 100755 phpBB/adm/style/acp_inactive.html
create mode 100755 phpBB/includes/acp/acp_inactive.php
create mode 100755 phpBB/includes/acp/info/acp_inactive.php
diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html
new file mode 100755
index 0000000000..b4e617b864
--- /dev/null
+++ b/phpBB/adm/style/acp_inactive.html
@@ -0,0 +1,75 @@
+
+
+
+
+{L_INACTIVE_USERS}
+
+{L_INACTIVE_USERS_EXPLAIN}
+
+
+
+
+
+
+
+
+
+
+
+ {L_DISPLAY_LOG}: {S_LIMIT_DAYS} {L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+
+
+
+
+ {L_MARK_ALL} • {L_UNMARK_ALL}
+ {S_INACTIVE_OPTIONS}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index af1623146e..ce4dde47b0 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -133,17 +133,18 @@
{L_INACTIVE_USERS}
- {L_INACTIVE_USERS_EXPLAIN}
+ {L_INACTIVE_USERS_EXPLAIN_INDEX}
-
+
-
-
- {L_MARK_ALL} • {L_UNMARK_ALL}
- {S_INACTIVE_OPTIONS}
-
-
-
-
-
-
-
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
new file mode 100755
index 0000000000..ebadb8446d
--- /dev/null
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -0,0 +1,195 @@
+p_master = &$p_master;
+ }
+
+ function main($id, $mode)
+ {
+ global $config, $db, $user, $auth, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+
+ $action = request_var('action', '');
+ $mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
+ $start = request_var('start', 0);
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 'i');
+ $sort_dir = request_var('sd', 'd');
+
+ if (sizeof($mark))
+ {
+ switch ($action)
+ {
+ case 'activate':
+ case 'delete':
+ $sql = 'SELECT username
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark);
+ $result = $db->sql_query($sql);
+
+ $user_affected = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_affected[] = $row['username'];
+ }
+ $db->sql_freeresult($result);
+
+ if ($action == 'activate')
+ {
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+
+ foreach ($mark as $user_id)
+ {
+ user_active_flip($user_id, USER_INACTIVE);
+ }
+
+ set_config('num_users', $config['num_users'] + sizeof($mark), true);
+
+ // Update latest username
+ update_last_username();
+ }
+ else if ($action == 'delete')
+ {
+ if (!$auth->acl_get('a_userdel'))
+ {
+ trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
+ }
+
+ $sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
+ $db->sql_query($sql);
+ $sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
+ }
+
+ break;
+
+ case 'remind':
+ if (empty($config['email_enable']))
+ {
+ trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
+ }
+
+ $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark);
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ // Send the messages
+ include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
+
+ $messenger = new messenger();
+
+ $board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
+ $sig = str_replace(' ', "\n", "-- \n" . $config['board_email_sig']);
+
+ $usernames = array();
+ do
+ {
+ $messenger->template('user_remind_inactive', $row['user_lang']);
+
+ $messenger->replyto($config['board_email']);
+ $messenger->to($row['user_email'], $row['username']);
+ $messenger->im($row['user_jabber'], $row['username']);
+
+ $messenger->assign_vars(array(
+ 'EMAIL_SIG' => $sig,
+ 'USERNAME' => html_entity_decode($row['username']),
+ 'SITENAME' => $config['sitename'],
+ 'REGISTER_DATE' => $user->format_date($row['user_regdate']),
+
+ 'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
+ );
+
+ $messenger->send($row['user_notify_type']);
+
+ $usernames[] = $row['username'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $messenger->save_queue();
+
+ add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
+ unset($usernames);
+ }
+ $db->sql_freeresult($result);
+
+ break;
+ }
+ }
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']);
+ $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ // Define where and sort sql for use in displaying logs
+ $sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
+ $sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
+
+ $inactive = array();
+ $inactive_count = 0;
+
+ view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
+
+ foreach ($inactive as $row)
+ {
+ $template->assign_block_vars('inactive', array(
+ 'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
+ 'JOINED' => $user->format_date($row['user_regdate']),
+ 'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
+ 'REASON' => $row['inactive_reason'],
+ 'USER_ID' => $row['user_id'],
+ 'USERNAME' => $row['username'],
+ 'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"))
+ );
+ }
+
+ $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
+ if ($config['email_enable'])
+ {
+ $option_ary += array('remind' => 'REMIND');
+ }
+
+ $template->assign_vars(array(
+ 'S_INACTIVE_USERS' => true,
+ 'S_INACTIVE_OPTIONS' => build_select($option_ary),
+
+ 'S_LIMIT_DAYS' => $s_limit_days,
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir,
+ 'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true),
+ ));
+
+ $this->tpl_name = 'acp_inactive';
+ $this->page_title = 'ACP_INACTIVE_USERS';
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index b0c12c7928..cefb80badc 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -50,123 +50,6 @@ class acp_main
}
$action = request_var('action', '');
- $mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array();
-
- if (sizeof($mark))
- {
- switch ($action)
- {
- case 'activate':
- case 'delete':
-
- if (!$auth->acl_get('a_user'))
- {
- trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
- }
-
- $sql = 'SELECT username
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $mark);
- $result = $db->sql_query($sql);
-
- $user_affected = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $user_affected[] = $row['username'];
- }
- $db->sql_freeresult($result);
-
- if ($action == 'activate')
- {
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
-
- foreach ($mark as $user_id)
- {
- user_active_flip($user_id, USER_INACTIVE);
- }
-
- set_config('num_users', $config['num_users'] + sizeof($mark), true);
-
- // Update latest username
- update_last_username();
- }
- else if ($action == 'delete')
- {
- if (!$auth->acl_get('a_userdel'))
- {
- trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
- }
-
- $sql = 'DELETE FROM ' . USER_GROUP_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
- $db->sql_query($sql);
- $sql = 'DELETE FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark);
- $db->sql_query($sql);
-
- add_log('admin', 'LOG_INDEX_' . strtoupper($action), implode(', ', $user_affected));
- }
-
- break;
-
- case 'remind':
- if (!$auth->acl_get('a_user'))
- {
- trigger_error($user->lang['NO_ADMIN'], E_USER_WARNING);
- }
-
- if (empty($config['email_enable']))
- {
- trigger_error($user->lang['EMAIL_DISABLED'], E_USER_WARNING);
- }
-
- $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $mark);
- $result = $db->sql_query($sql);
-
- if ($row = $db->sql_fetchrow($result))
- {
- // Send the messages
- include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
-
- $messenger = new messenger();
-
- $board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
- $sig = str_replace(' ', "\n", "-- \n" . $config['board_email_sig']);
-
- $usernames = array();
- do
- {
- $messenger->template('user_remind_inactive', $row['user_lang']);
-
- $messenger->replyto($config['board_email']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
-
- $messenger->assign_vars(array(
- 'EMAIL_SIG' => $sig,
- 'USERNAME' => html_entity_decode($row['username']),
- 'SITENAME' => $config['sitename'],
- 'REGISTER_DATE' => $user->format_date($row['user_regdate']),
-
- 'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
- );
-
- $messenger->send($row['user_notify_type']);
-
- $usernames[] = $row['username'];
- }
- while ($row = $db->sql_fetchrow($result));
-
- $messenger->save_queue();
-
- add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames));
- unset($usernames);
- }
- $db->sql_freeresult($result);
-
- break;
- }
- }
switch ($action)
{
@@ -443,6 +326,7 @@ class acp_main
'U_ACTION' => append_sid("{$phpbb_admin_path}index.$phpEx"),
'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&mode=admin'),
+ 'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'),
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? $s_action_options : '',
)
@@ -468,17 +352,18 @@ class acp_main
if ($auth->acl_get('a_user'))
{
- $sql = 'SELECT user_id, username, user_regdate, user_lastvisit
- FROM ' . USERS_TABLE . '
- WHERE user_type = ' . USER_INACTIVE . '
- ORDER BY user_regdate ASC';
- $result = $db->sql_query($sql);
+ $inactive = array();
+ $inactive_count = 0;
- while ($row = $db->sql_fetchrow($result))
+ view_inactive_users($inactive, $inactive_count, 10);
+
+ foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
- 'DATE' => $user->format_date($row['user_regdate']),
+ 'INACTIVE_DATE' => $user->format_date($row['user_inactive_time']),
+ 'JOINED' => $user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : $user->format_date($row['user_lastvisit']),
+ 'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"))
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 0214a252d0..7c789e4773 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -269,7 +269,7 @@ class acp_prune
{
foreach ($user_ids as $user_id)
{
- user_active_flip($user_id, USER_NORMAL, false, false, true);
+ user_active_flip($user_id, USER_NORMAL, false, false, INACTIVE_MANUAL, true);
}
$l_log = 'LOG_PRUNE_USER_DEAC';
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index cc5c1ffa78..87c9fc4edc 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -269,7 +269,7 @@ class acp_users
if ($user_row['user_type'] != USER_INACTIVE)
{
- user_active_flip($user_id, $user_row['user_type'], $user_actkey, $user_row['username']);
+ user_active_flip($user_id, $user_row['user_type'], $user_actkey, $user_row['username'], INACTIVE_MANUAL);
}
$messenger = new messenger(false);
@@ -311,7 +311,7 @@ class acp_users
trigger_error($user->lang['CANNOT_DEACTIVATE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
- user_active_flip($user_id, $user_row['user_type'], false, $user_row['username']);
+ user_active_flip($user_id, $user_row['user_type'], false, $user_row['username'], INACTIVE_MANUAL);
$message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED';
$log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE';
diff --git a/phpBB/includes/acp/info/acp_inactive.php b/phpBB/includes/acp/info/acp_inactive.php
new file mode 100755
index 0000000000..bee9d977d4
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_inactive.php
@@ -0,0 +1,37 @@
+ 'acp_inactive',
+ 'title' => 'ACP_INACTIVE_USERS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'list' => array('title' => 'ACP_INACTIVE_USERS', 'auth' => 'acl_a_user', 'cat' => array('ACP_CAT_USERS')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index f20729e6c6..42d3c41463 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -30,6 +30,10 @@ define('USER_FOUNDER', 3);
//define('USER_BOT', 2);
//define('USER_GUEST', 4);
+define('INACTIVE_REGISTER', 1);
+define('INACTIVE_PROFILE', 2);
+define('INACTIVE_MANUAL', 3);
+
// ACL
define('ACL_NEVER', 0);
define('ACL_YES', 1);
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 2f2e333c78..1d5ec9ee68 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2330,6 +2330,52 @@ function update_foes()
unset($perms);
}
+/**
+* Lists inactive users
+*/
+function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_inactive_time DESC')
+{
+ global $db, $user;
+
+ $sql = 'SELECT user_id, username, user_regdate, user_lastvisit, user_inactive_time, user_inactive_reason
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_INACTIVE .
+ (($limit_days) ? "AND user_inactive_time >= $limit_days" : '') . "
+ ORDER BY $sort_by";
+ $result = $db->sql_query_limit($sql, $limit, $offset);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_UNKNOWN'];
+ switch ($row['user_inactive_reason'])
+ {
+ case INACTIVE_REGISTER:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_REGISTER'];
+ break;
+
+ case INACTIVE_PROFILE:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_PROFILE'];
+ break;
+
+ case INACTIVE_MANUAL:
+ $row['inactive_reason'] = $user->lang['INACTIVE_REASON_MANUAL'];
+ break;
+ }
+
+ $users[] = $row;
+ }
+
+ $sql = 'SELECT count(user_id) AS user_count
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_INACTIVE .
+ (($limit_days) ? "AND user_inactive_time >= $limit_days" : '');
+ $result = $db->sql_query($sql);
+ $user_count = (int) $db->sql_fetchfield('user_count');
+ $db->sql_freeresult($result);
+
+ return;
+}
+
/**
* Lists warned users
*/
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 07701f27ac..6b53736e88 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -158,6 +158,8 @@ function user_add($user_row, $cp_data = false)
'user_regdate' => time(),
'user_passchg' => time(),
+ 'user_inactive_reason' => 0,
+ 'user_inactive_time' => 0,
'user_lastmark' => time(),
'user_lastvisit' => 0,
'user_lastpost_time' => 0,
@@ -423,7 +425,7 @@ function user_delete($mode, $user_id, $post_username = false)
* Flips user_type from active to inactive and vice versa, handles
* group membership updates
*/
-function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $no_log = false)
+function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $reason = 0, $no_log = false)
{
global $db, $user, $auth;
@@ -467,7 +469,9 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username
$db->sql_query($sql);
$sql_ary = array(
- 'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL
+ 'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL,
+ 'user_inactive_time' => ($user_type == USER_NORMAL) ? time() : 0,
+ 'user_inactive_reason' => ($user_type == USER_NORMAL) ? $reason : 0,
);
if ($user_actkey !== false)
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 5f7ba150f4..b3c857b5d8 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -70,7 +70,7 @@ class ucp_activate
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Now we need to demote the user from the inactive group and add him to the registered group
- user_active_flip($user_row['user_id'], $user_row['user_type'], '', $user_row['username'], true);
+ user_active_flip($user_row['user_id'], $user_row['user_type'], '', $user_row['username'], 0, true);
// Update last username
update_last_username();
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index e070ba8453..e9ef944986 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -180,8 +180,10 @@ class ucp_profile
$messenger->save_queue();
$sql_ary += array(
- 'user_type' => USER_INACTIVE,
- 'user_actkey' => $user_actkey
+ 'user_type' => USER_INACTIVE,
+ 'user_actkey' => $user_actkey,
+ 'user_inactive_reason' => INACTIVE_PROFILE,
+ 'user_inactive_time' => time(),
);
}
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 2638ea2ffe..0e0849982e 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -239,24 +239,30 @@ class ucp_register
$key_len = ($key_len < 6) ? 6 : $key_len;
$user_actkey = substr($user_actkey, 0, $key_len);
$user_type = USER_INACTIVE;
+ $user_inactive_reason = INACTIVE_REGISTER;
+ $user_inactive_time = time();
}
else
{
$user_type = USER_NORMAL;
$user_actkey = '';
+ $user_inactive_reason = 0;
+ $user_inactive_time = 0;
}
$user_row = array(
- 'username' => $username,
- 'user_password' => md5($new_password),
- 'user_email' => $email,
- 'group_id' => (int) $group_id,
- 'user_timezone' => (float) $tz,
- 'user_lang' => $lang,
- 'user_type' => $user_type,
- 'user_actkey' => $user_actkey,
- 'user_ip' => $user->ip,
- 'user_regdate' => time(),
+ 'username' => $username,
+ 'user_password' => md5($new_password),
+ 'user_email' => $email,
+ 'group_id' => (int) $group_id,
+ 'user_timezone' => (float) $tz,
+ 'user_lang' => $lang,
+ 'user_type' => $user_type,
+ 'user_actkey' => $user_actkey,
+ 'user_ip' => $user->ip,
+ 'user_regdate' => time(),
+ 'user_inactive_reason' => $user_inactive_reason,
+ 'user_inactive_time' => $user_inactive_time,
);
// Register user...
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index aec12abb5a..74b8b52fc6 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1357,7 +1357,7 @@ class install_install extends module
$_module->move_module_by($row, 'move_up', 4);
- // Move manage users screen module 4 up...
+ // Move manage users screen module 5 up...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
WHERE module_basename = 'users'
@@ -1367,7 +1367,7 @@ class install_install extends module
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $_module->move_module_by($row, 'move_up', 4);
+ $_module->move_module_by($row, 'move_up', 5);
}
// And now for the special ones
@@ -1667,13 +1667,13 @@ class install_install extends module
break;
- case 'oracle':
case 'sqlite':
$prefix_length = 200;
break;
case 'firebird':
+ case 'oracle':
$prefix_length = 6;
break;
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 269cea8254..979deb5171 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -98,6 +98,7 @@ $lang = array_merge($lang, array(
'ACP_ICONS' => 'Topic Icons',
'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies',
'ACP_IMAGESETS' => 'Imagesets',
+ 'ACP_INACTIVE_USERS' => 'Inactive users',
'ACP_INDEX' => 'Admin index',
'ACP_JABBER_SETTINGS' => 'Jabber Settings',
@@ -303,10 +304,6 @@ $lang = array_merge($lang, array(
'GZIP_COMPRESSION' => 'Gzip compression',
- 'INACTIVE_USERS' => 'Inactive Users',
- 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
-
- 'NO_INACTIVE_USERS' => 'No inactive users',
'NOT_AVAILABLE' => 'Not available',
'NUMBER_FILES' => 'Number of attachments',
'NUMBER_POSTS' => 'Number of posts',
@@ -329,12 +326,32 @@ $lang = array_merge($lang, array(
'UPLOAD_DIR_SIZE' => 'Size of posted attachments',
'USERS_PER_DAY' => 'Users per day',
- 'VALUE' => 'Value',
- 'VIEW_ADMIN_LOG' => 'View administrator log',
+ 'VALUE' => 'Value',
+ 'VIEW_ADMIN_LOG' => 'View administrator log',
+ 'VIEW_INACTIVE_USERS' => 'View inactive users',
'WELCOME_PHPBB' => 'Welcome to phpBB',
));
+// Inactive Users
+$lang = array_merge($lang, array(
+ 'INACTIVE_DATE' => 'Inactive date',
+ 'INACTIVE_REASON' => 'Reason',
+ 'INACTIVE_REASON_MANUAL' => 'Account deactivated by administrator',
+ 'INACTIVE_REASON_PROFILE' => 'Profile details changed',
+ 'INACTIVE_REASON_REGISTER' => 'Newly registered account',
+ 'INACTIVE_REASON_UNKNOWN' => 'Unknown',
+ 'INACTIVE_USERS' => 'Inactive Users',
+ 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whos accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
+ 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an email) these users if you wish.',
+
+ 'NO_INACTIVE_USERS' => 'No inactive users',
+
+ 'SORT_INACTIVE' => 'Inactive date',
+ 'SORT_LAST_VISIT' => 'Last visit',
+ 'SORT_REASON' => 'Reason',
+ 'SORT_REG_DATE' => 'Registration date',
+));
// Log Entries
$lang = array_merge($lang, array(
'LOG_ACL_ADD_USER_GLOBAL_U_' => 'Added or edited users user permissions » %s',
@@ -478,9 +495,9 @@ $lang = array_merge($lang, array(
'LOG_IMAGESET_EXPORT' => 'Exported imageset » %s',
'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset » %s',
- 'LOG_INDEX_ACTIVATE' => 'Activated inactive users » %s',
- 'LOG_INDEX_DELETE' => 'Deleted inactive users » %s',
- 'LOG_INDEX_REMIND' => 'Sent reminder emails to inactive users » %s',
+ 'LOG_INACTIVE_ACTIVATE' => 'Activated inactive users » %s',
+ 'LOG_INACTIVE_DELETE' => 'Deleted inactive users » %s',
+ 'LOG_INACTIVE_REMIND' => 'Sent reminder emails to inactive users » %s',
'LOG_INSTALL_CONVERTED' => 'Converted from %1$s to phpBB %2$s ',
'LOG_INSTALL_INSTALLED' => 'Installed phpBB %s ',
From a5a9f16c0decb0a6d828f5ee46a7e6a1fb28c583 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 23 Sep 2006 12:39:48 +0000
Subject: [PATCH 107/291] And the schema changes for the inactive user changes
git-svn-id: file:///svn/phpbb/trunk@6395 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/schemas/firebird_schema.sql | 8 ++-
phpBB/install/schemas/mssql_schema.sql | 8 ++-
phpBB/install/schemas/mysql_40_schema.sql | 74 ++++++++++++-----------
phpBB/install/schemas/mysql_41_schema.sql | 8 ++-
phpBB/install/schemas/oracle_schema.sql | 8 ++-
phpBB/install/schemas/postgres_schema.sql | 8 ++-
phpBB/install/schemas/sqlite_schema.sql | 8 ++-
7 files changed, 68 insertions(+), 54 deletions(-)
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 25dd4dcf33..0237ea838f 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -352,7 +352,7 @@ CREATE TABLE phpbb_forums (
forum_name BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
forum_desc BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
forum_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
- forum_desc_options INTEGER DEFAULT 0 NOT NULL,
+ forum_desc_options INTEGER DEFAULT 7 NOT NULL,
forum_desc_uid VARCHAR(5) DEFAULT '' NOT NULL,
forum_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
forum_password VARCHAR(14) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
@@ -361,7 +361,7 @@ CREATE TABLE phpbb_forums (
forum_rules BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
forum_rules_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
forum_rules_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
- forum_rules_options INTEGER DEFAULT 0 NOT NULL,
+ forum_rules_options INTEGER DEFAULT 7 NOT NULL,
forum_rules_uid VARCHAR(5) DEFAULT '' NOT NULL,
forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
forum_type INTEGER DEFAULT 0 NOT NULL,
@@ -440,7 +440,7 @@ CREATE TABLE phpbb_groups (
group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL,
group_desc BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL,
group_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL,
- group_desc_options INTEGER DEFAULT 0 NOT NULL,
+ group_desc_options INTEGER DEFAULT 7 NOT NULL,
group_desc_uid VARCHAR(5) DEFAULT '' NOT NULL,
group_display INTEGER DEFAULT 0 NOT NULL,
group_avatar VARCHAR(255) DEFAULT '' NOT NULL,
@@ -1392,6 +1392,8 @@ CREATE TABLE phpbb_users (
user_warnings INTEGER DEFAULT 0 NOT NULL,
user_last_warning INTEGER DEFAULT 0 NOT NULL,
user_login_attempts INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_reason INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_time INTEGER DEFAULT 0 NOT NULL,
user_posts INTEGER DEFAULT 0 NOT NULL,
user_lang VARCHAR(30) DEFAULT '' NOT NULL,
user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 0b9b55824d..3e78b80161 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -404,7 +404,7 @@ CREATE TABLE [phpbb_forums] (
[forum_name] [text] DEFAULT ('') NOT NULL ,
[forum_desc] [text] DEFAULT ('') NOT NULL ,
[forum_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
- [forum_desc_options] [int] DEFAULT (0) NOT NULL ,
+ [forum_desc_options] [int] DEFAULT (7) NOT NULL ,
[forum_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
@@ -413,7 +413,7 @@ CREATE TABLE [phpbb_forums] (
[forum_rules] [text] DEFAULT ('') NOT NULL ,
[forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_rules_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
- [forum_rules_options] [int] DEFAULT (0) NOT NULL ,
+ [forum_rules_options] [int] DEFAULT (7) NOT NULL ,
[forum_rules_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
[forum_type] [int] DEFAULT (0) NOT NULL ,
@@ -521,7 +521,7 @@ CREATE TABLE [phpbb_groups] (
[group_name] [varchar] (252) DEFAULT ('') NOT NULL ,
[group_desc] [text] DEFAULT ('') NOT NULL ,
[group_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL ,
- [group_desc_options] [int] DEFAULT (0) NOT NULL ,
+ [group_desc_options] [int] DEFAULT (7) NOT NULL ,
[group_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL ,
[group_display] [int] DEFAULT (0) NOT NULL ,
[group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
@@ -1619,6 +1619,8 @@ CREATE TABLE [phpbb_users] (
[user_warnings] [int] DEFAULT (0) NOT NULL ,
[user_last_warning] [int] DEFAULT (0) NOT NULL ,
[user_login_attempts] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_time] [int] DEFAULT (0) NOT NULL ,
[user_posts] [int] DEFAULT (0) NOT NULL ,
[user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
[user_timezone] [float] DEFAULT (0) NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index f2be2243a2..54b569e9f7 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -57,7 +57,7 @@ CREATE TABLE phpbb_acl_options (
# Table: 'phpbb_acl_roles'
CREATE TABLE phpbb_acl_roles (
role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- role_name varchar(255) DEFAULT '' NOT NULL,
+ role_name text DEFAULT '' NOT NULL,
role_description text DEFAULT '' NOT NULL,
role_type varchar(10) DEFAULT '' NOT NULL,
role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
@@ -202,7 +202,7 @@ CREATE TABLE phpbb_extensions (
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_name varchar(255) DEFAULT '' NOT NULL,
+ group_name text DEFAULT '' NOT NULL,
cat_id tinyint(2) DEFAULT '0' NOT NULL,
allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
@@ -224,16 +224,16 @@ CREATE TABLE phpbb_forums (
forum_name text DEFAULT '' NOT NULL,
forum_desc text DEFAULT '' NOT NULL,
forum_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
- forum_link varchar(255) DEFAULT '' NOT NULL,
+ forum_link text DEFAULT '' NOT NULL,
forum_password varchar(120) DEFAULT '' NOT NULL,
forum_style tinyint(4) DEFAULT '0' NOT NULL,
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules text DEFAULT '' NOT NULL,
- forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_link text DEFAULT '' NOT NULL,
forum_rules_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_rules_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
@@ -245,7 +245,7 @@ CREATE TABLE phpbb_forums (
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_subject text DEFAULT '' NOT NULL,
forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_name text DEFAULT '' NOT NULL,
forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
forum_flags tinyint(4) DEFAULT '32' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
@@ -295,10 +295,10 @@ CREATE TABLE phpbb_forums_watch (
CREATE TABLE phpbb_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
- group_name varchar(252) DEFAULT '' NOT NULL,
+ group_name text DEFAULT '' NOT NULL,
group_desc text DEFAULT '' NOT NULL,
group_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- group_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
group_desc_uid varchar(5) DEFAULT '' NOT NULL,
group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar varchar(255) DEFAULT '' NOT NULL,
@@ -369,7 +369,7 @@ CREATE TABLE phpbb_moderator_cache (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
username text DEFAULT '' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_name varchar(255) DEFAULT '' NOT NULL,
+ group_name text DEFAULT '' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
KEY disp_idx (display_on_index),
KEY forum_id (forum_id)
@@ -493,7 +493,7 @@ CREATE TABLE phpbb_privmsgs (
CREATE TABLE phpbb_privmsgs_folder (
folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- folder_name varchar(255) DEFAULT '' NOT NULL,
+ folder_name text DEFAULT '' NOT NULL,
pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (folder_id),
KEY user_id (user_id)
@@ -506,7 +506,7 @@ CREATE TABLE phpbb_privmsgs_rules (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_string text DEFAULT '' NOT NULL,
rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -537,14 +537,14 @@ CREATE TABLE phpbb_privmsgs_to (
# Table: 'phpbb_profile_fields'
CREATE TABLE phpbb_profile_fields (
field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- field_name varchar(255) DEFAULT '' NOT NULL,
+ field_name text DEFAULT '' NOT NULL,
field_type tinyint(4) DEFAULT '0' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
field_maxlen varchar(255) DEFAULT '' NOT NULL,
- field_novalue varchar(255) DEFAULT '' NOT NULL,
- field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_novalue text DEFAULT '' NOT NULL,
+ field_default_value text DEFAULT '' NOT NULL,
field_validation varchar(60) DEFAULT '' NOT NULL,
field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -571,7 +571,7 @@ CREATE TABLE phpbb_profile_fields_lang (
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
field_type tinyint(4) DEFAULT '0' NOT NULL,
- lang_value varchar(255) DEFAULT '' NOT NULL,
+ lang_value text DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
);
@@ -580,9 +580,9 @@ CREATE TABLE phpbb_profile_fields_lang (
CREATE TABLE phpbb_profile_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_name text DEFAULT '' NOT NULL,
lang_explain text DEFAULT '' NOT NULL,
- lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ lang_default_value text DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id)
);
@@ -590,7 +590,7 @@ CREATE TABLE phpbb_profile_lang (
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_title text DEFAULT '' NOT NULL,
rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
rank_image varchar(255) DEFAULT '' NOT NULL,
@@ -615,7 +615,7 @@ CREATE TABLE phpbb_reports (
# Table: 'phpbb_reports_reasons'
CREATE TABLE phpbb_reports_reasons (
reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
- reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_title text DEFAULT '' NOT NULL,
reason_description mediumtext DEFAULT '' NOT NULL,
reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (reason_id)
@@ -635,7 +635,7 @@ CREATE TABLE phpbb_search_results (
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word_text varchar(255) DEFAULT '' NOT NULL,
+ word_text text DEFAULT '' NOT NULL,
word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (word_id),
UNIQUE wrd_txt (word_text)
@@ -661,7 +661,7 @@ CREATE TABLE phpbb_sessions (
session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_ip varchar(40) DEFAULT '' NOT NULL,
session_browser varchar(150) DEFAULT '' NOT NULL,
- session_page varchar(255) DEFAULT '' NOT NULL,
+ session_page text DEFAULT '' NOT NULL,
session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -711,7 +711,7 @@ CREATE TABLE phpbb_smilies (
CREATE TABLE phpbb_styles (
style_id tinyint(4) NOT NULL auto_increment,
style_name text DEFAULT '' NOT NULL,
- style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_copyright text 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,
@@ -728,7 +728,7 @@ CREATE TABLE phpbb_styles (
CREATE TABLE phpbb_styles_template (
template_id tinyint(4) NOT NULL auto_increment,
template_name text DEFAULT '' NOT NULL,
- template_copyright varchar(255) DEFAULT '' NOT NULL,
+ template_copyright text DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(252) DEFAULT 'kNg=' NOT NULL,
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -753,7 +753,7 @@ CREATE TABLE phpbb_styles_template_data (
CREATE TABLE phpbb_styles_theme (
theme_id tinyint(4) NOT NULL auto_increment,
theme_name text DEFAULT '' NOT NULL,
- theme_copyright varchar(255) DEFAULT '' NOT NULL,
+ theme_copyright text DEFAULT '' NOT NULL,
theme_path varchar(100) DEFAULT '' NOT NULL,
theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
@@ -767,7 +767,7 @@ CREATE TABLE phpbb_styles_theme (
CREATE TABLE phpbb_styles_imageset (
imageset_id tinyint(4) NOT NULL auto_increment,
imageset_name text DEFAULT '' NOT NULL,
- imageset_copyright varchar(255) DEFAULT '' NOT NULL,
+ imageset_copyright text DEFAULT '' NOT NULL,
imageset_path varchar(100) DEFAULT '' NOT NULL,
site_logo varchar(200) DEFAULT '' NOT NULL,
upload_bar varchar(200) DEFAULT '' NOT NULL,
@@ -886,11 +886,11 @@ CREATE TABLE phpbb_topics (
topic_status tinyint(3) DEFAULT '0' NOT NULL,
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_name text DEFAULT '' NOT NULL,
topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_name text DEFAULT '' NOT NULL,
topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_subject text DEFAULT '' NOT NULL,
topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
@@ -964,7 +964,7 @@ CREATE TABLE phpbb_users (
user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_ip varchar(40) DEFAULT '' NOT NULL,
user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
- username varchar(252) DEFAULT '' NOT NULL,
+ username text DEFAULT '' NOT NULL,
user_password varchar(120) DEFAULT '' NOT NULL,
user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_email text DEFAULT '' NOT NULL,
@@ -979,6 +979,8 @@ CREATE TABLE phpbb_users (
user_warnings tinyint(4) DEFAULT '0' NOT NULL,
user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
@@ -1017,12 +1019,12 @@ CREATE TABLE phpbb_users (
user_sig_bbcode_bitfield varchar(252) DEFAULT '' NOT NULL,
user_from text DEFAULT '' NOT NULL,
user_icq varchar(15) DEFAULT '' NOT NULL,
- user_aim varchar(255) DEFAULT '' NOT NULL,
- user_yim varchar(255) DEFAULT '' NOT NULL,
- user_msnm varchar(255) DEFAULT '' NOT NULL,
- user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_aim text DEFAULT '' NOT NULL,
+ user_yim text DEFAULT '' NOT NULL,
+ user_msnm text DEFAULT '' NOT NULL,
+ user_jabber text DEFAULT '' NOT NULL,
user_website text DEFAULT '' NOT NULL,
- user_occ varchar(255) DEFAULT '' NOT NULL,
+ user_occ text DEFAULT '' NOT NULL,
user_interests text DEFAULT '' NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL,
user_newpasswd varchar(96) DEFAULT '' NOT NULL,
@@ -1048,8 +1050,8 @@ CREATE TABLE phpbb_warnings (
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word varchar(255) DEFAULT '' NOT NULL,
- replacement varchar(255) DEFAULT '' NOT NULL,
+ word text DEFAULT '' NOT NULL,
+ replacement text DEFAULT '' NOT NULL,
PRIMARY KEY (word_id)
);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 593980ea9b..f907a49fbe 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -224,7 +224,7 @@ CREATE TABLE phpbb_forums (
forum_name text DEFAULT '' NOT NULL,
forum_desc text DEFAULT '' NOT NULL,
forum_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(40) DEFAULT '' NOT NULL,
@@ -233,7 +233,7 @@ CREATE TABLE phpbb_forums (
forum_rules text DEFAULT '' NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
forum_rules_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_rules_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
@@ -298,7 +298,7 @@ CREATE TABLE phpbb_groups (
group_name varchar(252) DEFAULT '' NOT NULL,
group_desc text DEFAULT '' NOT NULL,
group_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- group_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
group_desc_uid varchar(5) DEFAULT '' NOT NULL,
group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar varchar(255) DEFAULT '' NOT NULL,
@@ -979,6 +979,8 @@ CREATE TABLE phpbb_users (
user_warnings tinyint(4) DEFAULT '0' NOT NULL,
user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index adc86f7b26..a3665563e1 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -479,7 +479,7 @@ CREATE TABLE phpbb_forums (
forum_name varchar2(3000) DEFAULT '' ,
forum_desc clob DEFAULT '' ,
forum_desc_bitfield varchar2(252) DEFAULT '' ,
- forum_desc_options number(11) DEFAULT '0' NOT NULL,
+ forum_desc_options number(11) DEFAULT '7' NOT NULL,
forum_desc_uid varchar2(5) DEFAULT '' ,
forum_link varchar2(255) DEFAULT '' ,
forum_password varchar2(40) DEFAULT '' ,
@@ -488,7 +488,7 @@ CREATE TABLE phpbb_forums (
forum_rules clob DEFAULT '' ,
forum_rules_link varchar2(255) DEFAULT '' ,
forum_rules_bitfield varchar2(252) DEFAULT '' ,
- forum_rules_options number(11) DEFAULT '0' NOT NULL,
+ forum_rules_options number(11) DEFAULT '7' NOT NULL,
forum_rules_uid varchar2(5) DEFAULT '' ,
forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
forum_type number(4) DEFAULT '0' NOT NULL,
@@ -586,7 +586,7 @@ CREATE TABLE phpbb_groups (
group_name varchar2(252) DEFAULT '' ,
group_desc clob DEFAULT '' ,
group_desc_bitfield varchar2(252) DEFAULT '' ,
- group_desc_options number(11) DEFAULT '0' NOT NULL,
+ group_desc_options number(11) DEFAULT '7' NOT NULL,
group_desc_uid varchar2(5) DEFAULT '' ,
group_display number(1) DEFAULT '0' NOT NULL,
group_avatar varchar2(255) DEFAULT '' ,
@@ -1788,6 +1788,8 @@ CREATE TABLE phpbb_users (
user_warnings number(4) DEFAULT '0' NOT NULL,
user_last_warning number(11) DEFAULT '0' NOT NULL,
user_login_attempts number(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason number(2) DEFAULT '0' NOT NULL,
+ user_inactive_time number(11) DEFAULT '0' NOT NULL,
user_posts number(8) DEFAULT '0' NOT NULL,
user_lang varchar2(30) DEFAULT '' ,
user_timezone number(5, 2) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index a4e71e8acf..a7ea77c538 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -356,7 +356,7 @@ CREATE TABLE phpbb_forums (
forum_name varchar(3000) DEFAULT '' NOT NULL,
forum_desc varchar(8000) DEFAULT '' NOT NULL,
forum_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_desc_options INT4 DEFAULT '0' NOT NULL CHECK (forum_desc_options >= 0),
+ forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0),
forum_desc_uid varchar(5) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(40) DEFAULT '' NOT NULL,
@@ -365,7 +365,7 @@ CREATE TABLE phpbb_forums (
forum_rules varchar(8000) DEFAULT '' NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
forum_rules_bitfield varchar(252) DEFAULT '' NOT NULL,
- forum_rules_options INT4 DEFAULT '0' NOT NULL CHECK (forum_rules_options >= 0),
+ forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0),
forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
forum_type INT2 DEFAULT '0' NOT NULL,
@@ -440,7 +440,7 @@ CREATE TABLE phpbb_groups (
group_name varchar_ci DEFAULT '' NOT NULL,
group_desc varchar(8000) DEFAULT '' NOT NULL,
group_desc_bitfield varchar(252) DEFAULT '' NOT NULL,
- group_desc_options INT4 DEFAULT '0' NOT NULL CHECK (group_desc_options >= 0),
+ group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0),
group_desc_uid varchar(5) DEFAULT '' NOT NULL,
group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0),
group_avatar varchar(255) DEFAULT '' NOT NULL,
@@ -1239,6 +1239,8 @@ CREATE TABLE phpbb_users (
user_warnings INT2 DEFAULT '0' NOT NULL,
user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0),
user_login_attempts INT2 DEFAULT '0' NOT NULL,
+ user_inactive_reason INT2 DEFAULT '0' NOT NULL,
+ user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0),
user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0),
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index adbffb4d0e..0d9e443e3a 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -217,7 +217,7 @@ CREATE TABLE phpbb_forums (
forum_name text(65535) NOT NULL DEFAULT '',
forum_desc text(65535) NOT NULL DEFAULT '',
forum_desc_bitfield varchar(252) NOT NULL DEFAULT '',
- forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
forum_desc_uid varchar(5) NOT NULL DEFAULT '',
forum_link varchar(255) NOT NULL DEFAULT '',
forum_password varchar(40) NOT NULL DEFAULT '',
@@ -226,7 +226,7 @@ CREATE TABLE phpbb_forums (
forum_rules text(65535) NOT NULL DEFAULT '',
forum_rules_link varchar(255) NOT NULL DEFAULT '',
forum_rules_bitfield varchar(252) NOT NULL DEFAULT '',
- forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
forum_rules_uid varchar(5) NOT NULL DEFAULT '',
forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
forum_type tinyint(4) NOT NULL DEFAULT '0',
@@ -290,7 +290,7 @@ CREATE TABLE phpbb_groups (
group_name varchar(252) NOT NULL DEFAULT '',
group_desc text(65535) NOT NULL DEFAULT '',
group_desc_bitfield varchar(252) NOT NULL DEFAULT '',
- group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
group_desc_uid varchar(5) NOT NULL DEFAULT '',
group_display INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_avatar varchar(255) NOT NULL DEFAULT '',
@@ -950,6 +950,8 @@ CREATE TABLE phpbb_users (
user_warnings tinyint(4) NOT NULL DEFAULT '0',
user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_login_attempts tinyint(4) NOT NULL DEFAULT '0',
+ user_inactive_reason tinyint(2) NOT NULL DEFAULT '0',
+ user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_lang varchar(30) NOT NULL DEFAULT '',
user_timezone decimal(5,2) NOT NULL DEFAULT '0',
From bab608a1b92a28f00d60c674b9a9a4d9b78e7ce9 Mon Sep 17 00:00:00 2001
From: David M
Date: Sat, 23 Sep 2006 13:44:24 +0000
Subject: [PATCH 108/291] oops
git-svn-id: file:///svn/phpbb/trunk@6396 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/db/mysql4.php | 2 +-
phpBB/includes/db/mysqli.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index cd1d7f9cf8..f3ee21fb70 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -49,7 +49,7 @@ class dbal_mysql4 extends dbal
{
if (@mysql_select_db($this->dbname))
{
- @mysql_query("SET NAMES 'utf8'");
+ @mysql_query("SET NAMES 'utf8'", $this->db_connect_id);
return $this->db_connect_id;
}
}
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index 554d9ddb60..550dca5d88 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -50,7 +50,7 @@ class dbal_mysqli extends dbal
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
- @mysqli_query("SET NAMES 'utf8'");
+ @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
return $this->db_connect_id;
}
}
From 11c278a0375f5efc4f529a856ac16510bdabc062 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 23 Sep 2006 15:47:31 +0000
Subject: [PATCH 109/291] #4422
git-svn-id: file:///svn/phpbb/trunk@6397 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/viewonline.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 98f0fb47af..becd307bf7 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -339,6 +339,7 @@ $pagination = generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpE
$sql = 'SELECT group_id, group_name, group_colour, group_type
FROM ' . GROUPS_TABLE . '
WHERE group_legend = 1
+ AND group_type <> ' . GROUP_HIDDEN . '
ORDER BY group_name ASC';
$result = $db->sql_query($sql);
From 1d2e60b0689904c0f657972d5c105f6725feedab Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sat, 23 Sep 2006 19:30:01 +0000
Subject: [PATCH 110/291] #3896
git-svn-id: file:///svn/phpbb/trunk@6398 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/index.php | 9 ++++++++-
phpBB/viewonline.php | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/phpBB/index.php b/phpBB/index.php
index 442a94c34c..59e51bac49 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -46,7 +46,14 @@ $result = $db->sql_query($sql);
$legend = '';
while ($row = $db->sql_fetchrow($result))
{
- $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ' ';
+ if ($row['group_name'] == 'BOTS')
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '' . $user->lang['G_BOTS'] . ' ';
+ }
+ else
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ' ';
+ }
}
$db->sql_freeresult($result);
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index becd307bf7..829bdc59fe 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -346,7 +346,14 @@ $result = $db->sql_query($sql);
$legend = '';
while ($row = $db->sql_fetchrow($result))
{
- $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ' ';
+ if ($row['group_name'] == 'BOTS')
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '' . $user->lang['G_BOTS'] . ' ';
+ }
+ else
+ {
+ $legend .= (($legend != '') ? ', ' : '') . '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ' ';
+ }
}
$db->sql_freeresult($result);
From 6ac33db38d79ba039249061f68fe4ea3728be651 Mon Sep 17 00:00:00 2001
From: Jonathan Stanley
Date: Sun, 24 Sep 2006 00:28:32 +0000
Subject: [PATCH 111/291] Righto... my first checkin for these language related
thingies. Hopefully nothing has blown up! ;)
The basic style guide is:
1) British English, Cambridge style... ie: -ise, not -ize, etc.
2) Sentence-case pervasively with exception of acronyms/abbreviations, which if not in their contracted form, shall be in title-case. If you don't like it, you can
restyle it via CSS using text-transform: none|uppercase|lowercase|capitalize; ...
additional hooks may be added to the strings to assist this.
3) For those that have missed the switch to UTF-8, it means that the language files need not use numeric entities anymore. <, > and & stay though, as
they must always be entitised.
There'll be more tweaks and changes, though this "big 'un" is out of the way and will get progressively chilly so that it can be frozen for RC1 after
however many betas there may be. ;) Wooh! :P
git-svn-id: file:///svn/phpbb/trunk@6399 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/language/en/acp/attachments.php | 102 +--
phpBB/language/en/acp/ban.php | 16 +-
phpBB/language/en/acp/board.php | 126 ++--
phpBB/language/en/acp/bots.php | 2 +-
phpBB/language/en/acp/common.php | 680 ++++++++++----------
phpBB/language/en/acp/database.php | 24 +-
phpBB/language/en/acp/email.php | 6 +-
phpBB/language/en/acp/forums.php | 54 +-
phpBB/language/en/acp/groups.php | 12 +-
phpBB/language/en/acp/language.php | 34 +-
phpBB/language/en/acp/modules.php | 10 +-
phpBB/language/en/acp/permissions.php | 132 ++--
phpBB/language/en/acp/permissions_phpbb.php | 16 +-
phpBB/language/en/acp/posting.php | 44 +-
phpBB/language/en/acp/profile.php | 62 +-
phpBB/language/en/acp/prune.php | 18 +-
phpBB/language/en/acp/search.php | 20 +-
phpBB/language/en/acp/styles.php | 28 +-
phpBB/language/en/acp/users.php | 3 +-
phpBB/language/en/common.php | 20 +-
phpBB/language/en/groups.php | 10 +-
phpBB/language/en/help_bbcode.php | 2 +-
phpBB/language/en/help_faq.php | 18 +-
phpBB/language/en/install.php | 52 +-
phpBB/language/en/mcp.php | 2 +-
phpBB/language/en/memberlist.php | 4 +-
phpBB/language/en/posting.php | 6 +-
phpBB/language/en/search.php | 2 +-
phpBB/language/en/ucp.php | 48 +-
phpBB/language/en/viewtopic.php | 2 +-
30 files changed, 778 insertions(+), 777 deletions(-)
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 2b25e0b0aa..b1a63a797b 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -31,29 +31,29 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_ATTACHMENT_SETTINGS_EXPLAIN' => 'Here you can configure the Main Settings for Attachments and the associated Special Categories.',
- 'ACP_EXTENSION_GROUPS_EXPLAIN' => 'Here you can add, delete and modify your Extension Groups, you can disable Extension Groups, assign a special Category to them, change the download mechanism and you can define an Upload Icon which will be displayed in front of an Attachment belonging to the Group.',
- 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your Extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3, php4, phtml, pl, cgi, asp, aspx...)',
- 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see files within the Attachments upload directory but not assigned to posts. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post id, you have to determine this id by yourself, this feature is mainly for those people wanting to upload files with another program and assigning those (mostly large) files to an existing post.',
+ 'ACP_ATTACHMENT_SETTINGS_EXPLAIN' => 'Here you can configure the main settings for attachments and the associated special categories.',
+ 'ACP_EXTENSION_GROUPS_EXPLAIN' => 'Here you can add, delete, modify or disable your extension groups. Further options include the assignment of a special category to them, changing the download mechanism and defining an upload icon which will be displayed in front of the attachment which belongs to the group.',
+ 'ACP_MANAGE_EXTENSIONS_EXPLAIN' => 'Here you can manage your allowed extensions. To activate your extensions, please refer to the extension groups management panel. We strongly recommend not to allow scripting extensions (such as php, php3
, php4
, phtml
, pl
, cgi
, py
, rb
, asp
, aspx
, and so forth…)',
+ 'ACP_ORPHAN_ATTACHMENTS_EXPLAIN' => 'Here you are able to see files within the attachments upload directory but not assigned to posts. This happens mostly if users are attaching files but not submitting the post. You are able to delete the files or attach them to existing posts. Attaching to posts requires a valid post ID, you have to determine this id by yourself, this feature is mainly for those people wanting to upload files with another program and assigning those (mostly large) files to an existing post.',
'ADD_EXTENSION' => 'Add extension',
- 'ADD_EXTENSION_GROUP' => 'Add Extension Group',
+ 'ADD_EXTENSION_GROUP' => 'Add extension group',
'ADMIN_UPLOAD_ERROR' => 'Errors while trying to attach file: %s',
- 'ALLOWED_FORUMS' => 'Allowed Forums',
+ 'ALLOWED_FORUMS' => 'Allowed forums',
'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums',
- 'ALLOW_ATTACHMENTS' => 'Allow Attachments',
- 'ALLOW_ALL_FORUMS' => 'Allow All Forums',
+ 'ALLOW_ATTACHMENTS' => 'Allow attachments',
+ 'ALLOW_ALL_FORUMS' => 'Allow all forums',
'ALLOW_IN_PM' => 'Allowed in private messaging',
- 'ALLOW_PM_ATTACHMENTS' => 'Allow Attachments in Private Messages',
- 'ALLOW_SELECTED_FORUMS' => 'Only Forums selected below',
- 'ASSIGNED_EXTENSIONS' => 'Assigned Extensions',
- 'ASSIGNED_GROUP' => 'Assigned Group',
+ 'ALLOW_PM_ATTACHMENTS' => 'Allow attachments in private messages',
+ 'ALLOW_SELECTED_FORUMS' => 'Only forums selected below',
+ 'ASSIGNED_EXTENSIONS' => 'Assigned extensions',
+ 'ASSIGNED_GROUP' => 'Assigned extension group',
'ATTACH_EXTENSIONS_URL' => 'Extensions',
- 'ATTACH_EXT_GROUPS_URL' => 'Extension Groups',
+ 'ATTACH_EXT_GROUPS_URL' => 'Extension groups',
'ATTACH_MAX_FILESIZE' => 'Maximum filesize',
'ATTACH_MAX_FILESIZE_EXPLAIN' => 'Maximum size of each file, 0 is unlimited.',
'ATTACH_MAX_PM_FILESIZE' => 'Maximum filesize messaging',
'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum drive space available per user for private message attachments, 0 is unlimited.',
- 'ATTACH_ORPHAN_URL' => 'Orphan Attachments',
+ 'ATTACH_ORPHAN_URL' => 'Orphan attachments',
'ATTACH_POST_ID' => 'Post ID',
'ATTACH_QUOTA' => 'Total attachment quota',
'ATTACH_QUOTA_EXPLAIN' => 'Maximum drive space available for attachments in total, 0 is unlimited.',
@@ -61,45 +61,45 @@ $lang = array_merge($lang, array(
'CAT_IMAGES' => 'Images',
'CAT_RM_FILES' => 'Real Media Streams',
- 'CAT_WM_FILES' => 'Win Media Streams',
+ 'CAT_WM_FILES' => 'Window Media Streams',
'CREATE_GROUP' => 'Create new group',
'CREATE_THUMBNAIL' => 'Create thumbnail',
'CREATE_THUMBNAIL_EXPLAIN' => 'Create a thumbnail in all possible situations.',
- 'DEFINE_ALLOWED_IPS' => 'Define allowed IPs/Hostnames',
- 'DEFINE_DISALLOWED_IPS' => 'Define disallowed IPs/Hostnames',
- 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IP\'s or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *',
- 'DOWNLOAD_MODE' => 'Download Mode',
- 'DOWNLOAD_MODE_EXPLAIN' => 'If you experience problems downloading files, set this to "physical", the user will be directed to the file directly. Do not set it to physical if not really needed, it discloses the filename.',
- 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a blue background.',
+ 'DEFINE_ALLOWED_IPS' => 'Define allowed IPs/hostnames',
+ 'DEFINE_DISALLOWED_IPS' => 'Define disallowed IPs/hostnames',
+ 'DOWNLOAD_ADD_IPS_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *',
+ 'DOWNLOAD_MODE' => 'Download mode',
+ 'DOWNLOAD_MODE_EXPLAIN' => 'If you experience problems downloading files, set this to “physical”, the user will be directed to the file directly. Do not set it to physical if not really needed, it discloses the filename.',
+ 'DOWNLOAD_REMOVE_IPS_EXPLAIN' => 'You can remove (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs have a blue background.',
'DISPLAY_INLINED' => 'Display images inline',
'DISPLAY_INLINED_EXPLAIN' => 'If set to No image attachments will show as a link.',
- 'DISPLAY_ORDER' => 'Attachment Display Order',
+ 'DISPLAY_ORDER' => 'Attachment display order',
'DISPLAY_ORDER_EXPLAIN' => 'Display attachments ordered by time.',
- 'EDIT_EXTENSION_GROUP' => 'Edit Extension Group',
- 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/Hostname.',
- 'EXCLUDE_FROM_ALLOWED_IP' => 'Exclude IP from allowed IPs/Hostnames',
- 'EXCLUDE_FROM_DISALLOWED_IP' => 'Exclude IP from disallowed IPs/Hostnames',
+ 'EDIT_EXTENSION_GROUP' => 'Edit extension group',
+ 'EXCLUDE_ENTERED_IP' => 'Enable this to exclude the entered IP/hostname.',
+ 'EXCLUDE_FROM_ALLOWED_IP' => 'Exclude IP from allowed IPs/hostnames',
+ 'EXCLUDE_FROM_DISALLOWED_IP' => 'Exclude IP from disallowed IPs/hostnames',
'EXTENSIONS_UPDATED' => 'Extensions successfully updated',
- 'EXTENSION_EXIST' => 'The Extension %s already exist',
- 'EXTENSION_GROUP' => 'Extension Group',
- 'EXTENSION_GROUPS' => 'Extension Groups',
- 'EXTENSION_GROUP_DELETED' => 'Extension Group successfully deleted',
- 'EXTENSION_GROUP_EXIST' => 'The Extension Group %s already exist',
+ 'EXTENSION_EXIST' => 'The extension %s already exist',
+ 'EXTENSION_GROUP' => 'Extension group',
+ 'EXTENSION_GROUPS' => 'Extension groups',
+ 'EXTENSION_GROUP_DELETED' => 'Extension group successfully deleted',
+ 'EXTENSION_GROUP_EXIST' => 'The extension group %s already exist',
- 'GO_TO_EXTENSIONS' => 'Go to Extension Management Screen',
+ 'GO_TO_EXTENSIONS' => 'Go to extension management screen',
'GROUP_NAME' => 'Group name',
- 'IMAGE_LINK_SIZE' => 'Image Link Dimensions',
+ 'IMAGE_LINK_SIZE' => 'Image link dimensions',
'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as link if image is larger than this, set to 0px by 0px to disable.',
'IMAGICK_PATH' => 'Imagemagick path',
- 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. /usr/bin/',
+ 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. /usr/bin/ ',
'MAX_ATTACHMENTS' => 'Max attachments per post',
'MAX_ATTACHMENTS_PM' => 'Max attachments per message',
- 'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize',
- 'MAX_IMAGE_SIZE' => 'Maximum Image Dimensions',
+ 'MAX_EXTGROUP_FILESIZE' => 'Maximum filesize',
+ 'MAX_IMAGE_SIZE' => 'Maximum image dimensions',
'MAX_IMAGE_SIZE_EXPLAIN' => 'Maximum size of image attachments, 0px by 0px disables image attachments.',
'MAX_THUMB_WIDTH' => 'Maximum thumbnail width in pixel',
'MAX_THUMB_WIDTH_EXPLAIN' => 'A generated thumbnail will not exceed the width set here',
@@ -111,10 +111,10 @@ $lang = array_merge($lang, array(
'NOT_ALLOWED_IN_PM' => 'Not allowed in private messages',
'NOT_ASSIGNED' => 'Not assigned',
'NO_EXT_GROUP' => 'None',
- 'NO_EXT_GROUP_NAME' => 'No Group Name entered',
- 'NO_EXT_GROUP_SPECIFIED' => 'No Extension Group specified',
+ 'NO_EXT_GROUP_NAME' => 'No group name entered',
+ 'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified',
'NO_FILE_CAT' => 'None',
- 'NO_IMAGE' => 'No Image',
+ 'NO_IMAGE' => 'No image',
'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled because there is no supported GD library available and the imagemagick executable could not be found.',
'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.',
'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.',
@@ -122,14 +122,14 @@ $lang = array_merge($lang, array(
'ORDER_ALLOW_DENY' => 'Allow',
'ORDER_DENY_ALLOW' => 'Deny',
- 'REMOVE_ALLOWED_IPS' => 'Remove or Un-exclude allowed IPs/Hostnames',
- 'REMOVE_DISALLOWED_IPS' => 'Remove or Un-exclude disallowed IPs/Hostnames',
+ 'REMOVE_ALLOWED_IPS' => 'Remove or un-exclude allowed IPs/hostnames',
+ 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude disallowed IPs/hostnames',
'SEARCH_IMAGICK' => 'Search for Imagemagick',
- 'SECURE_ALLOW_DENY' => 'Allow/Deny List',
+ 'SECURE_ALLOW_DENY' => 'Allow/Deny list',
'SECURE_ALLOW_DENY_EXPLAIN' => 'Allow or Deny the list of addresses, this setting only applies to downloading files',
'SECURE_DOWNLOADS' => 'Enable secure downloads',
- 'SECURE_DOWNLOADS_EXPLAIN' => 'With this option enabled, downloads are limited to IP\'s/hostnames you defined.',
+ 'SECURE_DOWNLOADS_EXPLAIN' => 'With this option enabled, downloads are limited to IP’s/hostnames you defined.',
'SECURE_DOWNLOAD_NOTICE' => 'Secure Downloads are not enabled. The settings below will be applied after enabling secure downloads.',
'SECURE_DOWNLOAD_UPDATE_SUCCESS'=> 'The IP list has been updated successfully',
'SECURE_EMPTY_REFERRER' => 'Allow empty referrer',
@@ -138,15 +138,15 @@ $lang = array_merge($lang, array(
'SPECIAL_CATEGORY' => 'Special Category',
'SPECIAL_CATEGORY_EXPLAIN' => 'Special Categories differ between the way presented within posts.',
'SUCCESSFULLY_UPLOADED' => 'Succeessfully uploaded',
- 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension Group successfully added',
- 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension Group successfully updated',
+ 'SUCCESS_EXTENSION_GROUP_ADD' => 'Extension group successfully added',
+ 'SUCCESS_EXTENSION_GROUP_EDIT' => 'Extension group successfully updated',
- 'UPLOADING_FILES' => 'Uploading Files',
- 'UPLOADING_FILE_TO' => 'Uploading File "%1$s" to Post Number %2$d...',
- 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum "%s"',
- 'UPLOAD_DIR' => 'Upload Directory',
- 'UPLOAD_DIR_EXPLAIN' => 'Storage Path for Attachments.',
- 'UPLOAD_ICON' => 'Upload Icon',
+ 'UPLOADING_FILES' => 'Uploading files',
+ 'UPLOADING_FILE_TO' => 'Uploading file “%1$s” to Post Number %2$d…',
+ 'UPLOAD_DENIED_FORUM' => 'You do not have the permission to upload files to forum “%s”',
+ 'UPLOAD_DIR' => 'Upload directory',
+ 'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments.',
+ 'UPLOAD_ICON' => 'Upload icon',
'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.',
));
diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php
index cc9d184d57..2b829efead 100644
--- a/phpBB/language/en/acp/ban.php
+++ b/phpBB/language/en/acp/ban.php
@@ -32,9 +32,9 @@ if (empty($lang) || !is_array($lang))
// Banning
$lang = array_merge($lang, array(
- '1_HOUR' => '1 Hour',
- '30_MINS' => '30 Minutes',
- '6_HOURS' => '6 Hours',
+ '1_HOUR' => '1 hour',
+ '30_MINS' => '30 minutes',
+ '6_HOURS' => '6 hours',
'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or email address. These methods prevent a user reaching any part of the board. You can give a short (255 character) reason for the ban if you wish. This will be displayed in the admin log. The length of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select Until for the ban length and enter a date in yyyy-mm-dd format.',
@@ -46,18 +46,18 @@ $lang = array_merge($lang, array(
'EMAIL_BAN' => 'Ban one or more email addresses',
'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered email address from all current bans.',
- 'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com, *@*.domain.tld, etc.',
+ 'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. *@hotmail.com , *@*.domain.tld , etc.',
'EMAIL_NO_BANNED' => 'No banned email addresses',
- 'EMAIL_UNBAN' => 'Un-ban or Un-exclude Emails',
+ 'EMAIL_UNBAN' => 'Un-ban or un-exclude emails',
'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded email addresses have a marked background.',
- 'IP_BAN' => 'Ban one or more ips',
+ 'IP_BAN' => 'Ban one or more IPs',
'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.',
- 'IP_BAN_EXPLAIN' => 'To specify several different IP\'s or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *',
+ 'IP_BAN_EXPLAIN' => 'To specify several different IPs or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *',
'IP_HOSTNAME' => 'IP addresses or hostnames',
'IP_NO_BANNED' => 'No banned IP addresses',
'IP_UNBAN' => 'Un-ban or Un-exclude IPs',
- 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a marked background.',
+ 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IPs have a marked background.',
'PERMANENT' => 'Permanent',
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index b3ae6938c7..e773839601 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -32,11 +32,11 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, from the site name through user registration to private messaging.',
- 'CUSTOM_DATEFORMAT' => 'Custom...',
+ 'CUSTOM_DATEFORMAT' => 'Custom…',
'DEFAULT_DATE_FORMAT' => 'Date Format',
- 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP date function.',
- 'DEFAULT_LANGUAGE' => 'Default Language',
- 'DEFAULT_STYLE' => 'Default Style',
+ 'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP date
function.',
+ 'DEFAULT_LANGUAGE' => 'Default language',
+ 'DEFAULT_STYLE' => 'Default style',
'DISABLE_BOARD' => 'Disable board',
'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish.',
'OVERRIDE_STYLE' => 'Override user style',
@@ -45,34 +45,34 @@ $lang = array_merge($lang, array(
'SITE_DESC' => 'Site description',
'SITE_NAME' => 'Site name',
'SYSTEM_DST' => 'Enable Daylight Savings Time',
- 'SYSTEM_TIMEZONE' => 'System Timezone',
+ 'SYSTEM_TIMEZONE' => 'System timezone',
'WARNINGS_EXPIRE' => 'Warning duration',
- 'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days after it is issued before a warning will expire from a user\'s record',
+ 'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days after it is issued before a warning will expire from a user’s record',
));
// Board Features
$lang = array_merge($lang, array(
'ACP_BOARD_FEATURES_EXPLAIN' => 'Here you can enable/disable several board features',
- 'ALLOW_ATTACHMENTS' => 'Allow Attachments',
+ 'ALLOW_ATTACHMENTS' => 'Allow attachments',
'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_NAME_CHANGE' => 'Allow Username changes',
- 'ALLOW_NO_CENSORS' => 'Allow Disable of Censors',
+ 'ALLOW_FORUM_NOTIFY' => 'Allow forum watching',
+ 'ALLOW_NAME_CHANGE' => 'Allow username changes',
+ 'ALLOW_NO_CENSORS' => 'Allow disable of censors',
'ALLOW_NO_CENSORS_EXPLAIN' => 'User can disable word censoring.',
- 'ALLOW_PM_ATTACHMENTS' => 'Allow Attachments in Private Messages',
- 'ALLOW_SIG' => 'Allow Signatures',
+ 'ALLOW_PM_ATTACHMENTS' => 'Allow attachments in private messages',
+ 'ALLOW_SIG' => 'Allow signatures',
'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
- 'ALLOW_SIG_FLASH' => 'Allow use of FLASH BBCode Tag in user signatures',
- 'ALLOW_SIG_IMG' => 'Allow use of IMG BBCode Tag in user signatures',
+ 'ALLOW_SIG_FLASH' => 'Allow use of [FLASH]
BBCode tag in user signatures',
+ 'ALLOW_SIG_IMG' => 'Allow use of [IMG]
BBCode tag in user signatures',
'ALLOW_SIG_LINKS' => 'Allow use of links in user signatures',
- 'ALLOW_SIG_LINKS_EXPLAIN' => 'If disallowed the URL bbcode tag and automatic/magic urls are disabled.',
+ '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',
- 'BOARD_PM' => 'Private Messaging',
+ 'ALLOW_SMILIES' => 'Allow smilies',
+ 'ALLOW_TOPIC_NOTIFY' => 'Allow topic watching',
+ 'BOARD_PM' => 'Private messaging',
'BOARD_PM_EXPLAIN' => 'Enable or disable private messaging for all users.',
));
@@ -84,15 +84,15 @@ $lang = array_merge($lang, array(
'ALLOW_REMOTE' => 'Enable remote avatars',
'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website',
'ALLOW_UPLOAD' => 'Enable avatar uploading',
- 'AVATAR_GALLERY_PATH' => 'Avatar Gallery Path',
- 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root dir for pre-loaded images, e.g. images/avatars/gallery',
- 'AVATAR_STORAGE_PATH' => 'Avatar Storage Path',
- 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/avatars/upload',
- 'MAX_AVATAR_SIZE' => 'Maximum Avatar Dimensions',
+ 'AVATAR_GALLERY_PATH' => 'Avatar gallery path',
+ 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root dir for pre-loaded images, e.g. images/avatars/gallery ',
+ 'AVATAR_STORAGE_PATH' => 'Avatar storage path',
+ 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/avatars/upload ',
+ 'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions',
'MAX_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)',
- 'MAX_FILESIZE' => 'Maximum Avatar File Size',
+ 'MAX_FILESIZE' => 'Maximum avatar file size',
'MAX_FILESIZE_EXPLAIN' => 'For uploaded avatar files',
- 'MIN_AVATAR_SIZE' => 'Minimum Avatar Dimensions',
+ 'MIN_AVATAR_SIZE' => 'Minimum avatar dimensions',
'MIN_AVATAR_SIZE_EXPLAIN' => '(Height x Width in pixels)',
));
@@ -101,9 +101,9 @@ $lang = array_merge($lang, array(
'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging',
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
- 'ALLOW_FLASH_PM' => 'Allow use of FLASH BBCode Tag',
+ 'ALLOW_FLASH_PM' => 'Allow use of [FLASH]
BBCode tag',
'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages',
- 'ALLOW_IMG_PM' => 'Allow use of IMG BBCode Tag',
+ 'ALLOW_IMG_PM' => 'Allow use of [IMG]
BBCode tag',
'ALLOW_MASS_PM' => 'Allow sending of private messages to multiple users and groups',
'ALLOW_PRINT_PM' => 'Allow print view in private messaging',
'ALLOW_QUOTE_PM' => 'Allow quotes in private messages',
@@ -185,14 +185,14 @@ $lang = array_merge($lang, array(
'ACC_NONE' => 'None',
'ACC_USER' => 'User',
// 'ACC_USER_ADMIN' => 'User + Admin',
- 'ALLOW_EMAIL_REUSE' => 'Allow Email address re-use',
+ 'ALLOW_EMAIL_REUSE' => 'Allow email address re-use',
'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.',
'COPPA' => 'Coppa',
- 'COPPA_FAX' => 'COPPA Fax Number',
- 'COPPA_MAIL' => 'COPPA Mailing Address',
+ 'COPPA_FAX' => 'COPPA fax number',
+ 'COPPA_MAIL' => 'COPPA mailing address',
'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms',
'ENABLE_COPPA' => 'Enable COPPA',
- 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA act. If this is disabled the COPPA specific groups will no longer be displayed.',
+ 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA Act. If this is disabled the COPPA specific groups will no longer be displayed.',
'MAX_CHARS' => 'Max',
'MIN_CHARS' => 'Min',
'PASSWORD_LENGTH' => 'Password length',
@@ -217,17 +217,17 @@ $lang = array_merge($lang, array(
'CAPTCHA_CELLS' => 'Cells',
'CAPTCHA_COMPOSITE' => 'Composite',
'CAPTCHA_ENTROPY' => 'Entropy',
- 'CAPTCHA_OPTIONS' => 'Captcha Options',
+ 'CAPTCHA_OPTIONS' => 'Captcha options',
'CAPTCHA_OVERLAP' => 'Overlap',
'CAPTCHA_SHAPE' => 'Shape',
'CAPTCHA_STENCIL' => 'Stencil',
- 'CAPTCHA_EXPLAIN' => 'Click %shere%s to preview this CAPTCHA policy.',
+ 'CAPTCHA_EXPLAIN' => '%sPreview this CAPTCHA policy%s.',
'ENTROPY_NOISE_LINE' => 'Entropy line noise',
'ENTROPY_NOISE_PIXEL' => 'Entropy pixel noise',
'HEAVY' => 'Heavy',
'LIGHT' => 'Light',
'MEDIUM' => 'Medium',
- 'NO_GD' => 'The server does not support GD, an extension required to enable the advanced CAPTCHA policies. A fall-back method will be used if you decide to enable Visual Confirmation features.',
+ 'NO_GD' => 'The server does not support GD, an extension required to enable the advanced CAPTCHA policies. A fall-back method will be used if you decide to enable visual confirmation features.',
'NO_NOISE' => 'None',
'NO_TTF' => 'The policy you selected requires TTF enabled, the server has TTF disabled. If this policy is enabled, it will be skipped and another policy will be used in its place. If no valid policies are enabled, a fall-back method will be used if you decide to enable Visual Confirmation features.',
'OVERLAP_NOISE_LINE' => 'Overlap line noise',
@@ -259,7 +259,7 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
- 'CUSTOM_PROFILE_FIELDS' => 'Custom Profile Fields',
+ 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
'LIMIT_LOAD' => 'Limit system load',
'LIMIT_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the board will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.',
'LIMIT_SESSIONS' => 'Limit sessions',
@@ -296,16 +296,16 @@ $lang = array_merge($lang, array(
'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username.',
- 'LDAP_DN' => 'LDAP base dn',
- 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US',
+ 'LDAP_DN' => 'LDAP base dn ',
+ 'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US ',
'LDAP_EMAIL' => 'LDAP email attribute',
'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry email attribute (if one exists) in order to automatically set the email address for new users. Leaving this empty results in empty email address for users who log in for the first time.',
'LDAP_NO_EMAIL' => 'The specified email attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s',
'LDAP_SERVER' => 'LDAP server name',
'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the name or IP address of the server.',
- 'LDAP_UID' => 'LDAP uid',
- 'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. uid, sn, etc.',
+ 'LDAP_UID' => 'LDAP uid ',
+ 'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. uid , sn , etc.',
));
// Server Settings
@@ -313,26 +313,26 @@ $lang = array_merge($lang, array(
'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in emails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.',
'ENABLE_GZIP' => 'Enable GZip Compression',
- 'FORCE_SERVER_VARS' => 'Force server url settings',
- 'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favor of the automatically determined values',
+ 'FORCE_SERVER_VARS' => 'Force server URL settings',
+ 'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favour of the automatically determined values',
'ICONS_PATH' => 'Post icons storage path',
- 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/icons',
- 'PATH_SETTINGS' => 'Path Settings',
+ 'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/icons ',
+ 'PATH_SETTINGS' => 'Path settings',
'RANKS_PATH' => 'Rank image storage path',
- 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/ranks',
- 'SEND_ENCODING' => 'Send Encoding',
+ 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/ranks ',
+ 'SEND_ENCODING' => 'Send encoding',
'SEND_ENCODING_EXPLAIN' => 'Send the file encoding from phpBB via HTTP overriding the webserver configuration',
- 'SERVER_NAME' => 'Domain Name',
- 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.foo.bar)',
+ 'SERVER_NAME' => 'Domain name',
+ 'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: www.foo.bar )',
'SERVER_PORT' => 'Server Port',
'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different',
- 'SERVER_PROTOCOL' => 'Server Protocol',
- 'SERVER_PROTOCOL_EXPLAIN' => 'This is used as the server protocol if these settings are forced. If empty or not forced the protocol is determined by the cookie secure settings (http:// or https://)',
- 'SERVER_URL_SETTINGS' => 'Server URL Settings',
+ 'SERVER_PROTOCOL' => 'Server protocol',
+ 'SERVER_PROTOCOL_EXPLAIN' => 'This is used as the server protocol if these settings are forced. If empty or not forced the protocol is determined by the cookie secure settings (http:// or https:// )',
+ 'SERVER_URL_SETTINGS' => 'Server URL settings',
'SMILIES_PATH' => 'Smilies storage path',
- 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/smilies',
+ 'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/smilies ',
'UPLOAD_ICONS_PATH' => 'Extension group icons storage path',
- 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/upload_icons',
+ 'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. images/upload_icons ',
));
// Security Settings
@@ -342,7 +342,7 @@ $lang = array_merge($lang, array(
'ALL' => 'All',
'ALLOW_AUTOLOGIN' => 'Allow persistent logins',
'ALLOW_AUTOLOGIN_EXPLAIN' => 'Determines whether users can autologin when they visit the board.',
- 'AUTOLOGIN_LENGTH' => 'Persistent login key expiry days',
+ 'AUTOLOGIN_LENGTH' => 'Persistent login key expiration length (in days)',
'AUTOLOGIN_LENGTH_EXPLAIN' => 'Number of days after which persistent login keys are removed or zero to disable.',
'BROWSER_VALID' => 'Validate browser',
'BROWSER_VALID_EXPLAIN' => 'Enables browser validation for each session improving security.',
@@ -351,7 +351,7 @@ $lang = array_merge($lang, array(
'FORCE_PASS_CHANGE' => 'Force password change',
'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days or zero to disable.',
'IP_VALID' => 'Session IP validation',
- 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking.',
+ 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking.',
'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts',
'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation)',
'NO_IP_VALIDATION' => 'None',
@@ -362,14 +362,14 @@ $lang = array_merge($lang, array(
'PASS_TYPE_CASE' => 'Must be mixed case',
'PASS_TYPE_SYMBOL' => 'Must contain symbols',
'TPL_ALLOW_PHP' => 'Allow php in templates',
- 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP and INCLUDEPHP statements will be recognized and parsed in templates.',
+ 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP
and INCLUDEPHP
statements will be recognized and parsed in templates.',
));
// Email Settings
$lang = array_merge($lang, array(
'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary), 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.',
- 'ADMIN_EMAIL' => 'Return Email Address',
+ 'ADMIN_EMAIL' => 'Return email address',
'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails.',
'BOARD_EMAIL_FORM' => 'Users send email via board',
'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.',
@@ -377,11 +377,11 @@ $lang = array_merge($lang, array(
'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.',
'CONTACT_EMAIL' => 'Contact email address',
'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc.',
- 'EMAIL_FUNCTION_NAME' => 'Email Function Name',
+ 'EMAIL_FUNCTION_NAME' => 'Email function name',
'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.',
- 'EMAIL_PACKAGE_SIZE' => 'Email Package Size',
+ 'EMAIL_PACKAGE_SIZE' => 'Email package size',
'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of emails sent in one package.',
- 'EMAIL_SIG' => 'Email Signature',
+ 'EMAIL_SIG' => 'Email signature',
'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.',
'ENABLE_EMAIL' => 'Enable board-wide emails',
'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all.',
@@ -399,9 +399,9 @@ $lang = array_merge($lang, array(
'SMTP_SERVER' => 'SMTP Server Address',
'SMTP_SETTINGS' => 'SMTP Settings',
'SMTP_USERNAME' => 'SMTP Username',
- 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your smtp server requires it.',
+ 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
'USE_SMTP' => 'Use SMTP Server for email',
- 'USE_SMTP_EXPLAIN' => 'Say yes if you want or have to send email via a named server instead of the local mail function.',
+ 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.',
));
// Jabber settings
@@ -418,12 +418,12 @@ $lang = array_merge($lang, array(
'JAB_CHANGED' => 'Jabber account changed successfully',
'JAB_ENABLE' => 'Enable Jabber',
'JAB_ENABLE_EXPLAIN' => 'Enables use of jabber messaging and notifications',
- 'JAB_PACKAGE_SIZE' => 'Jabber Package Size',
+ 'JAB_PACKAGE_SIZE' => 'Jabber package size',
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediatly and gets not queued for later sending.',
'JAB_PASSWORD' => 'Jabber password',
'JAB_PASS_CHANGED' => 'Jabber password changed successfully',
'JAB_PORT' => 'Jabber port',
- 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not 5222',
+ 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222',
'JAB_REGISTERED' => 'New account registered successfully',
'JAB_RESOURCE' => 'Jabber resource',
'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.',
diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php
index 40d3c791ad..0279798711 100644
--- a/phpBB/language/en/acp/bots.php
+++ b/phpBB/language/en/acp/bots.php
@@ -30,7 +30,7 @@ if (empty($lang) || !is_array($lang))
// Bot settings
$lang = array_merge($lang, array(
- 'BOTS' => 'Manage Bots',
+ 'BOTS' => 'Manage bots',
'BOTS_EXPLAIN' => 'Bots 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',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 979deb5171..847cd0f244 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -31,26 +31,26 @@ if (empty($lang) || !is_array($lang))
// Common
$lang = array_merge($lang, array(
'ACP_ADMINISTRATORS' => 'Administrators',
- 'ACP_ADMIN_LOGS' => 'Admin Log',
- 'ACP_ADMIN_ROLES' => 'Admin Roles',
+ 'ACP_ADMIN_LOGS' => 'Admin log',
+ 'ACP_ADMIN_ROLES' => 'Admin roles',
'ACP_ATTACHMENTS' => 'Attachments',
- 'ACP_ATTACHMENT_SETTINGS' => 'Attachment Settings',
+ 'ACP_ATTACHMENT_SETTINGS' => 'Attachment settings',
'ACP_AUTH_SETTINGS' => 'Authentication',
'ACP_AUTOMATION' => 'Automation',
- 'ACP_AVATAR_SETTINGS' => 'Avatar Settings',
+ 'ACP_AVATAR_SETTINGS' => 'Avatar settings',
'ACP_BACKUP' => 'Backup',
'ACP_BAN' => 'Banning',
- 'ACP_BAN_EMAILS' => 'Ban Emails',
+ 'ACP_BAN_EMAILS' => 'Ban emails',
'ACP_BAN_IPS' => 'Ban IPs',
- 'ACP_BAN_USERNAMES' => 'Ban Usernames',
- 'ACP_BASIC_PERMISSIONS' => 'Basic Permissions',
+ 'ACP_BAN_USERNAMES' => 'Ban usernames',
+ 'ACP_BASIC_PERMISSIONS' => 'Basic permissions',
'ACP_BBCODES' => 'BBCodes',
- 'ACP_BOARD_CONFIGURATION' => 'Board Configuration',
- 'ACP_BOARD_DEFAULTS' => 'Board Defaults',
- 'ACP_BOARD_FEATURES' => 'Board Features',
- 'ACP_BOARD_MANAGEMENT' => 'Board Management',
- 'ACP_BOARD_SETTINGS' => 'Board Settings',
+ 'ACP_BOARD_CONFIGURATION' => 'Board configuration',
+ 'ACP_BOARD_DEFAULTS' => 'Board defaults',
+ 'ACP_BOARD_FEATURES' => 'Board features',
+ 'ACP_BOARD_MANAGEMENT' => 'Board management',
+ 'ACP_BOARD_SETTINGS' => 'Board settings',
'ACP_BOTS' => 'Spiders/Robots',
'ACP_CAPTCHA' => 'CAPTCHA',
@@ -64,136 +64,136 @@ $lang = array_merge($lang, array(
'ACP_CAT_POSTING' => 'Posting',
'ACP_CAT_STYLES' => 'Styles',
'ACP_CAT_SYSTEM' => 'System',
- 'ACP_CAT_USERGROUP' => 'Users and Groups',
+ 'ACP_CAT_USERGROUP' => 'Users and groups',
'ACP_CAT_USERS' => 'Users',
- 'ACP_CLIENT_COMMUNICATION' => 'Client Communication',
- 'ACP_COOKIE_SETTINGS' => 'Cookie Settings',
- 'ACP_CRITICAL_LOGS' => 'Error Log',
- 'ACP_CUSTOM_PROFILE_FIELDS' => 'Custom Profile Fields',
+ 'ACP_CLIENT_COMMUNICATION' => 'Client communication',
+ 'ACP_COOKIE_SETTINGS' => 'Cookie settings',
+ 'ACP_CRITICAL_LOGS' => 'Error log',
+ 'ACP_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
- 'ACP_DATABASE' => 'Database Management',
+ 'ACP_DATABASE' => 'Database management',
'ACP_DISALLOW' => 'Disallow',
- 'ACP_DISALLOW_USERNAMES' => 'Disallow Usernames',
+ 'ACP_DISALLOW_USERNAMES' => 'Disallow usernames',
- 'ACP_EMAIL_SETTINGS' => 'Email Settings',
- 'ACP_EXTENSION_GROUPS' => 'Manage Extension Groups',
+ 'ACP_EMAIL_SETTINGS' => 'Email settings',
+ 'ACP_EXTENSION_GROUPS' => 'Manage extension groups',
- 'ACP_FORUM_BASED_PERMISSIONS' => 'Forum Based Permissions',
- 'ACP_FORUM_LOGS' => 'Forum Logs',
- 'ACP_FORUM_MANAGEMENT' => 'Forum Management',
- 'ACP_FORUM_MODERATORS' => 'Forum Moderators',
- 'ACP_FORUM_PERMISSIONS' => 'Forum Permissions',
- 'ACP_FORUM_ROLES' => 'Forum Roles',
+ 'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions',
+ 'ACP_FORUM_LOGS' => 'Forum logs',
+ 'ACP_FORUM_MANAGEMENT' => 'Forum management',
+ 'ACP_FORUM_MODERATORS' => 'Forum moderators',
+ 'ACP_FORUM_PERMISSIONS' => 'Forum permissions',
+ 'ACP_FORUM_ROLES' => 'Forum roles',
- 'ACP_GENERAL_CONFIGURATION' => 'General Configuration',
- 'ACP_GENERAL_TASKS' => 'General Tasks',
- 'ACP_GLOBAL_MODERATORS' => 'Global Moderators',
- 'ACP_GLOBAL_PERMISSIONS' => 'Global Permissions',
+ 'ACP_GENERAL_CONFIGURATION' => 'General configuration',
+ 'ACP_GENERAL_TASKS' => 'General tasks',
+ 'ACP_GLOBAL_MODERATORS' => 'Global moderators',
+ 'ACP_GLOBAL_PERMISSIONS' => 'Global permissions',
'ACP_GROUPS' => 'Groups',
- 'ACP_GROUPS_FORUM_PERMISSIONS' => 'Groups Forum Permissions',
- 'ACP_GROUPS_MANAGE' => 'Manage Groups',
- 'ACP_GROUPS_MANAGEMENT' => 'Group Management',
- 'ACP_GROUPS_PERMISSIONS' => 'Groups Permissions',
+ 'ACP_GROUPS_FORUM_PERMISSIONS' => 'Groups forum permissions',
+ 'ACP_GROUPS_MANAGE' => 'Manage groups',
+ 'ACP_GROUPS_MANAGEMENT' => 'Group management',
+ 'ACP_GROUPS_PERMISSIONS' => 'Groups permissions',
- 'ACP_ICONS' => 'Topic Icons',
- 'ACP_ICONS_SMILIES' => 'Topic Icons/Smilies',
+ 'ACP_ICONS' => 'Topic icons',
+ 'ACP_ICONS_SMILIES' => 'Topic icons/smilies',
'ACP_IMAGESETS' => 'Imagesets',
'ACP_INACTIVE_USERS' => 'Inactive users',
'ACP_INDEX' => 'Admin index',
- 'ACP_JABBER_SETTINGS' => 'Jabber Settings',
+ 'ACP_JABBER_SETTINGS' => 'Jabber settings',
- 'ACP_LANGUAGE' => 'Language Management',
- 'ACP_LANGUAGE_PACKS' => 'Language Packs',
- 'ACP_LOAD_SETTINGS' => 'Load Settings',
+ 'ACP_LANGUAGE' => 'Language management',
+ 'ACP_LANGUAGE_PACKS' => 'Language packs',
+ 'ACP_LOAD_SETTINGS' => 'Load settings',
'ACP_LOGGING' => 'Logging',
'ACP_MAIN' => 'Admin index',
- 'ACP_MANAGE_EXTENSIONS' => 'Manage Extensions',
- 'ACP_MANAGE_FORUMS' => 'Manage Forums',
- 'ACP_MANAGE_RANKS' => 'Manage Ranks',
- 'ACP_MANAGE_REASONS' => 'Manage Report/Denial Reasons',
- 'ACP_MANAGE_USERS' => 'Manage Users',
- 'ACP_MASS_EMAIL' => 'Mass Email',
+ 'ACP_MANAGE_EXTENSIONS' => 'Manage extensions',
+ 'ACP_MANAGE_FORUMS' => 'Manage forums',
+ 'ACP_MANAGE_RANKS' => 'Manage ranks',
+ 'ACP_MANAGE_REASONS' => 'Manage report/denial reasons',
+ 'ACP_MANAGE_USERS' => 'Manage users',
+ 'ACP_MASS_EMAIL' => 'Mass email',
'ACP_MESSAGES' => 'Messages',
- 'ACP_MESSAGE_SETTINGS' => 'Private Message Settings',
- 'ACP_MODULE_MANAGEMENT' => 'Module Management',
- 'ACP_MOD_LOGS' => 'Moderator Log',
- 'ACP_MOD_ROLES' => 'Moderator Roles',
+ 'ACP_MESSAGE_SETTINGS' => 'Private message settings',
+ 'ACP_MODULE_MANAGEMENT' => 'Module management',
+ 'ACP_MOD_LOGS' => 'Moderator log',
+ 'ACP_MOD_ROLES' => 'Moderator roles',
- 'ACP_ORPHAN_ATTACHMENTS' => 'Orphan Attachments',
+ 'ACP_ORPHAN_ATTACHMENTS' => 'Orphaned attachments',
'ACP_PERMISSIONS' => 'Permissions',
- 'ACP_PERMISSION_MASKS' => 'Permission Masks',
- 'ACP_PERMISSION_ROLES' => 'Permission Roles',
- 'ACP_PERMISSION_SETTINGS' => 'Permission Settings',
- 'ACP_PERMISSION_TRACE' => 'Permission Trace',
- 'ACP_PHP_INFO' => 'PHP Information',
- 'ACP_POST_SETTINGS' => 'Post Settings',
- 'ACP_PRUNE_FORUMS' => 'Prune Forums',
- 'ACP_PRUNE_USERS' => 'Prune Users',
+ 'ACP_PERMISSION_MASKS' => 'Permission masks',
+ 'ACP_PERMISSION_ROLES' => 'Permission roles',
+ 'ACP_PERMISSION_SETTINGS' => 'Permission settings',
+ 'ACP_PERMISSION_TRACE' => 'Permission trace',
+ 'ACP_PHP_INFO' => 'PHP information',
+ 'ACP_POST_SETTINGS' => 'Post settings',
+ 'ACP_PRUNE_FORUMS' => 'Prune forums',
+ 'ACP_PRUNE_USERS' => 'Prune users',
'ACP_PRUNING' => 'Pruning',
- 'ACP_QUICK_ACCESS' => 'Quick Access',
+ 'ACP_QUICK_ACCESS' => 'Quick access',
'ACP_RANKS' => 'Ranks',
- 'ACP_REASONS' => 'Report/Denial Reasons',
- 'ACP_REGISTER_SETTINGS' => 'User Registration Settings',
+ 'ACP_REASONS' => 'Report/Denial reasons',
+ 'ACP_REGISTER_SETTINGS' => 'User registration settings',
'ACP_RESTORE' => 'Restore',
- 'ACP_SEARCH' => 'Search Configuration',
- 'ACP_SEARCH_INDEX' => 'Search Index',
- 'ACP_SEARCH_SETTINGS' => 'Search Settings',
+ 'ACP_SEARCH' => 'Search configuration',
+ 'ACP_SEARCH_INDEX' => 'Search index',
+ 'ACP_SEARCH_SETTINGS' => 'Search settings',
- 'ACP_SECURITY_SETTINGS' => 'Security Settings',
- 'ACP_SERVER_CONFIGURATION' => 'Server Configuration',
- 'ACP_SERVER_SETTINGS' => 'Server Settings',
- 'ACP_SIGNATURE_SETTINGS' => 'Signature Settings',
+ 'ACP_SECURITY_SETTINGS' => 'Security settings',
+ 'ACP_SERVER_CONFIGURATION' => 'Server configuration',
+ 'ACP_SERVER_SETTINGS' => 'Server settings',
+ 'ACP_SIGNATURE_SETTINGS' => 'Signature settings',
'ACP_SMILIES' => 'Smilies',
- 'ACP_SPECIAL_PERMISSIONS' => 'Special Permissions',
- 'ACP_STYLE_COMPONENTS' => 'Style Components',
- 'ACP_STYLE_MANAGEMENT' => 'Style Management',
+ 'ACP_SPECIAL_PERMISSIONS' => 'Special permissions',
+ 'ACP_STYLE_COMPONENTS' => 'Style components',
+ 'ACP_STYLE_MANAGEMENT' => 'Style management',
'ACP_STYLES' => 'Styles',
'ACP_TEMPLATES' => 'Templates',
'ACP_THEMES' => 'Themes',
'ACP_UPDATE' => 'Updating',
- 'ACP_USERS_FORUM_PERMISSIONS' => 'Users Forum Permissions',
- 'ACP_USERS_LOGS' => 'User Logs',
- 'ACP_USERS_PERMISSIONS' => 'Users Permissions',
+ 'ACP_USERS_FORUM_PERMISSIONS' => 'Users forum permissions',
+ 'ACP_USERS_LOGS' => 'User logs',
+ 'ACP_USERS_PERMISSIONS' => 'Users permissions',
'ACP_USER_ATTACH' => 'Attachments',
'ACP_USER_AVATAR' => 'Avatar',
'ACP_USER_FEEDBACK' => 'Feedback',
'ACP_USER_GROUPS' => 'Groups',
- 'ACP_USER_MANAGEMENT' => 'User Management',
+ 'ACP_USER_MANAGEMENT' => 'User management',
'ACP_USER_OVERVIEW' => 'Overview',
'ACP_USER_PERM' => 'Permissions',
'ACP_USER_PREFS' => 'Preferences',
'ACP_USER_PROFILE' => 'Profile',
'ACP_USER_RANK' => 'Rank',
- 'ACP_USER_ROLES' => 'User Roles',
- 'ACP_USER_SECURITY' => 'User Security',
+ 'ACP_USER_ROLES' => 'User roles',
+ 'ACP_USER_SECURITY' => 'User security',
'ACP_USER_SIG' => 'Signature',
- 'ACP_VC_SETTINGS' => 'Visual Confirmation Settings',
- 'ACP_VC_CAPTCHA_DISPLAY' => 'CAPTCHA Image Preview',
- 'ACP_VERSION_CHECK' => 'Check for Updates',
- 'ACP_VIEW_ADMIN_PERMISSIONS' => 'View Admin Permissions',
- 'ACP_VIEW_FORUM_MOD_PERMISSIONS' => 'View Forum Moderator Permissions',
- 'ACP_VIEW_FORUM_PERMISSIONS' => 'View Forum Permissions',
- 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS' => 'View Global Moderator Permissions',
- 'ACP_VIEW_USER_PERMISSIONS' => 'View User Permissions',
+ 'ACP_VC_SETTINGS' => 'Visual confirmation settings',
+ 'ACP_VC_CAPTCHA_DISPLAY' => 'CAPTCHA image preview',
+ 'ACP_VERSION_CHECK' => 'Check for updates',
+ 'ACP_VIEW_ADMIN_PERMISSIONS' => 'View effective administrative permissions',
+ 'ACP_VIEW_FORUM_MOD_PERMISSIONS' => 'View effective forum moderation permissions',
+ 'ACP_VIEW_FORUM_PERMISSIONS' => 'View effective forum-based permissions',
+ 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS' => 'View effective global moderatoration permissions',
+ 'ACP_VIEW_USER_PERMISSIONS' => 'View effective user-based permissions',
- 'ACP_WORDS' => 'Word Censoring',
+ 'ACP_WORDS' => 'Word censoring',
'ACTION' => 'Action',
'ACTIONS' => 'Actions',
'ACTIVATE' => 'Activate',
'ADD' => 'Add',
'ADMIN' => 'Administration',
- 'ADMIN_INDEX' => 'Admin Index',
+ 'ADMIN_INDEX' => 'Admin index',
'ADMIN_PANEL' => 'Administration Control Panel',
'BACK' => 'Back',
@@ -209,19 +209,19 @@ $lang = array_merge($lang, array(
'DISABLE' => 'Disable',
'DOWNLOAD' => 'Download',
'DOWNLOAD_AS' => 'Download as',
- 'DOWNLOAD_STORE' => 'Download or Store file',
- 'DOWNLOAD_STORE_EXPLAIN' => 'You may directly download the file or save it in your store/ folder.',
+ 'DOWNLOAD_STORE' => 'Download or store file',
+ 'DOWNLOAD_STORE_EXPLAIN' => 'You may directly download the file or save it in your store/ folder.',
'EDIT' => 'Edit',
'ENABLE' => 'Enable',
'EXPORT_DOWNLOAD' => 'Download',
'EXPORT_STORE' => 'Store',
- 'FORUM_INDEX' => 'Forum Index',
+ 'FORUM_INDEX' => 'Forum index',
- 'GENERAL_OPTIONS' => 'General Options',
- 'GENERAL_SETTINGS' => 'General Settings',
- 'GLOBAL_MASK' => 'Global Permission Mask',
+ 'GENERAL_OPTIONS' => 'General options',
+ 'GENERAL_SETTINGS' => 'General settings',
+ 'GLOBAL_MASK' => 'Global permission mask',
'INSTALL' => 'Install',
'IP' => 'User IP',
@@ -231,29 +231,29 @@ $lang = array_merge($lang, array(
'LOGIN_ADMIN' => 'To administer the board you must be an authenticated user.',
'LOGIN_ADMIN_CONFIRM' => 'To administer the board you must re-authenticate yourself.',
'LOGIN_ADMIN_SUCCESS' => 'You have successfully authenticated and will now be redirected to the Administration Control Panel',
- 'LOOK_UP_FORUM' => 'Select a Forum',
+ 'LOOK_UP_FORUM' => 'Select a forum',
'MANAGE' => 'Manage',
- 'MOVE_DOWN' => 'Move Down',
- 'MOVE_UP' => 'Move Up',
+ 'MOVE_DOWN' => 'Move down',
+ 'MOVE_UP' => 'Move up',
'NOTIFY' => 'Notification',
- 'NO_ADMIN' => 'You are not authorised to administer this board.',
+ 'NO_ADMIN' => 'You are not authorised to administrate this board.',
'NO_EMAILS_DEFINED' => 'No valid email addresses found',
- 'OFF' => 'OFF',
- 'ON' => 'ON',
+ 'OFF' => 'Off',
+ 'ON' => 'On',
'PARSE_BBCODE' => 'Parse BBCode',
- 'PARSE_SMILIES' => 'Parse Smilies',
- 'PARSE_URLS' => 'Parse Links',
+ 'PARSE_SMILIES' => 'Parse smilies',
+ 'PARSE_URLS' => 'Parse links',
'PERMISSIONS_TRANSFERED' => 'Permissions transfered',
'PERMISSIONS_TRANSFERED_EXPLAIN' => 'You are currently having the permissions from %1$s. You are able to browse the forum with the users permissions but not access the administration control panel since admin permissions were not transfered. You are able to revert to your permission set at any time.',
'PROCEED_TO_ACP' => '%sProceed to the ACP%s',
'REMIND' => 'Remind',
'REORDER' => 'Reorder',
- 'RESYNC' => 'Sync',
- 'RETURN_TO' => 'Return to ...',
+ 'RESYNC' => 'Resyncronise',
+ 'RETURN_TO' => 'Return to',
'SELECT_ANONYMOUS' => 'Select Anonymous User',
'SELECT_OPTION' => 'Select option',
@@ -300,9 +300,9 @@ $lang = array_merge($lang, array(
'DATABASE_SIZE' => 'Database size',
'FILES_PER_DAY' => 'Attachments per day',
- 'FORUM_STATS' => 'Forum Statistics',
+ 'FORUM_STATS' => 'Forum statistics',
- 'GZIP_COMPRESSION' => 'Gzip compression',
+ 'GZIP_COMPRESSION' => 'GZip compression',
'NOT_AVAILABLE' => 'Not available',
'NUMBER_FILES' => 'Number of attachments',
@@ -313,11 +313,11 @@ $lang = array_merge($lang, array(
'POSTS_PER_DAY' => 'Posts per day',
- 'RESET_DATE' => 'Reset Date',
- 'RESET_ONLINE' => 'Reset Online',
- 'RESYNC_POSTCOUNTS' => 'Resync Postcounts',
- 'RESYNC_POST_MARKING' => 'Resync dotted topics',
- 'RESYNC_STATS' => 'Resync Stats',
+ 'RESET_DATE' => 'Reset date',
+ 'RESET_ONLINE' => 'Reset online',
+ 'RESYNC_POSTCOUNTS' => 'Resyncronise post counts',
+ 'RESYNC_POST_MARKING' => 'Resyncronise dotted topics',
+ 'RESYNC_STATS' => 'Resyncronise statistics',
'STATISTIC' => 'Statistic',
@@ -354,274 +354,274 @@ $lang = array_merge($lang, array(
));
// Log Entries
$lang = array_merge($lang, array(
- 'LOG_ACL_ADD_USER_GLOBAL_U_' => 'Added or edited users user permissions » %s',
- 'LOG_ACL_ADD_GROUP_GLOBAL_U_' => 'Added or edited groups user permissions » %s',
- 'LOG_ACL_ADD_USER_GLOBAL_M_' => 'Added or edited users global moderator permissions » %s',
- 'LOG_ACL_ADD_GROUP_GLOBAL_M_' => 'Added or edited groups global moderator permissions » %s',
- 'LOG_ACL_ADD_USER_GLOBAL_A_' => 'Added or edited users admin permissions » %s',
- 'LOG_ACL_ADD_GROUP_GLOBAL_A_' => 'Added or edited groups admin permissions » %s',
+ 'LOG_ACL_ADD_USER_GLOBAL_U_' => 'Added or edited users user permissions » %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_U_' => 'Added or edited groups user permissions » %s',
+ 'LOG_ACL_ADD_USER_GLOBAL_M_' => 'Added or edited users global moderator permissions » %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_M_' => 'Added or edited groups global moderator permissions » %s',
+ 'LOG_ACL_ADD_USER_GLOBAL_A_' => 'Added or edited users admin permissions » %s',
+ 'LOG_ACL_ADD_GROUP_GLOBAL_A_' => 'Added or edited groups admin permissions » %s',
- 'LOG_ACL_ADD_ADMIN_GLOBAL_A_' => 'Added or edited Administrators » %s',
- 'LOG_ACL_ADD_MOD_GLOBAL_M_' => 'Added or edited Global Moderators » %s',
+ 'LOG_ACL_ADD_ADMIN_GLOBAL_A_' => 'Added or edited Administrators » %s',
+ 'LOG_ACL_ADD_MOD_GLOBAL_M_' => 'Added or edited Global Moderators » %s',
- 'LOG_ACL_ADD_USER_LOCAL_F_' => 'Added or edited users forum access from %1$s » %2$s',
- 'LOG_ACL_ADD_USER_LOCAL_M_' => 'Added or edited users forum moderator access from %1$s » %2$s',
- 'LOG_ACL_ADD_GROUP_LOCAL_F_' => 'Added or edited groups forum access from %1$s » %2$s',
- 'LOG_ACL_ADD_GROUP_LOCAL_M_' => 'Added or edited groups forum moderator access from %1$s » %2$s',
+ 'LOG_ACL_ADD_USER_LOCAL_F_' => 'Added or edited users forum access from %1$s » %2$s',
+ 'LOG_ACL_ADD_USER_LOCAL_M_' => 'Added or edited users forum moderator access from %1$s » %2$s',
+ 'LOG_ACL_ADD_GROUP_LOCAL_F_' => 'Added or edited groups forum access from %1$s » %2$s',
+ 'LOG_ACL_ADD_GROUP_LOCAL_M_' => 'Added or edited groups forum moderator access from %1$s » %2$s',
- 'LOG_ACL_ADD_MOD_LOCAL_M_' => 'Added or edited Moderators from %1$s » %2$s',
- 'LOG_ACL_ADD_FORUM_LOCAL_F_' => 'Added or edited Forum Permissions from %1$s » %2$s',
+ 'LOG_ACL_ADD_MOD_LOCAL_M_' => 'Added or edited Moderators from %1$s » %2$s',
+ 'LOG_ACL_ADD_FORUM_LOCAL_F_' => 'Added or edited Forum Permissions from %1$s » %2$s',
- 'LOG_ACL_DEL_ADMIN_GLOBAL_A_' => 'Removed Administrators » %s',
- 'LOG_ACL_DEL_MOD_GLOBAL_M_' => 'Removed Global Moderators » %s',
- 'LOG_ACL_DEL_MOD_LOCAL_M_' => 'Removed Moderators from %1$s » %2$s',
- 'LOG_ACL_DEL_FORUM_LOCAL_F_' => 'Removed User/Group Forum Permissions from %1$s » %2$s',
+ 'LOG_ACL_DEL_ADMIN_GLOBAL_A_' => 'Removed Administrators » %s',
+ 'LOG_ACL_DEL_MOD_GLOBAL_M_' => 'Removed Global Moderators » %s',
+ 'LOG_ACL_DEL_MOD_LOCAL_M_' => 'Removed Moderators from %1$s » %2$s',
+ 'LOG_ACL_DEL_FORUM_LOCAL_F_' => 'Removed User/Group Forum Permissions from %1$s » %2$s',
- 'LOG_ACL_TRANSFER_PERMISSIONS' => 'Permissions transfered from » %s',
- 'LOG_ACL_RESTORE_PERMISSIONS' => 'Own permissions restored after using permissions from » %s',
+ 'LOG_ACL_TRANSFER_PERMISSIONS' => 'Permissions transfered from » %s',
+ 'LOG_ACL_RESTORE_PERMISSIONS' => 'Own permissions restored after using permissions from » %s',
- 'LOG_ADMIN_AUTH_FAIL' => 'Failed administration login attempt ',
- 'LOG_ADMIN_AUTH_SUCCESS' => 'Successful administration login ',
+ 'LOG_ADMIN_AUTH_FAIL' => 'Failed administration login attempt ',
+ 'LOG_ADMIN_AUTH_SUCCESS' => 'Successful administration login ',
- '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',
- 'LOG_ATTACH_EXTGROUP_ADD' => 'Added extension group » %s',
- 'LOG_ATTACH_EXTGROUP_EDIT' => 'Edited extension group » %s',
- 'LOG_ATTACH_EXTGROUP_DEL' => 'Removed extension group » %s',
- 'LOG_ATTACH_FILEUPLOAD' => 'Orphan File uploaded to Post » ID %1$d - %2$s',
- 'LOG_ATTACH_ORPHAN_DEL' => 'Orphan Files deleted » %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',
+ 'LOG_ATTACH_EXTGROUP_ADD' => 'Added extension group » %s',
+ 'LOG_ATTACH_EXTGROUP_EDIT' => 'Edited extension group » %s',
+ 'LOG_ATTACH_EXTGROUP_DEL' => 'Removed extension group » %s',
+ 'LOG_ATTACH_FILEUPLOAD' => 'Orphan File uploaded to Post » ID %1$d - %2$s',
+ 'LOG_ATTACH_ORPHAN_DEL' => 'Orphan Files deleted » %s',
- 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason "%1$s " » %2$s ',
- 'LOG_BAN_EXCLUDE_IP' => 'Excluded ip from ban for reason "%1$s " » %2$s ',
- 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason "%1$s " » %2$s ',
- 'LOG_BAN_USER' => 'Banned User for reason "%1$s " » %2$s ',
- 'LOG_BAN_IP' => 'Banned ip for reason "%1$s " » %2$s',
- 'LOG_BAN_EMAIL' => 'Banned email for reason "%1$s " » %2$s',
- 'LOG_UNBAN_USER' => 'Unbanned user » %s',
- 'LOG_UNBAN_IP' => 'Unbanned ip » %s',
- 'LOG_UNBAN_EMAIL' => 'Unbanned email » %s',
+ 'LOG_BAN_EXCLUDE_USER' => 'Excluded user from ban for reason "%1$s " » %2$s ',
+ 'LOG_BAN_EXCLUDE_IP' => 'Excluded IP from ban for reason "%1$s " » %2$s ',
+ 'LOG_BAN_EXCLUDE_EMAIL' => 'Excluded email from ban for reason "%1$s " » %2$s ',
+ 'LOG_BAN_USER' => 'Banned User for reason "%1$s " » %2$s ',
+ 'LOG_BAN_IP' => 'Banned IP for reason "%1$s " » %2$s',
+ 'LOG_BAN_EMAIL' => 'Banned email for reason "%1$s " » %2$s',
+ 'LOG_UNBAN_USER' => 'Unbanned user » %s',
+ 'LOG_UNBAN_IP' => 'Unbanned ip » %s',
+ 'LOG_UNBAN_EMAIL' => 'Unbanned email » %s',
- 'LOG_BBCODE_ADD' => 'Added new BBCode » %s',
- 'LOG_BBCODE_EDIT' => 'Edited BBCode » %s',
- 'LOG_BBCODE_DELETE' => 'Deleted BBCode » %s',
+ 'LOG_BBCODE_ADD' => 'Added new BBCode » %s',
+ 'LOG_BBCODE_EDIT' => 'Edited BBCode » %s',
+ 'LOG_BBCODE_DELETE' => 'Deleted BBCode » %s',
- 'LOG_BOT_ADDED' => 'New bot added » %s',
- 'LOG_BOT_DELETE' => 'Deleted bot » %s',
- 'LOG_BOT_UPDATED' => 'Existing bot updated » %s',
+ 'LOG_BOT_ADDED' => 'New bot added » %s',
+ 'LOG_BOT_DELETE' => 'Deleted bot » %s',
+ 'LOG_BOT_UPDATED' => 'Existing bot updated » %s',
- 'LOG_CLEAR_ADMIN' => 'Cleared admin log ',
- 'LOG_CLEAR_CRITICAL' => 'Cleared error log ',
- 'LOG_CLEAR_MOD' => 'Cleared moderator log ',
- 'LOG_CLEAR_USER' => 'Cleared user log » %s',
- 'LOG_CLEAR_USERS' => 'Cleared user logs ',
+ 'LOG_CLEAR_ADMIN' => 'Cleared admin log ',
+ 'LOG_CLEAR_CRITICAL' => 'Cleared error log ',
+ 'LOG_CLEAR_MOD' => 'Cleared moderator log ',
+ 'LOG_CLEAR_USER' => 'Cleared user log » %s',
+ 'LOG_CLEAR_USERS' => 'Cleared user logs ',
- 'LOG_CONFIG_ATTACH' => 'Altered attachment settings ',
- 'LOG_CONFIG_AUTH' => 'Altered authentication settings ',
- 'LOG_CONFIG_AVATAR' => 'Altered avatar settings ',
- 'LOG_CONFIG_COOKIE' => 'Altered cookie settings ',
- 'LOG_CONFIG_EMAIL' => 'Altered email settings ',
- 'LOG_CONFIG_FEATURES' => 'Altered board features ',
- 'LOG_CONFIG_LOAD' => 'Altered load settings ',
- 'LOG_CONFIG_MESSAGE' => 'Altered private message settings ',
- 'LOG_CONFIG_POST' => 'Altered post settings ',
- 'LOG_CONFIG_REGISTRATION' => 'Altered user registration settings ',
- 'LOG_CONFIG_SEARCH' => 'Altered search settings ',
- 'LOG_CONFIG_SECURITY' => 'Altered security settings ',
- 'LOG_CONFIG_SERVER' => 'Altered server settings ',
- 'LOG_CONFIG_SETTINGS' => 'Altered board settings ',
- 'LOG_CONFIG_SIGNATURE' => 'Altered signature settings ',
- 'LOG_CONFIG_VISUAL' => 'Altered visual confirmation settings ',
+ 'LOG_CONFIG_ATTACH' => 'Altered attachment settings ',
+ 'LOG_CONFIG_AUTH' => 'Altered authentication settings ',
+ 'LOG_CONFIG_AVATAR' => 'Altered avatar settings ',
+ 'LOG_CONFIG_COOKIE' => 'Altered cookie settings ',
+ 'LOG_CONFIG_EMAIL' => 'Altered email settings ',
+ 'LOG_CONFIG_FEATURES' => 'Altered board features ',
+ 'LOG_CONFIG_LOAD' => 'Altered load settings ',
+ 'LOG_CONFIG_MESSAGE' => 'Altered private message settings ',
+ 'LOG_CONFIG_POST' => 'Altered post settings ',
+ 'LOG_CONFIG_REGISTRATION' => 'Altered user registration settings ',
+ 'LOG_CONFIG_SEARCH' => 'Altered search settings ',
+ 'LOG_CONFIG_SECURITY' => 'Altered security settings ',
+ 'LOG_CONFIG_SERVER' => 'Altered server settings ',
+ 'LOG_CONFIG_SETTINGS' => 'Altered board settings ',
+ 'LOG_CONFIG_SIGNATURE' => 'Altered signature settings ',
+ 'LOG_CONFIG_VISUAL' => 'Altered visual confirmation settings ',
- 'LOG_APPROVE_TOPIC' => 'Approved topic » %s',
- 'LOG_BUMP_TOPIC' => 'User bumped topic » %s',
- 'LOG_DELETE_POST' => 'Deleted post » %s',
- 'LOG_DELETE_TOPIC' => 'Deleted topic » %s',
- 'LOG_FORK' => 'Copied topic » from %s',
- 'LOG_LOCK' => 'Locked topic » %s',
- 'LOG_LOCK_POST' => 'Locked post » %s',
- 'LOG_MERGE' => 'Merged posts into topic »%s',
- 'LOG_MOVE' => 'Moved topic » from %s',
- 'LOG_TOPIC_DELETED' => 'Deleted topic » %s',
- 'LOG_TOPIC_RESYNC' => 'Resynchronised topic counters » %s',
- 'LOG_TOPIC_TYPE_CHANGED' => 'Changed topic type » %s',
- 'LOG_UNLOCK' => 'Unlocked topic » %s',
- 'LOG_UNLOCK_POST' => 'Unlocked post » %s',
+ 'LOG_APPROVE_TOPIC' => 'Approved topic » %s',
+ 'LOG_BUMP_TOPIC' => 'User bumped topic » %s',
+ 'LOG_DELETE_POST' => 'Deleted post » %s',
+ 'LOG_DELETE_TOPIC' => 'Deleted topic » %s',
+ 'LOG_FORK' => 'Copied topic » from %s',
+ 'LOG_LOCK' => 'Locked topic » %s',
+ 'LOG_LOCK_POST' => 'Locked post » %s',
+ 'LOG_MERGE' => 'Merged posts into topic »%s',
+ 'LOG_MOVE' => 'Moved topic » from %s',
+ 'LOG_TOPIC_DELETED' => 'Deleted topic » %s',
+ 'LOG_TOPIC_RESYNC' => 'Resynchronised topic counters » %s',
+ 'LOG_TOPIC_TYPE_CHANGED' => 'Changed topic type » %s',
+ 'LOG_UNLOCK' => 'Unlocked topic » %s',
+ 'LOG_UNLOCK_POST' => 'Unlocked post » %s',
- 'LOG_DISALLOW_ADD' => 'Added disallowed username » %s',
- 'LOG_DISALLOW_DELETE' => 'Deleted disallowed username ',
+ 'LOG_DISALLOW_ADD' => 'Added disallowed username » %s',
+ 'LOG_DISALLOW_DELETE' => 'Deleted disallowed username ',
- 'LOG_DB_BACKUP' => 'Database backup ',
- 'LOG_DB_RESTORE' => 'Database restore ',
+ 'LOG_DB_BACKUP' => 'Database backup ',
+ 'LOG_DB_RESTORE' => 'Database restore ',
- 'LOG_DOWNLOAD_EXCLUDE_IP' => 'Exluded ip/hostname from download list » %s',
- 'LOG_DOWNLOAD_IP' => 'Added ip/hostname to download list » %s',
- 'LOG_DOWNLOAD_REMOVE_IP' => 'Removed ip/hostname from download list » %s',
+ 'LOG_DOWNLOAD_EXCLUDE_IP' => 'Exluded IP/hostname from download list » %s',
+ 'LOG_DOWNLOAD_IP' => 'Added IP/hostname to download list » %s',
+ 'LOG_DOWNLOAD_REMOVE_IP' => 'Removed IP/hostname from download list » %s',
- 'LOG_ERROR_JABBER' => 'Jabber Error » %s',
- 'LOG_ERROR_EMAIL' => 'Email Error » %s',
+ 'LOG_ERROR_JABBER' => 'Jabber error » %s',
+ 'LOG_ERROR_EMAIL' => 'Email error » %s',
- 'LOG_FORUM_ADD' => 'Created new forum » %s',
- 'LOG_FORUM_DEL_FORUM' => 'Deleted forum » %s',
- 'LOG_FORUM_DEL_FORUMS' => 'Deleted forum and its subforums » %s',
- 'LOG_FORUM_DEL_MOVE_FORUMS' => 'Deleted forum and moved subforums to %1$s » %2$s',
- 'LOG_FORUM_DEL_MOVE_POSTS' => 'Deleted forum and moved posts to %1$s » %2$s',
- 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => 'Deleted forum and its subforums, moved messages to %1$s » %2$s',
- 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => 'Deleted forum, moved posts to %1$s and subforums to %2$s » %3$s',
- 'LOG_FORUM_DEL_POSTS' => 'Deleted forum and its messages » %s',
- 'LOG_FORUM_DEL_POSTS_FORUMS' => 'Deleted forum, its messages and subforums » %s',
- 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => 'Deleted forum and its messages, moved subforums to %1$s » %2$s',
- 'LOG_FORUM_EDIT' => 'Edited forum details » %s',
- 'LOG_FORUM_MOVE_DOWN' => 'Moved forum %1$s below %2$s',
- 'LOG_FORUM_MOVE_UP' => 'Moved forum %1$s above %2$s',
- 'LOG_FORUM_SYNC' => 'Re-synchronised forum » %s',
+ 'LOG_FORUM_ADD' => 'Created new forum » %s',
+ 'LOG_FORUM_DEL_FORUM' => 'Deleted forum » %s',
+ 'LOG_FORUM_DEL_FORUMS' => 'Deleted forum and its subforums » %s',
+ 'LOG_FORUM_DEL_MOVE_FORUMS' => 'Deleted forum and moved subforums to %1$s » %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS' => 'Deleted forum and moved posts to %1$s » %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS_FORUMS' => 'Deleted forum and its subforums, moved messages to %1$s » %2$s',
+ 'LOG_FORUM_DEL_MOVE_POSTS_MOVE_FORUMS' => 'Deleted forum, moved posts to %1$s and subforums to %2$s » %3$s',
+ 'LOG_FORUM_DEL_POSTS' => 'Deleted forum and its messages » %s',
+ 'LOG_FORUM_DEL_POSTS_FORUMS' => 'Deleted forum, its messages and subforums » %s',
+ 'LOG_FORUM_DEL_POSTS_MOVE_FORUMS' => 'Deleted forum and its messages, moved subforums to %1$s » %2$s',
+ 'LOG_FORUM_EDIT' => 'Edited forum details » %s',
+ 'LOG_FORUM_MOVE_DOWN' => 'Moved forum %1$s below %2$s',
+ 'LOG_FORUM_MOVE_UP' => 'Moved forum %1$s above %2$s',
+ 'LOG_FORUM_SYNC' => 'Re-synchronised forum » %s',
- 'LOG_GROUP_CREATED' => 'New usergroup created » %s',
- 'LOG_GROUP_DEFAULTS' => 'Group made default for members » %s',
- 'LOG_GROUP_DELETE' => 'Usergroup deleted » %s',
- 'LOG_GROUP_DEMOTED' => 'Leaders demoted in usergroup %1$s » %2$s',
- 'LOG_GROUP_PROMOTED' => 'Members promoted to leader in usergroup %1$s » %2$s',
- 'LOG_GROUP_REMOVE' => 'Members removed from usergroup %1$s » %2$s',
- 'LOG_GROUP_UPDATED' => 'Usergroup details updated » %s',
- 'LOG_MODS_ADDED' => 'Added new leaders to usergroup %1$s » %2$s',
- 'LOG_USERS_APPROVED' => 'Users approved in usergroup %1$s » %2$s',
- 'LOG_USERS_ADDED' => 'Added new members to usergroup %1$s » %2$s',
+ 'LOG_GROUP_CREATED' => 'New usergroup created » %s',
+ 'LOG_GROUP_DEFAULTS' => 'Group made default for members » %s',
+ 'LOG_GROUP_DELETE' => 'Usergroup deleted » %s',
+ 'LOG_GROUP_DEMOTED' => 'Leaders demoted in usergroup %1$s » %2$s',
+ 'LOG_GROUP_PROMOTED' => 'Members promoted to leader in usergroup %1$s » %2$s',
+ 'LOG_GROUP_REMOVE' => 'Members removed from usergroup %1$s » %2$s',
+ 'LOG_GROUP_UPDATED' => 'Usergroup details updated » %s',
+ 'LOG_MODS_ADDED' => 'Added new leaders to usergroup %1$s » %2$s',
+ 'LOG_USERS_APPROVED' => 'Users approved in usergroup %1$s » %2$s',
+ 'LOG_USERS_ADDED' => 'Added new members to usergroup %1$s » %2$s',
- 'LOG_IMAGESET_ADD_DB' => 'Added new imageset to database » %s',
- 'LOG_IMAGESET_ADD_FS' => 'Add new imageset on filesystem » %s',
- 'LOG_IMAGESET_DELETE' => 'Deleted imageset » %s',
- 'LOG_IMAGESET_EDIT_DETAILS' => 'Edited imageset details » %s',
- 'LOG_IMAGESET_EDIT' => 'Edited imageset » %s',
- 'LOG_IMAGESET_EXPORT' => 'Exported imageset » %s',
- 'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset » %s',
+ 'LOG_IMAGESET_ADD_DB' => 'Added new imageset to database » %s',
+ 'LOG_IMAGESET_ADD_FS' => 'Add new imageset on filesystem » %s',
+ 'LOG_IMAGESET_DELETE' => 'Deleted imageset » %s',
+ 'LOG_IMAGESET_EDIT_DETAILS' => 'Edited imageset details » %s',
+ 'LOG_IMAGESET_EDIT' => 'Edited imageset » %s',
+ 'LOG_IMAGESET_EXPORT' => 'Exported imageset » %s',
+ 'LOG_IMAGESET_REFRESHED' => 'Refreshed imageset » %s',
- 'LOG_INACTIVE_ACTIVATE' => 'Activated inactive users » %s',
- 'LOG_INACTIVE_DELETE' => 'Deleted inactive users » %s',
- 'LOG_INACTIVE_REMIND' => 'Sent reminder emails to inactive users » %s',
- 'LOG_INSTALL_CONVERTED' => 'Converted from %1$s to phpBB %2$s ',
- 'LOG_INSTALL_INSTALLED' => 'Installed phpBB %s ',
+ 'LOG_INACTIVE_ACTIVATE' => 'Activated inactive users » %s',
+ 'LOG_INACTIVE_DELETE' => 'Deleted inactive users » %s',
+ 'LOG_INACTIVE_REMIND' => 'Sent reminder emails to inactive users » %s',
+ 'LOG_INSTALL_CONVERTED' => 'Converted from %1$s to phpBB %2$s ',
+ 'LOG_INSTALL_INSTALLED' => 'Installed phpBB %s ',
- 'LOG_IP_BROWSER_CHECK' => 'Session IP/Browser check failed »User IP "%1$s " checked against session IP "%2$s " and user browser string "%3$s " checked against session browser string "%4$s ".',
+ 'LOG_IP_BROWSER_CHECK' => 'Session IP/browser check failed »User IP "%1$s " checked against session IP "%2$s " and user browser string "%3$s " checked against session browser string "%4$s ".',
- 'LOG_JAB_CHANGED' => 'Jabber account changed ',
- 'LOG_JAB_PASSCHG' => 'Jabber password changed ',
- 'LOG_JAB_REGISTER' => 'Jabber account registered ',
- 'LOG_JAB_SETTINGS_CHANGED' => 'Jabber settings changed ',
+ 'LOG_JAB_CHANGED' => 'Jabber account changed ',
+ 'LOG_JAB_PASSCHG' => 'Jabber password changed ',
+ 'LOG_JAB_REGISTER' => 'Jabber account registered ',
+ 'LOG_JAB_SETTINGS_CHANGED' => 'Jabber settings changed ',
- 'LOG_LANGUAGE_PACK_DELETED' => 'Deleted language pack » %s',
- 'LOG_LANGUAGE_PACK_INSTALLED' => 'Installed language pack » %s',
- 'LOG_LANGUAGE_PACK_UPDATED' => 'Updated language pack details » %s',
- 'LOG_LANGUAGE_FILE_REPLACED' => 'Replaced language file » %s',
+ 'LOG_LANGUAGE_PACK_DELETED' => 'Deleted language pack » %s',
+ 'LOG_LANGUAGE_PACK_INSTALLED' => 'Installed language pack » %s',
+ 'LOG_LANGUAGE_PACK_UPDATED' => 'Updated language pack details » %s',
+ 'LOG_LANGUAGE_FILE_REPLACED' => 'Replaced language file » %s',
- 'LOG_MASS_EMAIL' => 'Sent mass email » %s',
+ 'LOG_MASS_EMAIL' => 'Sent mass email » %s',
- 'LOG_MCP_CHANGE_POSTER' => 'Changed poster in topic "%1$s" » from %2$s to %3$s',
+ 'LOG_MCP_CHANGE_POSTER' => 'Changed poster in topic "%1$s" » from %2$s to %3$s',
- 'LOG_MODULE_DISABLE' => 'Module disabled ',
- 'LOG_MODULE_ENABLE' => 'Module enabled ',
- 'LOG_MODULE_MOVE_DOWN' => 'Module moved down » %s',
- 'LOG_MODULE_MOVE_UP' => 'Module moved up » %s',
- 'LOG_MODULE_REMOVED' => 'Module removed » %s',
- 'LOG_MODULE_ADD' => 'Module added » %s',
- 'LOG_MODULE_EDIT' => 'Module edited » %s',
+ 'LOG_MODULE_DISABLE' => 'Module disabled ',
+ 'LOG_MODULE_ENABLE' => 'Module enabled ',
+ 'LOG_MODULE_MOVE_DOWN' => 'Module moved down » %s',
+ 'LOG_MODULE_MOVE_UP' => 'Module moved up » %s',
+ 'LOG_MODULE_REMOVED' => 'Module removed » %s',
+ 'LOG_MODULE_ADD' => 'Module added » %s',
+ 'LOG_MODULE_EDIT' => 'Module edited » %s',
- 'LOG_A_ROLE_ADD' => 'Admin Role added » %s',
- 'LOG_A_ROLE_EDIT' => 'Admin Role edited » %s',
- 'LOG_A_ROLE_REMOVED' => 'Admin Role removed » %s',
- 'LOG_F_ROLE_ADD' => 'Forum Role added » %s',
- 'LOG_F_ROLE_EDIT' => 'Forum Role edited » %s',
- 'LOG_F_ROLE_REMOVED' => 'Forum Role removed » %s',
- 'LOG_M_ROLE_ADD' => 'Moderator Role added » %s',
- 'LOG_M_ROLE_EDIT' => 'Moderator Role edited » %s',
- 'LOG_M_ROLE_REMOVED' => 'Moderator Role removed » %s',
- 'LOG_U_ROLE_ADD' => 'User Role added » %s',
- 'LOG_U_ROLE_EDIT' => 'User Role edited » %s',
- 'LOG_U_ROLE_REMOVED' => 'User Role removed » %s',
+ 'LOG_A_ROLE_ADD' => 'Admin role added » %s',
+ 'LOG_A_ROLE_EDIT' => 'Admin role edited » %s',
+ 'LOG_A_ROLE_REMOVED' => 'Admin role removed » %s',
+ 'LOG_F_ROLE_ADD' => 'Forum role added » %s',
+ 'LOG_F_ROLE_EDIT' => 'Forum role edited » %s',
+ 'LOG_F_ROLE_REMOVED' => 'Forum role removed » %s',
+ 'LOG_M_ROLE_ADD' => 'Moderator role added » %s',
+ 'LOG_M_ROLE_EDIT' => 'Moderator role edited » %s',
+ 'LOG_M_ROLE_REMOVED' => 'Moderator role removed » %s',
+ 'LOG_U_ROLE_ADD' => 'User role added » %s',
+ 'LOG_U_ROLE_EDIT' => 'User role edited » %s',
+ 'LOG_U_ROLE_REMOVED' => 'User role removed » %s',
- 'LOG_PROFILE_FIELD_ACTIVATE' => 'Profile field activated » %s',
- 'LOG_PROFILE_FIELD_CREATE' => 'Profile field added » %s',
- 'LOG_PROFILE_FIELD_DEACTIVATE' => 'Profile field deactivated » %s',
- 'LOG_PROFILE_FIELD_EDIT' => 'Profile field changed » %s',
- 'LOG_PROFILE_FIELD_REMOVED' => 'Profile field removed » %s',
+ 'LOG_PROFILE_FIELD_ACTIVATE' => 'Profile field activated » %s',
+ 'LOG_PROFILE_FIELD_CREATE' => 'Profile field added » %s',
+ 'LOG_PROFILE_FIELD_DEACTIVATE' => 'Profile field deactivated » %s',
+ 'LOG_PROFILE_FIELD_EDIT' => 'Profile field changed » %s',
+ 'LOG_PROFILE_FIELD_REMOVED' => 'Profile field removed » %s',
- 'LOG_PRUNE' => 'Pruned forums » %s',
- 'LOG_AUTO_PRUNE' => 'Auto-pruned forums » %s',
- 'LOG_PRUNE_USER_DEAC' => 'Users deactivated » %s',
- 'LOG_PRUNE_USER_DEL_DEL' => 'Users pruned and posts deleted » %s',
- 'LOG_PRUNE_USER_DEL_ANON' => 'Users pruned and posts retained » %s',
+ 'LOG_PRUNE' => 'Pruned forums » %s',
+ 'LOG_AUTO_PRUNE' => 'Auto-pruned forums » %s',
+ 'LOG_PRUNE_USER_DEAC' => 'Users deactivated » %s',
+ 'LOG_PRUNE_USER_DEL_DEL' => 'Users pruned and posts deleted » %s',
+ 'LOG_PRUNE_USER_DEL_ANON' => 'Users pruned and posts retained » %s',
- 'LOG_REASON_ADDED' => 'Added report/denial reason » %s',
- 'LOG_REASON_REMOVED' => 'Removed report/denial reason » %s',
- 'LOG_REASON_UPDATED' => 'Updated report/denial reason » %s',
+ 'LOG_REASON_ADDED' => 'Added report/denial reason » %s',
+ 'LOG_REASON_REMOVED' => 'Removed report/denial reason » %s',
+ 'LOG_REASON_UPDATED' => 'Updated report/denial reason » %s',
- 'LOG_RESET_DATE' => 'Board start date reset ',
- 'LOG_RESET_ONLINE' => 'Most users online reset ',
- 'LOG_RESYNC_POSTCOUNTS' => 'User postcounts synced ',
- 'LOG_RESYNC_POST_MARKING' => 'Dotted topics synced ',
- 'LOG_RESYNC_STATS' => 'Post, topic and user stats reset ',
+ 'LOG_RESET_DATE' => 'Board start date reset ',
+ 'LOG_RESET_ONLINE' => 'Most users online reset ',
+ 'LOG_RESYNC_POSTCOUNTS' => 'User post counts resyncronised ',
+ 'LOG_RESYNC_POST_MARKING' => 'Dotted topics resyncronised ',
+ 'LOG_RESYNC_STATS' => 'Post, topic and user statistics resyncronised ',
- 'LOG_STYLE_ADD' => 'Added new style » %s',
- 'LOG_STYLE_DELETE' => 'Deleted style » %s',
- 'LOG_STYLE_EDIT_DETAILS' => 'Edited style » %s',
- 'LOG_STYLE_EXPORT' => 'Exported style » %s',
+ 'LOG_STYLE_ADD' => 'Added new style » %s',
+ 'LOG_STYLE_DELETE' => 'Deleted style » %s',
+ 'LOG_STYLE_EDIT_DETAILS' => 'Edited style » %s',
+ 'LOG_STYLE_EXPORT' => 'Exported style » %s',
- 'LOG_TEMPLATE_ADD_DB' => 'Added new template set to database » %s',
- 'LOG_TEMPLATE_ADD_FS' => 'Add new template set on filesystem » %s',
- 'LOG_TEMPLATE_CACHE_CLEARED' => 'Deleted cached versions of template files in template set %1$s » %2$s',
- 'LOG_TEMPLATE_DELETE' => 'Deleted template set » %s',
- 'LOG_TEMPLATE_EDIT' => 'Edited template set %1$s » %2$s',
- 'LOG_TEMPLATE_EDIT_DETAILS' => 'Edited template details » %s',
- 'LOG_TEMPLATE_EXPORT' => 'Exported template set » %s',
- 'LOG_TEMPLATE_REFRESHED' => 'Refreshed template set » %s',
+ 'LOG_TEMPLATE_ADD_DB' => 'Added new template set to database » %s',
+ 'LOG_TEMPLATE_ADD_FS' => 'Add new template set on filesystem » %s',
+ 'LOG_TEMPLATE_CACHE_CLEARED' => 'Deleted cached versions of template files in template set %1$s » %2$s',
+ 'LOG_TEMPLATE_DELETE' => 'Deleted template set » %s',
+ 'LOG_TEMPLATE_EDIT' => 'Edited template set %1$s » %2$s',
+ 'LOG_TEMPLATE_EDIT_DETAILS' => 'Edited template details » %s',
+ 'LOG_TEMPLATE_EXPORT' => 'Exported template set » %s',
+ 'LOG_TEMPLATE_REFRESHED' => 'Refreshed template set » %s',
- 'LOG_THEME_ADD_DB' => 'Added new theme to database » %s',
- 'LOG_THEME_ADD_FS' => 'Add new theme on filesystem » %s',
- 'LOG_THEME_DELETE' => 'Theme deleted » %s',
- 'LOG_THEME_EDIT_DETAILS' => 'Edited theme details » %s',
- 'LOG_THEME_EDIT' => 'Edited theme %1$s » Modified class %2$s ',
- 'LOG_THEME_EDIT_ADD' => 'Edited theme %1$s » Added class %2$s ',
- 'LOG_THEME_EXPORT' => 'Exported theme » %s',
- 'LOG_THEME_REFRESHED' => 'Refreshed theme » %s',
+ 'LOG_THEME_ADD_DB' => 'Added new theme to database » %s',
+ 'LOG_THEME_ADD_FS' => 'Add new theme on filesystem » %s',
+ 'LOG_THEME_DELETE' => 'Theme deleted » %s',
+ 'LOG_THEME_EDIT_DETAILS' => 'Edited theme details » %s',
+ 'LOG_THEME_EDIT' => 'Edited theme %1$s » Modified class %2$s ',
+ 'LOG_THEME_EDIT_ADD' => 'Edited theme %1$s » Added class %2$s ',
+ 'LOG_THEME_EXPORT' => 'Exported theme » %s',
+ 'LOG_THEME_REFRESHED' => 'Refreshed theme » %s',
- 'LOG_USER_ACTIVE' => 'User activated » %s',
- 'LOG_USER_BAN_USER' => 'Banned User via user management for reason "%1$s " » %2$s',
- 'LOG_USER_BAN_IP' => 'Banned ip via user management for reason "%1$s " » %2$s',
- 'LOG_USER_BAN_EMAIL' => 'Banned email via user management for reason "%1$s " » %2$s',
- 'LOG_USER_DELETED' => 'Deleted user » %s',
- 'LOG_USER_DEL_ATTACH' => 'Removed all attachments made by the user » %s',
- 'LOG_USER_DEL_AVATAR' => 'Removed user avatar » %s',
- 'LOG_USER_DEL_POSTS' => 'Removed all posts made by the user » %s',
- 'LOG_USER_DEL_SIG' => 'Removed user signature » %s',
- 'LOG_USER_INACTIVE' => 'User deactivated » %s',
- 'LOG_USER_MOVE_POSTS' => 'Moved user posts » posts by "%1$s" to forum "%2$s"',
- 'LOG_USER_NEW_PASSWORD' => 'Changed user password » %s',
- 'LOG_USER_REACTIVATE' => 'Forced user account re-activation » %s',
- 'LOG_USER_UPDATE_EMAIL' => 'User "%1$s" changed email » from "%2$s" to "%3$s"',
- 'LOG_USER_UPDATE_NAME' => 'Changed username » from "%1$s" to "%2$s"',
- 'LOG_USER_USER_UPDATE' => 'Updated user details » %s',
+ 'LOG_USER_ACTIVE' => 'User activated » %s',
+ 'LOG_USER_BAN_USER' => 'Banned User via user management for reason "%1$s " » %2$s',
+ 'LOG_USER_BAN_IP' => 'Banned IP via user management for reason "%1$s " » %2$s',
+ 'LOG_USER_BAN_EMAIL' => 'Banned email via user management for reason "%1$s " » %2$s',
+ 'LOG_USER_DELETED' => 'Deleted user » %s',
+ 'LOG_USER_DEL_ATTACH' => 'Removed all attachments made by the user » %s',
+ 'LOG_USER_DEL_AVATAR' => 'Removed user avatar » %s',
+ 'LOG_USER_DEL_POSTS' => 'Removed all posts made by the user » %s',
+ 'LOG_USER_DEL_SIG' => 'Removed user signature » %s',
+ 'LOG_USER_INACTIVE' => 'User deactivated » %s',
+ 'LOG_USER_MOVE_POSTS' => 'Moved user posts » posts by "%1$s" to forum "%2$s"',
+ 'LOG_USER_NEW_PASSWORD' => 'Changed user password » %s',
+ 'LOG_USER_REACTIVATE' => 'Forced user account re-activation » %s',
+ 'LOG_USER_UPDATE_EMAIL' => 'User "%1$s" changed email » from "%2$s" to "%3$s"',
+ 'LOG_USER_UPDATE_NAME' => 'Changed username » from "%1$s" to "%2$s"',
+ 'LOG_USER_USER_UPDATE' => 'Updated user details » %s',
- 'LOG_USER_ACTIVE_USER' => 'User account activated ',
- 'LOG_USER_DEL_AVATAR_USER' => 'User avatar removed ',
- 'LOG_USER_DEL_SIG_USER' => 'User signature removed ',
- 'LOG_USER_FEEDBACK' => 'Added user feedback » %s',
+ 'LOG_USER_ACTIVE_USER' => 'User account activated ',
+ 'LOG_USER_DEL_AVATAR_USER' => 'User avatar removed ',
+ 'LOG_USER_DEL_SIG_USER' => 'User signature removed ',
+ 'LOG_USER_FEEDBACK' => 'Added user feedback » %s',
'LOG_USER_GENERAL' => '%s',
- 'LOG_USER_INACTIVE_USER' => 'User account de-activated ',
- 'LOG_USER_LOCK' => 'User locked own topic » %s',
- 'LOG_USER_MOVE_POSTS_USER' => 'Moved all posts to forum "%s" ',
- 'LOG_USER_REACTIVATE_USER' => 'Forced user account re-activation ',
- 'LOG_USER_UNLOCK' => 'User unlocked own topic » %s',
- 'LOG_USER_WARNING' => 'Added user warning »%s',
- 'LOG_USER_WARNING_BODY' => 'The following warning was issued to this user »%s',
+ 'LOG_USER_INACTIVE_USER' => 'User account de-activated ',
+ 'LOG_USER_LOCK' => 'User locked own topic » %s',
+ 'LOG_USER_MOVE_POSTS_USER' => 'Moved all posts to forum "%s" ',
+ 'LOG_USER_REACTIVATE_USER' => 'Forced user account re-activation ',
+ 'LOG_USER_UNLOCK' => 'User unlocked own topic » %s',
+ 'LOG_USER_WARNING' => 'Added user warning »%s',
+ 'LOG_USER_WARNING_BODY' => 'The following warning was issued to this user »%s',
- 'LOG_USER_GROUP_CHANGE' => 'User changed default group » %s',
- 'LOG_USER_GROUP_DEMOTE' => 'User demoted as leaders from usergroup » %s',
- 'LOG_USER_GROUP_JOIN' => 'User joined group » %s',
- 'LOG_USER_GROUP_JOIN_PENDING' => 'User joined group and needs to be approved » %s',
- 'LOG_USER_GROUP_RESIGN' => 'User resigned membership from group » %s',
+ 'LOG_USER_GROUP_CHANGE' => 'User changed default group » %s',
+ 'LOG_USER_GROUP_DEMOTE' => 'User demoted as leaders from usergroup » %s',
+ 'LOG_USER_GROUP_JOIN' => 'User joined group » %s',
+ 'LOG_USER_GROUP_JOIN_PENDING' => 'User joined group and needs to be approved » %s',
+ 'LOG_USER_GROUP_RESIGN' => 'User resigned membership from group » %s',
- 'LOG_WORD_ADD' => 'Added word censor » %s',
- 'LOG_WORD_DELETE' => 'Deleted word censor » %s',
- 'LOG_WORD_EDIT' => 'Edited word censor » %s',
+ 'LOG_WORD_ADD' => 'Added word censor » %s',
+ 'LOG_WORD_DELETE' => 'Deleted word censor » %s',
+ 'LOG_WORD_EDIT' => 'Edited word censor » %s',
));
?>
\ No newline at end of file
diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php
index 5a23ff19ee..5fb641304b 100644
--- a/phpBB/language/en/acp/database.php
+++ b/phpBB/language/en/acp/database.php
@@ -30,31 +30,31 @@ if (empty($lang) || !is_array($lang))
// Banning
$lang = array_merge($lang, array(
- 'DATABASE' => 'Database Utilities',
- '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 be able to compress the file in a number of formats.',
+ 'DATABASE' => 'Database utilities',
+ '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 be able to compress the file in a number of formats.',
'BACKUP_OPTIONS' => 'Backup options',
'BACKUP_TYPE' => 'Backup type',
'BACKUP_INVALID' => 'The selected file to backup is invalid',
- 'START_BACKUP' => 'Start Backup',
+ 'START_BACKUP' => 'Start backup',
'FULL_BACKUP' => 'Full',
- 'STRUCTURE_ONLY' => 'Structure Only',
+ 'STRUCTURE_ONLY' => 'Structure only',
'DATA_ONLY' => 'Data only',
- 'TABLE_SELECT' => 'Table Select',
- 'FILE_TYPE' => 'File Type',
+ 'TABLE_SELECT' => 'Table select',
+ 'FILE_TYPE' => 'File type',
'STORE_LOCAL' => 'Store file locally',
'SELECT_ALL' => 'Select all',
'DESELECT_ALL' => 'Deselect all',
'BACKUP_SUCCESS' => 'The backup file has been created successfully',
'BACKUP_DELETE' => 'The backup file has been deleted successfully',
- 'STORE_AND_DOWNLOAD' => 'Store and Download',
- '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.',
+ 'STORE_AND_DOWNLOAD' => 'Store and download',
+ '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.',
'SELECT_FILE' => 'Select a file',
'RESTORE_OPTIONS' => 'Restore options',
- 'START_RESTORE' => 'Start Restore',
- 'DELETE_BACKUP' => 'Delete Backup',
- 'DOWNLOAD_BACKUP' => 'Download Backup',
- 'RESTORE_SUCCESS' => 'The Database has been successfully restored. Your board should be back to the state it was when the backup was made.',
+ 'START_RESTORE' => 'Start restore',
+ 'DELETE_BACKUP' => 'Delete backup',
+ 'DOWNLOAD_BACKUP' => 'Download backup',
+ 'RESTORE_SUCCESS' => 'The database has been successfully restored. Your board should be back to the state it was when the backup was made.',
));
?>
\ No newline at end of file
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index 097909b9a4..1bb377fc2f 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -32,8 +32,8 @@ if (empty($lang) || !is_array($lang))
// Bot settings
$lang = array_merge($lang, array(
- 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users, or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed',
- 'ALL_USERS' => 'All Users',
+ 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed',
+ 'ALL_USERS' => 'All users',
'COMPOSE' => 'Compose',
@@ -51,7 +51,7 @@ $lang = array_merge($lang, array(
'MAIL_HIGH_PRIORITY' => 'High',
'MAIL_LOW_PRIORITY' => 'Low',
'MAIL_NORMAL_PRIORITY' => 'Normal',
- 'MAIL_PRIORITY' => 'Mail Priority',
+ 'MAIL_PRIORITY' => 'Mail priority',
'MASS_MESSAGE' => 'Your message',
'MASS_MESSAGE_EXPLAIN' => 'Please note that you may enter only plain text. All markup will be removed before sending.',
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index 89848d4b24..acbcd516a4 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -32,11 +32,11 @@ if (empty($lang) || !is_array($lang))
// Forum Admin
$lang = array_merge($lang, array(
- 'AUTO_PRUNE_DAYS' => 'Auto-prune Post Age',
+ 'AUTO_PRUNE_DAYS' => 'Auto-prune post age',
'AUTO_PRUNE_DAYS_EXPLAIN' => 'Number of days since last post after which topic is removed.',
- 'AUTO_PRUNE_FREQ' => 'Auto-prune Frequency',
+ 'AUTO_PRUNE_FREQ' => 'Auto-prune frequency',
'AUTO_PRUNE_FREQ_EXPLAIN' => 'Time in days between pruning events.',
- 'AUTO_PRUNE_VIEWED' => 'Auto-prune Post Viewed Age',
+ 'AUTO_PRUNE_VIEWED' => 'Auto-prune post viewed age',
'AUTO_PRUNE_VIEWED_EXPLAIN' => 'Number of days since topic was viewed after which topic is removed.',
'COPY_PERMISSIONS' => 'Copy permissions from',
@@ -60,13 +60,13 @@ $lang = array_merge($lang, array(
'ENABLE_RECENT_EXPLAIN' => 'If set to yes topics made to this forum will be shown in the active topics list.',
'ENABLE_TOPIC_ICONS' => 'Enable Topic Icons',
- 'FORUM_ADMIN' => 'Forum Administration',
+ '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_AUTO_PRUNE' => 'Enable Auto-Pruning',
+ '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.',
'FORUM_DATA_NEGATIVE' => 'Pruning parameters cannot be negative.',
- 'FORUM_DELETE' => 'Delete Forum',
+ 'FORUM_DELETE' => 'Delete forum',
'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum and decide where you want to put all topics (or forums) it contained.',
'FORUM_DELETED' => 'Forum successfully deleted',
'FORUM_DESC' => 'Description',
@@ -74,35 +74,35 @@ $lang = array_merge($lang, array(
'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.',
'FORUM_IMAGE' => 'Forum Image',
'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an image to associate with this forum.',
- 'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, for example http://) to location clicking this forum will take the user.',
- 'FORUM_LINK_TRACK' => 'Track Link Redirects',
+ 'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, for example http:// ) to location clicking this forum will take the user.',
+ 'FORUM_LINK_TRACK' => 'Track link redirects',
'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',
- 'FORUM_NAME' => 'Forum Name',
+ 'FORUM_NAME' => 'Forum name',
'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.',
- 'FORUM_PARENT' => 'Parent Forum',
- 'FORUM_PASSWORD' => 'Forum Password',
- 'FORUM_PASSWORD_CONFIRM' => 'Confirm Forum Password',
+ 'FORUM_PARENT' => 'Parent forum',
+ 'FORUM_PASSWORD' => 'Forum password',
+ 'FORUM_PASSWORD_CONFIRM' => 'Confirm forum password',
'FORUM_PASSWORD_CONFIRM_EXPLAIN' => 'Only needs to be set if a forum password is entered.',
'FORUM_PASSWORD_EXPLAIN' => 'Defines a password for this forum, use the permission system in preference.',
'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
'FORUM_PRUNE_SETTINGS' => 'Forum prune settings',
'FORUM_RESYNCED' => 'Forum "%s" successfully resynced',
- 'FORUM_RULES_EXPLAIN' => 'Forum Rules are displayed at any page within the given forum.',
- 'FORUM_RULES_LINK' => 'Link to Forum Rules',
- 'FORUM_RULES_LINK_EXPLAIN' => 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the Forum Rules text you specified.',
- 'FORUM_RULES_PREVIEW' => 'Forum Rules preview',
- 'FORUM_SETTINGS' => 'Forum Settings',
- 'FORUM_STATUS' => 'Forum Status',
- 'FORUM_STYLE' => 'Forum Style',
- 'FORUM_TOPICS_PAGE' => 'Topics Per Page',
+ 'FORUM_RULES_EXPLAIN' => 'Forum rules are displayed at any page within the given forum.',
+ 'FORUM_RULES_LINK' => 'Link to forum rules',
+ 'FORUM_RULES_LINK_EXPLAIN' => 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the forum rules text you specified.',
+ 'FORUM_RULES_PREVIEW' => 'Forum rules preview',
+ 'FORUM_SETTINGS' => 'Forum settings',
+ 'FORUM_STATUS' => 'Forum status',
+ 'FORUM_STYLE' => 'Forum style',
+ 'FORUM_TOPICS_PAGE' => 'Topics per page',
'FORUM_TOPICS_PAGE_EXPLAIN' => 'If non-zero this value will override the default topics per page setting.',
- 'FORUM_TYPE' => 'Forum Type',
+ 'FORUM_TYPE' => 'Forum type',
'FORUM_UPDATED' => 'Forum informations updated successfully.',
- 'GENERAL_FORUM_SETTINGS' => 'General Forum Settings',
+ 'GENERAL_FORUM_SETTINGS' => 'General forum settings',
'LINK' => 'Link',
- 'LIST_INDEX' => 'List Forum On Index',
+ 'LIST_INDEX' => 'List forum on index',
'LIST_INDEX_EXPLAIN' => 'Displays a link to this forum under the root parent forum on the index.',
'LOCKED' => 'Locked',
@@ -111,15 +111,15 @@ $lang = array_merge($lang, array(
'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to',
'NO_FORUM_ACTION' => 'No action defined for what happens with the forum content',
- 'NO_PARENT' => 'No Parent',
+ 'NO_PARENT' => 'No parent',
'NO_PERMISSIONS' => 'Do not copy permissions',
'NO_PERMISSION_FORUM_ADD' => 'You do not have the necessary permissions to add forums',
'NO_PERMISSION_FORUM_DELETE' => 'You do not have the necessary permissions to delete forums',
'PARENT_NOT_EXIST' => 'Parent does not exist',
- 'PRUNE_ANNOUNCEMENTS' => 'Prune Announcements',
- 'PRUNE_STICKY' => 'Prune Stickies',
- 'PRUNE_OLD_POLLS' => 'Prune Old Polls',
+ 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements',
+ '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.',
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 1e8dfa3f59..c942415ea4 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -31,8 +31,8 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administer all your usergroups, you can delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description.',
- 'ADD_USERS' => 'Add Users',
+ 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups, you can delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description.',
+ 'ADD_USERS' => 'Add users',
'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a seperate line.',
'COPY_PERMISSIONS' => 'Copy permissions from',
@@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
'GROUPS_NO_MEMBERS' => 'This group has no members',
'GROUPS_NO_MODS' => 'No group leaders defined',
'GROUP_APPROVE' => 'Approve',
- 'GROUP_APPROVED' => 'Approved Members',
+ 'GROUP_APPROVED' => 'Approved members',
'GROUP_AVATAR' => 'Group avatar',
'GROUP_AVATAR_EXPLAIN' => 'This image will be displayed in the Group Control Panel.',
'GROUP_CLOSED' => 'Closed',
@@ -75,7 +75,7 @@ $lang = array_merge($lang, array(
'GROUP_MODS_PROMOTED' => 'Group members promoted successfully',
'GROUP_NAME' => 'Group name',
'GROUP_OPEN' => 'Open',
- 'GROUP_PENDING' => 'Pending Members',
+ 'GROUP_PENDING' => 'Pending members',
'GROUP_PROMOTE' => 'Promote',
'GROUP_RANK' => 'Group rank',
'GROUP_RECEIVE_PM' => 'Group able to receive private messages',
@@ -98,14 +98,14 @@ $lang = array_merge($lang, array(
'NO_PERMISSIONS' => 'Do not copy permissions',
'SPECIAL_GROUPS' => 'Predefined groups',
- 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings. By clicking "Default" you can set the relevant group to the default for all its members.',
+ 'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings. By clicking “Default” you can set the relevant group to the default for all its members.',
'TOTAL_MEMBERS' => 'Members',
'USERS_APPROVED' => 'Users approved successfully.',
'USER_DEFAULT' => 'User default',
'USER_DEF_GROUPS' => 'User defined groups',
- 'USER_DEF_GROUPS_EXPLAIN' => 'These are groups created by you or another admin on this board. You can manage memberships as well as edit group properties or even delete the group. By clicking "Default" you can set the relevant group to the default for all its members.',
+ 'USER_DEF_GROUPS_EXPLAIN' => 'These are groups created by you or another admin on this board. You can manage memberships as well as edit group properties or even delete the group. By clicking “Default” you can set the relevant group to the default for all its members.',
'USER_GROUP_DEFAULT' => 'Set as default group',
'USER_GROUP_DEFAULT_EXPLAIN' => 'Saying yes here will set this group as the default group for the added users',
'USER_GROUP_LEADER' => 'Set as group leader',
diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php
index e735cd8dae..a4da720d66 100644
--- a/phpBB/language/en/acp/language.php
+++ b/phpBB/language/en/acp/language.php
@@ -31,15 +31,15 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_FILES' => 'Admin Language Files',
+ 'ACP_FILES' => 'Admin language files',
'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs',
- 'EMAIL_FILES' => 'Email Templates',
+ 'EMAIL_FILES' => 'Email templates',
- 'FILE_CONTENTS' => 'File Contents',
+ 'FILE_CONTENTS' => 'File contents',
'FILE_FROM_STORAGE' => 'File from storage folder',
- 'HELP_FILES' => 'Help Files',
+ 'HELP_FILES' => 'Help files',
'INSTALLED_LANGUAGE_PACKS' => 'Installed language packs',
'INVALID_LANGUAGE_PACK' => 'The selected language pack seems to be not valid. Please verify the language pack and upload it again if necessary.',
@@ -47,13 +47,13 @@ $lang = array_merge($lang, array(
'LANGUAGE_DETAILS_UPDATED' => 'Language details successfully updated',
'LANGUAGE_ENTRIES' => 'Language Entries',
- 'LANGUAGE_ENTRIES_EXPLAIN' => 'Here you are able to change existing language pack entries or not already translated ones.Note: Once you changed a language file, the changes will be stored within a seperate folder for you to download. The changes will not be seen by your users until you replace the original language files at your webspace (by uploading them).',
- 'LANGUAGE_FILES' => 'Language Files',
- 'LANGUAGE_KEY' => 'Language Key',
+ 'LANGUAGE_ENTRIES_EXPLAIN' => 'Here you are able to change existing language pack entries or not already translated ones.Note: Once you changed a language file, the changes will be stored within a seperate folder for you to download. The changes will not be seen by your users until you replace the original language files at your webspace (by uploading them).',
+ 'LANGUAGE_FILES' => 'Language files',
+ 'LANGUAGE_KEY' => 'Language key',
'LANGUAGE_PACK_ALREADY_INSTALLED' => 'This language pack is already installed.',
- 'LANGUAGE_PACK_DELETED' => 'The language pack %s has been removed successfully. All users using this language have been resetted to the boards default language.',
- 'LANGUAGE_PACK_DETAILS' => 'Language Pack Details',
- 'LANGUAGE_PACK_INSTALLED' => 'The language pack %s has been successfully installed.',
+ 'LANGUAGE_PACK_DELETED' => 'The language pack %s has been removed successfully. All users using this language have been resetted to the boards default language.',
+ 'LANGUAGE_PACK_DETAILS' => 'Language pack details',
+ 'LANGUAGE_PACK_INSTALLED' => 'The language pack %s has been successfully installed.',
'LANGUAGE_PACK_ISO' => 'ISO',
'LANGUAGE_PACK_LOCALNAME' => 'Local name',
'LANGUAGE_PACK_NAME' => 'Name',
@@ -65,22 +65,22 @@ $lang = array_merge($lang, array(
'LANG_ISO_CODE' => 'ISO Code',
'LANG_LOCAL_NAME' => 'Local name',
- 'MISSING_LANGUAGE_FILE' => 'Missing Language File: %s ',
- 'MISSING_LANG_VARIABLES' => 'Missing Language Variables',
- 'MODS_FILES' => 'Mods Language Files',
+ 'MISSING_LANGUAGE_FILE' => 'Missing Language File: %s ',
+ 'MISSING_LANG_VARIABLES' => 'Missing language variables',
+ 'MODS_FILES' => 'MODs language files',
- 'NO_LANG_ID' => 'You haven\'t specified a language pack',
+ 'NO_LANG_ID' => 'You haven’t specified a language pack',
'NO_REMOVE_DEFAULT_LANG' => 'You are not able to remove the default language pack. If you want to remove this language pack, change your boards default language first.',
'NO_UNINSTALLED_LANGUAGE_PACKS' => 'No uninstalled language packs',
'REMOVE_FROM_STORAGE_FOLDER' => 'Remove from storage folder',
'SELECT_DOWNLOAD_FORMAT' => 'Select download format',
- 'SUBMIT_AND_DOWNLOAD' => 'Submit and Download File',
- 'SUBMIT_AND_UPLOAD' => 'Submit and Upload File',
+ 'SUBMIT_AND_DOWNLOAD' => 'Submit and download file',
+ 'SUBMIT_AND_UPLOAD' => 'Submit and upload file',
'THOSE_MISSING_LANG_FILES' => 'The following language files are missing from the %s language folder',
- 'THOSE_MISSING_LANG_VARIABLES' => 'The following language variables are missing from the %s language pack',
+ 'THOSE_MISSING_LANG_VARIABLES' => 'The following language variables are missing from the %s language pack',
'UNINSTALLED_LANGUAGE_PACKS' => 'Uninstalled language packs',
diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php
index 0eefb59753..f01f1666fe 100644
--- a/phpBB/language/en/acp/modules.php
+++ b/phpBB/language/en/acp/modules.php
@@ -34,13 +34,13 @@ $lang = array_merge($lang, array(
'ACP_MODULE_MANAGEMENT_EXPLAIN' => 'Here you are able to manage all kind of modules. Please note that if you place the same module under different categories, the category selected will be the first one found within the tree.',
'ADD_MODULE' => 'Add module',
'ADD_MODULE_CONFIRM' => 'Are you sure you want to add the selected module with the selected mode?',
- 'ADD_MODULE_TITLE' => 'Add Module',
+ 'ADD_MODULE_TITLE' => 'Add module',
'CANNOT_REMOVE_MODULE' => 'Unable to remove module, it has assigned childs. Please remove or move all childs before performing this action',
'CATEGORY' => 'Category',
- 'CHOOSE_MODE' => 'Choose Module Mode',
+ 'CHOOSE_MODE' => 'Choose module mode',
'CHOOSE_MODE_EXPLAIN' => 'Choose the modules mode being used.',
- 'CHOOSE_MODULE' => 'Choose Module',
+ 'CHOOSE_MODULE' => 'Choose module',
'CHOOSE_MODULE_EXPLAIN' => 'Choose the file being called by this module.',
'CREATE_MODULE' => 'Create new module',
@@ -51,7 +51,7 @@ $lang = array_merge($lang, array(
'EDIT_MODULE' => 'Edit module',
'EDIT_MODULE_EXPLAIN' => 'Here you are able to enter module specific settings',
- 'HIDDEN_MODULE' => 'Hidden Module',
+ 'HIDDEN_MODULE' => 'Hidden module',
'MODULE' => 'Module',
'MODULE_ADDED' => 'Module successfully added',
@@ -60,7 +60,7 @@ $lang = array_merge($lang, array(
'MODULE_DISPLAYED_EXPLAIN' => 'If you do not wish to display this module, but want to use it, set this to no.',
'MODULE_EDITED' => 'Module successfully edited',
'MODULE_ENABLED' => 'Module enabled',
- 'MODULE_LANGNAME' => 'Module Language Name',
+ 'MODULE_LANGNAME' => 'Module language mame',
'MODULE_LANGNAME_EXPLAIN' => 'Enter the displayed module name. Use language constant if name is served from language file.',
'MODULE_TYPE' => 'Module type',
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
index 089e157707..4ab5c2eb56 100644
--- a/phpBB/language/en/acp/permissions.php
+++ b/phpBB/language/en/acp/permissions.php
@@ -52,23 +52,23 @@ $lang = array_merge($lang, array(
',
'ACL_NEVER' => 'Never',
- 'ACL_SET' => 'Setting Permissions',
- 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple YES/NO system. Setting an option to NEVER for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select NO. If values are assigned for this option elsewhere they will be used in preference, else NEVER is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
+ 'ACL_SET' => 'Setting permissions',
+ 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple YES /NO system. Setting an option to NEVER for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select NO . If values are assigned for this option elsewhere they will be used in preference, else NEVER is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
'ACL_SETTING' => 'Setting',
- 'ACL_TYPE_A_' => 'Administrative Permissions',
- 'ACL_TYPE_F_' => 'Forum Permissions',
- 'ACL_TYPE_M_' => 'Moderative Permissions',
- 'ACL_TYPE_U_' => 'User Permissions',
+ 'ACL_TYPE_A_' => 'Administrative permissions',
+ 'ACL_TYPE_F_' => 'Forum permissions',
+ 'ACL_TYPE_M_' => 'Moderative permissions',
+ 'ACL_TYPE_U_' => 'User permissions',
- 'ACL_TYPE_GLOBAL_A_' => 'Administrative Permissions',
- 'ACL_TYPE_GLOBAL_U_' => 'User Permissions',
- 'ACL_TYPE_GLOBAL_M_' => 'Global Moderator Permissions',
- 'ACL_TYPE_LOCAL_M_' => 'Forum Moderator Permissions',
- 'ACL_TYPE_LOCAL_F_' => 'Forum Permissions',
+ 'ACL_TYPE_GLOBAL_A_' => 'Administrative permissions',
+ 'ACL_TYPE_GLOBAL_U_' => 'User permissions',
+ 'ACL_TYPE_GLOBAL_M_' => 'Global Moderator permissions',
+ 'ACL_TYPE_LOCAL_M_' => 'Forum Moderator permissions',
+ 'ACL_TYPE_LOCAL_F_' => 'Forum permissions',
'ACL_NO' => 'No',
- 'ACL_VIEW' => 'Viewing Permissions',
+ 'ACL_VIEW' => 'Viewing permissions',
'ACL_VIEW_EXPLAIN' => 'Here you can see the effective permissions the user/group is having. A red square indicates that the user/group does not have the permission, a green square indicates that the user/group does have the permission.',
'ACL_YES' => 'Yes',
@@ -78,10 +78,10 @@ $lang = array_merge($lang, array(
'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator rights to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.',
'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.',
'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and admin permissions. User permissions include capabilities such as the use of avatars, sending private messages, etc. Global moderator permissions are blabla, administrative permissions blabla. Individual users permissions should only be changed in rare occassions, the preferred method is putting users in groups and assigning the groups permissions.',
- 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
- 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
- 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
- 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it\'s permissions too.',
+ 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
+ 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
+ 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
+ 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.',
'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and admin permissions. User permissions include capabilities such as the use of avatars, sending private messages, etc. Global moderator permissions are blabla, administrative permissions blabla. To alter these settings for large numbers of users the Group permissions system is the prefered method. Users permissions should only be changed in rare occassions, the preferred method is putting users in groups and assigning the groups permissions.',
'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups',
@@ -90,69 +90,69 @@ $lang = array_merge($lang, array(
'ACP_VIEW_FORUM_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the forum moderator permissions assigned to the selected users/groups and forums',
'ACP_VIEW_USER_PERMISSIONS_EXPLAIN' => 'Here you can view the effective user permissions assigned to the selected users/groups',
- 'ADD_GROUPS' => 'Add Groups',
- 'ADD_PERMISSIONS' => 'Add Permissions',
- 'ADD_USERS' => 'Add Users',
+ 'ADD_GROUPS' => 'Add groups',
+ 'ADD_PERMISSIONS' => 'Add permissions',
+ 'ADD_USERS' => 'Add users',
'ALL_GROUPS' => 'Select all groups',
- 'ALL_NEVER' => 'All Never',
- 'ALL_NO' => 'All No',
+ 'ALL_NEVER' => 'All NEVER ',
+ 'ALL_NO' => 'All NO ',
'ALL_USERS' => 'Select all users',
- 'ALL_YES' => 'All Yes',
- 'APPLY_ALL_PERMISSIONS' => 'Apply all Permissions',
- 'APPLY_PERMISSIONS' => 'Apply Permissions',
- 'APPLY_PERMISSIONS_EXPLAIN' => 'The Permissions and Role defined for this item will only be applied to this item and all checked items.',
+ 'ALL_YES' => 'All YES ',
+ 'APPLY_ALL_PERMISSIONS' => 'Apply all permissions',
+ 'APPLY_PERMISSIONS' => 'Apply permissions',
+ 'APPLY_PERMISSIONS_EXPLAIN' => 'The permissions and role defined for this item will only be applied to this item and all checked items.',
'AUTH_UPDATED' => 'Permissions have been updated',
- 'CREATE_ROLE' => 'Create Role',
- 'CREATE_ROLE_FROM' => 'Use settings from...',
- 'CUSTOM' => 'Custom...',
+ 'CREATE_ROLE' => 'Create role',
+ 'CREATE_ROLE_FROM' => 'Use settings from…',
+ 'CUSTOM' => 'Custom…',
'DEFAULT' => 'Default',
'DELETE_ROLE' => 'Delete role',
'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will not loosing their permission settings.',
- 'DISPLAY_ROLE_ITEMS' => 'View Items using this role',
+ 'DISPLAY_ROLE_ITEMS' => 'View items using this role',
- 'EDIT_PERMISSIONS' => 'Edit Permissions',
- 'EDIT_ROLE' => 'Edit Role',
+ 'EDIT_PERMISSIONS' => 'Edit permissions',
+ 'EDIT_ROLE' => 'Edit role',
'GROUPS_NOT_ASSIGNED' => 'No group assigned to this role',
'LOOK_UP_FORUMS_EXPLAIN' => 'You are able to select more than one forum',
- 'LOOK_UP_GROUP' => 'Look up Usergroup',
- 'LOOK_UP_USER' => 'Look up User',
+ 'LOOK_UP_GROUP' => 'Look up usergroup',
+ 'LOOK_UP_USER' => 'Look up user',
- 'MANAGE_GROUPS' => 'Manage Groups',
- 'MANAGE_USERS' => 'Manage Users',
+ 'MANAGE_GROUPS' => 'Manage groups',
+ 'MANAGE_USERS' => 'Manage users',
'NO_AUTH_SETTING_FOUND' => 'Permission settings not defined.',
- 'NO_ROLE_ASSIGNED' => 'No role assigned...',
- 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the "All No" link.',
+ 'NO_ROLE_ASSIGNED' => 'No role assigned…',
+ 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the “All NO ” link.',
'NO_ROLE_AVAILABLE' => 'No role available',
'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
'NO_ROLE_SELECTED' => 'Role could not be found.',
- 'NO_USER_GROUP_SELECTED' => 'You haven\'t selected any user or group.',
+ 'NO_USER_GROUP_SELECTED' => 'You haven’t selected any user or group.',
'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.',
'PERMISSION_APPLIED_TO_ALL' => 'Permissions and Role will also be applied to all checked objects',
'PLUS_SUBFORUMS' => '+Subforums',
- 'REMOVE_PERMISSIONS' => 'Remove Permissions',
- 'REMOVE_ROLE' => 'Remove Role',
+ 'REMOVE_PERMISSIONS' => 'Remove permissions',
+ 'REMOVE_ROLE' => 'Remove role',
'ROLE' => 'Role',
'ROLE_ADD_SUCCESS' => 'Role successfully added.',
'ROLE_ASSIGNED_TO' => 'Users/Groups assigned to %s',
'ROLE_DELETED' => 'Role successfully removed.',
- 'ROLE_DESCRIPTION' => 'Role Description',
+ 'ROLE_DESCRIPTION' => 'Role description',
'ROLE_DESCRIPTION_ADMIN_FORUM' => 'Can access the forum management and forum permission settings.',
'ROLE_DESCRIPTION_ADMIN_FULL' => 'Has access to all admin functions of this forum. Not recommended.',
'ROLE_DESCRIPTION_ADMIN_STANDARD' => 'Has access to most admin features but is not allowed to use server or system related tools.',
- 'ROLE_DESCRIPTION_ADMIN_USERGROUP' => 'Can manage groups and users: Can change permissions, settings, manage bans, and manage ranks.',
+ 'ROLE_DESCRIPTION_ADMIN_USERGROUP' => 'Can manage groups and users: Able to change permissions, settings, manage bans, and manage ranks.',
'ROLE_DESCRIPTION_FORUM_BOT' => 'This role is recommended for bots and search spiders.',
'ROLE_DESCRIPTION_FORUM_FULL' => 'Can use all forum features, including posting of announcements and stickies. Can also ignore the flood limit. Not recommended for normal users.',
'ROLE_DESCRIPTION_FORUM_LIMITED' => 'Can use some forum features, but cannot attach files or use post icons.',
- 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS' => 'Like Limited Access but can also create polls.',
+ 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS' => 'As per Limited Access but can also create polls.',
'ROLE_DESCRIPTION_FORUM_NOACCESS' => 'Can neither see nor access the forum.',
'ROLE_DESCRIPTION_FORUM_ONQUEUE' => 'Can use most forum features including attachments, but posts and topics need to be approved by a moderator.',
'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.',
@@ -169,9 +169,9 @@ $lang = array_merge($lang, array(
'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.',
'ROLE_DESCRIPTION_EXPLAIN' => 'You are able to enter a short explanation of what the role is doing or for what it is meant for. The text you enter here will be displayed within the permissions screens too.',
- 'ROLE_DETAILS' => 'Role Details',
+ 'ROLE_DETAILS' => 'Role details',
'ROLE_EDIT_SUCCESS' => 'Role successfully edited.',
- 'ROLE_NAME' => 'Role Name',
+ 'ROLE_NAME' => 'Role name',
'ROLE_NAME_ALREADY_EXIST' => 'A role named %s already exist for the specified permission type.',
'ROLE_NOT_ASSIGNED' => 'Role has not been assigned yet.',
@@ -179,38 +179,38 @@ $lang = array_merge($lang, array(
'SELECTED_GROUP_NOT_EXIST' => 'The selected group(s) do not exist',
'SELECTED_USER_NOT_EXIST' => 'The selected user(s) do not exist',
'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection',
- 'SELECT_ROLE' => 'Select role...',
+ 'SELECT_ROLE' => 'Select role…',
'SELECT_TYPE' => 'Select type',
'SET_PERMISSIONS' => 'Set permissions',
'SET_ROLE_PERMISSIONS' => 'Set role permissions',
'SET_USERS_PERMISSIONS' => 'Set users permissions',
'SET_USERS_FORUM_PERMISSIONS' => 'Set users forum permissions',
- 'TRACE_DEFAULT' => 'By default every permission is NO (unset). So the permission can be overwritten by other settings.',
+ 'TRACE_DEFAULT' => 'By default every permission is NO (unset). So the permission can be overwritten by other settings.',
'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_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_YES' => 'This group\'s permission 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_YES_TOTAL_NEVER' => 'This group\'s permission 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_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_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_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_YES' => 'This group’s permission 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_YES_TOTAL_NEVER' => 'This group’s permission 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_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_PERMISSION' => 'Trace permission - %s',
'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 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_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to YES but the total permission is already set to YES , so the 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_WHO' => 'Who',
'TRACE_TOTAL' => 'Total',
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index 4d550965a5..ddadceac7a 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -57,22 +57,22 @@ $lang = array_merge($lang, array(
'forums' => 'Forums',
'misc' => 'Misc',
'permissions' => 'Permissions',
- 'pm' => 'Private Messages',
+ 'pm' => 'Private messages',
'polls' => 'Polls',
'post' => 'Post',
- 'post_actions' => 'Post Actions',
+ 'post_actions' => 'Post actions',
'posting' => 'Posting',
'profile' => 'Profile',
'settings' => 'Settings',
- 'topic_actions' => 'Topic Actions',
+ 'topic_actions' => 'Topic actions',
'user_group' => 'Users & Groups',
),
'permission_type' => array(
- 'u_' => 'User Permissions',
- 'a_' => 'Admin Permissions',
- 'm_' => 'Moderator Permissions',
- 'f_' => 'Forum Permissions',
+ 'u_' => 'User permissions',
+ 'a_' => 'Admin permissions',
+ 'm_' => 'Moderator permissions',
+ 'f_' => 'Forum permissions',
),
));
@@ -173,7 +173,7 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'acl_a_board' => array('lang' => 'Can alter board settings', 'cat' => 'settings'),
'acl_a_server' => array('lang' => 'Can alter server/communication settings', 'cat' => 'settings'),
- 'acl_a_jabber' => array('lang' => 'Can alter jabber settings', 'cat' => 'settings'),
+ 'acl_a_jabber' => array('lang' => 'Can alter Jabber settings', 'cat' => 'settings'),
'acl_a_phpinfo' => array('lang' => 'Can view php settings', 'cat' => 'settings'),
'acl_a_forum' => array('lang' => 'Can manage forums', 'cat' => 'forums'),
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index a6c1f0aad8..d65fb4bccd 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -58,17 +58,17 @@ $lang = array_merge($lang, array(
'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 of lang 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. {USERNAME1}, {USERNAME2}. In addition to these tokens you can use any of lang 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',
'TOKEN_DEFINITION' => 'What can it be?',
'TOO_MANY_BBCODES' => 'You cannot create any more BBCodes. Please remove one or more BBCodes then try again',
'tokens' => array(
- 'TEXT' => 'Any text, including foreign characters, numbers, etc...',
+ 'TEXT' => 'Any text, including foreign characters, numbers, etc…',
'NUMBER' => 'Any series of digits',
'EMAIL' => 'A valid email address',
- 'URL' => 'A valid URL using any protocol (http, ftp, etc... cannot be used for javascript exploits). If none is given, "http://" is prepended to 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 prepended to 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 color, can be either in the numeric form #FF1234 or an english name such as "blue"'
+ 'COLOR' => 'A HTML color, can be either in the numeric form #FF1234 or a CSS colour keyword such as fuchsia or InactiveBorder '
)
));
@@ -89,13 +89,13 @@ $lang = array_merge($lang, array(
'DISPLAY_ON_POSTING' => 'Display on posting',
- 'EDIT_ICONS' => 'Edit Icons',
+ 'EDIT_ICONS' => 'Edit icons',
'EDIT_SMILIES' => 'Edit smilies',
'EMOTION' => 'Emotion',
- 'EXPORT_ICONS' => 'Create icons pak',
- 'EXPORT_ICONS_EXPLAIN' => 'To create a package of your currently installed icons, click %sHERE%s to download the icons package file. Once downloaded create a zip or tgz file containing all of your icons plus this .pak configuration file.',
- 'EXPORT_SMILIES' => 'Create smilies pak',
- 'EXPORT_SMILIES_EXPLAIN' => 'To create a package of your currently installed smilies, click %sHERE%s to download the smilies.pak file. Once downloaded create a zip or tgz file containing all of your smilies plus this .pak configuration file.',
+ 'EXPORT_ICONS' => 'Export and download icons.pak',
+ 'EXPORT_ICONS_EXPLAIN' => '%sOn clicking this link, the configuration for your installed icons will be packaged into icons.pak which once downloaded can be used to create a .zip or .tgz file containing all of your icons plus this icons.pak configuration file%s.',
+ 'EXPORT_SMILIES' => 'Export and download smilies.pak',
+ 'EXPORT_SMILIES_EXPLAIN' => '%sOn clicking this link, the configuration for your installed smilies will be packaged into smilies.pak which once downloaded can be used to create a .zip or .tgz file containing all of your smilies plus this icons.pak configuration file%s.',
'FIRST' => 'First',
@@ -103,7 +103,7 @@ $lang = array_merge($lang, array(
'ICONS_ADDED' => 'The icon has been added successfully.',
'ICONS_CONFIG' => 'Icon configuration',
'ICONS_DELETED' => 'The icon has been removed successfully.',
- 'ICONS_EDIT' => 'Edit Icon',
+ 'ICONS_EDIT' => 'Edit icon',
'ICONS_EDITED' => 'The icon has been updated successfully.',
'ICONS_HEIGHT' => 'Icon height',
'ICONS_IMAGE' => 'Icon image',
@@ -131,7 +131,7 @@ $lang = array_merge($lang, array(
'REPLACE_MATCHES' => 'Replace matches',
'SELECT_PACKAGE' => 'Select a package file',
- 'SMILIES_ADD' => 'Add a new Smiley',
+ 'SMILIES_ADD' => 'Add a new smiley',
'SMILIES_ADDED' => 'The smiley has been added successfully.',
'SMILIES_CODE' => 'Smiley code',
'SMILIES_CONFIG' => 'Smiley configuration',
@@ -180,16 +180,16 @@ $lang = array_merge($lang, array(
'MUST_SELECT_RANK' => 'You must select a rank.',
'NO_ASSIGNED_RANK' => 'No special rank assigned.',
- 'NO_RANK_TITLE' => 'You haven\'t specified a title for the rank.',
+ 'NO_RANK_TITLE' => 'You haven’t specified a title for the rank.',
'NO_UPDATE_RANKS' => 'The rank was successfully deleted. However user accounts using this rank were not updated. You will need to manually reset the rank on these accounts.',
'RANK_ADDED' => 'The rank was successfully added.',
- 'RANK_IMAGE' => 'Rank Image',
+ 'RANK_IMAGE' => 'Rank image',
'RANK_IMAGE_EXPLAIN' => 'Use this to define a small image associated with the rank. The path is relative to the root phpBB directory.',
- 'RANK_MINIMUM' => 'Minimum Posts',
+ 'RANK_MINIMUM' => 'Minimum posts',
'RANK_REMOVED' => 'The rank was successfully deleted.',
- 'RANK_SPECIAL' => 'Set as Special Rank',
- 'RANK_TITLE' => 'Rank Title',
+ 'RANK_SPECIAL' => 'Set as special rank',
+ 'RANK_TITLE' => 'Rank title',
'RANK_UPDATED' => 'The rank was successfully updated.',
));
@@ -200,13 +200,13 @@ $lang = array_merge($lang, array(
'ADD_DISALLOW_TITLE' => 'Add a disallowed username',
'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit',
- 'DELETE_DISALLOW_TITLE' => 'Remove a Disallowed Username',
+ 'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username',
'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.',
'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed',
'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added',
- 'NO_DISALLOWED' => 'No Disallowed Usernames',
- 'NO_USERNAME_SPECIFIED' => 'You haven\'t selected or entered a username to operate with.',
+ 'NO_DISALLOWED' => 'No disallowed usernames',
+ 'NO_USERNAME_SPECIFIED' => 'You haven’t selected or entered a username to operate with.',
));
// Reasons
@@ -215,8 +215,8 @@ $lang = array_merge($lang, array(
'ADD_NEW_REASON' => 'Add new reason',
- 'IS_NOT_TRANSLATED' => 'Reason has not been localized',
- 'IS_TRANSLATED' => 'Reason has been localized',
+ 'IS_NOT_TRANSLATED' => 'Reason has not been localised',
+ 'IS_TRANSLATED' => 'Reason has been localised',
'NO_REASON' => 'Reason could not be found',
'NO_REASON_INFO' => 'You have to specify a title and a description for this reason.',
@@ -225,7 +225,7 @@ $lang = array_merge($lang, array(
'REASON_ADD' => 'Add report/denial reason',
'REASON_ADDED' => 'Report/denial reason successfully added',
'REASON_ALREADY_EXIST' => 'A reason with this title already exist, please enter another title for this reason.',
- 'REASON_DESCRIPTION' => 'Reason Description',
+ 'REASON_DESCRIPTION' => 'Reason description',
'REASON_EDIT' => 'Edit report/denial reason',
'REASON_EDIT_EXPLAIN' => 'Here you are able to add or edit a reason. If the reason is translated the localized version is used instead of the description entered here.',
'REASON_REMOVED' => 'Report/denial reason successfully removed',
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index 229b93591a..48ca0cf619 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -38,21 +38,21 @@ $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',
'CHANGED_PROFILE_FIELD' => 'Successfully changed profile field',
'CHARS_ANY' => 'Any character',
'CHECKBOX' => 'Checkbox',
- 'CP_LANG_DEFAULT_VALUE' => 'Default Value',
+ 'CP_LANG_DEFAULT_VALUE' => 'Default value',
'CP_LANG_EXPLAIN' => 'Field Description',
- 'CP_LANG_EXPLAIN_EXPLAIN' => 'The Explanation for this field presented to the user',
- 'CP_LANG_NAME' => 'Field Name/Title presented to the user',
+ 'CP_LANG_EXPLAIN_EXPLAIN' => 'The explanation for this field presented to the user',
+ 'CP_LANG_NAME' => 'Field name/title presented to the user',
'CP_LANG_OPTIONS' => 'Options',
- 'CREATE_NEW_FIELD' => 'Create New Field',
+ 'CREATE_NEW_FIELD' => 'Create new field',
'COLUMNS' => 'Columns',
- 'DEFAULT_ISO_LANGUAGE' => 'Default Language [%s]',
- 'DEFAULT_VALUE' => 'Default Value',
+ 'DEFAULT_ISO_LANGUAGE' => 'Default language [%s]',
+ 'DEFAULT_VALUE' => 'Default value',
'DELETE_PROFILE_FIELD' => 'Remove profile field',
'DELETE_PROFILE_FIELD_CONFIRM' => 'Are you sure you want to delete this profile field?',
'DISPLAY_AT_PROFILE' => 'Display in user control panel',
@@ -71,77 +71,77 @@ $lang = array_merge($lang, array(
'FIELD_BOOL' => 'Boolean (Yes/No)',
'FIELD_DATE' => 'Date',
- 'FIELD_DESCRIPTION' => 'Field Description',
- 'FIELD_DESCRIPTION_EXPLAIN' => 'The Explanation for this field presented to the user',
- 'FIELD_DROPDOWN' => 'Dropdown Box',
- 'FIELD_IDENT' => 'Field Identification',
+ 'FIELD_DESCRIPTION' => 'Field description',
+ 'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user',
+ 'FIELD_DROPDOWN' => 'Dropdown box',
+ 'FIELD_IDENT' => 'Field identification',
'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.',
- 'FIELD_IDENT_EXPLAIN' => 'The field Identification is a name to identify the profile field within the database and the templates.',
+ 'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.',
'FIELD_INT' => 'Numbers',
'FIELD_LENGTH' => 'Length of input box',
'FIELD_NOT_FOUND' => 'Profile field not found',
- 'FIELD_STRING' => 'Single Textfield',
+ 'FIELD_STRING' => 'Single textfield',
'FIELD_TEXT' => 'Textarea',
- 'FIELD_TYPE' => 'Field Type',
+ 'FIELD_TYPE' => 'Field type',
'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.',
- 'FIELD_VALIDATION' => 'Field Validation',
- 'FIRST_OPTION' => 'First Option',
+ 'FIELD_VALIDATION' => 'Field validation',
+ 'FIRST_OPTION' => 'First option',
- 'HIDE_PROFILE_FIELD' => 'Hide Profile Field',
+ 'HIDE_PROFILE_FIELD' => 'Hide profile field',
'HIDE_PROFILE_FIELD_EXPLAIN' => 'Only Administrators and Moderators are able to see/fill out this profile field. If this option is enabled, the profile field will be only displayed in user profiles.',
'INVALID_CHARS_FIELD_IDENT' => 'Field identification can only contain lowercase a-z and _',
'ISO_LANGUAGE' => 'Language [%s]',
- 'LANG_SPECIFIC_OPTIONS' => 'Language specific options [%s ]',
+ 'LANG_SPECIFIC_OPTIONS' => 'Language specific options [%s ]',
'MAX_FIELD_CHARS' => 'Maximum number of characters',
'MAX_FIELD_NUMBER' => 'Highest allowed number',
'MIN_FIELD_CHARS' => 'Minimum number of characters',
'MIN_FIELD_NUMBER' => 'Lowest allowed number',
- 'NO_FIELD_ENTRIES' => 'No Entries defined',
+ 'NO_FIELD_ENTRIES' => 'No entries defined',
'NO_FIELD_ID' => 'No field id specified',
'NO_FIELD_TYPE' => 'No Field type specified',
'NO_VALUE_OPTION' => 'Option equal to non entered value',
'NO_VALUE_OPTION_EXPLAIN' => 'Value for a non-entry. If the field is required, the user gets an error if he choose the option selected here',
'NUMBERS_ONLY' => 'Only numbers (0-9)',
- 'PREVIEW_PROFILE_FIELD' => 'Preview Profile Field',
- 'PROFILE_BASIC_OPTIONS' => 'Basic Options',
+ 'PREVIEW_PROFILE_FIELD' => 'Preview profile field',
+ 'PROFILE_BASIC_OPTIONS' => 'Basic options',
'PROFILE_FIELD_ACTIVATED' => 'Profile field successfully activated',
'PROFILE_FIELD_DEACTIVATED' => 'Profile field successfully deactivated',
'PROFILE_LANG_OPTIONS' => 'Language specific options',
'PROFILE_TYPE_OPTIONS' => 'Profile type specific options',
- 'RADIO_BUTTONS' => 'Radio Buttons',
+ 'RADIO_BUTTONS' => 'Radio buttons',
'REMOVED_PROFILE_FIELD' => 'Successfully removed profile field.',
'REQUIRED_FIELD' => 'Required Field',
'REQUIRED_FIELD_EXPLAIN' => 'Force profile field to be filled out or specified by user. This will display the profile field at registration and within the user control panel.',
'ROWS' => 'Rows',
'SAVE' => 'Save',
- 'SECOND_OPTION' => 'Second Option',
+ 'SECOND_OPTION' => 'Second option',
'STEP_1_EXPLAIN_CREATE' => 'Here you can enter the first basic parameters of your new profile field. These informations are needed for the second step where you are able to set remaining options and where you are able to preview and tweak your profile field further.',
'STEP_1_EXPLAIN_EDIT' => 'Here you can change the basic parameters of your profile field. The relevant options are re-calculated within the second step, where you are able to preview and test the changed settings.',
- 'STEP_1_TITLE_CREATE' => 'Add Profile Field',
- 'STEP_1_TITLE_EDIT' => 'Edit Profile Field',
+ 'STEP_1_TITLE_CREATE' => 'Add profile field',
+ 'STEP_1_TITLE_EDIT' => 'Edit profile field',
'STEP_2_EXPLAIN_CREATE' => 'Here you are able to define some common options. Further you are able to preview the field you generated, as the user will see it. Play around with it until you are satisfied as how the field behaves.',
- 'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options. Further you are able to preview the changed field, as the user will see it. Play around with it until you are satisfied as how the field behaves.Please note that changes to profile fields will not affect existing profile fields entered by your users. ',
+ 'STEP_2_EXPLAIN_EDIT' => 'Here you are able to change some common options. Further you are able to preview the changed field, as the user will see it. Play around with it until you are satisfied as how the field behaves.Please note that changes to profile fields will not affect existing profile fields entered by your users. ',
'STEP_2_TITLE_CREATE' => 'Profile type specific options',
'STEP_2_TITLE_EDIT' => 'Profile type specific options',
'STEP_3_EXPLAIN_CREATE' => 'Since you have more than one board language installed, you have to fill out the remaining language items too. The profile field will work with the default language enabled, you are able to fill out the remaining language items later too.',
'STEP_3_EXPLAIN_EDIT' => 'Since you have more than one board language installed, you now can change or add the remaining language items too. The profile field will work with the default language enabled.',
- 'STEP_3_TITLE_CREATE' => 'Remaining Language Definitions',
- 'STEP_3_TITLE_EDIT' => 'Language Definitions',
+ 'STEP_3_TITLE_CREATE' => 'Remaining language definitions',
+ 'STEP_3_TITLE_EDIT' => 'Language definitions',
'STRING_DEFAULT_VALUE_EXPLAIN' => 'Enter a default phrase to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
'TEXT_DEFAULT_VALUE_EXPLAIN' => 'Enter a default text to be displayed, a default value. Leave empty if you want to show it empty at the first place.',
- 'UPDATE_PREVIEW' => 'Update Preview',
- 'USER_FIELD_NAME' => 'Field Name/Title presented to the user',
+ 'UPDATE_PREVIEW' => 'Update preview',
+ 'USER_FIELD_NAME' => 'Field name/title presented to the user',
- 'VISIBILITY_OPTION' => 'Visibility Option',
+ 'VISIBILITY_OPTION' => 'Visibility option',
));
?>
\ No newline at end of file
diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php
index 0788eb4fdc..9f2508fed5 100644
--- a/phpBB/language/en/acp/prune.php
+++ b/phpBB/language/en/acp/prune.php
@@ -40,9 +40,9 @@ $lang = array_merge($lang, array(
'DELETE_USER_POSTS' => 'Delete pruned user posts',
'DELETE_USER_POSTS_EXPLAIN' => 'Removes posts made by deleted users, has no effect if users are deactivated.',
- 'JOINED_EXPLAIN' => 'Enter a date in YYYY-MM-DD format.',
+ 'JOINED_EXPLAIN' => 'Enter a date in YYYY-MM-DD format.',
- 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in YYYY-MM-DD format.',
+ 'LAST_ACTIVE_EXPLAIN' => 'Enter a date in YYYY-MM-DD format.',
'SELECT_USERS_EXPLAIN' => 'Enter specific usernames here, they will be used in preference to the criteria above.',
@@ -54,22 +54,22 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_PRUNE_FORUMS_EXPLAIN' => 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove these topics manually.',
- 'FORUM_PRUNE' => 'Forum Prune',
+ 'FORUM_PRUNE' => 'Forum prune',
'NO_PRUNE' => 'No forums pruned',
- 'SELECTED_FORUM' => 'Selected Forum',
- 'SELECTED_FORUMS' => 'Selected Forums',
+ 'SELECTED_FORUM' => 'Selected forum',
+ 'SELECTED_FORUMS' => 'Selected forums',
'POSTS_PRUNED' => 'Posts pruned',
- 'PRUNE_ANNOUNCEMENTS' => 'Prune Announcements',
- 'PRUNE_FINISHED_POLLS' => 'Prune Closed Polls',
+ 'PRUNE_ANNOUNCEMENTS' => 'Prune announcements',
+ 'PRUNE_FINISHED_POLLS' => 'Prune closed polls',
'PRUNE_FINISHED_POLLS_EXPLAIN' => 'Removes topics with polls which have ended.',
'PRUNE_NOT_POSTED' => 'Days since last posted',
'PRUNE_NOT_VIEWED' => 'Days since last viewed',
- 'PRUNE_OLD_POLLS' => 'Prune Old Polls',
+ 'PRUNE_OLD_POLLS' => 'Prune old polls',
'PRUNE_OLD_POLLS_EXPLAIN' => 'Removes topics with polls not voted in for post age days.',
- 'PRUNE_STICKY' => 'Prune Stickies',
+ 'PRUNE_STICKY' => 'Prune stickies',
'PRUNE_SUCCESS' => 'Pruning of forums was successful',
'TOPICS_PRUNED' => 'Topics pruned',
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 9766729f35..b56a648bf0 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -31,17 +31,17 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_SEARCH_INDEX_EXPLAIN' => 'Here you can manage the search backend\'s indexes. Since you normally use only one backend you should delete all indexes that you do not make use of. After altering some of the search settings (e.g. the number of minimum/maximum chars) it might be worth recreating the index so it reflects those changes.',
+ 'ACP_SEARCH_INDEX_EXPLAIN' => 'Here you can manage the search backend’s indexes. Since you normally use only one backend you should delete all indexes that you do not make use of. After altering some of the search settings (e.g. the number of minimum/maximum chars) it might be worth recreating the index so it reflects those changes.',
'ACP_SEARCH_SETTINGS_EXPLAIN' => 'Here you can define what search backend will be used for indexing posts and performing searches. You can set various options that can influence how much processing these actions require. Some of these settings are the same for all search engine backends.',
- 'CONFIRM_SEARCH_BACKEND' => 'Are you sure you wish to switch to a different search backend? After changing the search backend you will have to create an index for the new search backend. If you don\'t plan on switching back to the old search backend you can also delete the old backend\'s index in order to free system resources.',
+ 'CONFIRM_SEARCH_BACKEND' => 'Are you sure you wish to switch to a different search backend? After changing the search backend you will have to create an index for the new search backend. If you don’t plan on switching back to the old search backend you can also delete the old backend’s index in order to free system resources.',
'CONTINUE_DELETING_INDEX' => 'Continue previous index deleting process',
'CONTINUE_DELETING_INDEX_EXPLAIN' => 'An index deleting process has been started. In order to access the search index page again you need to complete it first.',
'CONTINUE_INDEXING' => 'Continue previous indexing process',
'CONTINUE_INDEXING_EXPLAIN' => 'An indexing process has been started. In order to access the search index page again you need to complete it first.',
- 'CREATE_INDEX' => 'Create Index',
+ 'CREATE_INDEX' => 'Create index',
- 'DELETE_INDEX' => 'Delete Index',
+ 'DELETE_INDEX' => 'Delete index',
'DELETING_INDEX_IN_PROGRESS' => 'Deleting the index in progress',
'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.',
@@ -51,12 +51,12 @@ $lang = array_merge($lang, array(
'FULLTEXT_MYSQL_TEXT_CARDINALITY' => 'Cardinality of the post_text fulltext index (estimate of unique values)',
'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',
- 'GENERAL_SEARCH_SETTINGS' => 'General Search Settings',
+ 'GENERAL_SEARCH_SETTINGS' => 'General search settings',
'GO_TO_SEARCH_INDEX' => 'Go to search index page',
- 'INDEX_STATS' => 'Index Statistics',
+ 'INDEX_STATS' => 'Index statistics',
'INDEXING_IN_PROGRESS' => 'Indexing in progress',
- 'INDEXING_IN_PROGRESS_EXPLAIN' => 'The search backend is currently indexing all posts on the board. This can take from a few minutes to a few hours depending on your board\'s size.',
+ 'INDEXING_IN_PROGRESS_EXPLAIN' => 'The search backend is currently indexing all posts on the board. This can take from a few minutes to a few hours depending on your board’s size.',
'LIMIT_SEARCH_LOAD' => 'Search page system load limit',
'LIMIT_SEARCH_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the search page will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.',
@@ -66,7 +66,7 @@ $lang = array_merge($lang, array(
'MIN_SEARCH_CHARS' => 'Min characters indexed by search',
'MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching.',
'MIN_SEARCH_AUTHOR_CHARS' => 'Min author name characters',
- 'MIN_SEARCH_AUTHOR_CHARS_EXPLAIN' => 'Users have to enter at least this many characters of the name when performing a wildcard author search. If the author\'s username is shorter than this number you can still search for the author\'s posts by entering the complete username.',
+ 'MIN_SEARCH_AUTHOR_CHARS_EXPLAIN' => 'Users have to enter at least this many characters of the name when performing a wildcard author search. If the author’s username is shorter than this number you can still search for the author’s posts by entering the complete username.',
'PROGRESS_BAR' => 'Progress bar',
@@ -78,8 +78,8 @@ $lang = array_merge($lang, array(
'SEARCH_INTERVAL_EXPLAIN' => 'Number of seconds users must wait between searches. This interval is checked independendly for each user.',
'SEARCH_STORE_RESULTS' => 'Search result cache length',
'SEARCH_STORE_RESULTS_EXPLAIN' => 'Cached search results will expire after this time, in seconds. Set to 0 if you want to disable search cache.',
- 'SEARCH_TYPE' => 'Search Backend',
- 'SEARCH_TYPE_EXPLAIN' => 'phpBB allows you to choose the backend that is used for searching text in post contents. By default the search will use phpBB\'s own fulltext search.',
+ 'SEARCH_TYPE' => 'Search backend',
+ 'SEARCH_TYPE_EXPLAIN' => 'phpBB allows you to choose the backend that is used for searching text in post contents. By default the search will use phpBB’s own fulltext search.',
'SWITCHED_SEARCH_BACKEND' => 'You switched the search backend. In order to use the new search backend you should make sure that there is an index for the backend you chose.',
'TOTAL_WORDS' => 'Total number of indexed words',
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index 9b875d28ab..237e204b91 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -33,15 +33,15 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.',
'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists off a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterix (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
- 'ACP_TEMPLATES_EXPLAIN' => 'A Template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
- 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. The range of options open to you depends on the configuration of your server and phpBB installation, see the Manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.',
- 'ADD_IMAGESET' => 'Create Imageset',
+ 'ACP_TEMPLATES_EXPLAIN' => 'A template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
+ 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.',
+ 'ADD_IMAGESET' => 'Create imageset',
'ADD_IMAGESET_EXPLAIN' => 'Here you can create a new imageset. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this imageset on an existing one. You may also be able to upload or import (from the store directory) a imageset archive. If you upload or import an archive the imageset name can be optionally taken from the archive name (to do this leave the imageset name blank).',
- 'ADD_STYLE' => 'Create Style',
+ 'ADD_STYLE' => 'Create style',
'ADD_STYLE_EXPLAIN' => 'Here you can create a new style. Depending on your server configuration and file permissions you may have additional options. For example you may be able to base this style on an existing one. You may also be able to upload or import (from the store directory) a style archive. If you upload or import an archive the style name will be determined automatically.',
- 'ADD_TEMPLATE' => 'Create Template',
+ 'ADD_TEMPLATE' => 'Create template',
'ADD_TEMPLATE_EXPLAIN' => 'Here you can add a new template. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this template set on an existing one. You may also be able to upload or import (from the store directory) a template archive. If you upload or import an archive the template name can be optionally taken from the archive name (to do this leave the template name blank).',
- 'ADD_THEME' => 'Create Theme',
+ 'ADD_THEME' => 'Create theme',
'ADD_THEME_EXPLAIN' => 'Here you can add a new theme. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this theme on an existing one. You may also be able to upload or import (from the store directory) a theme archive. If you upload or import an archive the theme name can be optionally taken from the archive name (to do this leave the theme name blank).',
'ARCHIVE_FORMAT' => 'Archive file type',
@@ -66,18 +66,18 @@ $lang = array_merge($lang, array(
'CREATE_TEMPLATE' => 'Create new template set',
'CREATE_THEME' => 'Create new theme',
'CSS_CLASS_NAME' => 'CSS class name',
- 'CSS_COLOUR_EXPLAIN' => 'You can either enter a hex number for the colour or use the web safe colour swatch to select one.',
- 'CURRENT_IMAGE' => 'Current Image',
+ 'CSS_COLOUR_EXPLAIN' => 'You can either enter a hexidecimal number for the colour or use the web safe colour swatch to select one.',
+ 'CURRENT_IMAGE' => 'Current image',
'CUSTOM_CLASS' => 'Custom class',
'CUSTOM_CLASS_EXPLAIN' => 'You can add additional classes to this theme if you wish. You must provide the actual CSS class name below, it must be the same as that you have or will use in your template. Please remember that class names may contain only alphanumeric characters, periods (.), colons (:), dash (-) and number/hash/pound (#). The new class will be added to class selection above.',
'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.',
'DELETE_FROM_FS' => 'Delete from filesystem',
- 'DELETE_IMAGESET' => 'Delete Imageset',
+ 'DELETE_IMAGESET' => 'Delete imageset',
'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the imageset is deleted it is gone for good. It is recommended that you first export your set for possible future use.',
'DELETE_STYLE' => 'Delete style',
'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care in deleting styles there is no undo facility.',
- 'DELETE_TEMPLATE' => 'Delete Template',
+ 'DELETE_TEMPLATE' => 'Delete template',
'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the templates are deleted they are gone for good. It is recommended that you first export your set for possible future use.',
'DELETE_THEME' => 'Delete theme',
'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.',
@@ -86,7 +86,7 @@ $lang = array_merge($lang, array(
'EDIT_DETAILS_IMAGESET' => 'Edit imageset details',
'EDIT_DETAILS_IMAGESET_EXPLAIN' => 'Here you can edit certain imageset details such as its name.',
- 'EDIT_DETAILS_STYLE' => 'Edit Style',
+ 'EDIT_DETAILS_STYLE' => 'Edit style',
'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.',
'EDIT_DETAILS_TEMPLATE' => 'Edit template details',
'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain templates details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the webserver.',
@@ -105,7 +105,7 @@ $lang = array_merge($lang, array(
'FOREGROUND' => 'Foreground',
'FONT_COLOUR' => 'Font colour',
'FONT_FACE' => 'Font face',
- 'FONT_FACE_EXPLAIN' => 'You can specify multiple fonts seperated by commas. If a user doesn\'t have the first font installed the first other working font will be chosen.',
+ 'FONT_FACE_EXPLAIN' => 'You can specify multiple fonts seperated by commas. If a user doesn’t have the first font installed the first other working font will be chosen.',
'FONT_SIZE' => 'Font size',
'GLOBAL_IMAGES' => 'Global',
@@ -320,7 +320,7 @@ $lang = array_merge($lang, array(
'SELECT_IMAGE' => 'Select image',
'SELECT_TEMPLATE' => 'Select template file',
'SELECT_CLASS' => 'Select CSS class',
- 'SELECTED_IMAGE' => 'Selected Image',
+ 'SELECTED_IMAGE' => 'Selected image',
'SELECTED_IMAGESET' => 'Selected imageset',
'SELECTED_TEMPLATE' => 'Selected template',
'SELECTED_TEMPLATE_FILE' => 'Selected template file',
@@ -375,7 +375,7 @@ $lang = array_merge($lang, array(
'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters',
'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.',
'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this templates',
- 'TEMPLATE_EXPORT' => 'Export Templates',
+ 'TEMPLATE_EXPORT' => 'Export templates',
'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
'TEMPLATE_EXPORTED' => 'Templates exported succesfully and stored in %s',
'TEMPLATE_FILE' => 'Template file',
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
index 70e1520e0b..6ea2855dc0 100644
--- a/phpBB/language/en/acp/users.php
+++ b/phpBB/language/en/acp/users.php
@@ -74,7 +74,8 @@ $lang = array_merge($lang, array(
'SELECT_FORM' => 'Select form',
'SELECT_USER' => 'Select User',
- 'USER_ADMIN' => 'User Administration',
+ 'USER_ADMIN' => 'User administration',
+ 'USER_ADMIN' => 'User administration',
'USER_ADMIN_ACTIVATE' => 'Activate account',
'USER_ADMIN_ACTIVATED' => 'User activated successfully',
'USER_ADMIN_AVATAR_REMOVED' => 'Successfully removed avatar from user account',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 17fc170d21..00c272352e 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -74,8 +74,8 @@ $lang = array_merge($lang, array(
'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
'AVATAR_NO_SIZE' => 'Could not obtain width or height of linked avatar, please enter them manually.',
'AVATAR_PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded',
- 'AVATAR_PHP_SIZE_NA' => 'The avatar\'s filesize is too large. Could not determine the maximum size defined by PHP in php.ini.',
- 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar\'s filesize is too large, maximum upload size is %d MB. Please note this is set in php.ini and cannot be overriden.',
+ 'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large. Could not determine the maximum size defined by PHP in php.ini.',
+ 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large, maximum upload size is %d MB. Please note this is set in php.ini and cannot be overriden.',
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatar must be between 0 and %1d %2s.',
@@ -136,7 +136,7 @@ $lang = array_merge($lang, array(
'EDIT_POST' => 'Edit post',
'EMAIL' => 'Email',
'EMAIL_ADDRESS' => 'Email address',
- 'EMAIL_SMTP_ERROR_RESPONSE' => "Ran into problems sending Mail at Line %s . Response: %s",
+ 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending email at Line %1$s . Response: %2$s',
'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.',
'ENABLED' => 'Enabled',
'ENCLOSURE' => 'Enclosure',
@@ -249,7 +249,7 @@ $lang = array_merge($lang, array(
'JOINED' => 'Joined',
'JUMP_PAGE' => 'Enter the page number you wish to go to',
'JUMP_TO' => 'Jump to',
- 'JUMP_TO_PAGE' => 'Click to jump to page...',
+ 'JUMP_TO_PAGE' => 'Click to jump to page…',
'KB' => 'KB',
@@ -335,7 +335,7 @@ $lang = array_merge($lang, array(
'NO_ONLINE_USERS' => 'No registered users',
'NO_POSTS' => 'No posts',
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
- 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn\'t exist',
+ 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist',
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods',
'NO_TOPIC' => 'The requested topic does not exist.',
'NO_TOPICS' => 'There are no topics or posts in this forum.',
@@ -542,7 +542,7 @@ $lang = array_merge($lang, array(
'TOTAL_USERS_ZERO' => 'Total members 0 ',
'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
- 'UNABLE_GET_IMAGE_SIZE' => 'Accessing the image was impossible or file isn\'t a valid image.',
+ 'UNABLE_GET_IMAGE_SIZE' => 'Accessing the image was impossible or file isn’t a valid image.',
'UNABLE_TO_DELIVER_FILE'=> 'Unable to deliver file.',
'UNKNOWN_BROWSER' => 'Unknown browser',
'UNMARK_ALL' => 'Unmark all',
@@ -723,12 +723,12 @@ $lang = array_merge($lang, array(
'4.5' => '[UTC + 4:30, D*] Afghanistan Time',
'5' => '[UTC + 5, E] Pakistan Standard Time, Yekaterinburg Standard Time',
'5.5' => '[UTC + 5:30, E*] Indian Standard Time, Sri Lanka Time',
- '5.75' => '[UTC + 5:45, E‡] Nepal Time',
+ '5.75' => '[UTC + 5:45, E‡] Nepal Time',
'6' => '[UTC + 6, F] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
'6.5' => '[UTC + 6:30, F*] Cocos Islands Time, Myanmar Time',
'7' => '[UTC + 7, G] Indochina Time, Krasnoyarsk Standard Time',
'8' => '[UTC + 8, H] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
- '8.75' => '[UTC + 8:45, H‡] Southeastern Western Australia Standard Time',
+ '8.75' => '[UTC + 8:45, H‡] Southeastern Western Australia Standard Time',
'9' => '[UTC + 9, I] Japan Standard Time, Korea Standard Time, Chita Standard Time',
'9.5' => '[UTC + 9:30, I*] Australian Central Standard Time',
'10' => '[UTC + 10, K] Australian Eastern Standard Time, Vladivostok Standard Time',
@@ -736,9 +736,9 @@ $lang = array_merge($lang, array(
'11' => '[UTC + 11, L] Solomon Island Time, Magadan Standard Time',
'11.5' => '[UTC + 11:30, L*] Norfolk Island Time',
'12' => '[UTC + 12, M] New Zealand Time, Fiji Time, Kamchatka Standard Time',
- '12.75' => '[UTC + 12:45, M‡] Chatham Islands Time',
+ '12.75' => '[UTC + 12:45, M‡] Chatham Islands Time',
'13' => '[UTC + 13, M*] Tonga Time, Phoenix Islands Time',
- '14' => '[UTC + 14, M†] Line Island Time',
+ '14' => '[UTC + 14, M†] Line Island Time',
),
// The value is only an example and will get replaced by the current time on view
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
index 8bdf31168c..d28583bfb6 100644
--- a/phpBB/language/en/groups.php
+++ b/phpBB/language/en/groups.php
@@ -37,23 +37,23 @@ $lang = array_merge($lang, array(
'CHANGED_DEFAULT_GROUP' => 'Successfully changed default group',
'GROUP_AVATAR' => 'Group avatar',
- 'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group "%s"?',
+ 'GROUP_CHANGE_DEFAULT' => 'Are you sure you want to change your default membership to the group “%s”?',
'GROUP_CLOSED' => 'Closed',
'GROUP_DESC' => 'Group description',
'GROUP_HIDDEN' => 'Hidden',
- 'GROUP_INFORMATION' => 'Usergroup Information',
+ 'GROUP_INFORMATION' => 'Usergroup information',
'GROUP_IS_CLOSED' => 'This is a closed group, new members cannot automatically join.',
'GROUP_IS_FREE' => 'This is a freely open group, all new members are welcome.',
'GROUP_IS_HIDDEN' => 'This is a hidden group, only members of this group can view its membership.',
'GROUP_IS_OPEN' => 'This is an open group, members can apply to join.',
'GROUP_IS_SPECIAL' => 'This is a special group, special groups are managed by the board administrators.',
- 'GROUP_JOIN' => 'Join Group',
+ 'GROUP_JOIN' => 'Join group',
'GROUP_JOIN_CONFIRM' => 'Are you sure you want to join the selected group?',
'GROUP_JOIN_PENDING' => 'Request to join group',
'GROUP_JOIN_PENDING_CONFIRM' => 'Are you sure you want to request joining the selected group?',
'GROUP_JOINED' => 'Successfully joined selected group',
'GROUP_JOINED_PENDING' => 'Successfully requested group membership. Please wait for a group leader to approve your membership.',
- 'GROUP_LIST' => 'Manage Users',
+ 'GROUP_LIST' => 'Manage users',
'GROUP_MEMBERS' => 'Group members',
'GROUP_NAME' => 'Group name',
'GROUP_OPEN' => 'Open',
@@ -78,7 +78,7 @@ $lang = array_merge($lang, array(
'REMOVE_SELECTED' => 'Remove selected',
- 'USER_GROUP_CHANGE' => 'From "%1$s" group to "%2$s"',
+ 'USER_GROUP_CHANGE' => 'From “%1$s” group to “%2$s”',
'USER_GROUP_DEMOTE' => 'Demote leadership',
'USER_GROUP_DEMOTE_CONFIRM' => 'Are you sure you want to demote as group leader from the selected group?',
'USER_GROUP_DEMOTED' => 'Successfully demoted your leadership.',
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
index afdd8226f6..ada28713e0 100644
--- a/phpBB/language/en/help_bbcode.php
+++ b/phpBB/language/en/help_bbcode.php
@@ -48,7 +48,7 @@ $help = array(
),
array(
0 => 'Can I combine formatting tags?',
- 1 => 'Yes, of course you can, for example to get someones attention you may write:[size=18][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=18][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 => '--',
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index e90db8a1de..be44433302 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -31,7 +31,7 @@ $help = array(
1 => 'Login and Registration Issues'
),
array(
- 0 => 'Why can\'t I login?',
+ 0 => 'Why can’t I login?',
1 => 'Have you registered? Seriously, you must register in order to login. Have you been banned from the board (a message will be displayed if you have)? If so then you should contact the webmaster or board administrator to find out why. If you have registered and are not banned and you still cannot login then check and double check your username and password. Usually this is the problem, if not then contact the board administrator they may have incorrect configuration settings for the board.'
),
array(
@@ -44,11 +44,11 @@ $help = array(
),
array(
0 => 'How do I prevent my username appearing in the online user listings?',
- 1 => 'In your profile you will find an option Hide your online status , if you switch this on you\'ll only appear to board administrators or to yourself. You will be counted as a hidden user.'
+ 1 => 'In your profile you will find an option Hide your online status , if you switch this on you’ll only appear to board administrators or to yourself. You will be counted as a hidden user.'
),
array(
- 0 => 'I\'ve lost my password!',
- 1 => 'Don\'t panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click I\'ve forgotten my password , follow the instructions and you should be back online in no time'
+ 0 => 'I’ve lost my password!',
+ 1 => 'Don’t panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click I’ve forgotten my password , follow the instructions and you should be back online in no time'
),
array(
0 => 'I registered but cannot login!',
@@ -80,7 +80,7 @@ $help = array(
),
array(
0 => 'How do I show an image below my username?',
- 1 => 'There may be two images below a username when viewing posts. The first is an image associated with your rank, generally these take the form of stars or blocks indicating how many posts you have made or your status on the forums. Below this may be a larger image known as an avatar, this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin, you should ask them their reasons (we\'re sure they\'ll be good!)'
+ 1 => 'There may be two images below a username when viewing posts. The first is an image associated with your rank, generally these take the form of stars or blocks indicating how many posts you have made or your status on the forums. Below this may be a larger image known as an avatar, this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin, you should ask them their reasons (we’re sure they’ll be good!)'
),
array(
0 => 'How do I change my rank?',
@@ -115,11 +115,11 @@ $help = array(
1 => 'As with posts, polls can only be edited by the original poster, a moderator or board admin. To edit a poll click the first post in the topic (this always has the poll associated with it). If no one has cast a vote then users can delete the poll or edit any poll option, however if people have already placed votes only moderators or administrators can edit or delete it. This is to prevent people rigging polls by changing options mid-way through a poll'
),
array(
- 0 => 'Why can\'t I access a forum?',
+ 0 => 'Why can’t I access a forum?',
1 => 'Some forums may be limited to certain users or groups. To view, read, post, etc. you may need special authorisation, only the forum moderator and board admin can grant this access, you should contact them.'
),
array(
- 0 => 'Why can\'t I vote in polls?',
+ 0 => 'Why can’t I vote in polls?',
1 => 'Only registered users can vote in polls (so as to prevent spoofing of results). If you have registered and still cannot vote then you probably do not have appropriate access rights.'
),
array(
@@ -132,7 +132,7 @@ $help = array(
),
array(
0 => 'Can I use HTML?',
- 1 => '...'
+ 1 => ''
),
array(
0 => 'What are Smileys?',
@@ -203,7 +203,7 @@ $help = array(
1 => 'This software (in its unmodified form) is produced, released and is copyright phpBB Group . It is made available under the GNU General Public Licence and may be freely distributed, see link for more details'
),
array(
- 0 => 'Why isn\'t X feature available?',
+ 0 => 'Why isn’t X feature available?',
1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added then please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the Group uses sourceforge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there.'
),
array(
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 57c6c12965..a09b6b5321 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -39,7 +39,7 @@ $lang = array_merge($lang, array(
'ADMIN_USERNAME' => 'Administrator username',
'ADMIN_USERNAME_EXPLAIN' => '(Please enter a username between 3 and 20 characters in length)',
'APP_MAGICK' => 'Imagemagick support [ Attachments ]',
- 'AUTHOR_NOTES' => 'Author Notes » %s',
+ 'AUTHOR_NOTES' => 'Author Notes » %s',
'AVAILABLE' => 'Available',
'AVAILABLE_CONVERTORS' => 'Available Convertors',
@@ -68,17 +68,17 @@ $lang = array_merge($lang, array(
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) forum systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the forum software you wish to convert from, please check our website where further conversion modules may be available for download.',
'CONVERT_NOT_EXIST' => 'The specified convertor does not exist',
'CONVERT_SETTINGS_VERIFIED' => 'The information you entered has been verified. To start the conversion progress, push the button below to begin',
- 'COULD_NOT_COPY' => 'Could not copy file %1$s to %2$s Please check that the target directory exists and is writable by the webserver',
- 'COULD_NOT_FIND_PATH' => 'Could not find path to your former forum. Please check your settings and try again. » Specified source path was %s',
+ 'COULD_NOT_COPY' => 'Could not copy file %1$s to %2$s Please check that the target directory exists and is writable by the webserver',
+ 'COULD_NOT_FIND_PATH' => 'Could not find path to your former forum. Please check your settings and try again. » Specified source path was %s',
'DBMS' => 'Database type',
'DB_CONFIG' => 'Database Configuration',
'DB_CONNECTION' => 'Database Connection',
- 'DB_ERR_INSERT' => 'Error while processing INSERT query',
- 'DB_ERR_LAST' => 'Error while processing query_last',
- 'DB_ERR_QUERY_FIRST' => 'Error while executing query_first',
- 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first, %s ("%s")',
- 'DB_ERR_SELECT' => 'Error while running SELECT query',
+ 'DB_ERR_INSERT' => 'Error while processing INSERT
query',
+ 'DB_ERR_LAST' => 'Error while processing query_last ',
+ 'DB_ERR_QUERY_FIRST' => 'Error while executing query_first ',
+ 'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing query_first , %s ("%s")',
+ 'DB_ERR_SELECT' => 'Error while running SELECT
query',
'DB_HOST' => 'Database server hostname or DSN',
'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs.',
'DB_NAME' => 'Database name',
@@ -105,9 +105,9 @@ $lang = array_merge($lang, array(
'DLL_POSTGRES' => 'PostgreSQL 7.x/8.x',
'DLL_SQLITE' => 'SQLite',
'DLL_XML' => 'XML support [ Jabber ]',
- 'DLL_ZLIB' => 'zlib Compression support [ gz, .tar.gz, .zip ]',
+ 'DLL_ZLIB' => 'zlib compression support [ gz, .tar.gz, .zip ]',
'DL_CONFIG' => 'Download config',
- 'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.0 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click "Done" to move to the next stage.',
+ 'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.0 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done” to move to the next stage.',
'DL_DOWNLOAD' => 'Download',
'DONE' => 'Done',
@@ -116,8 +116,8 @@ $lang = array_merge($lang, array(
'FILES_OPTIONAL' => 'Optional Files and Directories',
'FILES_OPTIONAL_EXPLAIN' => 'Optional - These files, directories or permissions are not required. The installation routines will attempt to use various techniques to complete if they do not exist or cannot be written to. However, the presence of these files, directories or permissions will speed installation.',
'FILES_REQUIRED' => 'Files and Directories',
- 'FILES_REQUIRED_EXPLAIN' => 'Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see "Not Found" you need to create the relevant file or directory. If you see "Unwriteable" you need to change the permissions on the file or directory to allow phpBB to write to it.',
- 'FILLING_TABLE' => 'Filling table %s ',
+ 'FILES_REQUIRED_EXPLAIN' => 'Required - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see “Not Found” you need to create the relevant file or directory. If you see “Unwriteable” you need to change the permissions on the file or directory to allow phpBB to write to it.',
+ 'FILLING_TABLE' => 'Filling table %s ',
'FILLING_TABLES' => 'Filling Tables',
'FINAL_STEP' => 'Process Final Step',
'FORUM_ADDRESS' => 'Forum address',
@@ -144,7 +144,7 @@ $lang = array_merge($lang, array(
Database name
Database username and password
- Some more introductory text can go here...',
+
Some more introductory text can go here',
'INSTALL_INTRO_NEXT' => 'To commence the installation, please press the button below.',
'INSTALL_LOGIN' => 'Login',
'INSTALL_NEXT' => 'Next stage',
@@ -158,15 +158,15 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_CONNECT' => 'Could not connect to the database, see error message below',
'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your forum directory tree. You should put this file in a non web-accessible location',
'INST_ERR_DB_NO_ERROR' => 'No error message given',
- 'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.x/5.x" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.',
- 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.',
- 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the NLS_CHARACTERSET parameter to UTF8. Either upgrade your installation to 9.2+ or change the parameter.',
- 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding',
+ 'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the “MySQL 4.x/5.x” option you have selected. Please try the “MySQL 3.23.x/4.x” option instead.',
+ 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL 4.1.x/5.x with MySQLi Extension” option you have selected. Please try the “MySQL 3.23.x/4.x” option instead.',
+ 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the NLS_CHARACTERSET parameter to UTF8 . Either upgrade your installation to 9.2+ or change the parameter.',
+ 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding',
'INST_ERR_DB_NO_NAME' => 'No database name specified',
'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid',
'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.',
'INST_ERR_FATAL' => 'Fatal installation error',
- 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occured. This may be because the specified user does not have appropriate rights to CREATE TABLES or INSERT data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.',
+ 'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occured. This may be because the specified user does not have appropriate rights to CREATE TABLES
or INSERT
data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.',
'INST_ERR_FTP_PATH' => 'Could not change to the given directory, please check the path.',
'INST_ERR_FTP_LOGIN' => 'Could not login to FTP server, check your username and password',
'INST_ERR_MISSING_DATA' => 'You must fill out all fields in this block',
@@ -181,8 +181,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',
- 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again: »%s ',
- 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again: »%s ',
+ 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again: »%s ',
+ 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again: »%s ',
'NAMING_CONFLICT' => 'Naming conflict: %s and %s are both aliases %s',
'NEXT_STEP' => 'Proceed to next step',
@@ -198,11 +198,11 @@ $lang = array_merge($lang, array(
'PHP_OPTIONAL_MODULE_EXPLAIN' => 'Optional - These modules or applications are optional, you do not need these to use phpBB 3.0. However if you do have them they will will enable greater functionality.',
'PHP_SUPPORTED_DB' => 'Supported Databases',
'PHP_SUPPORTED_DB_EXPLAIN' => 'Required - You must have support for at least one compatible database within PHP. If no database modules are shown as available you should contact your hosting provider or review the relevant PHP installation documentation for advice.',
- 'PHP_REGISTER_GLOBALS' => 'PHP setting "register_globals" is disabled',
+ 'PHP_REGISTER_GLOBALS' => 'PHP setting register_globals is disabled',
'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.',
'PHP_SAFE_MODE' => 'Safe Mode',
'PHP_SETTINGS' => 'PHP Version and Settings',
- 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 4.3.3 of PHP in order to install phpBB. If "safe mode" is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
+ 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 4.3.3 of PHP in order to install phpBB. If safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_VERSION_REQD' => 'PHP version >= 4.3.3',
'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using %s as table prefix.',
'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
@@ -234,7 +234,7 @@ $lang = array_merge($lang, array(
'STAGE_REQUIREMENTS' => 'Requirements',
'STAGE_SETTINGS' => 'Settings',
'STARTING_CONVERT' => 'Starting Conversion Process',
- 'STEP_PERCENT_COMPLETED' => 'Step %d of %d : %d%% completed',
+ 'STEP_PERCENT_COMPLETED' => 'Step %d of %d : %d%% completed',
'SUB_INTRO' => 'Introduction',
'SUB_LICENSE' => 'License',
'SUB_SUPPORT' => 'Support',
@@ -245,9 +245,9 @@ $lang = array_merge($lang, array(
'SYNC_TOPICS' => 'Starting to sync topics',
'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id $1%s to $2%s',
- 'TABLES_MISSING' => 'Could not find these tables » %s .',
+ 'TABLES_MISSING' => 'Could not find these tables » %s .',
'TABLE_PREFIX' => 'Prefix for tables in database',
- 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from. » Specified table prefix was %s',
+ 'TABLE_PREFIX_SAME' => 'The table prefix needs to be the one used by the software you are converting from. » Specified table prefix was %s',
'TESTS_PASSED' => 'Tests passed',
'TESTS_FAILED' => 'Tests failed',
@@ -273,7 +273,7 @@ $lang = array_merge($lang, array(
'CHECK_FILES_UP_TO_DATE' => 'According to your database your version is up to date. You may want to proceed with the file check to make sure all files are really up to date with the latest phpBB version.',
'COLLECTED_INFORMATIONS' => 'Collected file informations',
'COLLECTED_INFORMATIONS_EXPLAIN'=> 'The list below shows informations about the files needing an update. Please read the information in front of every status block to see what they mean and what you may need to do to perform a successful update.',
- 'COMPLETE_LOGIN_TO_BOARD' => 'You should now login to your board and check if everything is working fine. Don\'t forget to delete, rename or move your install directory!',
+ 'COMPLETE_LOGIN_TO_BOARD' => 'You should now login to your board and check if everything is working fine. Don’t forget to delete, rename or move your install directory!',
'CURRENT_FILE' => 'Current original file',
'CURRENT_VERSION' => 'Current version',
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index bdb64075cc..757edb1691 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -47,7 +47,7 @@ $lang = array_merge($lang, array(
'APPROVE_POSTS' => 'Approve posts',
'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?',
- 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it\'s already in',
+ 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in',
'CANNOT_WARN_ANONYMOUS' => 'You cannot warn an guest user',
'CANNOT_WARN_SELF' => 'You cannot warn yourself',
'CAN_LEAVE_BLANK' => 'This can be left blank.',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index 08cc977111..8157388c85 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -56,7 +56,7 @@ $lang = array_merge($lang, array(
'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the email.',
'EQUAL_TO' => 'Equal to',
- 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format yyyy-mm-dd, e.g. 2002-01-01. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.',
+ 'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format YYYY-MM-DD , e.g. 2004-02-29 . Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.',
'FLOOD_EMAIL_LIMIT' => 'You cannot send another email at this time. Please try again later.',
'GROUP_LEADER' => 'Group leader',
@@ -104,7 +104,7 @@ $lang = array_merge($lang, array(
'REAL_NAME' => 'Recipient name',
'RECIPIENT' => 'Recipient',
- 'SEARCH_USER_POSTS' => 'Search user\'s posts',
+ 'SEARCH_USER_POSTS' => 'Search user’s posts',
'SELECT_MARKED' => 'Select marked',
'SELECT_SORT_METHOD' => 'Select sort method',
'SEND_IM' => 'Instant messaging',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 7623583d31..221c82c8f7 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -78,7 +78,7 @@ $lang = array_merge($lang, array(
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
'DISABLE_SMILIES' => 'Disable smilies',
'DISALLOWED_EXTENSION' => 'The extension %s is not allowed',
- 'DRAFT_LOADED' => 'Draft loaded into posting area, you may want to finish your post now. Your Draft will be deleted after submitting this post.',
+ 'DRAFT_LOADED' => 'Draft loaded into posting area, you may want to finish your post now. Your draft will be deleted after submitting this post.',
'DRAFT_SAVED' => 'Draft successfully saved.',
'DRAFT_TITLE' => 'Draft title',
@@ -129,8 +129,8 @@ $lang = array_merge($lang, array(
'NO_TOPIC_ICON' => 'None',
'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded',
- 'PHP_SIZE_NA' => 'The attachment\'s filesize is too large. Could not determine the maximum size defined by PHP in php.ini.',
- 'PHP_SIZE_OVERRUN' => 'The attachment\'s filesize is too large, the maximum upload size is %d MB. Please note this is set in php.ini and cannot be overriden.',
+ 'PHP_SIZE_NA' => 'The attachment’s filesize is too large. Could not determine the maximum size defined by PHP in php.ini.',
+ 'PHP_SIZE_OVERRUN' => 'The attachment’s filesize is too large, the maximum upload size is %d MB. Please note this is set in php.ini and cannot be overriden.',
'PLACE_INLINE' => 'Place inline',
'POLL_DELETE' => 'Delete poll',
'POLL_FOR' => 'Run poll for',
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index b8aa018380..361b336b83 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -43,7 +43,7 @@ $lang = array_merge($lang, array(
'GLOBAL' => 'Global announcement',
'IGNORED_TERMS' => 'ignored',
- 'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: %s ',
+ 'IGNORED_TERMS_EXPLAIN' => 'The following words in your search query were ignored: %s ',
'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index cf71cfb996..5d599373a8 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -32,22 +32,22 @@ if (empty($lang) || !is_array($lang))
// Privacy policy and T&C
$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.
+ '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 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/ .
- 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.
+ 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.
',
- 'PRIVACY_POLICY' => 'This policy explains in detail how "%1$s" along with its affiliated companies (hereinafter "we", "us", "our", "%1$s", "%2$s") and phpBB (hereinafter "they", "them", "their", "phpBB software", "www.phpbb.com", "phpBB Group", "phpBB Teams") use any information collected during any session of usage by you (hereinafter "your information").
+ 'PRIVACY_POLICY' => 'This policy explains in detail how “%1$s” along with its affiliated companies (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”) and phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) use any information collected during any session of usage by you (hereinafter “your information”).
- Your information is collected via two ways. Firstly, by browsing "%1$s" will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computer\'s web browser temporary files. The first two cookies just contain a user identifier (hereinafter "user-id") and an anonymous session identifier (hereinafter "session-id"), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within "%1$s" and is used to store which topics have been read, thereby improving your user experience.
+ Your information is collected via two ways. Firstly, by browsing “%1$s” will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computer’s web browser temporary files. The first two cookies just contain a user identifier (hereinafter “user-id”) and an anonymous session identifier (hereinafter “session-id”), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within “%1$s” and is used to store which topics have been read, thereby improving your user experience.
- We may also create cookies external to the phpBB software whilst browsing "%1$s", though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter "anonymous posts"), registering on "%1$s" (hereinafter "your account") and posts submitted by you after registration and whilst logged in (hereinafter "your posts").
+ We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).
- Your account will at a bare minimum contain a uniquely identifiable name (hereinafter "your user name"), a personal password used for logging into your account (hereinafter "your password") and a personal, valid email address (hereinafter "your email"). Your information for your account at "%1$s" is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password and your email required by "%1$s" during the registration process are at our digression what is mandatory and what is optional. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.
+ Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid email address (hereinafter “your email”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password and your email required by “%1$s” during the registration process are at our digression what is mandatory and what is optional. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.
- Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at "%1$s", so please guard it carefully and under no circumstance will anyone affiliated with "%1$s", phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the "I forgot my password" feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.
+ Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.
',
));
@@ -122,7 +122,7 @@ $lang = array_merge($lang, array(
'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.',
'CHANGE_DEFAULT_GROUP' => 'Change default group',
'CHANGE_PASSWORD' => 'Change password',
- 'CLICK_RETURN_FOLDER' => '%1$sReturn to your "%3$s" folder%2$s',
+ 'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s',
'CONFIRMATION' => 'Confirmation of registration',
'CONFIRM_EMAIL' => 'Confirm email address',
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your email address.',
@@ -132,12 +132,12 @@ $lang = array_merge($lang, array(
'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.',
'COPPA_COMPLIANCE' => 'COPPA compliance',
'COPPA_EXPLAIN' => 'Please note that clicking submit will create your account. However it cannot be activated until a parent or guardian approves your registration. You will be emailed a copy of the necessary form with details of where to send it.',
- 'CREATE_FOLDER' => 'Add folder...',
+ 'CREATE_FOLDER' => 'Add folder…',
'CURRENT_IMAGE' => 'Current image',
'CURRENT_PASSWORD' => 'Current password',
'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your email address or username.',
'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.',
- 'CUSTOM_DATEFORMAT' => 'Custom...',
+ 'CUSTOM_DATEFORMAT' => 'Custom…',
'DEFAULT_ACTION' => 'Default action',
'DEFAULT_ACTION_EXPLAIN' => 'This action will be triggered if none of the above is applicable',
@@ -183,15 +183,15 @@ $lang = array_merge($lang, array(
'EXPORT_AS_MSG' => 'Export as MSG',
'EXPORT_FOLDER' => 'Export Folder',
- 'FIELD_REQUIRED' => 'The field "%s" must be completed.',
- 'FIELD_TOO_SHORT' => 'The field "%1$s" is too short, a minimum of %2$d characters is required.',
- 'FIELD_TOO_LONG' => 'The field "%1$s" is too long, a maximum of %2$d characters is allowed.',
- 'FIELD_TOO_SMALL' => 'The value of "%1$s" is too small, a minimum value of %2$d is required.',
- 'FIELD_TOO_LARGE' => 'The value of "%1$s" is too large, a maximum value of %2$d is allowed.',
- 'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field "%s" has invalid characters, only numbers are allowed.',
- 'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field "%s" has invalid characters, only alphanumeric characters are allowed.',
- 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field "%s" has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
- 'FIELD_INVALID_DATE' => 'The field "%s" has an invalid date.',
+ 'FIELD_REQUIRED' => 'The field “%s” must be completed.',
+ 'FIELD_TOO_SHORT' => 'The field “%1$s” is too short, a minimum of %2$d characters is required.',
+ 'FIELD_TOO_LONG' => 'The field “%1$s” is too long, a maximum of %2$d characters is allowed.',
+ 'FIELD_TOO_SMALL' => 'The value of “%1$s” is too small, a minimum value of %2$d is required.',
+ 'FIELD_TOO_LARGE' => 'The value of “%1$s” is too large, a maximum value of %2$d is allowed.',
+ 'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.',
+ 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
+ 'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.',
'FOE_MESSAGE' => 'Message from foe',
'FOES_EXPLAIN' => 'Foes are users which will be ignored by default. Posts by these users will not be fully visible and personal messages will not be permitted. Please note that you cannot ignore moderators or administrators.',
@@ -248,7 +248,7 @@ $lang = array_merge($lang, array(
'MESSAGE_COLOURS' => 'Message colours',
'MESSAGE_DELETED' => 'Message successfully deleted',
'MESSAGE_HISTORY' => 'Message history',
- 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by it\'s author before it was delivered',
+ 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by it’s author before it was delivered',
'MESSAGE_SENT_ON' => 'on',
'MESSAGE_STORED' => 'Your message has been sent successfully',
'MESSAGE_TO' => 'To',
@@ -278,7 +278,7 @@ $lang = array_merge($lang, array(
'NOT_ADDED_FOES_FRIENDS' => 'You cannot add users to your foes list who are on your friends list.',
'NOT_ADDED_FOES_SELF' => 'You cannot add yourself to the foes list.',
'NOT_AGREE' => 'I do not agree to these terms',
- 'NOT_ENOUGH_SPACE_FOLDER' => 'The destination folder "%s" seems to be full. The requested action has not been taken.',
+ 'NOT_ENOUGH_SPACE_FOLDER' => 'The destination folder “%s” seems to be full. The requested action has not been taken.',
'NOT_MOVED_MESSAGE' => 'You have 1 private message currently on hold because of full folder.',
'NOT_MOVED_MESSAGES' => 'You have %d private messages currently on hold because of full folder.',
'NO_ACTION_MODE' => 'No message action specified',
@@ -349,7 +349,7 @@ $lang = array_merge($lang, array(
'RECIPIENTS' => 'Recipients',
'REGISTRATION' => 'Registration',
'RELATIVE_DAYS' => 'Relative days',
- 'RELEASE_MESSAGES' => '%sRelease all on-hold messages%s... they will be re-sorted into the appropiate folder if enough space is made available.',
+ 'RELEASE_MESSAGES' => '%sRelease all on-hold messages%s… they will be re-sorted into the appropiate folder if enough space is made available.',
'REMOVE_ADDRESS' => 'Remove address',
'REMOVE_SELECTED_BOOKMARKS' => 'Remove selected bookmarks',
'REMOVE_SELECTED_BOOKMARKS_CONFIRM' => 'Are you sure you want to delete all selected bookmarks?',
@@ -379,7 +379,7 @@ $lang = array_merge($lang, array(
'SORT_DOWNLOADS' => 'Downloads',
'SORT_EXTENSION' => 'Extension',
'SORT_FILENAME' => 'Filename',
- 'SORT_POST_TIME' => 'Post Time',
+ 'SORT_POST_TIME' => 'Post time',
'SORT_SIZE' => 'Filesize',
'TIMEZONE' => 'Timezone',
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index 3f37d1b265..44276689a7 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -67,7 +67,7 @@ $lang = array_merge($lang, array(
'MISSING_INLINE_ATTACHMENT' => 'The attachment %s is no longer available',
'MOVE_TOPIC' => 'Move topic',
- 'NO_ATTACHMENT_SELECTED'=> 'You haven\'t selected an attachment to download or view.',
+ 'NO_ATTACHMENT_SELECTED'=> 'You haven’t selected an attachment to download or view.',
'NO_NEWER_TOPICS' => 'There are no newer topics in this forum',
'NO_OLDER_TOPICS' => 'There are no older topics in this forum',
'NO_UNREAD_POSTS' => 'There are no new unread posts for this topic.',
From cb31a4446d2ca40860c6d08bc34a30f10c70f8e5 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sun, 24 Sep 2006 12:24:22 +0000
Subject: [PATCH 112/291] Forgot this one yesterday
git-svn-id: file:///svn/phpbb/trunk@6400 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/develop/create_schema_files.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 2477b4aea5..cad8c7fbe6 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -1816,6 +1816,8 @@ function get_schema_struct()
'user_warnings' => array('TINT:4', 0),
'user_last_warning' => array('TIMESTAMP', 0),
'user_login_attempts' => array('TINT:4', 0),
+ 'user_inactive_reason' => array('TINT:2', 0),
+ 'user_inactive_time' => array('TIMESTAMP', 0),
'user_posts' => array('UINT', 0),
'user_lang' => array('VCHAR:30', ''),
'user_timezone' => array('DECIMAL', 0),
From 25fc7e62cd8c7243d63969eefc4e946d16a1d4ef Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sun, 24 Sep 2006 14:03:57 +0000
Subject: [PATCH 113/291] this change may introduce yet another query (not if
store_reverse is used internally most of the time), but i hardly noticable on
small forums. This change scales very very better than the old method. With
the old one viewforum became slower and slower the more topics were present.
For me the difference for a forum with 100.000 topics were 0.4 seconds (local
server) - for others the speed increase should be noticeably higher.
git-svn-id: file:///svn/phpbb/trunk@6401 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/viewforum.php | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 4d41b27fa5..3490523c49 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -368,23 +368,29 @@ else
$sql_start = $start;
}
-// Obtain other topics
+// SQL array for obtaining topics/stickies
$sql_array = array(
'SELECT' => $sql_array['SELECT'],
'FROM' => $sql_array['FROM'],
'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
- 'WHERE' => (($forum_data['forum_type'] == FORUM_POST || !sizeof($active_forum_ary)) ? 't.forum_id = ' . $forum_id : $db->sql_in_set('t.forum_id', $active_forum_ary['forum_id'])) . '
- AND t.topic_type NOT IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
+ 'WHERE' => (($forum_data['forum_type'] == FORUM_POST || !sizeof($active_forum_ary)) ? 't.forum_id = ' . $forum_id : $db->sql_in_set('t.forum_id', $active_forum_ary['forum_id'])) . "
+ AND t.topic_type = {SQL_TOPIC_TYPE}
$sql_approved
$sql_limit_time",
- 'ORDER_BY' => 't.topic_type ' . ((!$store_reverse) ? 'DESC' : 'ASC') . ', ' . $sql_sort_order,
+ 'ORDER_BY' => $sql_sort_order,
);
+
+// If store_reverse, then first obtain topics, then stickies, else the other way around...
+// Funnily enough you typically save one query if going from the last page to the middle (store_reverse) because
+// the number of stickies are not known
$sql = $db->sql_build_query('SELECT', $sql_array);
+$sql = str_replace('{SQL_TOPIC_TYPE}', ($store_reverse) ? POST_NORMAL : POST_STICKY, $sql);
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
$shadow_topic_list = array();
+$num_rows = 0;
while ($row = $db->sql_fetchrow($result))
{
if ($row['topic_status'] == ITEM_MOVED)
@@ -394,9 +400,30 @@ while ($row = $db->sql_fetchrow($result))
$rowset[$row['topic_id']] = $row;
$topic_list[] = $row['topic_id'];
+ $num_rows++;
}
$db->sql_freeresult($result);
+// If the number of topics exceeds the sql limit then we do not need to retrieve the remaining topic type
+if ($num_rows < $sql_limit)
+{
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $sql = str_replace('{SQL_TOPIC_TYPE}', ($store_reverse) ? POST_STICKY : POST_NORMAL, $sql);
+ $result = $db->sql_query_limit($sql, $sql_limit - $num_rows, $sql_start);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
+ }
+
+ $rowset[$row['topic_id']] = $row;
+ $topic_list[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+}
+
// If we have some shadow topics, update the rowset to reflect their topic informations
if (sizeof($shadow_topic_list))
{
From 46c961b5f57d0580d41b03673c4af1f0eaae0e0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sun, 24 Sep 2006 14:34:39 +0000
Subject: [PATCH 114/291] Giving breadcrumbs their own home. (#4450)
Note that this is currently kinda broken, please no bug reports on the bottom breadcrumb not showing!
git-svn-id: file:///svn/phpbb/trunk@6402 89ea8834-ac86-4346-8a33-228a782c2dd0
---
.../subSilver/template/breadcrumbs.html | 8 ++++++
.../subSilver/template/confirm_body.html | 9 +------
phpBB/styles/subSilver/template/faq_body.html | 9 +------
.../subSilver/template/forumlist_body.html | 6 ++---
.../styles/subSilver/template/index_body.html | 9 +------
.../styles/subSilver/template/login_body.html | 9 +------
.../subSilver/template/login_forum.html | 9 +------
.../subSilver/template/mcp_approve.html | 9 +------
.../styles/subSilver/template/mcp_footer.html | 9 +------
phpBB/styles/subSilver/template/mcp_move.html | 9 +------
.../subSilver/template/memberlist_body.html | 9 +------
.../subSilver/template/memberlist_email.html | 9 +------
.../template/memberlist_leaders.html | 9 +------
.../subSilver/template/memberlist_view.html | 9 +------
.../subSilver/template/overall_header.html | 9 +------
.../subSilver/template/posting_body.html | 7 ++---
.../subSilver/template/report_body.html | 9 +------
.../subSilver/template/viewforum_body.html | 27 ++++++++++---------
.../subSilver/template/viewonline_body.html | 9 +------
.../subSilver/template/viewtopic_body.html | 9 +------
20 files changed, 44 insertions(+), 148 deletions(-)
create mode 100644 phpBB/styles/subSilver/template/breadcrumbs.html
diff --git a/phpBB/styles/subSilver/template/breadcrumbs.html b/phpBB/styles/subSilver/template/breadcrumbs.html
new file mode 100644
index 0000000000..ad180250ce
--- /dev/null
+++ b/phpBB/styles/subSilver/template/breadcrumbs.html
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/phpBB/styles/subSilver/template/confirm_body.html b/phpBB/styles/subSilver/template/confirm_body.html
index af69325446..27d9aa0444 100644
--- a/phpBB/styles/subSilver/template/confirm_body.html
+++ b/phpBB/styles/subSilver/template/confirm_body.html
@@ -19,14 +19,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/faq_body.html b/phpBB/styles/subSilver/template/faq_body.html
index 55821f289e..81c9b6296c 100644
--- a/phpBB/styles/subSilver/template/faq_body.html
+++ b/phpBB/styles/subSilver/template/faq_body.html
@@ -54,14 +54,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/forumlist_body.html b/phpBB/styles/subSilver/template/forumlist_body.html
index aa1c56c3dd..22b3660f7e 100644
--- a/phpBB/styles/subSilver/template/forumlist_body.html
+++ b/phpBB/styles/subSilver/template/forumlist_body.html
@@ -16,15 +16,15 @@
- {forumrow.FORUM_FOLDER_IMG}
-
+ {forumrow.FORUM_FOLDER_IMG}
+
{forumrow.FORUM_NAME}
{forumrow.FORUM_DESC}
{L_REDIRECTS}: {forumrow.CLICKS}
-
+
diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html
index 87788d9a07..894549fe08 100644
--- a/phpBB/styles/subSilver/template/index_body.html
+++ b/phpBB/styles/subSilver/template/index_body.html
@@ -14,14 +14,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subSilver/template/login_body.html
index 284b639f7d..d198b9d0ef 100644
--- a/phpBB/styles/subSilver/template/login_body.html
+++ b/phpBB/styles/subSilver/template/login_body.html
@@ -92,14 +92,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/login_forum.html b/phpBB/styles/subSilver/template/login_forum.html
index 24037aa276..29c85a78ed 100644
--- a/phpBB/styles/subSilver/template/login_forum.html
+++ b/phpBB/styles/subSilver/template/login_forum.html
@@ -38,14 +38,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/mcp_approve.html b/phpBB/styles/subSilver/template/mcp_approve.html
index e62476879e..b8e89b330a 100644
--- a/phpBB/styles/subSilver/template/mcp_approve.html
+++ b/phpBB/styles/subSilver/template/mcp_approve.html
@@ -41,14 +41,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/mcp_footer.html b/phpBB/styles/subSilver/template/mcp_footer.html
index 43d31283bc..a575055127 100644
--- a/phpBB/styles/subSilver/template/mcp_footer.html
+++ b/phpBB/styles/subSilver/template/mcp_footer.html
@@ -18,14 +18,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/mcp_move.html b/phpBB/styles/subSilver/template/mcp_move.html
index 04254307fa..78a0579de6 100644
--- a/phpBB/styles/subSilver/template/mcp_move.html
+++ b/phpBB/styles/subSilver/template/mcp_move.html
@@ -36,14 +36,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/memberlist_body.html b/phpBB/styles/subSilver/template/memberlist_body.html
index c5e8fd2f94..bc5cc32ee2 100644
--- a/phpBB/styles/subSilver/template/memberlist_body.html
+++ b/phpBB/styles/subSilver/template/memberlist_body.html
@@ -95,14 +95,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/memberlist_email.html b/phpBB/styles/subSilver/template/memberlist_email.html
index 408c45e280..1e4d7e9930 100644
--- a/phpBB/styles/subSilver/template/memberlist_email.html
+++ b/phpBB/styles/subSilver/template/memberlist_email.html
@@ -89,14 +89,7 @@ function checkForm(formObj)
-
+
diff --git a/phpBB/styles/subSilver/template/memberlist_leaders.html b/phpBB/styles/subSilver/template/memberlist_leaders.html
index 009efd5555..82009e1365 100644
--- a/phpBB/styles/subSilver/template/memberlist_leaders.html
+++ b/phpBB/styles/subSilver/template/memberlist_leaders.html
@@ -62,14 +62,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html
index dd33810495..57f4e05a3b 100644
--- a/phpBB/styles/subSilver/template/memberlist_view.html
+++ b/phpBB/styles/subSilver/template/memberlist_view.html
@@ -181,14 +181,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/overall_header.html b/phpBB/styles/subSilver/template/overall_header.html
index 933da814f4..ac0f359d5b 100644
--- a/phpBB/styles/subSilver/template/overall_header.html
+++ b/phpBB/styles/subSilver/template/overall_header.html
@@ -134,13 +134,6 @@ function marklist(id, name, state)
-
+
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html
index 8a868825e9..ec16783b75 100644
--- a/phpBB/styles/subSilver/template/posting_body.html
+++ b/phpBB/styles/subSilver/template/posting_body.html
@@ -472,11 +472,8 @@ function checkForm()
-
+
+
diff --git a/phpBB/styles/subSilver/template/report_body.html b/phpBB/styles/subSilver/template/report_body.html
index ca66a9d5f2..7065f0f35d 100644
--- a/phpBB/styles/subSilver/template/report_body.html
+++ b/phpBB/styles/subSilver/template/report_body.html
@@ -33,14 +33,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index 28a6379629..f3fe86aa05 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -226,14 +226,7 @@
-
+
@@ -265,6 +258,16 @@
{FOLDER_ANNOUNCE_IMG}
{L_ICON_ANNOUNCEMENT}
+
+ {FOLDER_NEW_IMG_MINE}
+ {L_NEW_POSTS_MINE}
+
+ {FOLDER_IMG_MINE}
+ {L_NO_NEW_POSTS_MINE}
+
+ {FOLDER_STICKY_IMG}
+ {L_ICON_STICKY}
+
{FOLDER_HOT_NEW_IMG}
{L_NEW_POSTS_HOT}
@@ -272,8 +275,8 @@
{FOLDER_HOT_IMG}
{L_NO_NEW_POSTS_HOT}
- {FOLDER_STICKY_IMG}
- {L_ICON_STICKY}
+ {FOLDER_MOVED_IMG}
+ {L_MOVED_TOPIC}
{FOLDER_LOCKED_NEW_IMG}
@@ -282,8 +285,8 @@
{FOLDER_LOCKED_IMG}
{L_NO_NEW_POSTS_LOCKED}
- {FOLDER_MOVED_IMG}
- {L_MOVED_TOPIC}
+
+
diff --git a/phpBB/styles/subSilver/template/viewonline_body.html b/phpBB/styles/subSilver/template/viewonline_body.html
index 0fd31c66d9..b0eff81cd9 100644
--- a/phpBB/styles/subSilver/template/viewonline_body.html
+++ b/phpBB/styles/subSilver/template/viewonline_body.html
@@ -47,14 +47,7 @@
-
+
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 9050f3109e..2b4ecbeed8 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -302,14 +302,7 @@
-
+
From 287fe750eacafce1335de67db14a460104649d5d Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sun, 24 Sep 2006 14:43:33 +0000
Subject: [PATCH 115/291] i am tired of the support requests for those having
changed the permissions of the cache folder on an update (not intentionally
most of the time though)
git-svn-id: file:///svn/phpbb/trunk@6403 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acm/acm_file.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index 8ba51780eb..0797b9d79d 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -80,6 +80,16 @@ class acm
@flock($fp, LOCK_UN);
fclose($fp);
}
+ else
+ {
+ // Now, this occurred how often? ... phew, just tell the user then...
+ if (!@is_writeable($this->cache_dir))
+ {
+ trigger_error($this->cache_dir . ' is NOT writeable.', E_USER_ERROR);
+ }
+
+ trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);
+ }
$this->is_modified = false;
}
From 7e9a6dd8b50e86e198e7d9328bd8014565d9ab88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?=
Date: Sun, 24 Sep 2006 14:47:42 +0000
Subject: [PATCH 116/291] Oops, will keep this out for now. Need to discuss
where to put the leged first.
git-svn-id: file:///svn/phpbb/trunk@6404 89ea8834-ac86-4346-8a33-228a782c2dd0
---
.../subSilver/template/viewforum_body.html | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html
index f3fe86aa05..02b33041af 100644
--- a/phpBB/styles/subSilver/template/viewforum_body.html
+++ b/phpBB/styles/subSilver/template/viewforum_body.html
@@ -258,16 +258,6 @@
{FOLDER_ANNOUNCE_IMG}
{L_ICON_ANNOUNCEMENT}
-
- {FOLDER_NEW_IMG_MINE}
- {L_NEW_POSTS_MINE}
-
- {FOLDER_IMG_MINE}
- {L_NO_NEW_POSTS_MINE}
-
- {FOLDER_STICKY_IMG}
- {L_ICON_STICKY}
-
{FOLDER_HOT_NEW_IMG}
{L_NEW_POSTS_HOT}
@@ -275,8 +265,8 @@
{FOLDER_HOT_IMG}
{L_NO_NEW_POSTS_HOT}
- {FOLDER_MOVED_IMG}
- {L_MOVED_TOPIC}
+ {FOLDER_STICKY_IMG}
+ {L_ICON_STICKY}
{FOLDER_LOCKED_NEW_IMG}
@@ -285,8 +275,8 @@
{FOLDER_LOCKED_IMG}
{L_NO_NEW_POSTS_LOCKED}
-
-
+ {FOLDER_MOVED_IMG}
+ {L_MOVED_TOPIC}
From e1beb68ae113baed5928b365f5f9105315d6f739 Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Sun, 24 Sep 2006 15:07:08 +0000
Subject: [PATCH 117/291] fix bug #4454
git-svn-id: file:///svn/phpbb/trunk@6405 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/template.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index e3fa1195cb..6c7558faa3 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -500,7 +500,7 @@ class template
if ($filename)
{
- include_once($filename);
+ include($filename);
return;
}
eval(' ?>' . $this->compiled_code[$handle] . '
Date: Sun, 24 Sep 2006 16:02:25 +0000
Subject: [PATCH 118/291] Welcome the new pagination.html - splitting up
multiple pages since 1897.
git-svn-id: file:///svn/phpbb/trunk@6406 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/styles/subSilver/template/mcp_footer.html | 2 +-
phpBB/styles/subSilver/template/mcp_notes_user.html | 2 +-
phpBB/styles/subSilver/template/mcp_viewlogs.html | 2 +-
phpBB/styles/subSilver/template/mcp_warn_list.html | 2 +-
phpBB/styles/subSilver/template/memberlist_body.html | 2 +-
phpBB/styles/subSilver/template/pagination.html | 1 +
phpBB/styles/subSilver/template/search_results.html | 2 +-
phpBB/styles/subSilver/template/ucp_attachments.html | 2 +-
phpBB/styles/subSilver/template/ucp_groups_manage.html | 2 +-
phpBB/styles/subSilver/template/ucp_main_subscribed.html | 2 +-
phpBB/styles/subSilver/template/ucp_pm_message_footer.html | 3 +--
phpBB/styles/subSilver/template/ucp_pm_message_header.html | 2 +-
phpBB/styles/subSilver/template/viewforum_body.html | 4 ++--
phpBB/styles/subSilver/template/viewtopic_body.html | 4 ++--
14 files changed, 16 insertions(+), 16 deletions(-)
create mode 100644 phpBB/styles/subSilver/template/pagination.html
diff --git a/phpBB/styles/subSilver/template/mcp_footer.html b/phpBB/styles/subSilver/template/mcp_footer.html
index a575055127..0b3680bf9e 100644
--- a/phpBB/styles/subSilver/template/mcp_footer.html
+++ b/phpBB/styles/subSilver/template/mcp_footer.html
@@ -8,7 +8,7 @@
{PAGE_NUMBER}
[ {TOTAL} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+
diff --git a/phpBB/styles/subSilver/template/mcp_notes_user.html b/phpBB/styles/subSilver/template/mcp_notes_user.html
index 6ef427ebbe..094ee093d8 100755
--- a/phpBB/styles/subSilver/template/mcp_notes_user.html
+++ b/phpBB/styles/subSilver/template/mcp_notes_user.html
@@ -110,7 +110,7 @@
diff --git a/phpBB/styles/subSilver/template/mcp_viewlogs.html b/phpBB/styles/subSilver/template/mcp_viewlogs.html
index f333d6c057..3c18865dd7 100644
--- a/phpBB/styles/subSilver/template/mcp_viewlogs.html
+++ b/phpBB/styles/subSilver/template/mcp_viewlogs.html
@@ -45,7 +45,7 @@
diff --git a/phpBB/styles/subSilver/template/mcp_warn_list.html b/phpBB/styles/subSilver/template/mcp_warn_list.html
index df09db9b68..f3ff9d4490 100755
--- a/phpBB/styles/subSilver/template/mcp_warn_list.html
+++ b/phpBB/styles/subSilver/template/mcp_warn_list.html
@@ -32,7 +32,7 @@
diff --git a/phpBB/styles/subSilver/template/memberlist_body.html b/phpBB/styles/subSilver/template/memberlist_body.html
index bc5cc32ee2..69701027b4 100644
--- a/phpBB/styles/subSilver/template/memberlist_body.html
+++ b/phpBB/styles/subSilver/template/memberlist_body.html
@@ -89,7 +89,7 @@
diff --git a/phpBB/styles/subSilver/template/pagination.html b/phpBB/styles/subSilver/template/pagination.html
new file mode 100644
index 0000000000..fa636e5bad
--- /dev/null
+++ b/phpBB/styles/subSilver/template/pagination.html
@@ -0,0 +1 @@
+{L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
\ No newline at end of file
diff --git a/phpBB/styles/subSilver/template/search_results.html b/phpBB/styles/subSilver/template/search_results.html
index 843c64eba7..16efdcbfcd 100644
--- a/phpBB/styles/subSilver/template/search_results.html
+++ b/phpBB/styles/subSilver/template/search_results.html
@@ -123,7 +123,7 @@
-{PAGE_NUMBER} [ {TOTAL_MATCHES} ]
+
diff --git a/phpBB/styles/subSilver/template/ucp_attachments.html b/phpBB/styles/subSilver/template/ucp_attachments.html
index 6b60d73154..4e3a12cb3b 100644
--- a/phpBB/styles/subSilver/template/ucp_attachments.html
+++ b/phpBB/styles/subSilver/template/ucp_attachments.html
@@ -18,7 +18,7 @@
{PAGE_NUMBER}
[ {TOTAL_ATTACHMENTS} ]
- {L_GOTO_PAGE} {L_PREVIOUS} {PAGINATION} {L_NEXT}
+
diff --git a/phpBB/styles/subSilver/template/ucp_groups_manage.html b/phpBB/styles/subSilver/template/ucp_groups_manage.html
index 1c6bce637b..51bd5a1567 100644
--- a/phpBB/styles/subSilver/template/ucp_groups_manage.html
+++ b/phpBB/styles/subSilver/template/ucp_groups_manage.html
@@ -193,7 +193,7 @@