diff options
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | composer.phar | bin | 960311 -> 1038928 bytes | |||
-rw-r--r-- | phpBB/docs/AUTHORS | 3 | ||||
-rw-r--r-- | phpBB/feed.php | 12 | ||||
-rw-r--r-- | phpBB/includes/session.php | 4 | ||||
-rw-r--r-- | phpBB/posting.php | 10 | ||||
-rwxr-xr-x | travis/install-phpunit-5-2.sh | 22 | ||||
-rw-r--r-- | travis/phpunit-mysql-5-2-travis.xml | 44 |
9 files changed, 24 insertions, 83 deletions
diff --git a/.travis.yml b/.travis.yml index 01e2553f3a..bb8f13c400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php php: - - 5.2 - 5.3.3 - 5.3 - 5.4 @@ -17,15 +16,14 @@ before_script: - sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' -a '$DB' = 'mysql' ]; then mysql -e 'SET GLOBAL storage_engine=MyISAM;'; fi" - sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then travis/install-phpunit-5-2.sh; fi" - cd phpBB - - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then php ../composer.phar install --dev --no-interaction --prefer-source; fi" + - php ../composer.phar install --dev --no-interaction --prefer-source - cd .. - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysql' ]; then sudo apt-get update; sudo apt-get install -y parallel libimage-exiftool-perl; fi" script: - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then php -d include_path='.:phpunit' phpunit/phpunit.php --configuration travis/phpunit-$DB-5-2-travis.xml; else phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" + - phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysql' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi" - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysql' ]; then find . -type f -not -path './phpBB/vendor/*' -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' | parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}' || exit 1; fi" @@ -19,9 +19,9 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev 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/phpbb.png?branch=develop)](http://travis-ci.org/phpbb/phpbb) -* develop-ascraeus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-ascraeus)](http://travis-ci.org/phpbb/phpbb) -* develop-olympus [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb) +* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=master)](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version +* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.1.x)](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x +* [![Build Status](https://secure.travis-ci.org/phpbb/phpbb.png?branch=3.0.x)](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x ## LICENSE diff --git a/composer.phar b/composer.phar Binary files differindex 1e9ca731cd..b00eef5a3e 100755 --- a/composer.phar +++ b/composer.phar diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS index a47fd5fa98..ca56fe3b72 100644 --- a/phpBB/docs/AUTHORS +++ b/phpBB/docs/AUTHORS @@ -24,9 +24,10 @@ phpBB Lead Developer: naderman (Nils Adermann) phpBB Developers: bantu (Andreas Fischer) dhruv.goel92 (Dhruv Goel) + Elsensee (Oliver Schramm) marc1706 (Marc Alexander) nickvergessen (Joas Schilling) - nicofuma (Tristan Darricau) + Nicofuma (Tristan Darricau) prototech (Cesar Gallegos) Contributions by: leviatan21 (Gabriel Vazquez) diff --git a/phpBB/feed.php b/phpBB/feed.php index 9816f0f303..7e1a761694 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -464,6 +464,9 @@ class phpbb_feed_base */ var $separator_stats = "\xE2\x80\x94"; // — + /** @var mixed Query result handle */ + var $result; + /** * Constructor */ @@ -617,10 +620,9 @@ class phpbb_feed_base function get_item() { - global $db, $cache; - static $result; + global $db; - if (!isset($result)) + if (!isset($this->result)) { if (!$this->get_sql()) { @@ -629,10 +631,10 @@ class phpbb_feed_base // Query database $sql = $db->sql_build_query('SELECT', $this->sql); - $result = $db->sql_query_limit($sql, $this->num_items); + $this->result = $db->sql_query_limit($sql, $this->num_items); } - return $db->sql_fetchrow($result); + return $db->sql_fetchrow($this->result); } function user_viewprofile($row) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 8b93ab762d..04b15b17d3 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -121,6 +121,8 @@ class session $script_path .= (substr($script_path, -1, 1) == '/') ? '' : '/'; $root_script_path .= (substr($root_script_path, -1, 1) == '/') ? '' : '/'; + $forum_id = (isset($_REQUEST['f']) && $_REQUEST['f'] > 0 && $_REQUEST['f'] < 16777215) ? (int) $_REQUEST['f'] : 0; + $page_array += array( 'page_name' => $page_name, 'page_dir' => $page_dir, @@ -130,7 +132,7 @@ class session 'root_script_path' => str_replace(' ', '%20', htmlspecialchars($root_script_path)), 'page' => $page, - 'forum' => (isset($_REQUEST['f']) && $_REQUEST['f'] > 0) ? (int) $_REQUEST['f'] : 0, + 'forum' => $forum_id, ); return $page_array; diff --git a/phpBB/posting.php b/phpBB/posting.php index 61df10b125..964b0f1f8b 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1222,9 +1222,13 @@ if (!sizeof($error) && $preview) 'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options'])) ); - $parse_poll->message = implode("\n", $post_data['poll_options']); - $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']); - $preview_poll_options = explode('<br />', $parse_poll->message); + $preview_poll_options = array(); + foreach ($post_data['poll_options'] as $poll_option) + { + $parse_poll->message = $poll_option; + $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']); + $preview_poll_options[] = $parse_poll->message; + } unset($parse_poll); foreach ($preview_poll_options as $key => $option) diff --git a/travis/install-phpunit-5-2.sh b/travis/install-phpunit-5-2.sh deleted file mode 100755 index 28f9069960..0000000000 --- a/travis/install-phpunit-5-2.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# @copyright (c) 2015 phpBB Group -# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -# - -# $1 - URL to .tar.gz -download() { - wget -q -O - "$1" | tar xzvf - --strip-components 1 -} - -mkdir phpunit -cd phpunit -download https://github.com/sebastianbergmann/phpunit/archive/3.6.12.tar.gz -download https://github.com/sebastianbergmann/php-file-iterator/archive/1.3.1.tar.gz -download https://github.com/sebastianbergmann/php-code-coverage/archive/1.1.3.tar.gz -download https://github.com/sebastianbergmann/php-token-stream/archive/1.1.3.tar.gz -download https://github.com/sebastianbergmann/php-text-template/archive/1.1.2.tar.gz -download https://github.com/sebastianbergmann/php-timer/archive/1.0.2.tar.gz -download https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.1.1.tar.gz -download https://github.com/sebastianbergmann/dbunit/archive/1.1.2.tar.gz -cd .. diff --git a/travis/phpunit-mysql-5-2-travis.xml b/travis/phpunit-mysql-5-2-travis.xml deleted file mode 100644 index e99f8d6cee..0000000000 --- a/travis/phpunit-mysql-5-2-travis.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?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" - verbose="true" - bootstrap="../tests/bootstrap.php"> - <testsuites> - <testsuite name="phpBB Test Suite"> - <directory suffix="_test.php">../tests/</directory> - <exclude>tests/functional</exclude> - <exclude>tests/lint_test.php</exclude> - </testsuite> - <testsuite name="phpBB Lint Test"> - <file>tests/lint_test.php</file> - </testsuite> - <testsuite name="phpBB Functional Tests"> - <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</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_"/> - <server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" /> - </php> -</phpunit> |