diff options
35 files changed, 328 insertions, 88 deletions
diff --git a/.gitignore b/.gitignore index d875beb784..4093aeb56d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,16 @@  /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/* diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..d73bbd2a48 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: php +php: +  - 5.2 +  - 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 @@ -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 - [](http://travis-ci.org/phpbb/phpbb3) +develop-olympus - [](http://travis-ci.org/phpbb/phpbb3) +  ## LICENSE  [GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php) diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit index 4d03359773..03babe47cd 100755 --- a/git-tools/hooks/pre-commit +++ b/git-tools/hooks/pre-commit @@ -12,8 +12,17 @@  # ln -s ../../git-tools/hooks/pre-commit \\  #   .git/hooks/pre-commit -# NOTE: this is run through /usr/bin/env -PHP_BIN=php +if [ -z "$PHP_BIN" ] +then +	PHP_BIN=php +fi + +if [ "$(echo -e test)" = test ] +then +	echo_e="echo -e" +else +	echo_e="echo" +fi  # necessary check for initial commit  if git rev-parse --verify HEAD >/dev/null 2>&1 @@ -27,7 +36,7 @@ fi  error=0  errors="" -if ! which $PHP_BIN >/dev/null 2>&1 +if ! which "$PHP_BIN" >/dev/null 2>&1  then  	echo "PHP Syntax check failed:"  	echo "PHP binary does not exist or is not in path: $PHP_BIN" @@ -64,7 +73,13 @@ do  	# check the staged file content for syntax errors  	# using php -l (lint) -	result=$(git cat-file -p $sha | /usr/bin/env $PHP_BIN -l 2>/dev/null) +	# note: if display_errors=stderr in php.ini, +	# parse errors are printed on stderr; otherwise +	# they are printed on stdout. +	# we filter everything other than parse errors +	# with a grep below, therefore it should be safe +	# to combine stdout and stderr in all circumstances +	result=$(git cat-file -p $sha | "$PHP_BIN" -l 2>&1)  	if [ $? -ne 0 ]  	then  		error=1 @@ -76,7 +91,45 @@ unset IFS  if [ $error -eq 1 ]  then -	echo -e "PHP Syntax check failed:"; -	echo -e "$errors" | grep "^Parse error:" +	echo "PHP Syntax check failed:" +	# php "display errors" (display_errors php.ini value) +	# and "log errors" (log_errors php.ini value). +	# these are independent settings - see main/main.c in php source. +	# the "log errors" setting produces output which +	# starts with "PHP Parse error:"; the "display errors" +	# setting produces output starting with "Parse error:". +	# if both are turned on php dumps the parse error twice. +	# therefore here we try to grep for one version and +	# if that yields no results grep for the other version. +	# +	# other fun php facts: +	# +	# 1. in cli, display_errors and log_errors have different +	#    destinations by default. display_errors prints to +	#    standard output and log_errors prints to standard error. +	#    whether these destinations make sense is left +	#    as an exercise for the reader. +	# 2. as mentioned above, with all output turned on +	#    php will print parse errors twice, one time on stdout +	#    and one time on stderr. +	# 3. it is possible to set both display_errors and log_errors +	#    to off. if this is done php will print the text +	#    "Errors parsing <file>" but will not say what +	#    the errors are. useful behavior, this. +	# 4. on my system display_errors defaults to on and +	#    log_errors defaults to off, therefore providing +	#    by default one copy of messages. your mileage may vary. +	# 5. by setting display_errors=stderr and log_errors=on, +	#    both sets of messages will be printed on stderr. +	# 6. php-cgi binary, given display_errors=stderr and +	#    log_errors=on, still prints both sets of messages +	#    on stderr, but formats one set as an html fragment. +	# 7. your entry here? ;) +	$echo_e "$errors" | grep "^Parse error:" +	if [ $? -ne 0 ] +	then +		# match failed +		$echo_e "$errors" | grep "^PHP Parse error:" +	fi  	exit 1  fi diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index bf4dc37044..3c984f8290 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -199,6 +199,7 @@ function adm_page_footer($copyright_html = true)  		'DEBUG_OUTPUT'		=> (defined('DEBUG')) ? $debug_output : '',  		'TRANSLATION_INFO'	=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',  		'S_COPYRIGHT_HTML'	=> $copyright_html, +		'CREDIT_LINE'		=> $user->lang('POWERED_BY', '<a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),  		'VERSION'			=> $config['version'])  	); diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index b48b449597..361d3185fd 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -9,7 +9,7 @@  	<div id="page-footer">  		<!-- IF S_COPYRIGHT_HTML --> -			Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group +			{CREDIT_LINE}  			<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->  		<!-- ENDIF --> diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index ac9c26a690..6395eace6c 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -5,7 +5,7 @@  <div id="page-footer">  	<!-- IF S_COPYRIGHT_HTML --> -		<br />Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group +		<br />{CREDIT_LINE}  		<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->  	<!-- ENDIF --> diff --git a/phpBB/develop/create_search_index.php b/phpBB/develop/create_search_index.php index 28001035f6..c1a7125d61 100644 --- a/phpBB/develop/create_search_index.php +++ b/phpBB/develop/create_search_index.php @@ -36,7 +36,6 @@ $search_errors = array();  $search = new $class_name($search_errors);  $batch_size = isset($argv[2]) ? $argv[2] : 2000; -$time = time();  if (method_exists($search, 'create_index'))  { @@ -68,6 +67,7 @@ else  	while ($post_counter <= $max_post_id)  	{  		$row_count = 0; +		$time = time();  		printf("Processing posts with %d <= post_id <= %d\n",  			$post_counter + 1, diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index c8df21f5a9..e529ae0e5a 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -398,11 +398,11 @@ class acp_main  		// Version check  		$user->add_lang('install'); -		if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.2.0', '<')) +		if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.3.2', '<'))  		{  			$template->assign_vars(array(  				'S_PHP_VERSION_OLD'	=> true, -				'L_PHP_VERSION_OLD'	=> sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=1958605">', '</a>'), +				'L_PHP_VERSION_OLD'	=> sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=2152375">', '</a>'),  			));  		} diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index c20196d019..1c6cdf7832 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -163,7 +163,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for  		$password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;  		$password_new_format = ''; -		set_var($password_new_format, stripslashes($password_old_format), 'string'); +		set_var($password_new_format, stripslashes($password_old_format), 'string', true);  		if ($password == $password_new_format)  		{ diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0320230a7d..ce80dc4a66 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4738,6 +4738,7 @@ function page_footer($run_cron = true)  	$template->assign_vars(array(  		'DEBUG_OUTPUT'			=> (defined('DEBUG')) ? $debug_output : '',  		'TRANSLATION_INFO'		=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', +		'CREDIT_LINE'			=> $user->lang('POWERED_BY', '<a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),  		'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')  	); diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f920be9c4b..68b6199cf5 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -497,7 +497,14 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage  	{  		if ($free_space <= $file->get('filesize'))  		{ -			$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; +			if ($auth->acl_get('a_')) +			{ +				$filedata['error'][] = $user->lang['ATTACH_DISK_FULL']; +			} +			else +			{ +				$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED']; +			}  			$filedata['post_attach'] = false;  			$file->remove(); @@ -1180,36 +1187,32 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id  	$topic_title = ($topic_notification) ? $topic_title : $subject;  	$topic_title = censor_text($topic_title); -	// Get banned User ID's -	$sql = 'SELECT ban_userid -		FROM ' . BANLIST_TABLE . ' -		WHERE ban_userid <> 0 -			AND ban_exclude <> 1'; -	$result = $db->sql_query($sql); - -	$sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id']; -	while ($row = $db->sql_fetchrow($result)) +	// Exclude guests, current user and banned users from notifications +	if (!function_exists('phpbb_get_banned_user_ids'))  	{ -		$sql_ignore_users .= ', ' . (int) $row['ban_userid']; +		include($phpbb_root_path . 'includes/functions_user.' . $phpEx);  	} -	$db->sql_freeresult($result); +	$sql_ignore_users = phpbb_get_banned_user_ids(); +	$sql_ignore_users[ANONYMOUS] = ANONYMOUS; +	$sql_ignore_users[$user->data['user_id']] = $user->data['user_id'];  	$notify_rows = array();  	// -- get forum_userids	|| topic_userids  	$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber  		FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u -		WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . " -			AND w.user_id NOT IN ($sql_ignore_users) -			AND w.notify_status = " . NOTIFY_YES . ' +		WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . ' +			AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . ' +			AND w.notify_status = ' . NOTIFY_YES . '  			AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')  			AND u.user_id = w.user_id';  	$result = $db->sql_query($sql);  	while ($row = $db->sql_fetchrow($result))  	{ -		$notify_rows[$row['user_id']] = array( -			'user_id'		=> $row['user_id'], +		$notify_user_id = (int) $row['user_id']; +		$notify_rows[$notify_user_id] = array( +			'user_id'		=> $notify_user_id,  			'username'		=> $row['username'],  			'user_email'	=> $row['user_email'],  			'user_jabber'	=> $row['user_jabber'], @@ -1219,30 +1222,29 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id  			'method'		=> $row['user_notify_type'],  			'allowed'		=> false  		); + +		// Add users who have been already notified to ignore list +		$sql_ignore_users[$notify_user_id] = $notify_user_id;  	}  	$db->sql_freeresult($result);  	// forum notification is sent to those not already receiving topic notifications  	if ($topic_notification)  	{ -		if (sizeof($notify_rows)) -		{ -			$sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows)); -		} -  		$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber  			FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u  			WHERE fw.forum_id = $forum_id -				AND fw.user_id NOT IN ($sql_ignore_users) -				AND fw.notify_status = " . NOTIFY_YES . ' +				AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . ' +				AND fw.notify_status = ' . NOTIFY_YES . '  				AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')  				AND u.user_id = fw.user_id';  		$result = $db->sql_query($sql);  		while ($row = $db->sql_fetchrow($result))  		{ -			$notify_rows[$row['user_id']] = array( -				'user_id'		=> $row['user_id'], +			$notify_user_id = (int) $row['user_id']; +			$notify_rows[$notify_user_id] = array( +				'user_id'		=> $notify_user_id,  				'username'		=> $row['username'],  				'user_email'	=> $row['user_email'],  				'user_jabber'	=> $row['user_jabber'], @@ -1273,7 +1275,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id  		}  	} -  	// Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)  	$msg_users = $delete_ids = $update_notification = array();  	foreach ($notify_rows as $user_id => $row) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index c40ceb088f..447920cfd5 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1622,6 +1622,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i  	$subject = censor_text($subject); +	// Exclude guests, current user and banned users from notifications  	unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);  	if (!sizeof($recipients)) @@ -1629,18 +1630,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i  		return;  	} -	// Get banned User ID's -	$sql = 'SELECT ban_userid -		FROM ' . BANLIST_TABLE . ' -		WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . ' -			AND ban_exclude = 0'; -	$result = $db->sql_query($sql); - -	while ($row = $db->sql_fetchrow($result)) +	if (!function_exists('phpbb_get_banned_user_ids'))  	{ -		unset($recipients[$row['ban_userid']]); +		include($phpbb_root_path . 'includes/functions_user.' . $phpEx);  	} -	$db->sql_freeresult($result); +	$banned_users = phpbb_get_banned_user_ids(array_keys($recipients)); +	$recipients = array_diff(array_keys($recipients), $banned_users);  	if (!sizeof($recipients))  	{ @@ -1649,7 +1644,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i  	$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber  		FROM ' . USERS_TABLE . ' -		WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients))); +		WHERE ' . $db->sql_in_set('user_id', $recipients);  	$result = $db->sql_query($sql);  	$msg_list_ary = array(); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6b5cca8abb..10fb57ea97 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3587,4 +3587,37 @@ function remove_newly_registered($user_id, $user_data = false)  	return $user_data['group_id'];  } +/** +* Gets user ids of currently banned registered users. +* +* @param array $user_ids Array of users' ids to check for banning, +*						leave empty to get complete list of banned ids +* @return array	Array of banned users' ids if any, empty array otherwise +*/ +function phpbb_get_banned_user_ids($user_ids = array()) +{ +	global $db; + +	$sql_user_ids = (!empty($user_ids)) ? $db->sql_in_set('ban_userid', $user_ids) : 'ban_userid <> 0'; + +	// Get banned User ID's +	// Ignore stale bans which were not wiped yet +	$banned_ids_list = array(); +	$sql = 'SELECT ban_userid +		FROM ' . BANLIST_TABLE . " +		WHERE $sql_user_ids +			AND ban_exclude <> 1 +			AND (ban_end > " . time() . ' +				OR ban_end = 0)'; +	$result = $db->sql_query($sql); +	while ($row = $db->sql_fetchrow($result)) +	{ +		$user_id = (int) $row['ban_userid']; +		$banned_ids_list[$user_id] = $user_id; +	} +	$db->sql_freeresult($result); + +	return $banned_ids_list; +} +  ?>
\ No newline at end of file diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index d7cc1e795a..7d4edaf362 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -50,6 +50,16 @@ function mcp_topic_view($id, $mode, $action)  	$submitted_id_list	= request_var('post_ids', array(0));  	$checked_ids = $post_id_list = request_var('post_id_list', array(0)); +	// Resync Topic? +	if ($action == 'resync') +	{ +		if (!function_exists('mcp_resync_topics')) +		{ +			include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx); +		} +		mcp_resync_topics(array($topic_id)); +	} +  	// Split Topic?  	if ($action == 'split_all' || $action == 'split_beyond')  	{ @@ -320,6 +330,7 @@ function mcp_topic_view($id, $mode, $action)  		'S_CAN_APPROVE'		=> ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,  		'S_CAN_LOCK'		=> ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,  		'S_CAN_REPORT'		=> ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, +		'S_CAN_SYNC'		=> $auth->acl_get('m_', $topic_info['forum_id']),  		'S_REPORT_VIEW'		=> ($action == 'reports') ? true : false,  		'S_MERGE_VIEW'		=> ($action == 'merge') ? true : false,  		'S_SPLIT_VIEW'		=> ($action == 'split') ? true : false, diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index bbe2f127f1..cf216a65db 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -19,7 +19,23 @@ if (!defined('E_DEPRECATED'))  {  	define('E_DEPRECATED', 8192);  } -error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); +$level = E_ALL & ~E_NOTICE & ~E_DEPRECATED; +if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) +{ +	// PHP 5.4 adds E_STRICT to E_ALL. +	// Our utf8 normalizer triggers E_STRICT output on PHP 5.4. +	// Unfortunately it cannot be made E_STRICT-clean while +	// continuing to work on PHP 4. +	// Therefore, in phpBB 3.0.x we disable E_STRICT on PHP 5.4+, +	// while phpBB 3.1 will fix utf8 normalizer. +	// E_STRICT is defined starting with PHP 5 +	if (!defined('E_STRICT')) +	{ +		define('E_STRICT', 2048); +	} +	$level &= ~E_STRICT; +} +error_reporting($level);  /*  * Remove variables created by register_globals from the global scope diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 958b9c7598..e64ba3c371 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -96,10 +96,10 @@ $lang = array_merge($lang, array(  	'ACP_GLOBAL_MODERATORS'			=> 'Global moderators',  	'ACP_GLOBAL_PERMISSIONS'		=> 'Global permissions',  	'ACP_GROUPS'					=> 'Groups', -	'ACP_GROUPS_FORUM_PERMISSIONS'	=> 'Groups’ forum permissions', +	'ACP_GROUPS_FORUM_PERMISSIONS'	=> 'Group forum permissions',  	'ACP_GROUPS_MANAGE'				=> 'Manage groups',  	'ACP_GROUPS_MANAGEMENT'			=> 'Group management', -	'ACP_GROUPS_PERMISSIONS'		=> 'Groups’ permissions', +	'ACP_GROUPS_PERMISSIONS'		=> 'Group permissions',  	'ACP_ICONS'					=> 'Topic icons',  	'ACP_ICONS_SMILIES'			=> 'Topic icons/smilies', @@ -172,9 +172,9 @@ $lang = array_merge($lang, array(  	'ACP_THEMES'				=> 'Themes',  	'ACP_UPDATE'					=> 'Updating', -	'ACP_USERS_FORUM_PERMISSIONS'	=> 'Users’ forum permissions', +	'ACP_USERS_FORUM_PERMISSIONS'	=> 'User forum permissions',  	'ACP_USERS_LOGS'				=> 'User logs', -	'ACP_USERS_PERMISSIONS'			=> 'Users’ permissions', +	'ACP_USERS_PERMISSIONS'			=> 'User permissions',  	'ACP_USER_ATTACH'				=> 'Attachments',  	'ACP_USER_AVATAR'				=> 'Avatar',  	'ACP_USER_FEEDBACK'				=> 'Feedback', diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php index 016be51282..c0396cc247 100644 --- a/phpBB/language/en/acp/permissions.php +++ b/phpBB/language/en/acp/permissions.php @@ -40,10 +40,10 @@ $lang = array_merge($lang, array(  		<p>Permissions are highly granular and grouped into four major sections, which are:</p>  		<h2>Global Permissions</h2> -		<p>These are used to control access on a global level and apply to the entire bulletin board. They are further divided into Users’ Permissions, Groups’ Permissions, Administrators and Global Moderators.</p> +		<p>These are used to control access on a global level and apply to the entire bulletin board. They are further divided into User Permissions, Group Permissions, Administrators and Global Moderators.</p>  		<h2>Forum Based Permissions</h2> -		<p>These are used to control access on a per forum basis. They are further divided into Forum Permissions, Forum Moderators, Users’ Forum Permissions and Groups’ Forum Permissions.</p> +		<p>These are used to control access on a per forum basis. They are further divided into Forum Permissions, Forum Moderators, User Forum Permissions and Group Forum Permissions.</p>  		<h2>Permission Roles</h2>  		<p>These are used to create different sets of permissions for the different permission types later being able to be assigned on a role-based basis. The default roles should cover the administration of bulletin boards large and small, though within each of the four divisions, you can add/edit/delete roles as you see fit.</p> @@ -83,13 +83,13 @@ $lang = array_merge($lang, array(  	'ACP_FORUM_PERMISSIONS_COPY_EXPLAIN'		=> 'Here you can copy forum permissions from one forum to one or more other forums.',  	'ACP_GLOBAL_MODERATORS_EXPLAIN'				=> 'Here you can assign global moderator permissions 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 administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', +	'ACP_GROUPS_PERMISSIONS_EXPLAIN'			=> 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual user permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group 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 its 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 its 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 its 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 its 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 administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', +	'ACP_USERS_PERMISSIONS_EXPLAIN'				=> 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group permissions.',  	'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN'		=> 'Here you can view the effective administrative permissions assigned to the selected users/groups.',  	'ACP_VIEW_GLOBAL_MOD_PERMISSIONS_EXPLAIN'	=> 'Here you can view the global moderative permissions assigned to the selected users/groups.',  	'ACP_VIEW_FORUM_PERMISSIONS_EXPLAIN'		=> 'Here you can view the forum permissions assigned to the selected users/groups and forums.', @@ -225,8 +225,8 @@ $lang = array_merge($lang, array(  	'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', +	'SET_USERS_PERMISSIONS'			=> 'Set user permissions', +	'SET_USERS_FORUM_PERMISSIONS'	=> 'Set user forum permissions',  	'TRACE_DEFAULT'					=> 'By default every permission is <samp>NO</samp> (unset). So the permission can be overwritten by other settings.',  	'TRACE_FOR'						=> 'Trace for', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 005640b7dd..0c387d0f36 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -191,7 +191,7 @@ $lang = array_merge($lang, array(  	'FORM_INVALID'			=> 'The submitted form was invalid. Try submitting again.',  	'FORUM'					=> 'Forum',  	'FORUMS'				=> 'Forums', -	'FORUMS_MARKED'			=> 'The selected forums have been marked read.', +	'FORUMS_MARKED'			=> 'Forums have been marked read.',  	'FORUM_CAT'				=> 'Forum category',  	'FORUM_INDEX'			=> 'Board index',  	'FORUM_LINK'			=> 'Forum link', @@ -450,6 +450,7 @@ $lang = array_merge($lang, array(  	'POST_TIME'				=> 'Post time',  	'POST_TOPIC'			=> 'Post a new topic',  	'POST_UNAPPROVED'		=> 'This post is waiting for approval', +	'POWERED_BY'			=> 'Powered by %s',  	'PREVIEW'				=> 'Preview',  	'PREVIOUS'				=> 'Previous',		// Used in pagination  	'PREVIOUS_STEP'			=> 'Previous', diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index b915a3da19..c500917d58 100644 --- a/phpBB/language/en/help_faq.php +++ b/phpBB/language/en/help_faq.php @@ -333,7 +333,7 @@ $help = array(  	),  	array(  		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, 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.' +		1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added, or you want to report a bug, please visit the phpBB <a href="http://area51.phpbb.com/">Area51</a> website, where you will find resources to do so.'  	),  	array(  		0 => 'Who do I contact about abusive and/or legal matters related to this board?', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index f8d265dddd..24f3204c57 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -42,6 +42,7 @@ $lang = array_merge($lang, array(  	'ADD_POLL'					=> 'Poll creation',  	'ADD_POLL_EXPLAIN'			=> 'If you do not want to add a poll to your topic leave the fields blank.',  	'ALREADY_DELETED'			=> 'Sorry but this message is already deleted.', +	'ATTACH_DISK_FULL'			=> 'There is not enough free disk space to post this attachment.',  	'ATTACH_QUOTA_REACHED'		=> 'Sorry, the board attachment quota has been reached.',  	'ATTACH_SIG'				=> 'Attach a signature (signatures can be altered via the UCP)', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b3c0bae16a..7e510a3368 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -62,11 +62,6 @@ $default_key = 'c';  $sort_key = request_var('sk', $default_key);  $sort_dir = request_var('sd', 'a'); - -// Grab rank information for later -$ranks = $cache->obtain_ranks(); - -  // What do you want to do today? ... oops, I think that line is taken ...  switch ($mode)  { @@ -1221,21 +1216,16 @@ switch ($mode)  			// Misusing the avatar function for displaying group avatars...  			$avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR'); +			// ... same for group rank  			$rank_title = $rank_img = $rank_img_src = '';  			if ($group_row['group_rank'])  			{ -				if (isset($ranks['special'][$group_row['group_rank']])) +				get_user_rank($group_row['group_rank'], false, $rank_title, $rank_img, $rank_img_src); + +				if ($rank_img)  				{ -					$rank_title = $ranks['special'][$group_row['group_rank']]['rank_title']; +					$rank_img .= '<br />';  				} -				$rank_img = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? '<img src="' . $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] . '" alt="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" title="' . $ranks['special'][$group_row['group_rank']]['rank_title'] . '" /><br />' : ''; -				$rank_img_src = (!empty($ranks['special'][$group_row['group_rank']]['rank_image'])) ? $config['ranks_path'] . '/' . $ranks['special'][$group_row['group_rank']]['rank_image'] : ''; -			} -			else -			{ -				$rank_title = ''; -				$rank_img = ''; -				$rank_img_src = '';  			}  			$template->assign_vars(array( @@ -1346,6 +1336,7 @@ switch ($mode)  		if ($mode)  		{  			$params[] = "mode=$mode"; +			$u_first_char_params[] = "mode=$mode";  		}  		$sort_params[] = "mode=$mode"; diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index cfdb54f54b..c16b0ef703 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -219,7 +219,7 @@ function addquote(post_id, username, l_wrote)  	// Get text selection - not only the post content :(  	// IE9 must use the document.selection method but has the *.getSelection so we just force no IE -	if (window.getSelection && !is_ie) +	if (window.getSelection && !is_ie && !window.opera)  	{  		theSelection = window.getSelection().toString();  	} @@ -456,4 +456,4 @@ function getCaretPosition(txtarea)  	}  	return caretPos; -}
\ No newline at end of file +} diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index a4d2a0f600..13b661ef0a 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -1,5 +1,6 @@  <!-- INCLUDE mcp_header.html --> +<div class="tabs-container">  <h2><a href="{U_VIEW_TOPIC}">{L_TOPIC}: {TOPIC_TITLE}</a></h2>  <script type="text/javascript"> @@ -35,6 +36,7 @@ onload_functions.push('subPanels()');  		</li>  	</ul>  </div> +</div>  <form id="mcp" method="post" action="{S_MCP_ACTION}"> @@ -106,7 +108,7 @@ onload_functions.push('subPanels()');  			<div class="inner"><span class="corners-top"><span></span></span>  			<div class="postbody" id="pr{postrow.POST_ID}"> -				<ul class="profile-icons"><li class="info-icon"><a href="{postrow.U_POST_DETAILS}" title="{L_POST_DETAILS}"><span>{L_POST_DETAILS}</span></a></li><li>{L_SELECT}: <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></li></ul> +				<ul class="profile-icons"><li class="info-icon"><a href="{postrow.U_POST_DETAILS}" title="{L_POST_DETAILS}"><span>{L_POST_DETAILS}</span></a></li><li><label for="post_id_list_select_{postrow.POST_ID}">{L_SELECT}: <input type="checkbox" id="post_id_list_select_{postrow.POST_ID}" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></label></li></ul>  				<h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>  				<p class="author"><a href="#pr{postrow.POST_ID}">{postrow.MINI_POST_IMG}</a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></p> @@ -158,6 +160,7 @@ onload_functions.push('subPanels()');  		<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->  		<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF S_MERGE_VIEW --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->  		<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF S_SPLIT_VIEW --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF --> +		<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->  	</select>   	<input class="button1" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" />  	<div><a href="#" onclick="marklist('mcp', 'post', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post', false); return false;">{L_UNMARK_ALL}</a></div> diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index cfec07cff0..2758a7e6cc 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -69,7 +69,7 @@  		<!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}:</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}:</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->  		<!-- IF S_PROFILE_FIELD1 -->  			<!-- NOTE: Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. --> -			<dt>{postrow.PROFILE_FIELD1_NAME}:</dt> <dd>{postrow.PROFILE_FIELD1_VALUE}</dd> +			<dt>{PROFILE_FIELD1_NAME}:</dt> <dd>{PROFILE_FIELD1_VALUE}</dd>  		<!-- ENDIF -->  		</dl>  	</div> diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index b252ff0de9..25b60be6e1 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -19,7 +19,7 @@  		<span class="corners-bottom"><span></span></span></div>  	</div> -	<div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group +	<div class="copyright">{CREDIT_LINE}  		<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->  		<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->  		<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF --> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 9795140c47..cc54c42d18 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -1,6 +1,6 @@  	</div> -	<div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group +	<div class="copyright">{CREDIT_LINE}  		<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->  		<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->  	</div> diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css index aed88831a8..7c7158bd00 100644 --- a/phpBB/styles/prosilver/theme/cp.css +++ b/phpBB/styles/prosilver/theme/cp.css @@ -104,6 +104,22 @@ ul.cplist {  	width: 100%;  } +.tabs-container h2 { +	float: left; +	margin-bottom: 0px; +} + +.tabs-container #minitabs { +	float: right; +	margin-top: 19px; +} + +.tabs-container:after { +	display: block; +	clear: both; +	content: ''; +} +  /* CP tabbed menu  ----------------------------------------*/  #tabs { diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css index 5e11b2122b..0c03020100 100644 --- a/phpBB/styles/prosilver/theme/tweaks.css +++ b/phpBB/styles/prosilver/theme/tweaks.css @@ -94,4 +94,14 @@ dl.icon {  *:first-child+html #site-description p {  	margin-bottom: 1.0em; +} + +/* #minitabs fix for IE */ +.tabs-container { +	zoom: 1; +} + +#minitabs { +	white-space: nowrap; +	*min-width: 50%;  }
\ No newline at end of file diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index 7cc5de9034..151cf53ff1 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -221,7 +221,7 @@ function addquote(post_id, username, l_wrote)  	// Get text selection - not only the post content :(  	// IE9 must use the document.selection method but has the *.getSelection so we just force no IE -	if (window.getSelection && !is_ie) +	if (window.getSelection && !is_ie && !window.opera)  	{  		theSelection = window.getSelection().toString();  	} @@ -459,4 +459,4 @@ function getCaretPosition(txtarea)  	}  	return caretPos; -}
\ No newline at end of file +} diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 13865d26ee..f9f9382ff2 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -135,6 +135,7 @@  		<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->  		<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF ACTION eq 'merge' --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->  		<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF ACTION eq 'split' --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF --> +		<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->  	</select> <input class="btnmain" type="submit" name="mcp_topic_submit" value="{L_SUBMIT}" /></td>  </tr>  </table> diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 5d6b63986f..6cd7a215b0 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -3,7 +3,7 @@  <div id="wrapfooter">  	<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF --> -	<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group +	<span class="copyright">{CREDIT_LINE}  	<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->  	<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>  </div> diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html index 043be16cdb..db95c7952a 100644 --- a/phpBB/styles/subsilver2/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -2,7 +2,7 @@  </div>  <div id="wrapfooter"> -	<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group</span> +	<span class="copyright">{CREDIT_LINE}  </div>  </body> diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml new file mode 100644 index 0000000000..36845a7f71 --- /dev/null +++ b/travis/phpunit-mysql-travis.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit backupGlobals="true" +         backupStaticAttributes="true" +         colors="true" +         convertErrorsToExceptions="true" +         convertNoticesToExceptions="true" +         convertWarningsToExceptions="true" +         processIsolation="false" +         stopOnFailure="false" +         syntaxCheck="true" +         strict="true" +         bootstrap="../tests/bootstrap.php"> +	<testsuites> +		<testsuite name="phpBB Test Suite"> +			<directory suffix="_test.php">../tests/</directory> +		</testsuite> +	</testsuites> + +	<groups> +		<exclude> +			<group>slow</group> +		</exclude> +	</groups> + +	<php> +		<server name="PHPBB_TEST_DBMS" value="mysqli" /> +		<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" /> +		<server name="PHPBB_TEST_DBPORT" value="3306" /> +		<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" /> +		<server name="PHPBB_TEST_DBUSER" value="root" /> +		<server name="PHPBB_TEST_DBPASSWD" value="" /> +		<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/> +	</php> +</phpunit> diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml new file mode 100644 index 0000000000..461a53bcb1 --- /dev/null +++ b/travis/phpunit-postgres-travis.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<phpunit backupGlobals="true" +         backupStaticAttributes="true" +         colors="true" +         convertErrorsToExceptions="true" +         convertNoticesToExceptions="true" +         convertWarningsToExceptions="true" +         processIsolation="false" +         stopOnFailure="false" +         syntaxCheck="true" +		 strict="true" +         bootstrap="../tests/bootstrap.php"> +	<testsuites> +		<testsuite name="phpBB Test Suite"> +			<directory suffix="_test.php">../tests/</directory> +		</testsuite> +	</testsuites> + +	<groups> +		<exclude> +			<group>slow</group> +		</exclude> +	</groups> + +	<php> +		<!-- "Real" test database --> +		<!-- uncomment, otherwise sqlite memory runs --> +		<server name="PHPBB_TEST_DBMS" value="postgres"/> +		<server name="PHPBB_TEST_DBHOST" value="localhost" /> +		<server name="PHPBB_TEST_DBPORT" value="5432" /> +		<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" /> +		<server name="PHPBB_TEST_DBUSER" value="postgres" /> +		<server name="PHPBB_TEST_DBPASSWD" value="" /> +		<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/> +	</php> +</phpunit>  | 
