diff options
-rw-r--r-- | phpBB/composer.json | 1 | ||||
-rw-r--r-- | phpBB/composer.lock | 162 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 10 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/log/log.php | 18 | ||||
-rw-r--r-- | tests/log/fixtures/full_log.xml | 12 | ||||
-rw-r--r-- | tests/log/function_view_log_test.php | 35 |
7 files changed, 171 insertions, 69 deletions
diff --git a/phpBB/composer.json b/phpBB/composer.json index 2941293e81..f005fff805 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -3,7 +3,6 @@ "You MUST update the clean-vendor-dir target in build/build.xml", "accordingly when adding or upgrading dependencies." ], - "minimum-stability": "beta", "require": { "lusitanian/oauth": "0.2.*", "symfony/config": "2.3.*", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index c0eb7afcbb..ee83dee047 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "cc83663b780856890f787b9b4d6ea474", + "hash": "9b683acbc766a345d90de958db4e7f48", "packages": [ { "name": "lusitanian/oauth", @@ -108,17 +108,17 @@ }, { "name": "symfony/config", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Config", "source": { "type": "git", "url": "https://github.com/symfony/Config.git", - "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0" + "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/65a927c15ca5a911ba2fa277a5457fa8129505b0", - "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0", + "url": "https://api.github.com/repos/symfony/Config/zipball/91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", + "reference": "91faa2d4944d0c8a94d5b73cb7ccfb219aee9d21", "shasum": "" }, "require": { @@ -136,14 +136,16 @@ "Symfony\\Component\\Config\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -152,21 +154,21 @@ ], "description": "Symfony Config Component", "homepage": "http://symfony.com", - "time": "2013-08-06 05:49:23" + "time": "2014-03-31 10:15:50" }, { "name": "symfony/console", - "version": "v2.3.6", + "version": "v2.3.12", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "f880062d56edefb25b36f2defa65aafe65959dc7" + "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7", - "reference": "f880062d56edefb25b36f2defa65aafe65959dc7", + "url": "https://api.github.com/repos/symfony/Console/zipball/df17996d37eb113a5675ca4cc2ac45f4fc057cb7", + "reference": "df17996d37eb113a5675ca4cc2ac45f4fc057cb7", "shasum": "" }, "require": { @@ -196,7 +198,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -205,7 +209,7 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2013-09-25 06:04:15" + "time": "2014-03-01 17:25:29" }, { "name": "symfony/debug", @@ -245,14 +249,16 @@ "Symfony\\Component\\Debug\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -265,17 +271,17 @@ }, { "name": "symfony/dependency-injection", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c" + "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c", - "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/41e9e2078e8edf261c11be478300c8fcddb64e30", + "reference": "41e9e2078e8edf261c11be478300c8fcddb64e30", "shasum": "" }, "require": { @@ -301,14 +307,16 @@ "Symfony\\Component\\DependencyInjection\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -317,21 +325,21 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", - "time": "2013-07-25 17:13:25" + "time": "2014-03-27 18:14:33" }, { "name": "symfony/event-dispatcher", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8" + "reference": "15645237c6ff70e74a28e8836362d82492765055" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8", - "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/15645237c6ff70e74a28e8836362d82492765055", + "reference": "15645237c6ff70e74a28e8836362d82492765055", "shasum": "" }, "require": { @@ -362,7 +370,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -371,7 +381,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2013-07-21 12:12:18" + "time": "2014-02-11 10:29:24" }, { "name": "symfony/filesystem", @@ -402,14 +412,16 @@ "Symfony\\Component\\Filesystem\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -452,14 +464,16 @@ "Symfony/Component/HttpFoundation/Resources/stubs" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -472,17 +486,17 @@ }, { "name": "symfony/http-kernel", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf" + "reference": "48d61b3622ca35dd924b167441a9810ad55906ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf", - "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/48d61b3622ca35dd924b167441a9810ad55906ce", + "reference": "48d61b3622ca35dd924b167441a9810ad55906ce", "shasum": "" }, "require": { @@ -523,14 +537,16 @@ "Symfony\\Component\\HttpKernel\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -539,21 +555,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2013-08-27 08:58:24" + "time": "2014-04-03 05:42:39" }, { "name": "symfony/routing", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143" + "reference": "08afcafd9af22a24a8055669f85d63b863c4711b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143", - "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143", + "url": "https://api.github.com/repos/symfony/Routing/zipball/08afcafd9af22a24a8055669f85d63b863c4711b", + "reference": "08afcafd9af22a24a8055669f85d63b863c4711b", "shasum": "" }, "require": { @@ -581,14 +597,16 @@ "Symfony\\Component\\Routing\\": "" } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -597,21 +615,21 @@ ], "description": "Symfony Routing Component", "homepage": "http://symfony.com", - "time": "2013-08-23 15:14:07" + "time": "2014-03-28 10:34:27" }, { "name": "symfony/yaml", - "version": "v2.3.4", + "version": "v2.3.12", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847" + "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847", - "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3acf34f6993db3d873fa77ac2cb6e595db00b88d", + "reference": "3acf34f6993db3d873fa77ac2cb6e595db00b88d", "shasum": "" }, "require": { @@ -635,7 +653,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -644,7 +664,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2013-08-24 15:26:22" + "time": "2014-03-04 16:04:39" }, { "name": "twig/twig", @@ -743,7 +763,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" } ], "description": "A simple PHP Web Scraper", @@ -1430,16 +1452,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "1.5.0RC4", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43" + "reference": "a76a39b317ce8106abe6264daa505e24e1731860" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/146a9b54e4adeaca0a3ae073e0a8a03570d6cc43", - "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860", + "reference": "a76a39b317ce8106abe6264daa505e24e1731860", "shasum": "" }, "require": { @@ -1496,7 +1518,7 @@ "phpcs", "standards" ], - "time": "2013-09-26 00:14:02" + "time": "2014-02-04 23:49:58" }, { "name": "symfony/browser-kit", @@ -1542,7 +1564,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1589,7 +1613,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1646,7 +1672,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1693,7 +1721,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1740,7 +1770,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1755,7 +1787,7 @@ "aliases": [ ], - "minimum-stability": "beta", + "minimum-stability": "stable", "stability-flags": [ ], diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 69f7c3f162..0cb88cd8ee 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3849,6 +3849,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline) if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_')) { $msg_text = $log_text; + + // If this is defined there already was some output + // So let's not break it + if (defined('IN_DB_UPDATE')) + { + echo '<div class="errorbox">' . $msg_text . '</div>'; + + $db->sql_return_on_error(true); + phpbb_end_update($cache, $config); + } } if ((defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db)) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index bad51e2fe3..6c9eeb6a75 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -169,6 +169,8 @@ header('Content-type: text/html; charset=UTF-8'); <?php +define('IN_DB_UPDATE', true); + /** * @todo firebird/mysql update? */ diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 44fba06d9d..e38950f4c1 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -643,9 +643,23 @@ class log implements \phpbb\log\log_interface $operations = array(); foreach ($this->user->lang as $key => $value) { - if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value)) + if (substr($key, 0, 4) == 'LOG_') { - $operations[] = $key; + if (is_array($value)) + { + foreach ($value as $plural_value) + { + if (preg_match($keywords_pattern, $plural_value)) + { + $operations[] = $key; + break; + } + } + } + else if (preg_match($keywords_pattern, $value)) + { + $operations[] = $key; + } } } diff --git a/tests/log/fixtures/full_log.xml b/tests/log/fixtures/full_log.xml index a10c224e0e..4e5538d5a9 100644 --- a/tests/log/fixtures/full_log.xml +++ b/tests/log/fixtures/full_log.xml @@ -119,6 +119,18 @@ <value>LOG_USER</value> <value>a:1:{i:0;s:5:"guest";}</value> </row> + <row> + <value>10</value> + <value>3</value> + <value>1</value> + <value>0</value> + <value>0</value> + <value>0</value> + <value>127.0.0.1</value> + <value>1</value> + <value>LOG_SINGULAR_PLURAL</value> + <value>a:1:{i:0;i:2;}</value> + </row> </table> <table name="phpbb_users"> <column>user_id</column> diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php index 2ddf7522f4..2f64459062 100644 --- a/tests/log/function_view_log_test.php +++ b/tests/log/function_view_log_test.php @@ -206,6 +206,25 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case 'viewforum' => '', 'action' => 'LOG_USER guest', ), + 10 => array( + 'id' => 10, + + 'reportee_id' => 0, + 'reportee_username' => '', + 'reportee_username_full'=> '', + + 'user_id' => 1, + 'username' => 'Anonymous', + 'username_full' => 'Anonymous', + + 'ip' => '127.0.0.1', + 'time' => 1, + 'forum_id' => 0, + 'topic_id' => 0, + + 'viewforum' => '', + 'action' => 'LOG_SINGULAR_PLURAL 2', + ), ); $test_cases = array( @@ -277,10 +296,20 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case 'user', 0, 5, 0, 0, 0, 2, ), array( - 'expected' => array(8, 9), + 'expected' => array(8, 9, 10), 'expected_returned' => 0, 'users', 0, ), + array( + 'expected' => array(1), + 'expected_returned' => 0, + 'admin', false, 5, 0, 0, 0, 0, 0, 'l.log_id ASC', 'install', + ), + array( + 'expected' => array(10), + 'expected_returned' => 0, + 'user', false, 5, 0, 0, 0, 0, 0, 'l.log_id ASC', 'plural', + ), ); foreach ($test_cases as $case => $case_data) @@ -333,6 +362,10 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case 'LOG_INSTALL_INSTALLED' => 'installed: %s', 'LOG_USER' => 'User<br /> %s', 'LOG_MOD2' => 'Mod2', + 'LOG_SINGULAR_PLURAL' => array( + 1 => 'singular', + 2 => 'plural (%d)', + ), ); $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE); |