Skip to content

Commit

Permalink
Merge branch 'prep-release-3.0.11'
Browse files Browse the repository at this point in the history
* prep-release-3.0.11: (279 commits)
  [prep-release-3.0.11] Bumping version number for 3.0.11 final.
  [prep-release-3.0.11] Update Changelog for 3.0.11-RC2 release.
  [prep-release-3.0.11] Bumping version number for 3.0.11-RC2.
  [ticket/10965] Profile data is only grabbed when show_novalue is enabled
  [ticket/10965] Make sure all profile fields are always grabbed on viewtopic
  [ticket/10965] Database update was referring to 3.0.5 instead of 3.0.11-RC1
  [ticket/10965] Introduce a new profile field option to display no value
  [ticket/10667] Fix tests under MySQL 5.5 strict mode (once again)
  [ticket/10950] Fix grammar in comments
  [ticket/10950] Delete PMs for users that have not yet read the pm
  [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
  [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
  [ticket/10950] Remove deleted entries in tests instead of commenting them out
  [ticket/10950] Use database count() and group by instead of doing that in php
  [ticket/10978] Fix typo in prosilver ucp_groups_membership.html
  [ticket/10950] Check $delete_ids to be not empty
  [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
  [ticket/10950] Fix unit tests to reflect desired behaviour
  [ticket/10441] Make CDB linking more consistent
  [ticket/10937] Update documentation to say which comment styles are removed.
  ...
  • Loading branch information
bantu committed Aug 20, 2012
2 parents 2345be3 + 6da0391 commit 7eb16cb
Show file tree
Hide file tree
Showing 220 changed files with 3,235 additions and 1,074 deletions.
6 changes: 6 additions & 0 deletions .gitignore
@@ -1,12 +1,18 @@
*~
/phpunit.xml
/phpBB/cache/*.html
/phpBB/cache/*.php
/phpBB/cache/queue.php.lock
/phpBB/composer.phar
/phpBB/config.php
/phpBB/config_dev.php
/phpBB/config_test.php
/phpBB/ext/*
/phpBB/files/*
/phpBB/images/avatars/gallery/*
/phpBB/images/avatars/upload/*
/phpBB/store/*
/phpBB/vendor
/tests/phpbb_unit_tests.sqlite2
/tests/test_config.php
/tests/tmp/*
27 changes: 27 additions & 0 deletions .travis.yml
@@ -0,0 +1,27 @@
language: php
php:
- 5.2
- 5.3.3
- 5.3
- 5.4

env:
- DB=mysql
- DB=postgres

before_script:
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi"
- phpenv rehash

script:
- phpunit --configuration travis/phpunit-$DB-travis.xml

notifications:
email:
recipients:
- dev-team@phpbb.com
on_success: change
on_failure: change
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -15,6 +15,12 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev
3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
4. Send us a pull request

## AUTOMATED TESTING

We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3)
develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3)

## LICENSE

[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
6 changes: 3 additions & 3 deletions build/build.xml
Expand Up @@ -2,9 +2,9 @@

<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="3.0.10" />
<property name="prevversion" value="3.0.9" />
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.10-RC1, 3.0.10-RC2, 3.0.10-RC3" />
<property name="newversion" value="3.0.11" />
<property name="prevversion" value="3.0.10" />
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1, 3.0.11-RC2" />
<!-- no configuration should be needed beyond this point -->

<property name="oldversions" value="${olderversions}, ${prevversion}" />
Expand Down
2 changes: 1 addition & 1 deletion build/build_changelog.php
Expand Up @@ -4,7 +4,7 @@
*
* @package build
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down
5 changes: 2 additions & 3 deletions build/build_diff.php
Expand Up @@ -3,9 +3,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down Expand Up @@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header)
$html .= "## {$filename['phpbb_filename']}\n";
}
}
$html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
$html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n";
$html .= "############################################################## \n";
$html .= "\n";

Expand Down
3 changes: 1 addition & 2 deletions build/build_helper.php
Expand Up @@ -2,9 +2,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down
3 changes: 1 addition & 2 deletions build/diff_class.php
Expand Up @@ -2,10 +2,9 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org>
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down
3 changes: 1 addition & 2 deletions build/package.php
Expand Up @@ -3,9 +3,8 @@
/**
*
* @package build
* @version $Id$
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

Expand Down
114 changes: 92 additions & 22 deletions git-tools/hooks/commit-msg
Expand Up @@ -11,14 +11,30 @@
#
# ln -s ../../git-tools/hooks/commit-msg \\
# .git/hooks/commit-msg
#
# You can configure whether invalid commit messages abort commits:
#
# git config phpbb.hooks.commit-msg.fatal true (abort)
# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort)
#
# The default is to warn only.
#
# Warning/error messages use color by default if the output is a terminal
# ("output" here is normally standard error when you run git commit).
# To force or disable the use of color:
#
# git config phpbb.hooks.commit-msg.color true (force color output)
# git config phpbb.hooks.commit-msg.color false (disable color output)

config_ns="phpbb.hooks.commit-msg";

if [ "$(git config --bool $config_ns.fatal)" = "false" ]
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
then
fatal=0;
else
fatal=1;
severity=Error;
else
fatal=0;
severity=Warning;
fi

debug_level=$(git config --int $config_ns.debug || echo 0);
Expand Down Expand Up @@ -47,14 +63,68 @@ debug()

quit()
{
if [ $1 -gt 0 ] && [ $1 -ne $ERR_UNKNOWN ] && [ $fatal -eq 0 ]
if [ $1 -eq 0 ] || [ $1 -eq $ERR_UNKNOWN ]
then
# success
exit 0;
elif [ $fatal -eq 0 ]
then
# problems found but fatal is false
complain 'Please run `git commit --amend` and fix the problems mentioned.' 1>&2
exit 0;
else
complain "Aborting commit." 1>&2
exit $1;
fi
}

use_color()
{
if [ -z "$use_color_cached" ]
then
case $(git config --bool $config_ns.color)
in
false)
use_color_cached=1
;;
true)
use_color_cached=0
;;
*)
# tty detection in shell:
# http://hwi.ath.cx/jsh/list/shext/isatty.sh.html
tty 0>/dev/stdout >/dev/null 2>&1
use_color_cached=$?
;;
esac
fi
# return value is the flag inverted -
# if return value is 0, this means use color
return $use_color_cached
}

complain()
{
if use_color
then
# Careful: our argument may include arguments to echo like -n
# ANSI color codes:
# http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html
printf "\033[31m\033[1m"
if [ "$1" = "-n" ]
then
echo "$@"
printf "\033[0m"
else
# This will print one trailing space.
# Not sure how to avoid this at the moment.
echo "$@" $(printf "\033[0m")
fi
else
echo "$@"
fi
}

# Check for empty commit message
if ! grep -qv '^#' "$1"
then
Expand All @@ -70,9 +140,9 @@ msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')

if [ $? -eq 0 ]
then
echo "The following lines are greater than 80 characters long:" >&2;
echo >&2
echo "$msg" >&2;
complain "The following lines are greater than 80 characters long:" >&2;
complain >&2
complain "$msg" >&2;

quit $ERR_LENGTH;
fi
Expand Down Expand Up @@ -126,9 +196,9 @@ do
# Don't be too strict.
# Commits may be temporary, intended to be squashed later.
# Just issue a warning here.
echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
echo "You entered:" 1>&2
echo "$line" 1>&2
complain "$severity: heading should be a sentence beginning with a capital letter." 1>&2
complain "You entered:" 1>&2
complain "$line" 1>&2
fi
# restore exit code
(exit $result)
Expand Down Expand Up @@ -160,7 +230,7 @@ do
echo "$line" | grep -Eq "^#";
;;
*)
echo "Unrecognised token $expect" >&2;
complain "Unrecognised token $expect" >&2;
quit $err;
;;
esac
Expand Down Expand Up @@ -231,7 +301,7 @@ do
expecting="eof";
;;
*)
echo "Unrecognised token $expect" >&2;
complain "Unrecognised token $expect" >&2;
quit 254;
;;
esac
Expand All @@ -245,11 +315,11 @@ do
else
# None of the expected line formats matched
# Guess we'll call it a day here then
echo "Syntax error on line $i:" >&2;
echo ">> $line" >&2;
echo -n "Expecting: " >&2;
echo "$expecting" | sed 's/ /, /g' >&2;
exit $err;
complain "Syntax error on line $i:" >&2;
complain ">> $line" >&2;
complain -n "Expecting: " >&2;
complain "$expecting" | sed 's/ /, /g' >&2;
quit $err;
fi

i=$(( $i + 1 ));
Expand All @@ -258,7 +328,7 @@ done
# If EOF is expected exit cleanly
echo "$expecting" | grep -q "eof" || (
# Unexpected EOF, error
echo "Unexpected EOF encountered" >&2;
complain "Unexpected EOF encountered" >&2;
quit $ERR_EOF;
) && (
# Do post scan checks
Expand All @@ -269,17 +339,17 @@ echo "$expecting" | grep -q "eof" || (

if [ ! -z "$dupes" ]
then
echo "The following tickets are repeated:" >&2;
echo "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
complain "The following tickets are repeated:" >&2;
complain "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
fi
fi
# Check the branch ticket is mentioned, doesn't make sense otherwise
if [ $ticket -gt 0 ]
then
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
echo "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
echo "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
) || exit $?;
fi
Expand Down

0 comments on commit 7eb16cb

Please sign in to comment.