From f9f10be464369053a505b5c4c1de9e29f38247b2 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sun, 18 Jun 2006 11:55:45 +0000
Subject: [PATCH 001/193] Misc installation bugs
git-svn-id: file:///svn/phpbb/trunk@6095 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/index.php | 6 ++----
phpBB/install/install_install.php | 9 ++++-----
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index b2e36cd047..87766d03d4 100755
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -332,7 +332,7 @@ class module
*/
function page_footer()
{
- global $template;
+ global $db, $template;
$template->display('body');
@@ -545,9 +545,7 @@ class module
'MESSAGE_TEXT' => '' . basename($file) . ' [ ' . $line . ' ]
SQL : ' . $sql . '
' . $error . '
',
));
- $db->sql_close();
$this->page_footer();
- exit;
}
/**
@@ -573,7 +571,7 @@ class module
$rows = (int) $tpl_type[1];
$cols = (int) $tpl_type[2];
- $tpl = '';
+ $tpl = '';
break;
case 'radio':
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index bdd718ab1a..1e525bc179 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -836,8 +836,8 @@ class install_install extends module
$server_name = ($server_name !== '') ? $server_name : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
$server_port = ($server_port !== '') ? $server_port : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
- $server_protocol = ($server_protocol !== '') ? $server_protocol : (isset($_SERVER['HTTPS']) ? 'https://' : 'http://');
- $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : (isset($_SERVER['HTTPS']) ? true : false);
+ $server_protocol = ($server_protocol !== '') ? $server_protocol : (isset($_SERVER['HTTPS'] && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
+ $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : (isset($_SERVER['HTTPS'] && $_SERVER['HTTPS'] == 'on') ? true : false);
foreach ($this->advanced_config_options as $config_key => $vars)
@@ -1315,9 +1315,8 @@ class install_install extends module
$sql = 'SELECT * FROM ' . MODULES_TABLE . "
WHERE module_langname = '$mod_name'
AND module_class = '$module_class'
- AND module_name <> ''
- LIMIT 1";
- $result = $db->sql_query($sql);
+ AND module_name <> ''";
+ $result = $db->sql_query_limit($sql, 1);
$module_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
From d3b8612402006e7dc0a2cbf60ea406ec34294b7e Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sun, 18 Jun 2006 14:41:40 +0000
Subject: [PATCH 002/193] Begone damn typo's
git-svn-id: file:///svn/phpbb/trunk@6096 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 1e525bc179..e5c91a04eb 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -836,8 +836,8 @@ class install_install extends module
$server_name = ($server_name !== '') ? $server_name : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
$server_port = ($server_port !== '') ? $server_port : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
- $server_protocol = ($server_protocol !== '') ? $server_protocol : (isset($_SERVER['HTTPS'] && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
- $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : (isset($_SERVER['HTTPS'] && $_SERVER['HTTPS'] == 'on') ? true : false);
+ $server_protocol = ($server_protocol !== '') ? $server_protocol : (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
+ $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
foreach ($this->advanced_config_options as $config_key => $vars)
From bd3c8c50c01ec0344fec1c5a1cef2cf83c4c4ca7 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Sun, 18 Jun 2006 14:56:17 +0000
Subject: [PATCH 003/193] This fixes a consistancy issue re the ISO language
code on install, but there's still a bigger issue related to thsi to look at
git-svn-id: file:///svn/phpbb/trunk@6097 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 4 ++--
phpBB/install/schemas/schema_data.sql | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index e5c91a04eb..c7f442a65b 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -836,8 +836,8 @@ class install_install extends module
$server_name = ($server_name !== '') ? $server_name : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
$server_port = ($server_port !== '') ? $server_port : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
- $server_protocol = ($server_protocol !== '') ? $server_protocol : (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
- $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
+ $server_protocol = ($server_protocol !== '') ? $server_protocol : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
+ $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
foreach ($this->advanced_config_options as $config_key => $vars)
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 4c3fc036d9..80901a23b8 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -390,7 +390,7 @@ 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', '');
# -- Language
-INSERT INTO phpbb_lang (lang_iso, lang_dir, lang_english_name, lang_local_name, lang_author) VALUES ('en', 'en', 'English [ UK ]', 'English [ UK ]', 'phpBB Group');
+INSERT INTO phpbb_lang (lang_iso, lang_dir, lang_english_name, lang_local_name, lang_author) VALUES ('en', 'en', 'English [ GB ]', 'English [ GB ]', 'phpBB Group');
# -- 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);
From ef9b72537905ab8d73d5f14400b94eb03f4b61f2 Mon Sep 17 00:00:00 2001
From: David M
Date: Sun, 18 Jun 2006 15:21:31 +0000
Subject: [PATCH 004/193] dumbness++
git-svn-id: file:///svn/phpbb/trunk@6098 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_profile.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 0e70327585..f045f66e74 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -125,7 +125,7 @@ class acp_profile
preg_match('#\((.*)\)#s', $row['sql'], $matches);
- $new_table_cols = $matches[1];
+ $new_table_cols = trim($matches[1]);
$old_table_cols = explode(',', $new_table_cols);
$column_list = array();
foreach($old_table_cols as $declaration)
@@ -917,7 +917,7 @@ class acp_profile
'field_hide' => $cp->vars['field_hide'],
'field_no_view' => $cp->vars['field_no_view']
);
-
+$db->sql_transaction('begin');
if ($action == 'create')
{
$profile_fields += array(
@@ -1029,12 +1029,13 @@ class acp_profile
preg_match('#\((.*)\)#s', $row['sql'], $matches);
- $new_table_cols = $matches[1];
+ $new_table_cols = trim($matches[1]);
$old_table_cols = explode(',', $new_table_cols);
$column_list = array();
foreach($old_table_cols as $declaration)
{
$entities = preg_split('#\s+#', $declaration);
+ var_dump($entities);
$column_list[] = $entities[0];
}
@@ -1380,6 +1381,7 @@ class acp_profile
}
}
+$db->sql_transaction('commit');
$db->sql_transaction('begin');
if ($action == 'create')
From 5735c5176e65905f8814b935000247fc8a4a88d0 Mon Sep 17 00:00:00 2001
From: David M
Date: Sun, 18 Jun 2006 15:35:32 +0000
Subject: [PATCH 005/193] fixes...
git-svn-id: file:///svn/phpbb/trunk@6099 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_database.php | 14 +++++++++++++-
phpBB/includes/acp/acp_profile.php | 4 ++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 3cdb09bb5e..6d5d97e454 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -135,6 +135,7 @@ class acp_database
{
case 'sqlite':
$sql_data .= "BEGIN TRANSACTION;\n";
+ $sqlite_version = sqlite_libversion();
break;
case 'postgres':
@@ -157,7 +158,6 @@ class acp_database
case 'mysqli':
case 'mysql4':
case 'mysql':
- case 'sqlite':
$sql_data .= '# Table: ' . $table_name . "\n";
$sql_data .= "DROP TABLE IF EXISTS $table_name;\n";
break;
@@ -167,6 +167,18 @@ class acp_database
$sql_data .= "DROP TABLE $table_name;\n\\\n";
break;
+ case 'sqlite':
+ $sql_data .= '# Table: ' . $table_name . "\n";
+ if (version_compare($sqlite_version, '3.0') == -1)
+ {
+ $sql_data .= "DROP TABLE $table_name;\n";
+ }
+ else
+ {
+ $sql_data .= "DROP TABLE IF EXISTS $table_name;\n";
+ }
+ break;
+
case 'postgres':
case 'firebird':
$sql_data .= '# Table: ' . $table_name . "\n";
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index f045f66e74..7299192773 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -917,7 +917,7 @@ class acp_profile
'field_hide' => $cp->vars['field_hide'],
'field_no_view' => $cp->vars['field_no_view']
);
-$db->sql_transaction('begin');
+
if ($action == 'create')
{
$profile_fields += array(
@@ -1381,7 +1381,7 @@ $db->sql_transaction('begin');
}
}
-$db->sql_transaction('commit');
+
$db->sql_transaction('begin');
if ($action == 'create')
From ac3f3b1ae94f8a820063fc816500dc2eb9a603b2 Mon Sep 17 00:00:00 2001
From: David M
Date: Sun, 18 Jun 2006 15:50:00 +0000
Subject: [PATCH 006/193] SQL!
git-svn-id: file:///svn/phpbb/trunk@6100 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_reasons.php | 36 ++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index d6e15435ee..90ec2ddb55 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -198,10 +198,38 @@ class acp_reasons
$other_reason_id = (int) $db->sql_fetchfield('reason_id');
$db->sql_freeresult($result);
- // Change the reports using this reason to 'other'
- $sql = 'UPDATE ' . REPORTS_TABLE . '
- SET reason_id = ' . $other_reason_id . ", report_text = CONCAT('" . $db->sql_escape($reason_row['reason_description']) . "\n\n', report_text)
- WHERE reason_id = $reason_id";
+ switch (SQL_LAYER)
+ {
+ // The ugly one!
+ case 'mysqli':
+ case 'mysql4':
+ case 'mysql':
+ // Change the reports using this reason to 'other'
+ $sql = 'UPDATE ' . REPORTS_TABLE . '
+ SET reason_id = ' . $other_reason_id . ", report_text = CONCAT('" . $db->sql_escape($reason_row['reason_description']) . "\n\n', report_text)
+ WHERE reason_id = $reason_id";
+ break;
+
+ // Nearly standard, not quite
+ 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";
+ break;
+
+ // Teh standard
+ case 'postgres':
+ case 'oracle':
+ case 'firebird':
+ case 'sqlite':
+ // 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";
+ break;
+ }
$db->sql_query($sql);
$db->sql_query('DELETE FROM ' . REPORTS_REASONS_TABLE . ' WHERE reason_id = ' . $reason_id);
From aa443a868dd1c908731fbb076859bfe6b5b2ba16 Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Mon, 19 Jun 2006 20:40:29 +0000
Subject: [PATCH 007/193] Deleting logs
git-svn-id: file:///svn/phpbb/trunk@6101 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/mcp/mcp_logs.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 2850505e66..df7236b974 100755
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -43,8 +43,8 @@ class mcp_logs
// Set up general vars
$start = request_var('start', 0);
- $deletemark = (isset($_POST['del_marked'])) ? true : false;
- $deleteall = (isset($_POST['del_all'])) ? true : false;
+ $deletemark = ($action == 'del_marked') ? true : false;
+ $deleteall = ($action == 'del_all') ? true : false;
$marked = request_var('mark', array(0));
// Sort keys
@@ -91,7 +91,7 @@ class mcp_logs
if ($where_sql || $deleteall)
{
$sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE log_type = ' . LOD_MOD . "
+ WHERE log_type = ' . LOG_MOD . "
$where_sql";
$db->sql_query($sql);
From 790f4dcc02dde2a49b3bd30a22524fb0fd0c582c Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Mon, 19 Jun 2006 20:52:01 +0000
Subject: [PATCH 008/193] Prevent direct access to these files
git-svn-id: file:///svn/phpbb/trunk@6102 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/install/install_install.php | 6 ++++++
phpBB/install/install_main.php | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index c7f442a65b..8b0d86db7e 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -11,6 +11,12 @@
/**
*/
+if ( !defined('IN_INSTALL') )
+{
+ // Someone has tried to access the file direct. This is not a good idea, so exit
+ exit;
+}
+
if (!empty($setmodules))
{
$module[] = array(
diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php
index 80516a895f..ad534aaeb8 100755
--- a/phpBB/install/install_main.php
+++ b/phpBB/install/install_main.php
@@ -11,6 +11,12 @@
/**
*/
+if ( !defined('IN_INSTALL') )
+{
+ // Someone has tried to access the file direct. This is not a good idea, so exit
+ exit;
+}
+
if (!empty($setmodules))
{
$module[] = array(
From cbfcf07af37e86dec6d6b8bdc1891b9524bd77ec Mon Sep 17 00:00:00 2001
From: Graham Eames
Date: Mon, 19 Jun 2006 21:02:44 +0000
Subject: [PATCH 009/193] A few changes to the doc links for the beta process
git-svn-id: file:///svn/phpbb/trunk@6103 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/language/en/install.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 89a0a5ad11..1cb4dd2f65 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -129,7 +129,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 phpBB support forums, see the %sREADME%s for further information.',
+ '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.',
'INSTALL_INTRO' => 'Welcome to Installation',
'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB onto your server.
@@ -219,7 +219,7 @@ $lang = array_merge($lang, array(
'SUB_SUPPORT' => 'Support',
'SUCCESSFUL_CONNECT' => 'Successful Connection',
// TODO: Write some text on obtaining support
- 'SUPPORT_BODY' => 'During the beta phase a minimal level of support will be given at the phpBB 3.0 Beta1 support forum . We will provide answers to general setup questions, configuration problems and support for determining common problems mostly related to bugs. We will not support modifications, custom code/style additions or any users using the beta packages within a live environment.For additional assistance, please refer to our Quick Start Guide .
To ensure you stay up to date with the latest news and releases, why not subscribe to our mailing list ',
+ 'SUPPORT_BODY' => 'During the beta phase a minimal level of support will be given at the phpBB 3.0 Beta1 support forum . We will provide answers to general setup questions, configuration problems and support for determining common problems mostly related to bugs. We will not support modifications, custom code/style additions or any users using the beta packages within a live environment.
For additional assistance, please refer to our Quick Start Guide .
To ensure you stay up to date with the latest news and releases, why not subscribe to our mailing list ',
'SYNC_FORUMS' => 'Starting to sync forums',
'SYNC_TOPICS' => 'Starting to sync topics',
'SYNC_TOPIC_ID' => 'Synchronising topics from topic_id $1%s to $2%s',
From 52045ff2631cdfa14efd3379b64843cafd00df8f Mon Sep 17 00:00:00 2001
From: Meik Sievertsen
Date: Mon, 19 Jun 2006 21:30:32 +0000
Subject: [PATCH 010/193] some bugfixes
git-svn-id: file:///svn/phpbb/trunk@6104 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_board.php | 8 ++---
phpBB/includes/acp/acp_email.php | 4 +--
phpBB/includes/functions.php | 7 +++-
phpBB/includes/functions_privmsgs.php | 15 ++++-----
phpBB/includes/functions_user.php | 33 +++++++++++++++++--
phpBB/includes/session.php | 17 ++++++----
phpBB/includes/ucp/ucp_pm.php | 1 +
phpBB/includes/ucp/ucp_pm_compose.php | 2 +-
phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +-
phpBB/includes/ucp/ucp_profile.php | 2 +-
phpBB/language/en/mcp.php | 3 +-
phpBB/language/en/ucp.php | 3 +-
phpBB/mcp.php | 3 ++
phpBB/memberlist.php | 6 ++--
phpBB/posting.php | 2 +-
.../styles/subSilver/template/index_body.html | 2 +-
phpBB/styles/subSilver/template/jumpbox.html | 2 +-
.../subSilver/template/memberlist_view.html | 20 ++++++-----
phpBB/ucp.php | 3 ++
phpBB/viewtopic.php | 6 ++--
20 files changed, 93 insertions(+), 48 deletions(-)
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index da424d1131..cb27314f74 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -40,9 +40,9 @@ class acp_board
'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}'), 'explain' => false),
+ '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}', true), '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),
'legend2' => 'WARNINGS',
@@ -104,7 +104,7 @@ class acp_board
'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['SECONDS']),
+ 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', '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),
@@ -137,7 +137,7 @@ class acp_board
'legend2' => 'POSTING',
'bump_type' => false,
- 'edit_time' => array('lang' => 'EDIT_TIME', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ '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),
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 62a86eed19..f75d878a9e 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -85,10 +85,10 @@ class acp_email
}
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
if (!$row)
{
+ $db->sql_freeresult($result);
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
}
@@ -121,7 +121,7 @@ class acp_email
$email_list[$j][$i]['jabber'] = $row['user_jabber'];
$i++;
}
- }
+ }
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 7b36c36548..9115ac2b6a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -429,13 +429,18 @@ function style_select($default = '', $all = false)
/**
* Pick a timezone
*/
-function tz_select($default = '')
+function tz_select($default = '', $truncate = false)
{
global $sys_timezone, $user;
$tz_select = '';
foreach ($user->lang['tz_zones'] as $offset => $zone)
{
+ if ($truncate)
+ {
+ $zone = (strlen($zone) > 70) ? substr($zone, 0, 70) . '...' : $zone;
+ }
+
if (is_numeric($offset))
{
$selected = ($offset == $default) ? ' selected="selected"' : '';
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 7a9cdfb322..b5afbf436e 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1477,19 +1477,18 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
$subject = censor_text($subject);
+ unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
+
// Get banned User ID's
$sql = 'SELECT ban_userid
- FROM ' . BANLIST_TABLE;
+ FROM ' . BANLIST_TABLE . '
+ WHERE ban_userid IN (' . implode(', ', array_map('intval', array_keys($recipients))) . ')
+ AND ban_exclude = 0';
$result = $db->sql_query($sql);
- unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
-
while ($row = $db->sql_fetchrow($result))
{
- if (isset($row['ban_userid']))
- {
- unset($recipients[$row['ban_userid']]);
- }
+ unset($recipients[$row['ban_userid']]);
}
$db->sql_freeresult($result);
@@ -1498,7 +1497,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
return;
}
- $recipient_list = implode(', ', array_keys($recipients));
+ $recipient_list = implode(', ', array_map('intval', array_keys($recipients)));
$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
FROM ' . USERS_TABLE . "
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c246e98396..0eab7d8a6f 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -472,6 +472,23 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
$ban_end = 0;
}
+ $founder = array();
+
+ if (!$ban_exclude)
+ {
+ // Create a list of founder...
+ $sql = 'SELECT user_id, user_email
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_FOUNDER;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $founder[$row['user_id']] = $row['user_email'];
+ }
+ $db->sql_freeresult($result);
+ }
+
$banlist_ary = array();
switch ($mode)
@@ -502,6 +519,12 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
$sql = 'SELECT user_id
FROM ' . USERS_TABLE . '
WHERE username IN (' . $sql_usernames . ')';
+
+ if (sizeof($founder))
+ {
+ $sql .= ' AND user_id NOT IN (' . implode(', ', array_keys($founder)) . ')';
+ }
+
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
@@ -618,9 +641,14 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
foreach ($ban_list as $ban_item)
{
- if (preg_match('#^.*?@*|(([a-z0-9\-]+\.)+([a-z]{2,3}))$#i', trim($ban_item)))
+ $ban_item = trim($ban_item);
+
+ if (preg_match('#^.*?@*|(([a-z0-9\-]+\.)+([a-z]{2,3}))$#i', $ban_item))
{
- $banlist_ary[] = trim($ban_item);
+ if (!sizeof($founder) || !in_array($ban_item, $founder))
+ {
+ $banlist_ary[] = $ban_item;
+ }
}
}
@@ -764,6 +792,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
// Update log
$log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_';
add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
+
return true;
}
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 09ae84a210..5f921fcc22 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -82,7 +82,7 @@ class session
}
// Current page from phpBB root (for example: adm/index.php?i=10&b=2)
- $page = (($page_dir) ? $page_dir . '/' : '') . $page_name . (($query_string) ? "?$query_string" : '');
+ $page = (($page_dir) ? urlencode($page_dir) . '/' : '') . urlencode($page_name) . (($query_string) ? "?$query_string" : '');
// The script path from the webroot to the current directory (for example: /phpBB2/adm/) : always prefixed with / and ends in /
$script_path = trim(str_replace('\\', '/', dirname($script_name)));
@@ -102,12 +102,12 @@ class session
$root_script_path .= (substr($root_script_path, -1, 1) == '/') ? '' : '/';
$page_array += array(
- 'page_name' => $page_name,
- 'page_dir' => $page_dir,
+ 'page_name' => urlencode($page_name),
+ 'page_dir' => urlencode($page_dir),
'query_string' => $query_string,
- 'script_path' => htmlspecialchars($script_path),
- 'root_script_path' => htmlspecialchars($root_script_path),
+ 'script_path' => urlencode(htmlspecialchars($script_path)),
+ 'root_script_path' => urlencode(htmlspecialchars($root_script_path)),
'page' => $page
);
@@ -763,8 +763,11 @@ class session
$sql = 'SELECT ban_ip, ban_userid, ban_email, ban_exclude, ban_give_reason, ban_end
FROM ' . BANLIST_TABLE . '
- WHERE ban_end >= ' . time() . '
- OR ban_end = 0';
+ WHERE (ban_end >= ' . time() . " OR ban_end = 0)
+ AND (
+ ban_ip <> '' OR ban_email <> '' OR
+ (ban_userid <> 0 AND ban_userid = " . $user_id . ')
+ )';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index c23456715f..f3a92f6adb 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -148,6 +148,7 @@ class ucp_pm
include($phpbb_root_path . 'includes/ucp/ucp_main.' . $phpEx);
$module = new ucp_main($this);
+ $module->u_action = $this->u_action;
$module->main($id, $mode);
$this->tpl_name = $module->tpl_name;
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index bc7f22427b..e8b8606015 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -243,7 +243,7 @@ function compose_pm($id, $mode, $action)
if ($action == 'edit' && !$refresh && !$preview && !$submit)
{
- if (!($message_time > time() - $config['pm_edit_time'] || !$config['pm_edit_time']))
+ if (!($message_time > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']))
{
trigger_error('CANNOT_EDIT_MESSAGE_TIME');
}
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index e66b519327..2eb17337cf 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -194,7 +194,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_AUTHOR_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $author_id),
'U_EMAIL' => $user_info['email'],
'U_QUOTE' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
- 'U_EDIT' => (($message_row['message_time'] > time() - $config['pm_edit_time'] || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
+ 'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next",
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 9326e41427..e7b602b0d1 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -49,10 +49,10 @@ class ucp_profile
$data[$var] = request_var($var, $default);
}
+ // Do not check cur_password, it is the old one.
$var_ary = array(
'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'new_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
- 'cur_password' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
array('email', $data['email'])),
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index ad14572737..1b6a496a7e 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -93,8 +93,6 @@ $lang = array_merge($lang, array(
'IP_INFO' => 'IP Information',
- 'JUMP_TO' => 'Moderate forum', // Overwriting the jump to language variable for the mcp jumpbox
-
'LATEST_LOGS' => 'Latest 5 logged actions',
'LATEST_REPORTED' => 'Latest 5 reports',
'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting for approval',
@@ -188,6 +186,7 @@ $lang = array_merge($lang, array(
'MERGE_POSTS_CONFIRM' => 'Are you sure you want to merge the selected posts?',
'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic. Please enter the destination topic id or click on the "Select" button to search for one',
'MERGE_TOPIC_ID' => 'Destination topic id',
+ 'MODERATE_FORUM' => 'Moderate forum',
'MOD_OPTIONS' => 'Moderator options',
'MORE_INFO' => 'Further information',
'MOST_WARNINGS' => 'Users with most warnings',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index aa9cc1c6cc..6899ca180e 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -157,6 +157,7 @@ $lang = array_merge($lang, array(
'DRAFT_UPDATED' => 'Draft successfully updated.',
'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll informations.',
+ 'EMAIL_BANNED_EMAIL' => 'The email address you entered is not allowed to be used.',
'EMAIL_INVALID_EMAIL' => 'The email address you entered is invalid.',
'EMAIL_REMIND' => 'This must be the email address you supplied when registering.',
'EMAIL_TAKEN_EMAIL' => 'The entered email address is already in use',
@@ -414,7 +415,7 @@ $lang = array_merge($lang, array(
'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.',
'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$d and %2$d characters.',
'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
- 'USERNAME_USERNAME_DISALLOWED' => 'The username you entered has been banned.',
+ 'USERNAME_DISALLOWED_USERNAME' => 'The username you entered has been banned.',
'USER_NOT_FOUND_OR_INACTIVE' => 'The usernames you specified could either not be found or are not activated users.',
'VIEW_AVATARS' => 'Display avatars',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 0293d161e4..3470518a4e 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -25,6 +25,9 @@ $user->setup('mcp');
$module = new p_master();
+// Setting a variable to let the style designer know where he is...
+$template->assign_var('S_IN_MCP', true);
+
// Basic parameter data
$id = request_var('i', '');
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index d7eed90dd2..e8991faf90 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -183,7 +183,7 @@ switch ($mode)
'U_GROUP' => $u_group,
'U_VIEWPROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
- 'U_PM' => ($auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '')
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '')
);
}
$db->sql_freeresult($result);
@@ -921,7 +921,7 @@ switch ($mode)
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
- 'U_PM' => ($auth->acl_get('u_sendpm') && $group_row['group_receive_pm'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '',)
+ 'U_PM' => ($auth->acl_get('u_sendpm') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&g=' . $group_id) : '',)
);
$sql_select = ', ug.group_leader';
@@ -1235,7 +1235,7 @@ function show_profile($data)
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&sr=posts") : '',
'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $user_id, true, $user->session_id) : '',
'U_WARN' => $auth->acl_getf_global('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '',
- 'U_PM' => ($auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '',
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '',
'U_EMAIL' => $email,
'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
'U_ICQ' => ($data['user_icq']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=icq&u=' . $user_id) : '',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f647b30940..62ef28bfb3 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -199,7 +199,7 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
trigger_error('USER_CANNOT_EDIT');
}
- if (!($post_data['post_time'] > time() - $config['edit_time'] || !$config['edit_time']))
+ if (!($post_data['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time']))
{
trigger_error('CANNOT_EDIT_TIME');
}
diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html
index d91a5bf3ba..e8dfafbcdf 100644
--- a/phpBB/styles/subSilver/template/index_body.html
+++ b/phpBB/styles/subSilver/template/index_body.html
@@ -146,7 +146,7 @@
- {L_USERNAME}: {L_PASSWORD}: {L_LOG_ME_IN}
+ {L_USERNAME}: {L_PASSWORD}: {L_LOG_ME_IN}
diff --git a/phpBB/styles/subSilver/template/jumpbox.html b/phpBB/styles/subSilver/template/jumpbox.html
index b45793316f..1f1b06d9be 100644
--- a/phpBB/styles/subSilver/template/jumpbox.html
+++ b/phpBB/styles/subSilver/template/jumpbox.html
@@ -4,7 +4,7 @@
- {L_JUMP_TO}:
+ {L_MODERATE_FORUM}{L_JUMP_TO}:
------------------
diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html
index 818be5f7ce..e3f391cce5 100644
--- a/phpBB/styles/subSilver/template/memberlist_view.html
+++ b/phpBB/styles/subSilver/template/memberlist_view.html
@@ -93,27 +93,29 @@
{L_EMAIL_ADDRESS}:
{EMAIL_IMG}
-
- {L_PM}:
- {PM_IMG}
-
-
+
+
+ {L_PM}:
+ {PM_IMG}
+
+
+
{L_MSNM}:
{MSN_IMG}
-
+
{L_YIM}:
{YIM_IMG}
-
+
{L_AIM}:
{AIM_IMG}
-
+
{L_ICQ}:
{ICQ_IMG}
-
+
{L_JABBER}:
{JABBER_IMG} {JABBER_IMG}
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index cf75233172..87c331ed92 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -32,6 +32,9 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup('ucp');
+// Setting a variable to let the style designer know where he is...
+$template->assign_var('S_IN_UCP', true);
+
$module = new p_master();
// Basic "global" modes
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 71a97c3d43..f0dc63f023 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1337,14 +1337,14 @@ 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('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
- 'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - $config['edit_time'] || !$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_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) : '',
- 'U_DELETE' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - $config['edit_time'] || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '',
+ 'U_DELETE' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '',
'U_PROFILE' => $user_cache[$poster_id]['profile'],
'U_SEARCH' => $user_cache[$poster_id]['search'],
- 'U_PM' => ($poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
+ 'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '',
'U_EMAIL' => $user_cache[$poster_id]['email'],
'U_WWW' => $user_cache[$poster_id]['www'],
'U_ICQ' => $user_cache[$poster_id]['icq'],
From 9b0d2143bb5d8de42c10ac74cbbf81feafb7ecb4 Mon Sep 17 00:00:00 2001
From: David M
Date: Tue, 20 Jun 2006 00:09:45 +0000
Subject: [PATCH 011/193] what? yeah... - turns out the backup issue was not a
backup issue but a schema issue - let there be color
git-svn-id: file:///svn/phpbb/trunk@6105 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_database.php | 62 +++++++++++++----------
phpBB/includes/bbcode.php | 2 +-
phpBB/install/schemas/firebird_schema.sql | 2 +-
phpBB/install/schemas/mssql_schema.sql | 1 +
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 +-
8 files changed, 42 insertions(+), 33 deletions(-)
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 6d5d97e454..ed6f5e0d7b 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -23,7 +23,7 @@ class acp_database
$user->add_lang('acp/database');
$this->tpl_name = 'acp_database';
- $this->page_title = 'ACP_DATABASE';
+ $this->page_title = 'ACP_DATABasE';
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
@@ -42,16 +42,16 @@ class acp_database
$type = request_var('type', '');
$table = request_var('table', array(''));
$format = request_var('method', '');
- $where = request_var('where', '');
+ $WHERE = request_var('WHERE', '');
$store = $download = $structure = $schema_data = false;
- if ($where == 'store_and_download' || $where == 'store')
+ if ($WHERE == 'store_and_download' || $WHERE == 'store')
{
$store = true;
}
- if ($where == 'store_and_download' || $where == 'download')
+ if ($WHERE == 'store_and_download' || $WHERE == 'download')
{
$download = true;
}
@@ -223,7 +223,8 @@ class acp_database
{
case 'mysqli':
- $sql = "SELECT * FROM $table_name";
+ $sql = "SELECT *
+ FROM $table_name";
$result = mysqli_query($db->db_connect_id, $sql, MYSQLI_USE_RESULT);
if ($result != false)
{
@@ -290,7 +291,8 @@ class acp_database
case 'mysql4':
case 'mysql':
- $sql = "SELECT * FROM $table_name";
+ $sql = "SELECT *
+ FROM $table_name";
$result = mysql_unbuffered_query($sql, $db->db_connect_id);
if ($result != false)
@@ -361,7 +363,8 @@ class acp_database
case 'sqlite':
$col_types = sqlite_fetch_column_types($table_name, $db->db_connect_id);
- $sql = "SELECT * FROM $table_name";
+ $sql = "SELECT *
+ FROM $table_name";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -415,7 +418,7 @@ class acp_database
$ary_type = $ary_name = array();
- // Grab all of the data from current table.
+ // Grab all of the data FROM current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -440,7 +443,7 @@ class acp_database
// Determine if we must reset the sequences
if (strpos($row['rowdefault'], 'nextval(\'') === 0)
{
- $seq .= "SELECT SETVAL('{$table_name}_seq',(select case when max({$ary_name[$i]})>0 then max({$ary_name[$i]})+1 else 1 end from {$table_name}));\n";
+ $seq .= "SELECT SETVAL('{$table_name}_seq',(select case when max({$ary_name[$i]})>0 then max({$ary_name[$i]})+1 else 1 end FROM {$table_name}));\n";
}
}
}
@@ -536,7 +539,7 @@ class acp_database
$ary_type = $ary_name = array();
$ident_set = false;
- // Grab all of the data from current table.
+ // Grab all of the data FROM current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -546,8 +549,8 @@ class acp_database
if ($retrieved_data)
{
$sql = "SELECT 1 as has_identity
- FROM INFORMATION_SCHEMA.COLUMNS
- WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
$result2 = $db->sql_query($sql);
$row2 = $db->sql_fetchrow($result2);
if (!empty($row2['has_identity']))
@@ -647,7 +650,7 @@ class acp_database
$ary_type = $ary_name = array();
$ident_set = false;
- // Grab all of the data from current table.
+ // Grab all of the data FROM current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -665,8 +668,8 @@ class acp_database
if ($retrieved_data)
{
$sql = "SELECT 1 as has_identity
- FROM INFORMATION_SCHEMA.COLUMNS
- WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
$result2 = $db->sql_query($sql);
$row2 = $db->sql_fetchrow($result2);
if (!empty($row2['has_identity']))
@@ -758,7 +761,7 @@ class acp_database
$ary_type = $ary_name = array();
- // Grab all of the data from current table.
+ // Grab all of the data FROM current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -843,7 +846,7 @@ class acp_database
case 'oracle':
$ary_type = $ary_name = array();
- // Grab all of the data from current table.
+ // Grab all of the data FROM current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -1017,7 +1020,7 @@ class acp_database
case 'mssql_odbc':
$sql = "SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
- WHERE TABLE_TYPE = 'BASE TABLE'
+ WHERE TABLE_TYPE = 'BasE TABLE'
ORDER BY TABLE_NAME";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1290,7 +1293,10 @@ class acp_database
}
$db->sql_freeresult($result);
- $result = $db->sql_query("SHOW KEYS FROM $table_name");
+ $sql = "SHOW KEYS
+ FROM $table_name";
+
+ $result = $db->sql_query($sql);
$index = array();
while ($row = $db->sql_fetchrow($result))
@@ -1419,7 +1425,7 @@ class acp_database
}
$db->sql_freeresult($result);
- $field_query = "SELECT a.attnum, a.attname AS field, t.typname as type, a.attlen AS length, a.atttypmod as lengthvar, a.attnotnull as notnull
+ $field_query = "SELECT a.attnum, a.attname as field, t.typname as type, a.attlen as length, a.atttypmod as lengthvar, a.attnotnull as notnull
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relname = '" . $db->sql_escape($table_name) . "'
AND a.attnum > 0
@@ -1432,7 +1438,7 @@ class acp_database
$lines = array();
while ($row = $db->sql_fetchrow($result))
{
- // Get the data from the table
+ // Get the data FROM the table
$sql_get_default = "SELECT pg_get_expr(d.adbin, d.adrelid) as rowdefault
FROM pg_attrdef d, pg_class c
WHERE (c.relname = '" . $db->sql_escape($table_name) . "')
@@ -1489,7 +1495,7 @@ class acp_database
// Get the listing of primary keys.
- $sql_pri_keys = "SELECT ic.relname AS index_name, bc.relname AS tab_name, ta.attname AS column_name, i.indisunique AS unique_key, i.indisprimary AS primary_key
+ $sql_pri_keys = "SELECT ic.relname as index_name, bc.relname as tab_name, ta.attname as column_name, i.indisunique as unique_key, i.indisprimary as primary_key
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute ta, pg_attribute ia
WHERE (bc.oid = i.indrelid)
AND (ic.oid = i.indexrelid)
@@ -1678,7 +1684,7 @@ class acp_database
$sql_data .= "\nCREATE TABLE $table_name (\n";
- $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME AS FNAME, R.RDB$NULL_FLAG AS NFLAG, R.RDB$DEFAULT_SOURCE AS DSOURCE, F.RDB$FIELD_TYPE AS FTYPE, F.RDB$FIELD_SUB_TYPE AS STYPE, F.RDB$FIELD_LENGTH AS FLEN
+ $sql = 'SELECT DISTINCT R.RDB$FIELD_NAME as FNAME, R.RDB$NULL_FLAG as NFLAG, R.RDB$DEFAULT_SOURCE as DSOURCE, F.RDB$FIELD_TYPE as FTYPE, F.RDB$FIELD_SUB_TYPE as STYPE, F.RDB$FIELD_LENGTH as FLEN
FROM RDB$RELATION_FIELDS R
JOIN RDB$FIELDS F ON R.RDB$FIELD_SOURCE=F.RDB$FIELD_NAME
LEFT JOIN RDB$FIELD_DIMENSIONS D ON R.RDB$FIELD_SOURCE = D.RDB$FIELD_NAME
@@ -1739,7 +1745,7 @@ class acp_database
$db->sql_freeresult($result);
- $sql = 'SELECT I.RDB$INDEX_NAME AS INAME, I.RDB$UNIQUE_FLAG AS UFLAG, S.RDB$FIELD_NAME AS FNAME
+ $sql = 'SELECT I.RDB$INDEX_NAME as INAME, I.RDB$UNIQUE_FLAG as UFLAG, S.RDB$FIELD_NAME as FNAME
FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON S.RDB$INDEX_NAME=I.RDB$INDEX_NAME
WHERE (I.RDB$SYSTEM_FLAG IS NULL OR I.RDB$SYSTEM_FLAG=0)
AND I.RDB$FOREIGN_KEY IS NULL
@@ -1783,7 +1789,7 @@ class acp_database
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $sql = 'SELECT T1.RDB$DEPENDED_ON_NAME AS GEN, T1.RDB$FIELD_NAME, T1.RDB$DEPENDED_ON_TYPE
+ $sql = 'SELECT T1.RDB$DEPENDED_ON_NAME as GEN, T1.RDB$FIELD_NAME, T1.RDB$DEPENDED_ON_TYPE
FROM RDB$DEPENDENCIES T1
WHERE (T1.RDB$DEPENDENT_NAME = \'' . $row['dname'] . '\')
AND (T1.RDB$DEPENDENT_TYPE = 2 AND T1.RDB$DEPENDED_ON_TYPE = 14)
@@ -1801,7 +1807,7 @@ class acp_database
$sql_data .= "\nCREATE GENERATOR " . $gen_name . ";;";
$sql_data .= "\nSET GENERATOR " . $gen_name . " TO 0;;\n";
$sql_data .= "\nCREATE TRIGGER {$row['dname']} FOR $table_name";
- $sql_data .= "\nBEFORE INSERT\nAS\nBEGIN";
+ $sql_data .= "\nBEFORE INSERT\nas\nBEGIN";
$sql_data .= "\n NEW.{$row['fname']} = GEN_ID(" . $gen_name . ", 1);";
$sql_data .= "\nEND;;\n";
}
@@ -1812,7 +1818,9 @@ class acp_database
case 'oracle':
$sql_data .= "\nCREATE TABLE $table_name (\n";
- $sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT from ALL_TAB_COLS where table_name = '{$table_name}'";
+ $sql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_LENGTH, NULLABLE, DATA_DEFAULT
+ FROM ALL_TAB_COLS
+ WHERE table_name = '{$table_name}'";
$result = $db->sql_query($sql);
$rows = array();
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index ea800e533b..936a543b7d 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -232,7 +232,7 @@ class bbcode
case 6:
$this->bbcode_cache[$bbcode_id] = array(
'preg' => array(
- '!\[color=(#[0-9A-F]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!s' => $this->bbcode_tpl('color', $bbcode_id),
+ '!\[color=(#[0-9a-fA-F]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!s' => $this->bbcode_tpl('color', $bbcode_id),
)
);
break;
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index a505ed9578..3b03c818bc 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -16,7 +16,7 @@ CREATE TABLE phpbb_attachments (
comment BLOB SUB_TYPE TEXT,
extension VARCHAR(100),
mimetype VARCHAR(100),
- filesize INTEGER NOT NULL,
+ filesize INTEGER DEFAULT 0 NOT NULL,
filetime INTEGER DEFAULT 0 NOT NULL,
thumbnail INTEGER DEFAULT 0 NOT NULL
);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 72db08a523..a74e214aa7 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -44,6 +44,7 @@ ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_attach_poster_id] DEFAULT (0) FOR [poster_id],
CONSTRAINT [DF_phpbb_attach_download_count] DEFAULT (0) FOR [download_count],
CONSTRAINT [DF_phpbb_attach_filetime] DEFAULT (0) FOR [filetime],
+ CONSTRAINT [DF_phpbb_attach_filesize] DEFAULT (0) FOR [filesize],
CONSTRAINT [DF_phpbb_attach_thumbnail] DEFAULT (0) FOR [thumbnail]
GO
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index 88d02429ef..f89f468085 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -17,7 +17,7 @@ CREATE TABLE phpbb_attachments (
comment text,
extension varchar(100),
mimetype varchar(100),
- filesize int(20) UNSIGNED NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
thumbnail tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (attach_id),
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 900232b79a..5851bed653 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -54,7 +54,7 @@ CREATE TABLE phpbb_attachments (
"COMMENT" clob,
extension varchar2(100),
mimetype varchar2(100),
- filesize number(20) NOT NULL,
+ filesize number(20) DEFAULT '0' NOT NULL,
filetime number(11) DEFAULT '0' NOT NULL,
thumbnail number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index f52d6fe278..8dc3d9d977 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -95,7 +95,7 @@ CREATE TABLE phpbb_attachments (
comment varchar(8000),
extension varchar(100),
mimetype varchar(100),
- filesize INT4 NOT NULL,
+ filesize INT4 DEFAULT '0' NOT NULL,
filetime INT4 DEFAULT '0' NOT NULL,
thumbnail INT2 DEFAULT '0' NOT NULL,
PRIMARY KEY (attach_id),
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 74ac458057..af59df634b 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -19,7 +19,7 @@ CREATE TABLE phpbb_attachments (
comment text(65535),
extension varchar(100),
mimetype varchar(100),
- filesize int(20) NOT NULL,
+ filesize int(20) NOT NULL DEFAULT '0',
filetime int(11) NOT NULL DEFAULT '0',
thumbnail tinyint(1) NOT NULL DEFAULT '0'
);
From c125ae12761e99a0f11703bbbec0defb29ad90c4 Mon Sep 17 00:00:00 2001
From: David M
Date: Tue, 20 Jun 2006 00:21:16 +0000
Subject: [PATCH 012/193] oops?
git-svn-id: file:///svn/phpbb/trunk@6106 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/includes/acp/acp_database.php | 24 ++++++++++++------------
phpBB/includes/message_parser.php | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index ed6f5e0d7b..fbe4f78aca 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -23,7 +23,7 @@ class acp_database
$user->add_lang('acp/database');
$this->tpl_name = 'acp_database';
- $this->page_title = 'ACP_DATABasE';
+ $this->page_title = 'ACP_DATABASE';
$action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false;
@@ -42,16 +42,16 @@ class acp_database
$type = request_var('type', '');
$table = request_var('table', array(''));
$format = request_var('method', '');
- $WHERE = request_var('WHERE', '');
+ $where = request_var('WHERE', '');
$store = $download = $structure = $schema_data = false;
- if ($WHERE == 'store_and_download' || $WHERE == 'store')
+ if ($where == 'store_and_download' || $where == 'store')
{
$store = true;
}
- if ($WHERE == 'store_and_download' || $WHERE == 'download')
+ if ($where == 'store_and_download' || $where == 'download')
{
$download = true;
}
@@ -418,7 +418,7 @@ class acp_database
$ary_type = $ary_name = array();
- // Grab all of the data FROM current table.
+ // Grab all of the data from current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -539,7 +539,7 @@ class acp_database
$ary_type = $ary_name = array();
$ident_set = false;
- // Grab all of the data FROM current table.
+ // Grab all of the data from current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -650,7 +650,7 @@ class acp_database
$ary_type = $ary_name = array();
$ident_set = false;
- // Grab all of the data FROM current table.
+ // Grab all of the data from current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -761,7 +761,7 @@ class acp_database
$ary_type = $ary_name = array();
- // Grab all of the data FROM current table.
+ // Grab all of the data from current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -846,7 +846,7 @@ class acp_database
case 'oracle':
$ary_type = $ary_name = array();
- // Grab all of the data FROM current table.
+ // Grab all of the data from current table.
$sql = "SELECT *
FROM {$table_name}";
$result = $db->sql_query($sql);
@@ -1020,7 +1020,7 @@ class acp_database
case 'mssql_odbc':
$sql = "SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
- WHERE TABLE_TYPE = 'BasE TABLE'
+ WHERE TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_NAME";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1438,7 +1438,7 @@ class acp_database
$lines = array();
while ($row = $db->sql_fetchrow($result))
{
- // Get the data FROM the table
+ // Get the data from the table
$sql_get_default = "SELECT pg_get_expr(d.adbin, d.adrelid) as rowdefault
FROM pg_attrdef d, pg_class c
WHERE (c.relname = '" . $db->sql_escape($table_name) . "')
@@ -1807,7 +1807,7 @@ class acp_database
$sql_data .= "\nCREATE GENERATOR " . $gen_name . ";;";
$sql_data .= "\nSET GENERATOR " . $gen_name . " TO 0;;\n";
$sql_data .= "\nCREATE TRIGGER {$row['dname']} FOR $table_name";
- $sql_data .= "\nBEFORE INSERT\nas\nBEGIN";
+ $sql_data .= "\nBEFORE INSERT\nAS\nBEGIN";
$sql_data .= "\n NEW.{$row['fname']} = GEN_ID(" . $gen_name . ", 1);";
$sql_data .= "\nEND;;\n";
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index a0dcd821fd..a4d003c3a2 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -97,7 +97,7 @@ class bbcode_firstpass extends bbcode
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](https?://)([a-z0-9\-\.,\?!%\*_:;~\\&$@/=\+]+)\[/img\]#ie' => "\$this->bbcode_img('\$1\$2')")),
'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?[1-2]?[0-9])\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
- 'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
+ 'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9A-Fa-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
'u' => array('bbcode_id' => 7, 'regexp' => array('#\[u\](.*?)\[/u\]#ise' => "\$this->bbcode_underline('\$1')")),
'list' => array('bbcode_id' => 9, 'regexp' => array('#\[list(=[a-z|0-9|(?:disc|circle|square))]+)?\].*\[/list\]#ise' => "\$this->bbcode_parse_list('\$0')")),
'email' => array('bbcode_id' => 10, 'regexp' => array('#\[email=?(.*?)?\](.*?)\[/email\]#ise' => "\$this->validate_email('\$1', '\$2')")),
From 4448249a4433c9047b886efe2ec06dce6c4276f8 Mon Sep 17 00:00:00 2001
From: Nils Adermann
Date: Tue, 20 Jun 2006 19:00:30 +0000
Subject: [PATCH 013/193] - correctly display subcategories - use
L_TRANSLATION_INFO [Bug #2357] - always begin with ACL_UNSET in permission
trace - allow copy permissions when editing a forum - default to parent forum
for copying permissions - no duplication of the breadcrumps on registration
[Bug #2307]
git-svn-id: file:///svn/phpbb/trunk@6107 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/adm/style/acp_forums.html | 10 ++++-----
phpBB/adm/style/overall_footer.html | 3 ++-
phpBB/adm/style/simple_footer.html | 1 +
phpBB/includes/acp/acp_forums.php | 21 +++++++++++++++----
phpBB/includes/acp/acp_permissions.php | 2 +-
phpBB/includes/functions_display.php | 4 ++--
phpBB/includes/ucp/ucp_remind.php | 2 +-
phpBB/language/en/acp/forums.php | 3 ++-
phpBB/language/en/common.php | 2 ++
.../subSilver/template/overall_footer.html | 4 ++--
.../subSilver/template/ucp_register.html | 6 ------
.../template/viewforum_subforum.html | 4 ++--
12 files changed, 36 insertions(+), 26 deletions(-)
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index bf4434d972..e596ce73e7 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -100,12 +100,10 @@
{L_FORUM_STYLE}:
{L_DEFAULT_STYLE} {S_STYLES_OPTIONS}
-
-
- {L_COPY_PERMISSIONS}: {L_COPY_PERMISSIONS_EXPLAIN}
- {L_NO_PERMISSIONS} {S_FORUM_OPTIONS}
-
-
+
+ {L_COPY_PERMISSIONS}: {L_COPY_PERMISSIONS_EXPLAIN}
+ {L_NO_PERMISSIONS} {S_FORUM_OPTIONS}
+
style="display: none;">
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 1ca5c4304e..44ff7ccd6a 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -19,8 +19,9 @@