From fdd04eef49198ea40e0977431c6f490bfeb34f9f Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 2 Sep 2010 20:15:33 +0200 Subject: [PATCH 1/6] [ticket/9800] Update tracker URL in docs/README.html PHPBB3-9800 --- phpBB/docs/README.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 3510bc448e..bb88fdc01f 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -242,7 +242,7 @@

The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please DO NOT post bug reports to our forums, they will be locked. In addition please DO NOT use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).

-

http://www.phpbb.com/bugs/

+

http://tracker.phpbb.com/

While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:

From bb191a1d696994c1d27bbd0457457cf538dff7ee Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 2 Sep 2010 19:38:34 +0200 Subject: [PATCH 2/6] [ticket/8944] Add index length to CREATE INDEX for MySQL4 in database_update Fixes following SQL error when updating the database to 3.0.6. BLOB column 'post_username' used in key specification without a key length PHPBB3-8944 --- phpBB/install/database_update.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index fec09f89db..019469b061 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -880,7 +880,7 @@ function database_update_info() 'pm_id' => array('pm_id'), ), POSTS_TABLE => array( - 'post_username' => array('post_username'), + 'post_username' => array('post_username:255'), ), ), ), @@ -2141,7 +2141,7 @@ class updater_db_tools * drop_columns: Removing/Dropping columns * add_primary_keys: adding primary keys * add_unique_index: adding an unique index - * add_index: adding an index + * add_index: adding an index (can be column:index_size if you need to provide size) * * The values are in this format: * {TABLE NAME} => array( @@ -3520,6 +3520,12 @@ class updater_db_tools { $statements = array(); + // remove index length unless MySQL4 + if ('mysql_40' != $this->sql_layer) + { + $column = preg_replace('#:.*$#', '', $column); + } + switch ($this->sql_layer) { case 'firebird': @@ -3530,6 +3536,16 @@ class updater_db_tools break; case 'mysql_40': + // add index size to definition as required by MySQL4 + foreach ($column as $i => $col) + { + if (false !== strpos($col, ':')) + { + list($col, $index_size) = explode(':', $col); + $column[$i] = "$col($index_size)"; + } + } + // no break case 'mysql_41': $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; break; From 58bdd91d616c7c9117c22722bbd93f4c58d5bacf Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 3 Sep 2010 22:38:58 +0200 Subject: [PATCH 3/6] [ticket/9039] Make mssqlnative.php non-executable PHPBB3-9039 --- phpBB/includes/db/mssqlnative.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 phpBB/includes/db/mssqlnative.php diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php old mode 100755 new mode 100644 From e7b86871f077bb0d9ad819a6405607232fdd078f Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 5 Sep 2010 03:14:27 +0200 Subject: [PATCH 4/6] [ticket/8944] Patch db_tools to support index length for MySQL4 --- phpBB/includes/db/db_tools.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php index 819ef69c96..f4b181c6ad 100644 --- a/phpBB/includes/db/db_tools.php +++ b/phpBB/includes/db/db_tools.php @@ -611,7 +611,7 @@ class phpbb_db_tools * drop_columns: Removing/Dropping columns * add_primary_keys: adding primary keys * add_unique_index: adding an unique index - * add_index: adding an index + * add_index: adding an index (can be column:index_size if you need to provide size) * * The values are in this format: * {TABLE NAME} => array( @@ -1804,6 +1804,12 @@ class phpbb_db_tools { $statements = array(); + // remove index length unless MySQL4 + if ('mysql_40' != $this->sql_layer) + { + $column = preg_replace('#:.*$#', '', $column); + } + switch ($this->sql_layer) { case 'firebird': @@ -1814,6 +1820,16 @@ class phpbb_db_tools break; case 'mysql_40': + // add index size to definition as required by MySQL4 + foreach ($column as $i => $col) + { + if (false !== strpos($col, ':')) + { + list($col, $index_size) = explode(':', $col); + $column[$i] = "$col($index_size)"; + } + } + // no break case 'mysql_41': $statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')'; break; From 8ce2f63d73f8f3b5fec220448ca060c43733840f Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 7 Sep 2010 23:35:47 +0100 Subject: [PATCH 5/6] [task/git-tools] Solve dependency on the GNU wc --max-line-length option PHPBB3-9808 --- git-tools/hooks/commit-msg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index d6ad57a38a..91951b05c2 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -55,11 +55,12 @@ quit() fi } -if [ "$(wc --max-line-length "$1" | cut -f1 -d" ")" -gt 80 ] +msg=$(grep -nE '.{81,}' "$1"); + +if [ $? -eq 0 ] then echo "The following lines are greater than 80 characters long:\n" >&2; - - grep -nE '.{81,}' "$1" >&2; + echo $msg >&2; quit $ERR_LENGTH; fi From e08e1e0d9a7c529dbec47705beb2a7384a0e4300 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 7 Sep 2010 23:36:33 +0100 Subject: [PATCH 6/6] [task/git-tools] Change the GNU --lines argument to the POSIX -l Changed to awk which handles the formatting differences between the two versions of wc -- BSD version prefixes the output with spaces, the GNU version does not. PHPBB3-9808 --- git-tools/hooks/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-tools/hooks/commit-msg b/git-tools/hooks/commit-msg index 91951b05c2..a6777ff9c9 100755 --- a/git-tools/hooks/commit-msg +++ b/git-tools/hooks/commit-msg @@ -65,7 +65,7 @@ then quit $ERR_LENGTH; fi -lines=$(wc --lines "$1" | cut -f1 -d" "); +lines=$(wc -l "$1" | awk '{ print $1; }'); expecting=header; in_description=0; in_empty=0;