From fbf101d0ff0992b665b71083c2e2bb36292de8f4 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 11 Jun 2014 16:30:57 +0200 Subject: [PATCH 1/4] [ticket/261] Use correct branch for tests and use code and icc sniffer B3P-261 --- .travis.yml | 6 +++--- travis/prepare-phpbb.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e57c61a..1dc3f617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,9 +30,9 @@ matrix: env: global: - EXTNAME="board3/portal" - - SNIFF="0" # Should we run code sniffer on your code? - - IMAGE_ICC="0" # Should we run icc profile sniffer on your images? - - PHPBB_BRANCH="ticket/12483" # - PHPBB_BRANCH="develop-ascraeus" + - SNIFF="1" # Should we run code sniffer on your code? + - IMAGE_ICC="1" # Should we run icc profile sniffer on your images? + - PHPBB_BRANCH="develop-ascraeus" branches: except: diff --git a/travis/prepare-phpbb.sh b/travis/prepare-phpbb.sh index a5782e9c..01770ad6 100755 --- a/travis/prepare-phpbb.sh +++ b/travis/prepare-phpbb.sh @@ -21,4 +21,4 @@ cp -R . ../../tmp cd ../../ # Clone phpBB -git clone --depth=1 "git://github.com/nickvergessen/phpbb.git" "phpBB3" --branch=$BRANCH +git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch=$BRANCH From a11bdf667f06f4831ecb022280736835f5f4ffcd Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 11 Jun 2014 16:31:23 +0200 Subject: [PATCH 2/4] [ticket/261] Require phpBB functions.php in check_file_src_test B3P-261 --- tests/unit/functions/check_file_src_test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/functions/check_file_src_test.php b/tests/unit/functions/check_file_src_test.php index 71471631..ee594937 100644 --- a/tests/unit/functions/check_file_src_test.php +++ b/tests/unit/functions/check_file_src_test.php @@ -9,6 +9,7 @@ require_once(dirname(__FILE__) . '/../../../includes/functions.php'); require_once(dirname(__FILE__) . '/../../../../../../includes/functions_acp.php'); +require_once(dirname(__FILE__) . '/../../../../../../includes/functions.php'); class phpbb_functions_check_file_src_test extends \board3\portal\tests\testframework\database_test_case { From a4b71f01e3e18a341f8c56536b170523c0ccdd70 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 11 Jun 2014 17:56:59 +0200 Subject: [PATCH 3/4] [ticket/261] Properly build birthday list database query This should fix compatibility with sqlite3. B3P-261 --- modules/birthday_list.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/birthday_list.php b/modules/birthday_list.php index 1ed2d10f..36164b78 100644 --- a/modules/birthday_list.php +++ b/modules/birthday_list.php @@ -103,14 +103,22 @@ class birthday_list extends module_base break; } - $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday - FROM ' . USERS_TABLE . ' u - LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) - WHERE (b.ban_id IS NULL + $sql_array = array( + 'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_birthday', + 'FROM' => array(USERS_TABLE => 'u'), + 'LEFT_JOIN' => array( + array( + 'FROM' => array(BANLIST_TABLE => 'b'), + 'ON' => 'u.user_id = b.ban_userid', + ), + ), + 'WHERE' => "(b.ban_id IS NULL OR b.ban_exclude = 1) - AND (u.user_birthday LIKE '" . $this->db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' {$sql_days}) - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') - ORDER BY ' . $order_by; + AND (u.user_birthday " . $this->db->sql_like_expression($this->db->any_char . sprintf('%2d-%2d-', $now['mday'], $now['mon']) . $this->db->any_char) . " {$sql_days}) + AND " . $this->db->sql_in_set('u.user_type', array(USER_NORMAL , USER_FOUNDER)), + 'ORDER BY' => $order_by, + ); + $sql = $this->db->sql_build_query('SELECT', $sql_array); $result = $this->db->sql_query($sql); $today = sprintf('%2d-%2d-', $now['mday'], $now['mon']); From 9423032df75bf70ddd89480a7b2e89bbba9efed7 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 11 Jun 2014 18:23:22 +0200 Subject: [PATCH 4/4] [ticket/261] Remove sqlite3 from allowed failures B3P-261 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1dc3f617..58d1e07d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,6 @@ matrix: env: DB=mysqli allow_failures: - php: hhvm - - env: DB=sqlite3 fast_finish: true env: