From 06caac044479c3ff41f48157f40e8cb00e3d5e84 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:48:21 +0200 Subject: [PATCH 001/157] [ticket/11574] Try to load updated service.yml before the default one PHPBB3-11574 --- phpBB/includes/di/extension/core.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/di/extension/core.php b/phpBB/includes/di/extension/core.php index 9c36ba2fc4..d0a3ebdf99 100644 --- a/phpBB/includes/di/extension/core.php +++ b/phpBB/includes/di/extension/core.php @@ -51,8 +51,16 @@ class phpbb_di_extension_core extends Extension */ public function load(array $config, ContainerBuilder $container) { - $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config'))); - $loader->load('services.yml'); + if (file_exists($this->root_path . 'install/update/new/config/services.yml')) + { + $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config'))); + $loader->load('services.yml'); + } + else if (file_exists($this->root_path . 'config/services.yml')) + { + $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config'))); + $loader->load('services.yml'); + } } /** From 8aca9635f57630b89615d888cc8b92f5ac9b327c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:50:15 +0200 Subject: [PATCH 002/157] [ticket/11574] Find language files in update/new before throwing an error PHPBB3-11574 --- phpBB/includes/user.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index 5530fe3f03..f823e85148 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -590,6 +590,18 @@ class phpbb_user extends phpbb_session $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx; } + if (!file_exists($language_filename)) + { + // File was not found, try to find it in update directory + $orig_language_filename = $language_filename; + $language_filename = str_replace('language/', 'install/update/new/language/', $language_filename); + if (!file_exists($language_filename)) + { + // Not found either, go back to the original file name + $language_filename = $orig_language_filename; + } + } + if (!file_exists($language_filename)) { global $config; From e12fd2fdda76f629060c517aab9812b8565cc696 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:51:55 +0200 Subject: [PATCH 003/157] [ticket/11574] Require new files in database_update.php and add a class loader PHPBB3-11574 --- phpBB/install/database_update.php | 34 +++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index b20ca1e4ea..3341c20058 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -41,6 +41,26 @@ if (!function_exists('phpbb_require_updated')) } } +if (!function_exists('phpbb_include_updated')) +{ + function phpbb_include_updated($path, $optional = false) + { + global $phpbb_root_path; + + $new_path = $phpbb_root_path . 'install/update/new/' . $path; + $old_path = $phpbb_root_path . $path; + + if (file_exists($new_path)) + { + include($new_path); + } + else if (!$optional || file_exists($old_path)) + { + include($old_path); + } + } +} + function phpbb_end_update($cache, $config) { $cache->purge(); @@ -82,19 +102,21 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files -require($phpbb_root_path . 'includes/class_loader.' . $phpEx); +phpbb_require_updated('includes/class_loader.' . $phpEx); -require($phpbb_root_path . 'includes/functions.' . $phpEx); -require($phpbb_root_path . 'includes/functions_content.' . $phpEx); -require($phpbb_root_path . 'includes/functions_container.' . $phpEx); +phpbb_require_updated('includes/functions.' . $phpEx); +phpbb_require_updated('includes/functions_content.' . $phpEx); +phpbb_require_updated('includes/functions_container.' . $phpEx); -require($phpbb_root_path . 'includes/constants.' . $phpEx); -require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); +phpbb_require_updated('includes/constants.' . $phpEx); +phpbb_require_updated('includes/utf/utf_tools.' . $phpEx); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); // Setup class loader first +$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/includes/", $phpEx); +$phpbb_class_loader_new->register(); $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx); $phpbb_class_loader->register(); From f11993c0382d6942a14b37686d2c00dac97a6748 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:54:48 +0200 Subject: [PATCH 004/157] [ticket/11574] Require new files in install/index.php and add a class loader PHPBB3-11574 --- phpBB/install/index.php | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index f745f51974..90cd71d7f3 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -43,6 +43,23 @@ function phpbb_require_updated($path, $optional = false) } } +function phpbb_include_updated($path, $optional = false) +{ + global $phpbb_root_path; + + $new_path = $phpbb_root_path . 'install/update/new/' . $path; + $old_path = $phpbb_root_path . $path; + + if (file_exists($new_path)) + { + include($new_path); + } + else if (!$optional || file_exists($old_path)) + { + include($old_path); + } +} + phpbb_require_updated('includes/startup.' . $phpEx); // Try to override some limits - maybe it helps some... @@ -78,18 +95,20 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include essential scripts -require($phpbb_root_path . 'includes/class_loader.' . $phpEx); +phpbb_require_updated('includes/class_loader.' . $phpEx); -require($phpbb_root_path . 'includes/functions.' . $phpEx); -require($phpbb_root_path . 'includes/functions_container.' . $phpEx); +phpbb_require_updated('includes/functions.' . $phpEx); +phpbb_require_updated('includes/functions_container.' . $phpEx); phpbb_require_updated('includes/functions_content.' . $phpEx, true); -include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); -include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); -require($phpbb_root_path . 'includes/functions_install.' . $phpEx); +phpbb_include_updated('includes/functions_admin.' . $phpEx); +phpbb_include_updated('includes/utf/utf_tools.' . $phpEx); +phpbb_require_updated('includes/functions_install.' . $phpEx); // Setup class loader first +$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/includes/", $phpEx); +$phpbb_class_loader_new->register(); $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx); $phpbb_class_loader->register(); $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx); From deac5f53e3e4131c315c93ce1324899da08d233e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:56:32 +0200 Subject: [PATCH 005/157] [ticket/11574] Load new language files whenever possible PHPBB3-11574 --- phpBB/install/index.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 90cd71d7f3..5494b57610 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -186,11 +186,23 @@ if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_r } // And finally, load the relevant language files -include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx); -include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx); +$load_lang_files = array('common', 'acp/common', 'acp/board', 'install', 'posting'); +$new_path = $phpbb_root_path . 'install/update/new/language/' . $language . '/'; +$old_path = $phpbb_root_path . 'language/' . $language . '/'; + +// NOTE: we can not use "phpbb_include_updated" as the files uses vars which would be required +// to be global while loading. +foreach ($load_lang_files as $lang_file) +{ + if (file_exists($new_path . $lang_file . '.' . $phpEx)) + { + include($new_path . $lang_file . '.' . $phpEx); + } + else + { + include($old_path . $lang_file . '.' . $phpEx); + } +} // usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :( From 3eaeede32176d8831f12529aa2053123293b67ca Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:57:47 +0200 Subject: [PATCH 006/157] [ticket/11574] Use request object rather then request_var function PHPBB3-11574 --- phpBB/install/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 5494b57610..fd6734cbfb 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -127,7 +127,7 @@ $request = $phpbb_container->get('request'); request_var('', 0, false, false, $request); // "dependency injection" for a function // Try and load an appropriate language if required -$language = basename(request_var('language', '')); +$language = basename($request->variable('language', '')); if ($request->header('Accept-Language') && !$language) { @@ -212,8 +212,8 @@ define('CHMOD_READ', 4); define('CHMOD_WRITE', 2); define('CHMOD_EXECUTE', 1); -$mode = request_var('mode', 'overview'); -$sub = request_var('sub', ''); +$mode = $request->variable('mode', 'overview'); +$sub = $request->variable('sub', ''); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); From fcf343733887d7d42a3060c48b1a009ae0520467 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 13:58:36 +0200 Subject: [PATCH 007/157] [ticket/11574] Add correct language parameter to return links PHPBB3-11574 --- phpBB/install/database_update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 3341c20058..de7f4f202e 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -286,7 +286,7 @@ while (!$migrator->finished()) if ((time() - $update_start_time) >= $safe_time_limit) { echo $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '
'; - echo '' . $user->lang['DATABASE_UPDATE_CONTINUE'] . ''; + echo '' . $user->lang['DATABASE_UPDATE_CONTINUE'] . ''; phpbb_end_update($cache, $config); } @@ -302,7 +302,7 @@ echo $user->lang['DATABASE_UPDATE_COMPLETE'] . '
'; if ($request->variable('type', 0)) { echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '

'; - echo '' . $user->lang['CONTINUE_UPDATE_NOW'] . ''; + echo '' . $user->lang['CONTINUE_UPDATE_NOW'] . ''; } else { From 14ff1ef540f71e765ceeaa53b87ad62e4c8d8a40 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 14:44:49 +0200 Subject: [PATCH 008/157] [ticket/11574] Create phpbb_log object before using it. PHPBB3-11574 --- phpBB/install/install_update.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index df9b6c1c7e..90c56bcdcc 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -509,6 +509,9 @@ class install_update extends module if ($all_up_to_date) { + global $phpbb_log, $phpbb_container; + $phpbb_log = $phpbb_container->get('log'); + // Add database update to log add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version); From 129e393b66125ed6b19cbc0a8defbefabf5cd5ca Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 10 Jun 2013 15:10:03 +0200 Subject: [PATCH 009/157] [ticket/11574] Include vendor into update packages PHPBB3-11574 --- build/package.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/package.php b/build/package.php index 48f42b3572..eef6765af6 100755 --- a/build/package.php +++ b/build/package.php @@ -121,6 +121,7 @@ if (sizeof($package->old_packages)) $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir); $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir); + $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $dest_filename_dir); $package->run_command('mkdir ' . $dest_filename_dir . '/install/update'); $package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old'); @@ -256,6 +257,7 @@ $update_info = array( // Copy the install files to their respective locations $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory')); $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory')); + $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('patch_directory')); // Remove some files chdir($package->get('patch_directory') . '/install'); From fe7823b6685975012d3c033b335d7ed5fa9756d7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 6 Jul 2013 19:26:37 +0200 Subject: [PATCH 010/157] [ticket/11574] Use log object instead of old function PHPBB3-11574 --- phpBB/install/install_update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 90c56bcdcc..38d9f66629 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -509,11 +509,11 @@ class install_update extends module if ($all_up_to_date) { - global $phpbb_log, $phpbb_container; + global $phpbb_container; $phpbb_log = $phpbb_container->get('log'); // Add database update to log - add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version); + $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_UPDATE_PHPBB', time(), array($this->current_version, $this->update_to_version)); $db->sql_return_on_error(true); $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); From 3bccd10ccd509ae622cfd23f075fce1d1289888a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 6 Jul 2013 19:35:42 +0200 Subject: [PATCH 011/157] [ticket/11574] Only fall back to install/update versions, when IN_INSTALL ;) PHPBB3-11574 --- phpBB/includes/di/extension/core.php | 3 ++- phpBB/includes/user.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/di/extension/core.php b/phpBB/includes/di/extension/core.php index d0a3ebdf99..4e1159e6fd 100644 --- a/phpBB/includes/di/extension/core.php +++ b/phpBB/includes/di/extension/core.php @@ -51,7 +51,8 @@ class phpbb_di_extension_core extends Extension */ public function load(array $config, ContainerBuilder $container) { - if (file_exists($this->root_path . 'install/update/new/config/services.yml')) + // If we are in install, try to use the updated version, when available + if (defined('IN_INSTALL') && file_exists($this->root_path . 'install/update/new/config/services.yml')) { $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config'))); $loader->load('services.yml'); diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index f823e85148..f8ff3b8b13 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -590,14 +590,15 @@ class phpbb_user extends phpbb_session $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx; } - if (!file_exists($language_filename)) + if (defined('IN_INSTALL')) { - // File was not found, try to find it in update directory + // If we are in install, try to use the updated version, when available $orig_language_filename = $language_filename; $language_filename = str_replace('language/', 'install/update/new/language/', $language_filename); + if (!file_exists($language_filename)) { - // Not found either, go back to the original file name + // Not found, go back to the original file name $language_filename = $orig_language_filename; } } From 6c52fae750ed2955b8c0d737e72f101f4d6f2e3a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 11 Jul 2013 15:55:04 +0200 Subject: [PATCH 012/157] [ticket/11574] Include normalizer so it loads form the correct directory PHPBB3-11574 --- phpBB/install/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index fd6734cbfb..4051a5a08b 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -103,6 +103,7 @@ phpbb_require_updated('includes/functions_container.' . $phpEx); phpbb_require_updated('includes/functions_content.' . $phpEx, true); phpbb_include_updated('includes/functions_admin.' . $phpEx); +phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx); phpbb_include_updated('includes/utf/utf_tools.' . $phpEx); phpbb_require_updated('includes/functions_install.' . $phpEx); From 1dea0286a48b4bac6702aad673e13e281690adfb Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 12 Jul 2013 15:40:49 -0400 Subject: [PATCH 013/157] [ticket/11574] Use alternate DI config file for updater PHPBB3-11574 --- phpBB/includes/di/extension/core.php | 23 +++++++---------------- phpBB/includes/functions_container.php | 7 +++++-- phpBB/install/database_update.php | 5 ++++- tests/di/create_container_test.php | 6 +++--- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/phpBB/includes/di/extension/core.php b/phpBB/includes/di/extension/core.php index 4e1159e6fd..9d59a24b7e 100644 --- a/phpBB/includes/di/extension/core.php +++ b/phpBB/includes/di/extension/core.php @@ -26,19 +26,19 @@ use Symfony\Component\Config\FileLocator; class phpbb_di_extension_core extends Extension { /** - * phpBB Root path + * Config path * @var string */ - protected $root_path; + protected $config_path; /** * Constructor * - * @param string $root_path Root path + * @param string $config_path Config path */ - public function __construct($root_path) + public function __construct($config_path) { - $this->root_path = $root_path; + $this->config_path = $config_path; } /** @@ -51,17 +51,8 @@ class phpbb_di_extension_core extends Extension */ public function load(array $config, ContainerBuilder $container) { - // If we are in install, try to use the updated version, when available - if (defined('IN_INSTALL') && file_exists($this->root_path . 'install/update/new/config/services.yml')) - { - $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config'))); - $loader->load('services.yml'); - } - else if (file_exists($this->root_path . 'config/services.yml')) - { - $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config'))); - $loader->load('services.yml'); - } + $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->config_path))); + $loader->load('services.yml'); } /** diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index 106b7d75cc..d302b75350 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -53,7 +53,10 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext) */ function phpbb_create_install_container($phpbb_root_path, $php_ext) { - $core = new phpbb_di_extension_core($phpbb_root_path); + $other_config_path = $phpbb_root_path . 'install/update/new/config'; + $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; + + $core = new phpbb_di_extension_core($config_path); $container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext); $container->setParameter('core.root_path', $phpbb_root_path); @@ -175,7 +178,7 @@ function phpbb_create_default_container($phpbb_root_path, $php_ext) return phpbb_create_dumped_container_unless_debug( array( new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext), - new phpbb_di_extension_core($phpbb_root_path), + new phpbb_di_extension_core($phpbb_root_path . 'config'), ), array( new phpbb_di_pass_collection_pass(), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index de7f4f202e..b0e28958ac 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -121,9 +121,12 @@ $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includ $phpbb_class_loader->register(); // Set up container (must be done here because extensions table may not exist) +$other_config_path = $phpbb_root_path . 'install/update/new/config'; +$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path; + $container_extensions = array( new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), - new phpbb_di_extension_core($phpbb_root_path), + new phpbb_di_extension_core($config_path), ); $container_passes = array( new phpbb_di_pass_collection_pass(), diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php index 6de8803df9..d6a5ec823b 100644 --- a/tests/di/create_container_test.php +++ b/tests/di/create_container_test.php @@ -17,7 +17,7 @@ class phpbb_di_container_test extends phpbb_test_case $phpbb_root_path = __DIR__ . '/../../phpBB/'; $extensions = array( new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'), - new phpbb_di_extension_core($phpbb_root_path), + new phpbb_di_extension_core($phpbb_root_path . 'config'), ); $container = phpbb_create_container($extensions, $phpbb_root_path, 'php'); @@ -29,7 +29,7 @@ class phpbb_di_container_test extends phpbb_test_case $phpbb_root_path = __DIR__ . '/../../phpBB/'; $extensions = array( new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'), - new phpbb_di_extension_core($phpbb_root_path), + new phpbb_di_extension_core($phpbb_root_path . 'config'), ); $container = phpbb_create_install_container($phpbb_root_path, 'php'); @@ -42,7 +42,7 @@ class phpbb_di_container_test extends phpbb_test_case $phpbb_root_path = __DIR__ . '/../../phpBB/'; $extensions = array( new phpbb_di_extension_config(__DIR__ . '/fixtures/config.php'), - new phpbb_di_extension_core($phpbb_root_path), + new phpbb_di_extension_core($phpbb_root_path . 'config'), ); $container = phpbb_create_compiled_container($extensions, array(), $phpbb_root_path, 'php'); From 51ab2c710e91d98bb182dded1e9d5462451151e8 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 12 Jul 2013 16:40:20 -0400 Subject: [PATCH 014/157] [ticket/11574] Make install language filename less crazy PHPBB3-11574 --- phpBB/includes/user.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index f8ff3b8b13..b39438e315 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -590,17 +590,11 @@ class phpbb_user extends phpbb_session $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx; } - if (defined('IN_INSTALL')) + // If we are in install, try to use the updated version, when available + $install_language_filename = str_replace('language/', 'install/update/new/language/', $language_filename); + if (defined('IN_INSTALL') && file_exists($install_language_filename)) { - // If we are in install, try to use the updated version, when available - $orig_language_filename = $language_filename; - $language_filename = str_replace('language/', 'install/update/new/language/', $language_filename); - - if (!file_exists($language_filename)) - { - // Not found, go back to the original file name - $language_filename = $orig_language_filename; - } + $language_filename = $install_language_filename; } if (!file_exists($language_filename)) From 31fed4215067ee39e7396f010a06093fe66352ee Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 12:58:04 +0100 Subject: [PATCH 015/157] [ticket/11656] generate_text_for_display on memberlist.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11656 --- phpBB/memberlist.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 7ecf332720..6156e6a292 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -561,17 +561,8 @@ switch ($mode) if ($member['user_sig']) { - $member['user_sig'] = censor_text($member['user_sig']); - - if ($member['user_sig_bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode(); - $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']); - } - - $member['user_sig'] = bbcode_nl2br($member['user_sig']); - $member['user_sig'] = smiley_text($member['user_sig']); + $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], + $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE || OPTION_FLAG_SMILIES, true); } $poster_avatar = phpbb_get_user_avatar($member); From fca4bc53232e22233711a275e252a8006dd89e9a Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 15:55:37 +0100 Subject: [PATCH 016/157] [ticket/11656] Remove line break in function call sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11656 --- phpBB/memberlist.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 6156e6a292..09b9dab5c1 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -561,8 +561,7 @@ switch ($mode) if ($member['user_sig']) { - $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], - $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE || OPTION_FLAG_SMILIES, true); + $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE || OPTION_FLAG_SMILIES, true); } $poster_avatar = phpbb_get_user_avatar($member); From 402d987ccbeacb494f1147cdee047a6cf1f19f7b Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 15:56:55 +0100 Subject: [PATCH 017/157] [ticket/11656] Wrong bitwise OR sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11656 --- phpBB/memberlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 09b9dab5c1..f8ee82084c 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -561,7 +561,7 @@ switch ($mode) if ($member['user_sig']) { - $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE || OPTION_FLAG_SMILIES, true); + $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES, true); } $poster_avatar = phpbb_get_user_avatar($member); From b4fcdc51e9df126faf5e9aabcbaa50bb33da0bd0 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 13:49:19 +0100 Subject: [PATCH 018/157] [ticket/11638] generate_text_for_display on viewtopic.php lines: 835-843 sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 4dd03202f1..6b789bbb99 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -828,26 +828,15 @@ if (!empty($topic_data['poll_start'])) $poll_total += $poll_option['poll_option_total']; } - if ($poll_info[0]['bbcode_bitfield']) - { - $poll_bbcode = new bbcode(); - } - else - { - $poll_bbcode = false; + $parse_bbcode_flags = OPTION_FLAG_SMILIES; + + if(empty($poll_info[0]['bbcode_bitfield'])){ + $parse_bbcode_flags |= OPTION_FLAG_BBCODE; } for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++) { - $poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']); - - if ($poll_bbcode !== false) - { - $poll_bbcode->bbcode_second_pass($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield']); - } - - $poll_info[$i]['poll_option_text'] = bbcode_nl2br($poll_info[$i]['poll_option_text']); - $poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']); + $poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_bbcode_flags, true); } $topic_data['poll_title'] = censor_text($topic_data['poll_title']); From 97054d81f82123f17cd3680326932a8fd021ffa2 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 13:50:44 +0100 Subject: [PATCH 019/157] [ticket/11638] generate_text_for_display on viewtopic.php lines: 846-854 sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 6b789bbb99..d295b91f43 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -839,17 +839,9 @@ if (!empty($topic_data['poll_start'])) $poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_bbcode_flags, true); } - $topic_data['poll_title'] = censor_text($topic_data['poll_title']); - - if ($poll_bbcode !== false) - { - $poll_bbcode->bbcode_second_pass($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield']); - } - - $topic_data['poll_title'] = bbcode_nl2br($topic_data['poll_title']); - $topic_data['poll_title'] = smiley_text($topic_data['poll_title']); - - unset($poll_bbcode); + $topic_data['poll_title'] = generate_text_for_display($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield'], $parse_bbcode_flags, true); + + unset($parse_bbcode_flags); foreach ($poll_info as $poll_option) { From a58ccdabf30cad5b0373c266fc69368c65cee1a1 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 14:35:22 +0100 Subject: [PATCH 020/157] [ticket/11638] generate_text_for_display on viewtopic.php lines: 1395-1403 sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index d295b91f43..34586b1491 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1380,16 +1380,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // End signature parsing, only if needed if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { - $user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']); - - if ($user_cache[$poster_id]['sig_bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield']); - } - - $user_cache[$poster_id]['sig'] = bbcode_nl2br($user_cache[$poster_id]['sig']); - $user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']); - $user_cache[$poster_id]['sig_parsed'] = true; + $include_bbcode_parse = $user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0; + $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $include_bbcode_parse | OPTION_FLAG_SMILIES, true); } // Parse the message and subject From 713a2ba573ab49d2add2522392b1f91ca3065dea Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 13 Jul 2013 14:35:50 +0100 Subject: [PATCH 021/157] [ticket/11638] generate_text_for_display on viewtopic.php lines: 1403-1417 sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 34586b1491..9274539ab4 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1385,16 +1385,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } // Parse the message and subject - $message = censor_text($row['post_text']); - - // Second parse bbcode here - if ($row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); if (!empty($attachments[$row['post_id']])) { From d6de892ee40579c45259f8c68ba7eef26accc08b Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 13 Jul 2013 16:47:15 -0400 Subject: [PATCH 022/157] [ticket/11574] Fix various path issues in the updater PHPBB3-11574 --- phpBB/includes/functions_container.php | 26 +++++++++++++++++++++++- phpBB/install/database_update.php | 5 ++--- phpBB/install/install_update.php | 28 ++------------------------ 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index d302b75350..923a8f370b 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -53,7 +53,7 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext) */ function phpbb_create_install_container($phpbb_root_path, $php_ext) { - $other_config_path = $phpbb_root_path . 'install/update/new/config'; + $other_config_path = $phpbb_root_path . 'install/update/new/config/'; $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; $core = new phpbb_di_extension_core($config_path); @@ -73,6 +73,30 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext) return $container; } +/** +* Create updater container +* +* @param string $phpbb_root_path Root path +* @param string $php_ext PHP Extension +* @param array $config_path Path to config directory +* @return ContainerBuilder object (compiled) +*/ +function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path) +{ + return phpbb_create_compiled_container( + array( + new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext), + new phpbb_di_extension_core($config_path), + ), + array( + new phpbb_di_pass_collection_pass(), + new phpbb_di_pass_kernel_pass(), + ), + $phpbb_root_path, + $php_ext + ); +} + /** * Create a compiled ContainerBuilder object * diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index b0e28958ac..51ffdd3c88 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -121,8 +121,8 @@ $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includ $phpbb_class_loader->register(); // Set up container (must be done here because extensions table may not exist) -$other_config_path = $phpbb_root_path . 'install/update/new/config'; -$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path; +$other_config_path = $phpbb_root_path . 'install/update/new/config/'; +$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; $container_extensions = array( new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), @@ -130,7 +130,6 @@ $container_extensions = array( ); $container_passes = array( new phpbb_di_pass_collection_pass(), - //new phpbb_di_pass_kernel_pass(), ); $phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 38d9f66629..f9dfaaef50 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -75,7 +75,7 @@ class install_update extends module global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container; // Create a normal container now - $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx); + $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config'); // Writes into global $cache $cache = $phpbb_container->get('cache'); @@ -125,7 +125,7 @@ class install_update extends module $config['default_lang'] = $language; $user->data['user_lang'] = $language; - $user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting')); + $user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting')); // Reset the default_lang $config['default_lang'] = $config_default_lang; @@ -302,30 +302,6 @@ class install_update extends module break; case 'update_db': - - // Make sure the database update is valid for the latest version - $valid = false; - $updates_to_version = ''; - - if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx)) - { - include_once($phpbb_root_path . 'install/database_update.' . $phpEx); - - if ($updates_to_version === $this->update_info['version']['to']) - { - $valid = true; - } - } - - // Should not happen at all - if (!$valid) - { - trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR); - } - - // Just a precaution - $cache->purge(); - // Redirect the user to the database update script with some explanations... $template->assign_vars(array( 'S_DB_UPDATE' => true, From c96f8936c969b3fd441c179cc4ffa8ea75d8f901 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 13 Jul 2013 18:19:21 -0400 Subject: [PATCH 023/157] [ticket/11574] Fix table prefix in database updater PHPBB3-11574 --- phpBB/install/database_update.php | 3 ++- phpBB/install/index.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 51ffdd3c88..5f2d46c7ad 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -25,7 +25,7 @@ if (!function_exists('phpbb_require_updated')) { function phpbb_require_updated($path, $optional = false) { - global $phpbb_root_path; + global $phpbb_root_path, $table_prefix; $new_path = $phpbb_root_path . 'install/update/new/' . $path; $old_path = $phpbb_root_path . $path; @@ -108,6 +108,7 @@ phpbb_require_updated('includes/functions.' . $phpEx); phpbb_require_updated('includes/functions_content.' . $phpEx); phpbb_require_updated('includes/functions_container.' . $phpEx); +require($phpbb_root_path . 'config.' . $phpEx); phpbb_require_updated('includes/constants.' . $phpEx); phpbb_require_updated('includes/utf/utf_tools.' . $phpEx); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 4051a5a08b..055fb72d7c 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -28,7 +28,7 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0) function phpbb_require_updated($path, $optional = false) { - global $phpbb_root_path; + global $phpbb_root_path, $table_prefix; $new_path = $phpbb_root_path . 'install/update/new/' . $path; $old_path = $phpbb_root_path . $path; From e6e2a50062eca8b640822b8f616ea4bb23b23566 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 14 Jul 2013 01:28:49 -0400 Subject: [PATCH 024/157] [ticket/11574] Add trailing slash for consistency PHPBB3-11574 --- phpBB/includes/functions_container.php | 2 +- phpBB/install/database_update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index 923a8f370b..e22fa9919a 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -54,7 +54,7 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext) function phpbb_create_install_container($phpbb_root_path, $php_ext) { $other_config_path = $phpbb_root_path . 'install/update/new/config/'; - $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; + $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; $core = new phpbb_di_extension_core($config_path); $container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 5f2d46c7ad..e0ecc242e1 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -123,7 +123,7 @@ $phpbb_class_loader->register(); // Set up container (must be done here because extensions table may not exist) $other_config_path = $phpbb_root_path . 'install/update/new/config/'; -$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config'; +$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; $container_extensions = array( new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), From 81e0859041cd181c142a87a5fc78640f92aa5ce0 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 14 Jul 2013 12:11:57 -0400 Subject: [PATCH 025/157] [ticket/11688] Purge TWIG cache Purge directories Replace opendir() with DirectoryIterator PHPBB3-11688 --- phpBB/phpbb/cache/driver/file.php | 67 +++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index 85decbe3e8..7f8c646a11 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -205,28 +205,36 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base function purge() { // Purge all phpbb cache files - $dir = @opendir($this->cache_dir); - - if (!$dir) + try + { + $iterator = new DirectoryIterator($this->cache_dir); + } + catch (Exception $e) { return; } - while (($entry = readdir($dir)) !== false) + foreach ($iterator as $fileInfo) { - if (strpos($entry, 'container_') !== 0 && - strpos($entry, 'url_matcher') !== 0 && - strpos($entry, 'sql_') !== 0 && - strpos($entry, 'data_') !== 0 && - strpos($entry, 'ctpl_') !== 0 && - strpos($entry, 'tpl_') !== 0) + if ($fileInfo->isDot()) { continue; } - - $this->remove_file($this->cache_dir . $entry); + $filename = $fileInfo->getFilename(); + if ($fileInfo->isDir()) + { + $this->purge_dir($fileInfo->getPathname()); + } + elseif (strpos($filename, 'container_') === 0 || + strpos($filename, 'url_matcher') === 0 || + strpos($filename, 'sql_') === 0 || + strpos($filename, 'data_') === 0 || + strpos($filename, 'ctpl_') === 0 || + strpos($filename, 'tpl_') === 0) + { + $this->remove_file($fileInfo->getPathname()); + } } - closedir($dir); unset($this->vars); unset($this->var_expires); @@ -241,6 +249,39 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base $this->is_modified = false; } + /** + * Remove directory + */ + protected function purge_dir($dir) + { + try + { + $iterator = new DirectoryIterator($dir); + } + catch (Exception $e) + { + return; + } + + foreach ($iterator as $fileInfo) + { + if ($fileInfo->isDot()) + { + continue; + } + if ($fileInfo->isDir()) + { + $this->purge_dir($fileInfo->getPathname()); + } + else + { + $this->remove_file($fileInfo->getPathname()); + } + } + + @rmdir($dir); + } + /** * Destroy cache data */ From a68aed51190e10535d364db056de97098cd56019 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 14 Jul 2013 13:20:41 -0400 Subject: [PATCH 026/157] [ticket/11688] tpl_ files are no longer used Remove tpl_ and ctpl_ from cache->purge() because those prefixes are no longer used. PHPBB3-11688 --- phpBB/phpbb/cache/driver/file.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index 7f8c646a11..19596f5205 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -228,9 +228,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base elseif (strpos($filename, 'container_') === 0 || strpos($filename, 'url_matcher') === 0 || strpos($filename, 'sql_') === 0 || - strpos($filename, 'data_') === 0 || - strpos($filename, 'ctpl_') === 0 || - strpos($filename, 'tpl_') === 0) + strpos($filename, 'data_') === 0) { $this->remove_file($fileInfo->getPathname()); } From 8928240dc3fefd42d8e98132451e2de92ff7cbec Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 14 Jul 2013 15:40:09 -0400 Subject: [PATCH 027/157] [ticket/11574] Fix more issues in the updater * Stupid mistake in phpbb_create_update_container * Do not bootstrap extensions in installer/updater * Fix template lookup in installer/updater * Do not attempt to delete posts from bots The latter is a really fun problem. Since deleting posts now depends on a new db column that does not exist yet, we cannot call delete_post from a migration, ever. By using retain, we can hack around the issue for now. PHPBB3-11574 --- phpBB/includes/functions_container.php | 12 ++++++------ phpBB/install/index.php | 6 +++++- phpBB/install/install_update.php | 12 ------------ phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php index 5c6bd6dd8a..7cbfa17a0e 100644 --- a/phpBB/includes/functions_container.php +++ b/phpBB/includes/functions_container.php @@ -148,9 +148,11 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext) */ function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path) { + $config_file = $phpbb_root_path . 'config.' . $php_ext; return phpbb_create_compiled_container( + $config_file, array( - new phpbb_di_extension_config($phpbb_root_path . 'config.' . $php_ext), + new phpbb_di_extension_config($config_file), new phpbb_di_extension_core($config_path), ), array( @@ -173,11 +175,6 @@ function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path) */ function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext) { - $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path); - - // Now pass the enabled extension paths into the ext compiler extension - $extensions[] = new phpbb_di_extension_ext($installed_exts); - // Create the final container to be compiled and cached $container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext); @@ -258,11 +255,14 @@ function phpbb_create_dumped_container_unless_debug($config_file, array $extensi function phpbb_create_default_container($phpbb_root_path, $php_ext) { $config_file = $phpbb_root_path . 'config.' . $php_ext; + $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path); + return phpbb_create_dumped_container_unless_debug( $config_file, array( new phpbb_di_extension_config($config_file), new phpbb_di_extension_core($phpbb_root_path . 'config'), + new phpbb_di_extension_ext($installed_exts), ), array( new phpbb_di_pass_collection_pass(), diff --git a/phpBB/install/index.php b/phpBB/install/index.php index ada1f43905..fe61c53558 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -249,7 +249,11 @@ $phpbb_style_path_provider = new phpbb_style_path_provider(); $template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context()); $phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_style->set_ext_dir_prefix('adm/'); -$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), ''); + +$paths = array($phpbb_admin_path . 'style', $phpbb_root_path . 'install/update/new/adm/style'); +$paths = array_filter($paths, 'is_dir'); +$phpbb_style->set_custom_style('admin', $paths, array(), ''); + $template->assign_var('T_ASSETS_PATH', '../assets'); $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index f9dfaaef50..478cc9f76f 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -222,12 +222,6 @@ class install_update extends module if ($this->test_update === false) { - // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present - if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files'])) - { - $this->tpl_name = '../../install/update/new/adm/style/install_update'; - } - // What about the language file? Got it updated? if (in_array('language/en/install.' . $phpEx, $this->update_info['files'])) { @@ -1068,12 +1062,6 @@ class install_update extends module $this->tpl_name = 'install_update_diff'; - // Got the diff template itself updated? If so, we are able to directly use it - if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files'])) - { - $this->tpl_name = '../../install/update/new/adm/style/install_update_diff'; - } - $this->page_title = 'VIEWING_FILE_DIFF'; $status = request_var('status', ''); diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php index 6a31a51201..a89a409dfd 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php @@ -108,7 +108,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration WHERE user_id = $bot_user_id"; $this->sql_query($sql); - user_delete('remove', $bot_user_id); + user_delete('retain', $bot_user_id); } else { From f96f2a9e23b41106c6a8ed71ad3538141c648c2f Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 15 Jul 2013 20:06:54 +0100 Subject: [PATCH 028/157] [ticket/11639] generate_text_for_display on functions_posting.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index b9b518ad32..d277ef06a3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1104,14 +1104,12 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $decoded_message = bbcode_nl2br($decoded_message); } - - if ($row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message, !$row['enable_smilies']); + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); + $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); + + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); + + unset($parse_flags); if (!empty($attachments[$row['post_id']])) { From dde9a1fb27e6db3c1b4cd41d8848496a3ef8d363 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 15 Jul 2013 20:08:17 +0100 Subject: [PATCH 029/157] [ticket/11639] Added an useful comment. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d277ef06a3..49fbe92256 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1104,9 +1104,10 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $decoded_message = bbcode_nl2br($decoded_message); } + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); - + // Do not censor text because it has already been censored before $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); unset($parse_flags); From 5f19ca6a6f3ad6641954c58c44ef0c94d1609e5a Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 15 Jul 2013 20:09:59 +0100 Subject: [PATCH 030/157] [ticket/11639] Whitespace fixing sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 49fbe92256..ad75ed1079 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1104,12 +1104,12 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $decoded_message = bbcode_nl2br($decoded_message); } - + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); // Do not censor text because it has already been censored before $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); - + unset($parse_flags); if (!empty($attachments[$row['post_id']])) From fc6bed28566590c26fab5845a6b94cf9b795e4da Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 16 Jul 2013 20:25:08 +0100 Subject: [PATCH 031/157] [ticket/11640] generate_text_for_display on functions_privmsgs.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11640 --- phpBB/includes/functions_privmsgs.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 14278a2529..001cf7bba0 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -2018,14 +2018,12 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode $decoded_message = bbcode_nl2br($decoded_message); } - - if ($row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message, !$row['enable_smilies']); + + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); + $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); + + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); + unset($parse_flags); $subject = censor_text($subject); From e1e8d4ed347cb1707ee4cfca8d05e679b575fe0c Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 16 Jul 2013 21:01:47 +0100 Subject: [PATCH 032/157] [ticket/11641] generate_text_for_display on mcp/mcp_pm_reports.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11641 --- phpBB/includes/mcp/mcp_pm_reports.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php index 99ff397a66..dc953aae33 100644 --- a/phpBB/includes/mcp/mcp_pm_reports.php +++ b/phpBB/includes/mcp/mcp_pm_reports.php @@ -115,17 +115,8 @@ class mcp_pm_reports } // Process message, leave it uncensored - $message = $pm_info['message_text']; + $message = generate_text_for_display($pm_info['message_text'], $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield'], ($pm_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); - if ($pm_info['bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode($pm_info['bbcode_bitfield']); - $bbcode->bbcode_second_pass($message, $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); $report['report_text'] = make_clickable(bbcode_nl2br($report['report_text'])); if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download')) From e7bf3abd1ac79fabab7da925e55bd884aee0663d Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 16 Jul 2013 21:15:59 +0100 Subject: [PATCH 033/157] [ticket/11642] generate_text_for_display on mcp/mcp_post.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11642 --- phpBB/includes/mcp/mcp_post.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 520c964228..235b2a44be 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -125,17 +125,7 @@ function mcp_post_details($id, $mode, $action) $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = $post_info['post_text']; - - if ($post_info['bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode($post_info['bbcode_bitfield']); - $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($post_info['message_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From 596e9bb69df2f5d0c07c0b8201cc770bbe5253a0 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 16 Jul 2013 21:20:22 +0100 Subject: [PATCH 034/157] [ticket/11643] generate_text_for_display on mcp/mcp_queue.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11643 --- phpBB/includes/mcp/mcp_queue.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 24afa1f210..14490343c2 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -132,17 +132,7 @@ class mcp_queue $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = $post_info['post_text']; - - if ($post_info['bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode($post_info['bbcode_bitfield']); - $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($post_info['message_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From d183431894b85ca2ebc778ccb8fd52ecf91082fb Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 16 Jul 2013 21:28:06 +0100 Subject: [PATCH 035/157] [ticket/11653] generate_text_for_display on mcp/mcp_topic.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/mcp/mcp_topic.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index e3dd5a6b57..3491f37bcb 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -213,13 +213,7 @@ function mcp_topic_view($id, $mode, $action) $message = $row['post_text']; $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title']; - if ($row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); if (!empty($attachments[$row['post_id']])) { From 16b411616575cdd4023fb42bb77b56e43db735e0 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 18 Jul 2013 16:15:36 +0100 Subject: [PATCH 036/157] [ticket/11654] generate_text_for_display on mcp/mcp_warn.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11654 --- phpBB/includes/mcp/mcp_warn.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 4ef477775d..d0fcd8a77d 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -289,19 +289,7 @@ class mcp_warn // We want to make the message available here as a reminder // Parse the message and subject - $message = censor_text($user_row['post_text']); - - // Second parse bbcode here - if ($user_row['bbcode_bitfield']) - { - include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); - - $bbcode = new bbcode($user_row['bbcode_bitfield']); - $bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']); - } - - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], ($user_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); // Generate the appropriate user information for the user we are looking at if (!function_exists('phpbb_get_user_avatar')) From ef7a7cac6dc3f313960a70462b084fbeaff9d4bd Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Fri, 19 Jul 2013 18:27:25 +0100 Subject: [PATCH 037/157] [ticket/11655] generate_text_for_display on ucp_pm_viewmessage.php sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 28 ++--------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index b7d2dd6821..0a8a3d55ab 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,17 +76,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $message = censor_text($message_row['message_text']); - - // Second parse bbcode here - if ($message_row['bbcode_bitfield']) - { - $bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']); - } - - // Always process smilies after parsing bbcodes - $message = bbcode_nl2br($message); - $message = smiley_text($message); + $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); // Replace naughty words such as farty pants $message_row['message_subject'] = censor_text($message_row['message_subject']); @@ -160,21 +150,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = censor_text($signature); - - if ($user_info['user_sig_bbcode_bitfield']) - { - if ($bbcode === false) - { - include($phpbb_root_path . 'includes/bbcode.' . $phpEx); - $bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']); - } - - $bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']); - } - - $signature = bbcode_nl2br($signature); - $signature = smiley_text($signature); + $signature = generate_text_for_display($signature, $user_info['bbcode_uid'], $user_info['bbcode_bitfield'], ($user_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); From b3ad2fc23f35fce2a888bb8f9c35ece247e0bc09 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:16:10 +0100 Subject: [PATCH 038/157] [ticket/11642] Fixed typo in the variable name. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11642 --- phpBB/includes/mcp/mcp_post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 235b2a44be..e8768957e0 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -125,7 +125,7 @@ function mcp_post_details($id, $mode, $action) $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = generate_text_for_display($post_info['message_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From f1bfbde3f5bdb9191057f28dd623dc2a3a530bf7 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:19:27 +0100 Subject: [PATCH 039/157] [ticket/11643] Fixed typo in the variable name. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11643 --- phpBB/includes/mcp/mcp_queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 14490343c2..2c95dc6a67 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -132,7 +132,7 @@ class mcp_queue $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = generate_text_for_display($post_info['message_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From fc64e6997f9d54362a7fbe2f7a366fb8ba497deb Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:24:31 +0100 Subject: [PATCH 040/157] [ticket/11638] Fixed typo in the variable name. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 9274539ab4..d18478fbfa 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1385,7 +1385,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } // Parse the message and subject - $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); if (!empty($attachments[$row['post_id']])) { From 73414823048cac8c2963b2034ba13daaf60c3fee Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:25:05 +0100 Subject: [PATCH 041/157] [ticket/11638] Fixed not following guidelines for brackets sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index d18478fbfa..de76d1186d 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -830,7 +830,8 @@ if (!empty($topic_data['poll_start'])) $parse_bbcode_flags = OPTION_FLAG_SMILIES; - if(empty($poll_info[0]['bbcode_bitfield'])){ + if(empty($poll_info[0]['bbcode_bitfield'])) + { $parse_bbcode_flags |= OPTION_FLAG_BBCODE; } From 0ef1bcac2b3152bbf389b512fd373987a7d0edce Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:31:08 +0100 Subject: [PATCH 042/157] [ticket/11639] Whitespace fixing sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index ad75ed1079..49a1797321 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1108,7 +1108,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); // Do not censor text because it has already been censored before - $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false); unset($parse_flags); From 67ba959d9b34ff727b77206f4c706b1fbe024cb2 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:35:28 +0100 Subject: [PATCH 043/157] [ticket/11654] first parameter fail sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11654 --- phpBB/includes/mcp/mcp_warn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index d0fcd8a77d..65cf641418 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -289,7 +289,7 @@ class mcp_warn // We want to make the message available here as a reminder // Parse the message and subject - $message = generate_text_for_display($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], ($user_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], ($user_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); // Generate the appropriate user information for the user we are looking at if (!function_exists('phpbb_get_user_avatar')) From 43b172c8aabbfbcc5180a3f3ad5daede45fcc041 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Sat, 20 Jul 2013 16:44:24 +0100 Subject: [PATCH 044/157] [ticket/11655] wrong var names for the uid and for the bitfield sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 0a8a3d55ab..52a28e3552 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -150,7 +150,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = generate_text_for_display($signature, $user_info['bbcode_uid'], $user_info['bbcode_bitfield'], ($user_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); From 580131b5c316925107d1c8bed586b1c6044f4c6e Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 22 Jul 2013 11:16:47 +0100 Subject: [PATCH 045/157] [ticket/11640] removed the unset sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11640 --- phpBB/includes/functions_privmsgs.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 001cf7bba0..15907feedd 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -2023,7 +2023,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); - unset($parse_flags); $subject = censor_text($subject); From 974da6449c2f18f52086bd5ee6d24aafed046e37 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 22 Jul 2013 22:00:27 +0200 Subject: [PATCH 046/157] [ticket/11723] Correctly redirect user to agreement page and let him leave This patch consists of two changes. The first one will make sure that $agree is correctly reset to 0 and the user redirected back to the agreement page after changing the display language. Secondly, by reseting 'change_lang', the user will be able to agree to the terms on the agreement page again. The changed language will still be kept, as this is correctly saved in the 'lang' field that is passed to the ucp_register page. The variable $agree has also been changed to be boolean. It is not used as an integer anywere in the ucp_register file. PHPBB3-11723 --- phpBB/includes/ucp/ucp_register.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 70fbfe46fb..7bc7ac8191 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -38,7 +38,7 @@ class ucp_register include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false; - $agreed = (int) $request->variable('agreed', false); + $agreed = $request->variable('agreed', false); $submit = $request->is_set_post('submit'); $change_lang = request_var('change_lang', ''); $user_lang = request_var('lang', $user->lang_name); @@ -63,7 +63,7 @@ class ucp_register $submit = false; // Setting back agreed to let the user view the agreement in his/her language - $agreed = ($request->variable('change_lang', false)) ? 0 : $agreed; + $agreed = false; } $user->lang_name = $user_lang = $use_lang; @@ -89,7 +89,7 @@ class ucp_register $add_coppa = ($coppa !== false) ? '&coppa=' . $coppa : ''; $s_hidden_fields = array( - 'change_lang' => $change_lang, + 'change_lang' => '', ); // If we change the language, we want to pass on some more possible parameter. From c36699811221b17c563a7525b790e0c6c3ab98e0 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 23 Jul 2013 12:47:18 +0100 Subject: [PATCH 047/157] [ticket/11654] Moved some code to reduce line width. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11654 --- phpBB/includes/mcp/mcp_warn.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 65cf641418..bb21d3d377 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -289,7 +289,8 @@ class mcp_warn // We want to make the message available here as a reminder // Parse the message and subject - $message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], ($user_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = OPTION_FLAG_SMILIES | ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); + $message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], $parse_flags, true); // Generate the appropriate user information for the user we are looking at if (!function_exists('phpbb_get_user_avatar')) From 6b0b0f2a9fdd2e2169534756e9ceb4421125c7ea Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Sun, 14 Jul 2013 12:10:49 -0500 Subject: [PATCH 048/157] [ticket/11701] Loop variables are not passed correctly to events PHPBB3-11701 --- phpBB/phpbb/template/twig/lexer.php | 10 +++++----- phpBB/phpbb/template/twig/twig.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 4f88147542..606ca347ae 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -191,20 +191,20 @@ class phpbb_template_twig_lexer extends Twig_Lexer // Recursive...fix any child nodes $body = $parent_class->fix_begin_tokens($body, $parent_nodes); - // Rename loopname vars (to prevent collisions, loop children are named (loop name)_loop_element) - $body = str_replace($name . '.', $name . '_loop_element.', $body); + // Rename loopname vars + $body = str_replace($name . '.', $name . '.', $body); // Need the parent variable name array_pop($parent_nodes); - $parent = (!empty($parent_nodes)) ? end($parent_nodes) . '_loop_element.' : ''; + $parent = (!empty($parent_nodes)) ? end($parent_nodes) . '.' : ''; if ($subset !== '') { $subset = '|subset(' . $subset . ')'; } - // Turn into a Twig for loop, using (loop name)_loop_element for each child - return "{% for {$name}_loop_element in {$parent}{$name}{$subset} %}{$body}{% endfor %}"; + // Turn into a Twig for loop + return "{% for {$name} in loops.{$parent}{$name}{$subset} %}{$body}{% endfor %}"; }; // Replace correctly, only needs to be done once diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 92a37d1634..6cff1bb8e4 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -429,15 +429,15 @@ class phpbb_template_twig implements phpbb_template $vars = array_merge( $context_vars['.'][0], // To get normal vars - $context_vars, // To get loops array( 'definition' => new phpbb_template_twig_definition(), 'user' => $this->user, + 'loops' => $context_vars, // To get loops ) ); // cleanup - unset($vars['.']); + unset($vars['loops']['.']); return $vars; } From 0d31420ae099b9284c6240bfbda0f03f1be155c1 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Sun, 14 Jul 2013 12:18:44 -0500 Subject: [PATCH 049/157] [ticket/11701] Remove useless str_replace PHPBB3-11701 --- phpBB/phpbb/template/twig/lexer.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 606ca347ae..3c072adff9 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -191,9 +191,6 @@ class phpbb_template_twig_lexer extends Twig_Lexer // Recursive...fix any child nodes $body = $parent_class->fix_begin_tokens($body, $parent_nodes); - // Rename loopname vars - $body = str_replace($name . '.', $name . '.', $body); - // Need the parent variable name array_pop($parent_nodes); $parent = (!empty($parent_nodes)) ? end($parent_nodes) . '.' : ''; From c0b9db1c626c88780b2ee5f5a237561a125c54aa Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Sun, 14 Jul 2013 14:10:11 -0500 Subject: [PATCH 050/157] [ticket/11701] Fix loops var check PHPBB3-11701 --- phpBB/phpbb/template/twig/lexer.php | 8 +++-- tests/template/template_test.php | 32 +++++++++---------- tests/template/templates/include_loop.html | 8 ++--- .../templates/include_loop_define.html | 6 ++-- tests/template/templates/loop.html | 14 ++++---- tests/template/templates/loop_advanced.html | 20 ++++++------ tests/template/templates/loop_size.html | 10 +++--- tests/template/templates/loop_vars.html | 18 +++++------ 8 files changed, 60 insertions(+), 56 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 3c072adff9..4f127bd7e6 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -200,8 +200,9 @@ class phpbb_template_twig_lexer extends Twig_Lexer $subset = '|subset(' . $subset . ')'; } + $parent = ($parent) ?: 'loops.'; // Turn into a Twig for loop - return "{% for {$name} in loops.{$parent}{$name}{$subset} %}{$body}{% endfor %}"; + return "{% for {$name} in {$parent}{$name}{$subset} %}{$body}{% endfor %}"; }; // Replace correctly, only needs to be done once @@ -224,7 +225,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer // Replace $TEST with definition.TEST $inner = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $inner); - // Replace .test with test|length + // Replace .foo with loops.foo|length + $inner = preg_replace('#\s\.([a-zA-Z_0-9]+)#', ' loops.$1|length', $inner); + + // Replace .foo.bar with foo.bar|length $inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+)#', ' $1|length', $inner); return ""; diff --git a/tests/template/template_test.php b/tests/template/template_test.php index dd9ba21c26..0a6b680100 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -93,49 +93,49 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'loop.html', array(), - array('loop' => array(array())), + array('test_loop' => array(array())), array(), "loop\nloop", ), array( 'loop.html', array(), - array('loop' => array(array(), array()), 'loop.block' => array(array())), + array('test_loop' => array(array(), array()), 'test_loop.block' => array(array())), array(), "loop\nloop\nloop\nloop", ), array( 'loop.html', array(), - array('loop' => array(array(), array()), 'loop.block' => array(array()), 'block' => array(array(), array())), + array('test_loop' => array(array(), array()), 'test_loop.block' => array(array()), 'block' => array(array(), array())), array(), "loop\nloop\nloop\nloop\nloop#0-block#0\nloop#0-block#1\nloop#1-block#0\nloop#1-block#1", ), array( 'loop_vars.html', array(), - array('loop' => array(array('VARIABLE' => 'x'))), + array('test_loop' => array(array('VARIABLE' => 'x'))), array(), "first\n0 - a\nx - b\nset\nlast", ), array( 'loop_vars.html', array(), - array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y'))), + array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y'))), array(), "first\n0 - a\nx - b\nset\n1 - a\ny - b\nset\nlast", ), array( 'loop_vars.html', array(), - array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())), + array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())), array(), "first\n0 - a\nx - b\nset\n1 - a\ny - b\nset\nlast\n0 - c\n1 - c\nlast inner", ), array( 'loop_advanced.html', array(), - array('loop' => array(array(), array(), array(), array(), array(), array(), array())), + array('test_loop' => array(array(), array(), array(), array(), array(), array(), array())), array(), "101234561\nx\n101234561\nx\n101234561\nx\n1234561\nx\n1\nx\n101\nx\n234\nx\n10\nx\n561\nx\n561", ), @@ -149,14 +149,14 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'define.html', array(), - array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())), + array('test_loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())), array(), "xyz\nabc\n\$VALUE == 'abc'abc\nbar\nbar\nabc\ntest!@#$%^&*()_-=+{}[]:;\",<.>/?", ), array( 'define_advanced.html', array(), - array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())), + array('test_loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())), array(), "abc\nzxc\ncde\nbcd", ), @@ -200,7 +200,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'include_loop.html', array(), - array('loop' => array(array('NESTED_FILE' => 'include_loop1.html')), 'loop.inner' => array(array('NESTED_FILE' => 'include_loop1.html'), array('NESTED_FILE' => 'include_loop2.html'), array('NESTED_FILE' => 'include_loop3.html'))), + array('test_loop' => array(array('NESTED_FILE' => 'include_loop1.html')), 'test_loop.inner' => array(array('NESTED_FILE' => 'include_loop1.html'), array('NESTED_FILE' => 'include_loop2.html'), array('NESTED_FILE' => 'include_loop3.html'))), array(), "1\n_1\n_02\n_3", ), @@ -221,8 +221,8 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'loop_vars.html', array(), - array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())), - array('loop'), + array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())), + array('test_loop'), '', ), array( @@ -235,7 +235,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'include_loop_define.html', array('VARIABLE' => 'value'), - array('loop' => array(array('NESTED_FILE' => 'variable.html'))), + array('test_loop' => array(array('NESTED_FILE' => 'variable.html'))), array(), 'value', ), @@ -243,8 +243,8 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'loop_vars.html', array(), - array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())), - array('loop.inner'), + array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())), + array('test_loop.inner'), "first\n0\n0\n2\nx\nset\n1\n1\n2\ny\nset\nlast", ),*/ array( @@ -295,7 +295,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case array( 'loop_size.html', array(), - array('loop' => array(array()), 'empty_loop' => array()), + array('test_loop' => array(array()), 'empty_loop' => array()), array(), "nonexistent = 0\n! nonexistent\n\nempty = 0\n! empty\nloop\n\nin loop", ), diff --git a/tests/template/templates/include_loop.html b/tests/template/templates/include_loop.html index d5c3d9bc82..5cad34b363 100644 --- a/tests/template/templates/include_loop.html +++ b/tests/template/templates/include_loop.html @@ -1,4 +1,4 @@ - - -_ - + + +_ + diff --git a/tests/template/templates/include_loop_define.html b/tests/template/templates/include_loop_define.html index f539b21396..4bab09422e 100644 --- a/tests/template/templates/include_loop_define.html +++ b/tests/template/templates/include_loop_define.html @@ -1,4 +1,4 @@ - - + + - + diff --git a/tests/template/templates/loop.html b/tests/template/templates/loop.html index de1a10004d..f541e934df 100644 --- a/tests/template/templates/loop.html +++ b/tests/template/templates/loop.html @@ -1,21 +1,21 @@ - + loop noloop - + - + loop noloop - + loop - + -loop#{loop.S_ROW_COUNT}-block#{block.S_ROW_COUNT} +loop#{test_loop.S_ROW_COUNT}-block#{block.S_ROW_COUNT} - + diff --git a/tests/template/templates/loop_advanced.html b/tests/template/templates/loop_advanced.html index c75fe55f03..1f56686eaa 100644 --- a/tests/template/templates/loop_advanced.html +++ b/tests/template/templates/loop_advanced.html @@ -1,19 +1,19 @@ -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} x -{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW} +{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW} diff --git a/tests/template/templates/loop_size.html b/tests/template/templates/loop_size.html index 8f581cef10..2b1fcd2dd4 100644 --- a/tests/template/templates/loop_size.html +++ b/tests/template/templates/loop_size.html @@ -22,18 +22,18 @@ ! empty - + loop - + loop = 0 - + ! loop - + in loop - + diff --git a/tests/template/templates/loop_vars.html b/tests/template/templates/loop_vars.html index 7d86d4b7b6..70a3eb2cec 100644 --- a/tests/template/templates/loop_vars.html +++ b/tests/template/templates/loop_vars.html @@ -1,13 +1,13 @@ - -first -{loop.S_ROW_NUM} - a -{loop.VARIABLE} - b -set - + +first +{test_loop.S_ROW_NUM} - a +{test_loop.VARIABLE} - b +set + last -{inner.S_ROW_NUM} - c -last inner +{test_loop.inner.S_ROW_NUM} - c +last inner - + From 2d764ef7d54104be2925aa015193da20c4383c5d Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 19 Jul 2013 11:31:52 -0500 Subject: [PATCH 051/157] [ticket/11701] Fix regex for appending |length PHPBB3-11701 --- phpBB/phpbb/template/twig/lexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 4f127bd7e6..95b3043403 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -226,10 +226,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer $inner = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $inner); // Replace .foo with loops.foo|length - $inner = preg_replace('#\s\.([a-zA-Z_0-9]+)#', ' loops.$1|length', $inner); + $inner = preg_replace('#\s\.([a-zA-Z_0-9]+) #', ' loops.$1|length ', $inner); // Replace .foo.bar with foo.bar|length - $inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+)#', ' $1|length', $inner); + $inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+) #', ' $1|length ', $inner); return ""; }; From ea250a5ef5dd3e790b22336e5a9e74c77da35569 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 19 Jul 2013 12:43:24 -0500 Subject: [PATCH 052/157] [ticket/11701] Refix regex for appending |length PHPBB3-11701 --- phpBB/phpbb/template/twig/lexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 95b3043403..3534311b7a 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -226,10 +226,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer $inner = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $inner); // Replace .foo with loops.foo|length - $inner = preg_replace('#\s\.([a-zA-Z_0-9]+) #', ' loops.$1|length ', $inner); + $inner = preg_replace('#\s\.([a-zA-Z_0-9]+)([^a-zA-Z_0-9\.])#', ' loops.$1|length$2', $inner); // Replace .foo.bar with foo.bar|length - $inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+) #', ' $1|length ', $inner); + $inner = preg_replace('#\s\.([a-zA-Z_0-9\.]+)([^a-zA-Z_0-9\.])#', ' $1|length$2', $inner); return ""; }; From 30bfd7fb61bbe1d7ca50290730d8c4b6094c41a4 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 19 Jul 2013 13:25:53 -0500 Subject: [PATCH 053/157] [ticket/11701] Test events in loops PHPBB3-11701 --- .../trivial/styles/all/template/test_event_loop.html | 1 + .../ext_trivial/styles/silver/template/event_loop.html | 3 +++ tests/template/template_events_test.php | 10 ++++++++++ 3 files changed, 14 insertions(+) create mode 100644 tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html create mode 100644 tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html new file mode 100644 index 0000000000..149398d6bd --- /dev/null +++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html @@ -0,0 +1 @@ +{event_loop.S_ROW_COUNT}| \ No newline at end of file diff --git a/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html b/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html new file mode 100644 index 0000000000..c70d8f86d7 --- /dev/null +++ b/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html @@ -0,0 +1,3 @@ + +event_loop + diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php index f7bcd2dcc6..d3b65e763a 100644 --- a/tests/template/template_events_test.php +++ b/tests/template/template_events_test.php @@ -80,6 +80,16 @@ Zeta test event in all', array(), 'two in silver in omega', ), + array( + 'EVENT in loop', + 'ext_trivial', + array('silver'), + 'event_loop.html', + array(), + array('event_loop' => array(array(), array(), array())), + array(), + 'event_loop0|event_loop1|event_loop2', + ), ); } From 0f83d7fd6cf6819c0fe2f4bfa9f65873f7124b72 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 19 Jul 2013 13:36:28 -0500 Subject: [PATCH 054/157] [ticket/11701] New line at EOF PHPBB3-11701 --- .../ext/trivial/styles/all/template/test_event_loop.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html index 149398d6bd..235e129f85 100644 --- a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html +++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html @@ -1 +1 @@ -{event_loop.S_ROW_COUNT}| \ No newline at end of file +{event_loop.S_ROW_COUNT}| From 1372b4f20801d6079798832f15caf38949fe9333 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 10:33:06 +0100 Subject: [PATCH 055/157] [ticket/11639] Removed a non-needed unset sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 49a1797321..acf0cc874b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1110,8 +1110,6 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id // Do not censor text because it has already been censored before $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false); - unset($parse_flags); - if (!empty($attachments[$row['post_id']])) { $update_count = array(); From 13fa346e8f5b496f5e51ea20e9420a48228a5072 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 11:38:04 +0100 Subject: [PATCH 056/157] [ticket/11656] Made the check for the bitfield just like other PR's sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11656 --- phpBB/memberlist.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index f8ee82084c..018526d034 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -561,7 +561,8 @@ switch ($mode) if ($member['user_sig']) { - $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES, true); + $parse_flags = ($member['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], $parse_flags, true); } $poster_avatar = phpbb_get_user_avatar($member); From 4ed322b5b8642ec8d0a6faf23d9ea751e81dbf69 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 11:59:28 +0100 Subject: [PATCH 057/157] [ticket/11638] Updated: bitwise $parse_flags use optionset() sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index de76d1186d..303b9bb6da 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1381,8 +1381,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // End signature parsing, only if needed if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { - $include_bbcode_parse = $user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0; - $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $include_bbcode_parse | OPTION_FLAG_SMILIES, true); + $parse_flags = phpbb_optionset(OPTION_FLAG_SMILIES, true, 0); + $parse_flags = phpbb_optionset(OPTION_FLAG_BBCODE, $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flag); + $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $parse_flags, true); } // Parse the message and subject From 0dcf24acc10e7ad52bf47c39faf14b118fd1566d Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 24 Jul 2013 12:41:40 +0200 Subject: [PATCH 058/157] [ticket/8228] Fix whitespaces before code in Firefox Based on the "[code] enhancements" modification by TerraFrost PHPBB3-8228 --- phpBB/styles/prosilver/template/bbcode.html | 4 ++-- phpBB/styles/prosilver/template/forum_fn.js | 5 +++-- phpBB/styles/prosilver/theme/colours.css | 2 +- phpBB/styles/prosilver/theme/content.css | 2 +- phpBB/styles/subsilver2/template/bbcode.html | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html index c0c0a2da46..460d102c28 100644 --- a/phpBB/styles/prosilver/template/bbcode.html +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -12,8 +12,8 @@
-
{L_CODE}{L_COLON} {L_SELECT_ALL_CODE}
-
+
{L_CODE}{L_COLON} {L_SELECT_ALL_CODE}

+
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index eccb12e827..42a68a2ef5 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -187,7 +187,7 @@ function displayBlocks(c, e, t) { function selectCode(a) { // Get ID of code block - var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; + var e = a.parentNode.parentNode.getElementsByTagName('PRE')[0]; var s, r; // Not IE and IE9+ @@ -205,7 +205,8 @@ function selectCode(a) { } r = document.createRange(); - r.selectNodeContents(e); + r.setStart(e.firstChild, 0); + r.setEnd(e.lastChild, e.lastChild.textContent.length); s.removeAllRanges(); s.addRange(r); } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 7d0462be1b..801d607d9c 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -479,7 +479,7 @@ dl.codebox dt { border-bottom-color: #CCCCCC; } -dl.codebox code { +dl.codebox pre { color: #2E8B57; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 4b8c972697..0cab12910b 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -491,7 +491,7 @@ blockquote dl.codebox { margin-left: 0; } -dl.codebox code { +dl.codebox pre { /* Also see tweaks.css */ overflow: auto; display: block; diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html index efcf5e1acb..5558716cad 100644 --- a/phpBB/styles/subsilver2/template/bbcode.html +++ b/phpBB/styles/subsilver2/template/bbcode.html @@ -21,11 +21,11 @@ -
{L_CODE}{L_COLON}
+
{L_CODE}{L_COLON}
 
 
 
-
+ From 029015e1542e7719d4a35d350093f4dfb3a7313e Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 12:31:14 +0100 Subject: [PATCH 059/157] [ticket/11638] Reverted to use the $parse tags way as the other ones sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 303b9bb6da..a0e7eb6a94 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1381,9 +1381,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // End signature parsing, only if needed if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { - $parse_flags = phpbb_optionset(OPTION_FLAG_SMILIES, true, 0); - $parse_flags = phpbb_optionset(OPTION_FLAG_BBCODE, $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flag); - $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $parse_flags, true); + $parse_flags = ($user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true); } // Parse the message and subject From 6c68348a71891219b039ae98a5a0af2fd52d3956 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 12:31:38 +0100 Subject: [PATCH 060/157] [ticket/11638] Use the $parse_flags like the other commits sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index a0e7eb6a94..151176fc6f 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1386,7 +1386,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } // Parse the message and subject - $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true); if (!empty($attachments[$row['post_id']])) { From 4cdccbd42b2f6ee54c6edb7f96ec3a0cac2ae8ea Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Wed, 24 Jul 2013 12:45:23 +0100 Subject: [PATCH 061/157] [ticket/11638] Removed the unneeded reset. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 151176fc6f..64006fbe61 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -830,7 +830,7 @@ if (!empty($topic_data['poll_start'])) $parse_bbcode_flags = OPTION_FLAG_SMILIES; - if(empty($poll_info[0]['bbcode_bitfield'])) + if (empty($poll_info[0]['bbcode_bitfield'])) { $parse_bbcode_flags |= OPTION_FLAG_BBCODE; } @@ -841,8 +841,6 @@ if (!empty($topic_data['poll_start'])) } $topic_data['poll_title'] = generate_text_for_display($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield'], $parse_bbcode_flags, true); - - unset($parse_bbcode_flags); foreach ($poll_info as $poll_option) { From 27126e065dd6a8de44c9da718b4b5b9895544bb1 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 24 Jul 2013 17:22:10 +0200 Subject: [PATCH 062/157] [ticket/11741] Fix empty brackets and remove bullet PHPBB3-11741 --- phpBB/styles/subsilver2/template/overall_header.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index bc2307154b..b0d7ce6fab 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -154,8 +154,8 @@ function marklist(id, name, state) + + @@ -23,7 +25,33 @@ var text_name = 'signature'; // ]]> - + +
- - [ {NOTIFICATIONS_COUNT} ] • + + [ {NOTIFICATIONS_COUNT}
{L_NOTIFICATIONS} From 5af63a7860678ac55f84201cf7dbbdf82dcdc8e8 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 24 Jul 2013 18:15:03 +0200 Subject: [PATCH 063/157] [ticket/10917] Fixed notice that files are out of date when updating to an unreleased version PHPBB3-10917 --- phpBB/install/install_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index c18a0fb4ec..5393040061 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -204,7 +204,7 @@ class install_update extends module } // Check if the update files stored are for the latest version... - if ($this->latest_version != $this->update_info['version']['to']) + if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>')) { $this->unequal_version = true; From e80503696350d7410e82e63e9d108d65e3c35696 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 24 Jul 2013 19:08:49 +0200 Subject: [PATCH 064/157] [ticket/10917] Using phpbb wrapper PHPBB3-10917 --- phpBB/install/install_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 5393040061..5419e3edf1 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -204,7 +204,7 @@ class install_update extends module } // Check if the update files stored are for the latest version... - if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>')) + if (phpbb_version_compare($this->latest_version, $this->update_info['version']['to'], '>')) { $this->unequal_version = true; From a9f05775025f010339fee5607df9b890abf472f8 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 25 Jul 2013 12:29:25 +0200 Subject: [PATCH 065/157] [ticket/11062] Load new strings from user's language file if provided PHPBB3-11062 --- phpBB/install/install_update.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index c18a0fb4ec..0afd6b07bb 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -232,6 +232,13 @@ class install_update extends module } // What about the language file? Got it updated? + if (in_array('language/' . $language . '/install.' . $phpEx, $this->update_info['files'])) + { + $lang = array(); + include($this->new_location . 'language/' . $language . '/install.' . $phpEx); + // this is the user's language.. just merge it + $user->lang = array_merge($user->lang, $lang); + } if (in_array('language/en/install.' . $phpEx, $this->update_info['files'])) { $lang = array(); From 7304ac9c3ca817716f14bb8817a201b149e5ebef Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 25 Jul 2013 13:10:45 +0200 Subject: [PATCH 066/157] [ticket/11062] If user's language is english there is no further work needed PHPBB3-11062 --- phpBB/install/install_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 0afd6b07bb..9823703f0a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -239,7 +239,7 @@ class install_update extends module // this is the user's language.. just merge it $user->lang = array_merge($user->lang, $lang); } - if (in_array('language/en/install.' . $phpEx, $this->update_info['files'])) + if ($language != 'en' && in_array('language/en/install.' . $phpEx, $this->update_info['files'])) { $lang = array(); include($this->new_location . 'language/en/install.' . $phpEx); From c5de4dd51dfba4737e4b46af05546f3c6a4f8da6 Mon Sep 17 00:00:00 2001 From: MichaelC Date: Thu, 25 Jul 2013 13:06:11 +0100 Subject: [PATCH 067/157] [ticket/11740] Update FAQ to include Ideas Centre PHPBB3-11740 --- phpBB/language/en/help_faq.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php index dab66779c3..b68336e0f7 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, or you want to report a bug, please visit the phpBB Area51 website, where you will find resources to do so.' + 1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added please visit the phpBB Ideas Centre, where you can upvote existing ideas or suggest new features.' ), array( 0 => 'Who do I contact about abusive and/or legal matters related to this board?', From 866e475f9644dd3575ed62bfb0e7dde0338fd5cc Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 25 Jul 2013 15:47:55 +0200 Subject: [PATCH 068/157] [ticket/10037] Apply attached patch with a few changes PHPBB3-10037 --- phpBB/includes/ucp/ucp_profile.php | 3 ++ .../prosilver/template/posting_smilies.html | 4 +-- .../subsilver2/template/posting_smilies.html | 4 +-- .../template/ucp_profile_signature.html | 35 ++++++++++++++++++- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index d35d13b6c1..847311058b 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -548,6 +548,9 @@ class ucp_profile // Build custom bbcodes array display_custom_bbcodes(); + // Generate smiley listing + generate_smilies('inline', 0); + break; case 'avatar': diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html index 86ac24aa53..d45b185ed3 100644 --- a/phpBB/styles/prosilver/template/posting_smilies.html +++ b/phpBB/styles/prosilver/template/posting_smilies.html @@ -2,8 +2,8 @@ diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html index fcab578bd9..d2224887bc 100644 --- a/phpBB/styles/subsilver2/template/posting_smilies.html +++ b/phpBB/styles/subsilver2/template/posting_smilies.html @@ -2,8 +2,8 @@ diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html index a33726e166..8588a99438 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html @@ -5,9 +5,11 @@
{L_TITLE}
{L_SIGNATURE_EXPLAIN}
+ + + + +
+ {L_SIGNATURE_EXPLAIN} + + + + + + + + + + + + + +
{L_SMILIES}
+ + {smiley.SMILEY_CODE} + +
{L_MORE_SMILIES}
+ +
+ @@ -47,6 +75,11 @@
+ +
+ From 9e68404de5277de23baa153a29f4a3825e233e1e Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 27 Jul 2013 10:44:39 -0700 Subject: [PATCH 069/157] [ticket/11749] PHP Events for search.php PHPBB3-11749 --- phpBB/search.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/phpBB/search.php b/phpBB/search.php index 8bcbfc498b..d0484bf598 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -687,6 +687,18 @@ if ($keywords || $author || $author_id || $search_id || $submit) $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array(); } + /** + * Event to modify the SQL query before the topic data is retrieved + * + * @event core.search_get_topic_data + * @var string sql_select The SQL SELECT string used by search to get topic data + * @var string sql_from The SQL FROM string used by search to get topic data + * @var string sql_where The SQL WHERE string used by search to get topic data + * @since 3.1-A1 + */ + $vars = array('sql_select', 'sql_from', 'sql_where'); + extract($phpbb_dispatcher->trigger_event('core.search_get_topic_data', compact($vars))); + $sql = "SELECT $sql_select FROM $sql_from WHERE $sql_where"; @@ -989,6 +1001,17 @@ if ($keywords || $author || $author_id || $search_id || $submit) ); } + /** + * Modify the topic data before it is assigned to the template + * + * @event core.search_modify_tpl_ary + * @var array row Array with topic data + * @var array tpl_ary Template block array with topic data + * @since 3.1-A1 + */ + $vars = array('row', 'tpl_ary'); + extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars))); + $template->assign_block_vars('searchresults', array_merge($tpl_ary, array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $result_topic_id, From 9ffb150d47d3db42c1816ffa662e73046a1b5d03 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 27 Jul 2013 10:45:40 -0700 Subject: [PATCH 070/157] [ticket/11749] PHP Events for viewforum.php PHPBB3-11749 --- phpBB/viewforum.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 5a59e021b3..1fa2030671 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -372,6 +372,16 @@ $sql_array = array( 'LEFT_JOIN' => array(), ); +/** +* Event to modify the SQL query before the topic data is retrieved +* +* @event core.viewforum_get_topic_data +* @var array sql_array The SQL array to get the data of all topics +* @since 3.1-A1 +*/ +$vars = array('sql_array'); +extract($phpbb_dispatcher->trigger_event('core.viewforum_get_topic_data', compact($vars))); + $sql_approved = ' AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'); if ($user->data['is_registered']) @@ -554,6 +564,17 @@ if (sizeof($shadow_topic_list)) $sql = 'SELECT * FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list)); + + /** + * Event to modify the SQL query before the shadowtopic data is retrieved + * + * @event core.viewforum_get_shadowtopic_data + * @var string sql The SQL string to get the data of any shadowtopics + * @since 3.1-A1 + */ + $vars = array('sql'); + extract($phpbb_dispatcher->trigger_event('core.viewforum_get_shadowtopic_data', compact($vars))); + $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) From 8e636e4572ef11af61f2b2c6dfb56d7a9530c8de Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 27 Jul 2013 10:48:40 -0700 Subject: [PATCH 071/157] [ticket/11749] Template events for topic_list_row_pre/append PHPBB3-11749 --- phpBB/docs/events.md | 18 ++++++++++++++++++ .../prosilver/template/search_results.html | 2 ++ .../prosilver/template/viewforum_body.html | 2 ++ .../subsilver2/template/search_results.html | 2 ++ .../subsilver2/template/viewforum_body.html | 4 ++++ 5 files changed, 28 insertions(+) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 3723bf7b3f..855f238653 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -114,6 +114,24 @@ simple_footer_after * Location: styles/prosilver/template/simple_footer.html * Purpose: Add content directly prior to the `` tag of the simple footer +topiclist_row_prepend +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/search_results.html + + styles/subsilver2/template/viewforum_body.html +* Purpose: Add content into topic rows (inside the elements containing topic titles) + +topiclist_row_append +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/search_results.html + + styles/subsilver2/template/viewforum_body.html +* Purpose: Add content into topic rows (inside the elements containing topic titles) + ucp_pm_viewmessage_print_head_append === * Location: styles/prosilver/template/ucp_pm_viewmessage_print.html diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index f0424c45db..54e8867526 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -63,6 +63,7 @@
style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;" title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
+ {NEWEST_POST_IMG} {searchresults.TOPIC_TITLE} {searchresults.ATTACH_ICON_IMG} {searchresults.UNAPPROVED_IMG} @@ -83,6 +84,7 @@
{L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} » {searchresults.FIRST_POST_TIME} » {L_IN} {searchresults.FORUM_TITLE} +
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 69b0608a64..ecd993d7fb 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -144,6 +144,7 @@
style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;" title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ {NEWEST_POST_IMG} {topicrow.TOPIC_TITLE} {topicrow.UNAPPROVED_IMG} {DELETED_IMG} @@ -164,6 +165,7 @@ {topicrow.ATTACH_ICON_IMG} {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} » {topicrow.FIRST_POST_TIME} » {L_IN} {topicrow.FORUM_NAME} +
{topicrow.REPLIES} {L_REPLIES}
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index d98079de20..19ba0b196a 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -34,6 +34,7 @@ + {NEWEST_POST_IMG} {searchresults.ATTACH_ICON_IMG} {searchresults.TOPIC_TITLE} @@ -58,6 +59,7 @@ ]

{L_IN} {searchresults.FORUM_TITLE}

+

{searchresults.TOPIC_AUTHOR_FULL}

{searchresults.TOPIC_REPLIES}

diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index d07e9a1372..dfbe0a605b 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -40,6 +40,7 @@ + {NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TYPE} {topicrow.TOPIC_TITLE} @@ -63,6 +64,7 @@ ]

+

{topicrow.TOPIC_AUTHOR_FULL}

{topicrow.REPLIES}

@@ -203,6 +205,7 @@ + {NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} {topicrow.TOPIC_TYPE} {topicrow.TOPIC_TITLE} @@ -227,6 +230,7 @@ ]

{L_IN} {topicrow.FORUM_NAME}

+

{topicrow.TOPIC_AUTHOR_FULL}

{topicrow.REPLIES}

From d8584877a19ece5b5d6cd1d0ec752905ef8501e7 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sat, 27 Jul 2013 22:37:44 +0200 Subject: [PATCH 072/157] [ticket/10917] Revert use of phpbb wrapper PHPBB3-10917 --- phpBB/install/install_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 9ac17e7579..e8fcabfc2d 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -204,7 +204,7 @@ class install_update extends module } // Check if the update files stored are for the latest version... - if (phpbb_version_compare($this->latest_version, $this->update_info['version']['to'], '>')) + if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>')) { $this->unequal_version = true; From dd875f13e875a726c9ea4654a90a74878658e423 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sun, 28 Jul 2013 02:35:01 +0200 Subject: [PATCH 073/157] [ticket/10917] Variable used only once so delete it The variable $this->unequal_version was only used once and only to display the version the package updates to. To display the version it updates to makes no sense when the update files just aren't meant to update from the current version. (It's already shown in an error message) So I deleted the variable from there. Furthermore the use of version_compare makes the variable useless in that context which is why I deleted the variable from the whole file and replaced it in the relevant if statement with the old comparison. PHPBB3-10917 --- phpBB/install/install_update.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index e8fcabfc2d..2f3ee1c55a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -58,7 +58,6 @@ class install_update extends module var $new_location; var $latest_version; var $current_version; - var $unequal_version; var $update_to_version; @@ -76,7 +75,6 @@ class install_update extends module $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; - $this->unequal_version = false; $this->old_location = $phpbb_root_path . 'install/update/old/'; $this->new_location = $phpbb_root_path . 'install/update/new/'; @@ -195,8 +193,6 @@ class install_update extends module // Check if the update files are actually meant to update from the current version if ($this->current_version != $this->update_info['version']['from']) { - $this->unequal_version = true; - $template->assign_vars(array( 'S_ERROR' => true, 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']), @@ -206,8 +202,6 @@ class install_update extends module // Check if the update files stored are for the latest version... if (version_compare(strtolower($this->latest_version), strtolower($this->update_info['version']['to']), '>')) { - $this->unequal_version = true; - $template->assign_vars(array( 'S_WARNING' => true, 'WARNING_MSG' => sprintf($user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version)) @@ -294,7 +288,7 @@ class install_update extends module ); // Print out version the update package updates to - if ($this->unequal_version) + if ($this->latest_version != $this->update_info['version']['to']) { $template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']); } From 9902f1c75178aa72d3b89f51033fcda552141b40 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 29 Jul 2013 00:05:31 -0700 Subject: [PATCH 074/157] [ticket/11749] Move event after all template data has been defined PHPBB3-11749 --- phpBB/search.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index d0484bf598..40c0b9a8ce 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1001,18 +1001,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) ); } - /** - * Modify the topic data before it is assigned to the template - * - * @event core.search_modify_tpl_ary - * @var array row Array with topic data - * @var array tpl_ary Template block array with topic data - * @since 3.1-A1 - */ - $vars = array('row', 'tpl_ary'); - extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars))); - - $template->assign_block_vars('searchresults', array_merge($tpl_ary, array( + $tpl_ary = array_merge($tpl_ary, array( 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $result_topic_id, 'POST_ID' => ($show_results == 'posts') ? $row['post_id'] : false, @@ -1024,9 +1013,22 @@ if ($keywords || $author || $author_id || $search_id || $submit) 'U_VIEW_TOPIC' => $view_topic_url, 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), - 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '') + 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '', )); + /** + * Modify the topic data before it is assigned to the template + * + * @event core.search_modify_tpl_ary + * @var array row Array with topic data + * @var array tpl_ary Template block array with topic data + * @since 3.1-A1 + */ + $vars = array('row', 'tpl_ary'); + extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars))); + + $template->assign_block_vars('searchresults', $tpl_ary); + if ($show_results == 'topics') { phpbb_generate_template_pagination($template, $view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true); From b8fef3b33a5c04c6637667b0a9a9f3b24ba2c594 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 29 Jul 2013 16:55:58 +0100 Subject: [PATCH 075/157] [ticket/11640] removed the space that I wonder what it was doing there. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11640 --- phpBB/includes/functions_privmsgs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 15907feedd..5fc6de8e02 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -2022,7 +2022,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); - $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags , false); + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false); $subject = censor_text($subject); From ccc5c5f6b8c197c0f96349e139472ddbe17f19ce Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Mon, 29 Jul 2013 17:00:51 +0100 Subject: [PATCH 076/157] [ticket/11638] Changed the layout to match the other similar commits sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 64006fbe61..a24c40f697 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -828,19 +828,14 @@ if (!empty($topic_data['poll_start'])) $poll_total += $poll_option['poll_option_total']; } - $parse_bbcode_flags = OPTION_FLAG_SMILIES; - - if (empty($poll_info[0]['bbcode_bitfield'])) - { - $parse_bbcode_flags |= OPTION_FLAG_BBCODE; - } + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++) { - $poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_bbcode_flags, true); + $poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_flags, true); } - $topic_data['poll_title'] = generate_text_for_display($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield'], $parse_bbcode_flags, true); + $topic_data['poll_title'] = generate_text_for_display($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield'], $parse_flags, true); foreach ($poll_info as $poll_option) { From 5bb08a1ab973ee13237876d11b001c4ed6658892 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 29 Jul 2013 21:30:01 +0200 Subject: [PATCH 077/157] [ticket/11574] Change order of files and database update PHPBB3-11574 --- phpBB/adm/style/install_update.html | 46 ++++++++++++++--------------- phpBB/install/database_update.php | 3 +- phpBB/install/index.php | 2 +- phpBB/install/install_update.php | 33 ++++++++++++++++----- phpBB/language/en/install.php | 6 ++-- 5 files changed, 55 insertions(+), 35 deletions(-) diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index b5fa46dbf6..bd46f7877e 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -109,27 +109,14 @@ - +
- +
+

{L_CHECK_FILES_EXPLAIN}

+ +
-
-

{L_UPDATE_DATABASE_EXPLAIN}

- -
- -
- - -
- -
-

{L_CHECK_FILES_UP_TO_DATE}

- -
- -
- + @@ -155,6 +142,11 @@ +
+

{L_UPDATE_DB_SUCCESS}

+

{L_EVERYTHING_UP_TO_DATE}

+
+

{L_UPDATE_DB_SUCCESS}



@@ -174,10 +166,18 @@ -
-

{L_UPDATE_SUCCESS}

-

{L_ALL_FILES_UP_TO_DATE}

-
+

{L_UPDATE_FILE_SUCCESS}

+

{L_ALL_FILES_UP_TO_DATE}

+ +

{L_UPDATE_DATABASE_EXPLAIN}

+ +
+ +
+ +
+ +

{L_COLLECTED_INFORMATION}

diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 44cbc74d29..f69f0f6986 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -110,6 +110,7 @@ phpbb_require_updated('includes/functions_container.' . $phpEx); require($phpbb_root_path . 'config.' . $phpEx); phpbb_require_updated('includes/constants.' . $phpEx); +phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx); phpbb_require_updated('includes/utf/utf_tools.' . $phpEx); // Set PHP error handler to ours @@ -305,7 +306,7 @@ echo $user->lang['DATABASE_UPDATE_COMPLETE'] . '
'; if ($request->variable('type', 0)) { echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '

'; - echo '' . $user->lang['CONTINUE_UPDATE_NOW'] . ''; + echo '' . $user->lang['CONTINUE_UPDATE_NOW'] . ''; } else { diff --git a/phpBB/install/index.php b/phpBB/install/index.php index fe61c53558..bd39e231f4 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -250,7 +250,7 @@ $template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, ne $phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_style->set_ext_dir_prefix('adm/'); -$paths = array($phpbb_admin_path . 'style', $phpbb_root_path . 'install/update/new/adm/style'); +$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); $paths = array_filter($paths, 'is_dir'); $phpbb_style->set_custom_style('admin', $paths, array(), ''); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 478cc9f76f..a8abfc7cfc 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -39,7 +39,7 @@ if (!empty($setmodules)) 'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1), 'module_order' => 30, 'module_subs' => '', - 'module_stages' => array('INTRO', 'VERSION_CHECK', 'UPDATE_DB', 'FILE_CHECK', 'UPDATE_FILES'), + 'module_stages' => array('INTRO', 'VERSION_CHECK', 'FILE_CHECK', 'UPDATE_FILES', 'UPDATE_DB'), 'module_reqs' => '' ); } @@ -74,6 +74,11 @@ class install_update extends module global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container; + // We must enable super globals, otherwise creating a new instance of the request class, + // using the new container with a dbal connection will fail with the following PHP Notice: + // Object of class phpbb_request_deactivated_super_global could not be converted to int + $request->enable_super_globals(); + // Create a normal container now $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config'); @@ -138,7 +143,9 @@ class install_update extends module } // Set custom template again. ;) - $phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), ''); + $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); + $paths = array_filter($paths, 'is_dir'); + $phpbb_style->set_custom_style('admin', $paths, array(), ''); $template->assign_vars(array( 'S_USER_LANG' => $user->lang['USER_LANG'], @@ -267,15 +274,14 @@ class install_update extends module $this->page_title = 'STAGE_VERSION_CHECK'; $template->assign_vars(array( - 'S_UP_TO_DATE' => $up_to_date, 'S_VERSION_CHECK' => true, - 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), - 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), + 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), + 'S_UP_TO_DATE' => $up_to_date, 'LATEST_VERSION' => $this->latest_version, - 'CURRENT_VERSION' => $this->current_version) - ); + 'CURRENT_VERSION' => $this->current_version, + )); // Print out version the update package updates to if ($this->unequal_version) @@ -303,6 +309,7 @@ class install_update extends module 'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&language=' . $user->data['user_lang']), 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), + 'L_EVERYTHING_UP_TO_DATE' => $user->lang('EVERYTHING_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')), )); break; @@ -470,13 +477,23 @@ class install_update extends module $template->assign_vars(array( 'S_FILE_CHECK' => true, 'S_ALL_UP_TO_DATE' => $all_up_to_date, - 'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')), 'S_VERSION_UP_TO_DATE' => $up_to_date, + 'S_UP_TO_DATE' => $up_to_date, 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), 'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"), 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_db"), )); + // Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run + // we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less + // We now try to cope with this by triggering the update process + if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<')) + { + $template->assign_vars(array( + 'S_UP_TO_DATE' => false, + )); + } + if ($all_up_to_date) { global $phpbb_container; diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index be45047861..f994f339a9 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -374,7 +374,7 @@ $lang = array_merge($lang, array( // Updater $lang = array_merge($lang, array( - 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now login to your board and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the Send statistics module in your ACP.', + 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version.', 'ARCHIVE_FILE' => 'Source file within archive', 'BACK' => 'Back', @@ -419,8 +419,9 @@ $lang = array_merge($lang, array( 'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive', 'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.', - 'ERROR' => 'Error', 'EDIT_USERNAME' => 'Edit username', + 'ERROR' => 'Error', + 'EVERYTHING_UP_TO_DATE' => 'Everything is up to date with the latest phpBB version. You should now login to your board and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the Send statistics module in your ACP.', 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.', 'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.', @@ -570,6 +571,7 @@ $lang = array_merge($lang, array( 'UPLOAD_METHOD' => 'Upload method', 'UPDATE_DB_SUCCESS' => 'Database update was successful.', + 'UPDATE_FILE_SUCCESS' => 'File update was successful.', 'USER_ACTIVE' => 'Active user', 'USER_INACTIVE' => 'Inactive user', From 5f3f41d6d6fb5c997ab7b70482fef542a5534b6a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 29 Jul 2013 23:47:31 +0200 Subject: [PATCH 078/157] [ticket/11574] Remove old "continue step"-message PHPBB3-11574 --- phpBB/adm/style/install_update.html | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html index bd46f7877e..57e2c8ffea 100644 --- a/phpBB/adm/style/install_update.html +++ b/phpBB/adm/style/install_update.html @@ -143,23 +143,10 @@
-

{L_UPDATE_DB_SUCCESS}

+

{L_UPDATE_SUCCESS}

{L_EVERYTHING_UP_TO_DATE}

-

{L_UPDATE_DB_SUCCESS}

- -

- -
- -
-

{L_CHECK_FILES_EXPLAIN}

- -
- -
- From 18164e63e2897a755a214b8fcb4b6d84897888e6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 30 Jul 2013 01:06:10 +0200 Subject: [PATCH 079/157] [ticket/11752] HTTP -> HTTPs in email/installed.txt PHPBB3-11752 --- phpBB/language/en/email/installed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt index 2aa03a7f33..60e52e37c4 100644 --- a/phpBB/language/en/email/installed.txt +++ b/phpBB/language/en/email/installed.txt @@ -12,7 +12,7 @@ Username: {USERNAME} Board URL: {U_BOARD} ---------------------------- -Useful information regarding the phpBB software can be found in the docs folder of your installation and on phpBB.com's support page - http://www.phpbb.com/support/ +Useful information regarding the phpBB software can be found in the docs folder of your installation and on phpBB.com's support page - https://www.phpbb.com/support/ In order to keep your board safe and secure, we highly recommended keeping current with software releases. For your convenience, a mailing list is available at the page referenced above. From 0ff2e93c1937f96f8fcd733a152a0c2f263706b1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Jul 2013 01:18:32 +0200 Subject: [PATCH 080/157] [ticket/11574] Do not display incompatible package note after successful update PHPBB3-11574 --- phpBB/install/install_update.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index dce0134730..4ae39f202f 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -313,6 +313,11 @@ class install_update extends module 'L_EVERYTHING_UP_TO_DATE' => $user->lang('EVERYTHING_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')), )); + // Do not display incompatible package note after successful update + if ($config['version'] == $this->update_info['version']['to']) + { + $template->assign_var('S_ERROR', false); + } break; case 'file_check': From 32499c8808bb72812f66ba00e35c5af128a4d4e2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Jul 2013 01:38:06 +0200 Subject: [PATCH 081/157] [ticket/11574] Remove install/udpate/new/ fallback from database_update.php Since we switched the order, everything should be in the normal root by then. PHPBB3-11574 --- phpBB/install/database_update.php | 67 +++++-------------------------- phpBB/language/en/install.php | 2 +- 2 files changed, 12 insertions(+), 57 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index f69f0f6986..3be5ea659c 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -21,46 +21,6 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if (!function_exists('phpbb_require_updated')) -{ - function phpbb_require_updated($path, $optional = false) - { - global $phpbb_root_path, $table_prefix; - - $new_path = $phpbb_root_path . 'install/update/new/' . $path; - $old_path = $phpbb_root_path . $path; - - if (file_exists($new_path)) - { - require($new_path); - } - else if (!$optional || file_exists($old_path)) - { - require($old_path); - } - } -} - -if (!function_exists('phpbb_include_updated')) -{ - function phpbb_include_updated($path, $optional = false) - { - global $phpbb_root_path; - - $new_path = $phpbb_root_path . 'install/update/new/' . $path; - $old_path = $phpbb_root_path . $path; - - if (file_exists($new_path)) - { - include($new_path); - } - else if (!$optional || file_exists($old_path)) - { - include($old_path); - } - } -} - function phpbb_end_update($cache, $config) { $cache->purge(); @@ -89,7 +49,7 @@ function phpbb_end_update($cache, $config) exit_handler(); } -phpbb_require_updated('includes/startup.' . $phpEx); +require($phpbb_root_path . 'includes/startup.' . $phpEx); include($phpbb_root_path . 'config.' . $phpEx); if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) @@ -102,33 +62,28 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files -phpbb_require_updated('phpbb/class_loader.' . $phpEx); +require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); -phpbb_require_updated('includes/functions.' . $phpEx); -phpbb_require_updated('includes/functions_content.' . $phpEx); -phpbb_require_updated('includes/functions_container.' . $phpEx); +require($phpbb_root_path . 'includes/functions.' . $phpEx); +require($phpbb_root_path . 'includes/functions_content.' . $phpEx); +require($phpbb_root_path . 'includes/functions_container.' . $phpEx); require($phpbb_root_path . 'config.' . $phpEx); -phpbb_require_updated('includes/constants.' . $phpEx); -phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx); -phpbb_require_updated('includes/utf/utf_tools.' . $phpEx); +require($phpbb_root_path . 'includes/constants.' . $phpEx); +include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); +require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); // Setup class loader first -$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx); -$phpbb_class_loader_new->register(); $phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}phpbb/", $phpEx); $phpbb_class_loader->register(); // Set up container (must be done here because extensions table may not exist) -$other_config_path = $phpbb_root_path . 'install/update/new/config/'; -$config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; - $container_extensions = array( new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), - new phpbb_di_extension_core($config_path), + new phpbb_di_extension_core($phpbb_root_path . 'config/'), ); $container_passes = array( new phpbb_di_pass_collection_pass(), @@ -289,8 +244,8 @@ while (!$migrator->finished()) // Are we approaching the time limit? If so we want to pause the update and continue after refreshing if ((time() - $update_start_time) >= $safe_time_limit) { - echo $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '
'; - echo '' . $user->lang['DATABASE_UPDATE_CONTINUE'] . ''; + echo '
' . $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '

'; + echo '' . $user->lang['DATABASE_UPDATE_CONTINUE'] . ''; phpbb_end_update($cache, $config); } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index f994f339a9..03c9562983 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -398,7 +398,7 @@ $lang = array_merge($lang, array( 'DATABASE_TYPE' => 'Database type', 'DATABASE_UPDATE_COMPLETE' => 'Database updater has completed!', - 'DATABASE_UPDATE_CONTINUE' => 'Continue database update.', + 'DATABASE_UPDATE_CONTINUE' => 'Continue database update', 'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.', 'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.', 'DELETE_USER_REMOVE' => 'Delete user and remove posts', From 8a6f3a58000b7d969bd9108f2bdb34203354d39b Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 30 Jul 2013 01:54:11 +0200 Subject: [PATCH 082/157] [ticket/11524] Add another isset() to mitigate "Illegal string offset 'limit'" ... on PHP 5.4 or higher. PHPBB3-11524 --- phpBB/develop/mysql_upgrader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 05d279a099..17ce12e2bf 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -149,7 +149,8 @@ foreach ($schema_data as $table_name => $table_data) list($orig_column_type, $column_length) = explode(':', $column_data[0]); $column_type = sprintf($dbms_type_map['mysql_41'][$orig_column_type . ':'], $column_length); - if (isset($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0])) + if (isset($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit']) && + isset($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0])) { switch ($dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0]) { From 404f2881135373060086116003122a9f6d851adf Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 30 Jul 2013 02:01:24 +0200 Subject: [PATCH 083/157] [ticket/11753] Update MySQL upgrader schema data. PHPBB3-11753 --- phpBB/develop/mysql_upgrader.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 05d279a099..b3f40b2ca4 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -694,6 +694,24 @@ function get_schema_struct() ), ); + $schema_data['phpbb_login_attempts'] = array( + 'COLUMNS' => array( + 'attempt_ip' => array('VCHAR:40', ''), + 'attempt_browser' => array('VCHAR:150', ''), + 'attempt_forwarded_for' => array('VCHAR:255', ''), + 'attempt_time' => array('TIMESTAMP', 0), + 'user_id' => array('UINT', 0), + 'username' => array('VCHAR_UNI:255', 0), + 'username_clean' => array('VCHAR_CI', 0), + ), + 'KEYS' => array( + 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')), + 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')), + 'att_time' => array('INDEX', array('attempt_time')), + 'user_id' => array('INDEX', 'user_id'), + ), + ); + $schema_data['phpbb_moderator_cache'] = array( 'COLUMNS' => array( 'forum_id' => array('UINT', 0), @@ -897,6 +915,7 @@ function get_schema_struct() 'field_default_value' => array('VCHAR_UNI', ''), 'field_validation' => array('VCHAR_UNI:20', ''), 'field_required' => array('BOOL', 0), + 'field_show_novalue' => array('BOOL', 0), 'field_show_on_reg' => array('BOOL', 0), 'field_show_on_vt' => array('BOOL', 0), 'field_show_profile' => array('BOOL', 0), From a3de463b3027733f0560a420fb1c61e5413a8957 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 30 Jul 2013 02:01:41 +0200 Subject: [PATCH 084/157] [ticket/11753] Remove ?> from MySQL Upgrader. PHPBB3-11753 --- phpBB/develop/mysql_upgrader.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index b3f40b2ca4..6dd577ebf7 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -1415,5 +1415,3 @@ function get_schema_struct() return $schema_data; } - -?> \ No newline at end of file From c335edc038461449d86c2278cf414f304dcc735b Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 30 Jul 2013 12:21:34 +0300 Subject: [PATCH 085/157] [ticket/11754] Remove styleswitcher leftovers PHPBB3-11754 --- phpBB/includes/functions.php | 2 -- phpBB/styles/prosilver/template/overall_header.html | 2 -- phpBB/styles/prosilver/template/simple_header.html | 2 -- 3 files changed, 6 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 49f2e469bc..3db843ffd1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5390,8 +5390,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_UPLOAD' => $config['upload_path'], 'SITE_LOGO_IMG' => $user->img('site_logo'), - - 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')), )); // application/xhtml+xml not used because of IE diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index ddbd917bd6..fcce0060f3 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -30,8 +30,6 @@ var on_page = '{ON_PAGE}'; var per_page = '{PER_PAGE}'; var base_url = '{A_BASE_URL}'; - var style_cookie = 'phpBBstyle'; - var style_cookie_settings = '{A_COOKIE_SETTINGS}'; var onload_functions = new Array(); var onunload_functions = new Array(); diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 667698c371..5bdc539f40 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -14,10 +14,8 @@ var on_page = '{ON_PAGE}'; var per_page = '{PER_PAGE}'; var base_url = '{A_BASE_URL}'; - var style_cookie = 'phpBBstyle'; var onload_functions = new Array(); var onunload_functions = new Array(); - var style_cookie_settings = '{A_COOKIE_SETTINGS}'; /** * New function for handling multiple calls to window.onload and window.unload by pentapenguin From 212294382d2626012bb1caf0dde1392e59b1ca31 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 30 Jul 2013 12:32:14 +0300 Subject: [PATCH 086/157] [ticket/11688] Rename purge_dir to remove_dir PHPBB3-11688 --- phpBB/phpbb/cache/driver/file.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index 19596f5205..66a74ea4eb 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -223,7 +223,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base $filename = $fileInfo->getFilename(); if ($fileInfo->isDir()) { - $this->purge_dir($fileInfo->getPathname()); + $this->remove_dir($fileInfo->getPathname()); } elseif (strpos($filename, 'container_') === 0 || strpos($filename, 'url_matcher') === 0 || @@ -250,7 +250,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base /** * Remove directory */ - protected function purge_dir($dir) + protected function remove_dir($dir) { try { @@ -269,7 +269,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base } if ($fileInfo->isDir()) { - $this->purge_dir($fileInfo->getPathname()); + $this->remove_dir($fileInfo->getPathname()); } else { From 8295d0fb36df1c11af45f9062e17520d661e625c Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Tue, 30 Jul 2013 11:15:46 +0100 Subject: [PATCH 087/157] [ticket/11638] Variable names goof... sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11638 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index a24c40f697..e120322a4f 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -828,7 +828,7 @@ if (!empty($topic_data['poll_start'])) $poll_total += $poll_option['poll_option_total']; } - $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $parse_flags = ($poll_info[0]['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++) { From 95c603d545ade8ab37e81fd99f2b62765a54bcb0 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Tue, 30 Jul 2013 18:00:47 +0200 Subject: [PATCH 088/157] [ticket/8228] Fix still existing problems with code in firefox A user of a board mentioned that there are still some problems in firefox if php-highlighting is on. So I used a snippet which they worked on for weeks. Link to the snippet (in german): http://www.ongray-design.de/forum/viewtopic.php?t=541 PHPBB3-8228 --- phpBB/styles/prosilver/template/bbcode.html | 4 ++-- phpBB/styles/prosilver/template/forum_fn.js | 5 ++--- phpBB/styles/prosilver/theme/bidi.css | 2 +- phpBB/styles/prosilver/theme/colours.css | 6 +++--- phpBB/styles/prosilver/theme/content.css | 8 ++++---- phpBB/styles/prosilver/theme/print.css | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html index 460d102c28..909c09df5a 100644 --- a/phpBB/styles/prosilver/template/bbcode.html +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -12,8 +12,8 @@
-
{L_CODE}{L_COLON} {L_SELECT_ALL_CODE}

-
+

{L_CODE}{L_COLON} {L_SELECT_ALL_CODE}

+
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 42a68a2ef5..eccb12e827 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -187,7 +187,7 @@ function displayBlocks(c, e, t) { function selectCode(a) { // Get ID of code block - var e = a.parentNode.parentNode.getElementsByTagName('PRE')[0]; + var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; var s, r; // Not IE and IE9+ @@ -205,8 +205,7 @@ function selectCode(a) { } r = document.createRange(); - r.setStart(e.firstChild, 0); - r.setEnd(e.lastChild, e.lastChild.textContent.length); + r.selectNodeContents(e); s.removeAllRanges(); s.addRange(r); } diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index f617428565..a921805327 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -422,7 +422,7 @@ margin-left: 0; } -.rtl blockquote dl.codebox { +.rtl blockquote .codebox { margin-right: 0; } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 801d607d9c..5548905ede 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -470,16 +470,16 @@ blockquote blockquote blockquote { } /* Code block */ -dl.codebox { +.codebox { background-color: #FFFFFF; border-color: #C9D2D8; } -dl.codebox dt { +.codebox p { border-bottom-color: #CCCCCC; } -dl.codebox pre { +.codebox code { color: #2E8B57; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 0cab12910b..c56c7f9ef8 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -472,13 +472,13 @@ blockquote.uncited { } /* Code block */ -dl.codebox { +.codebox { padding: 3px; border: 1px solid transparent; font-size: 1em; } -dl.codebox dt { +.codebox p { text-transform: uppercase; border-bottom: 1px solid transparent; margin-bottom: 3px; @@ -487,11 +487,11 @@ dl.codebox dt { display: block; } -blockquote dl.codebox { +blockquote .codebox { margin-left: 0; } -dl.codebox pre { +.codebox code { /* Also see tweaks.css */ overflow: auto; display: block; diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css index bc3ca80fdc..88de620493 100644 --- a/phpBB/styles/prosilver/theme/print.css +++ b/phpBB/styles/prosilver/theme/print.css @@ -136,4 +136,4 @@ div.spacer { clear: both; } /* Accessibility tweaks: Mozilla.org */ .skip_link { display: none; } -dl.codebox dt { display: none; } +.codebox p { display: none; } From 5eb321d3113136f5e6cbc1f0ad911636f93f94df Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 30 Jul 2013 21:02:40 +0300 Subject: [PATCH 089/157] [ticket/11688] Fix docblock PHPBB3-11688 --- phpBB/phpbb/cache/driver/file.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index 66a74ea4eb..944dfd6541 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -249,6 +249,10 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base /** * Remove directory + * + * @param string $dir Directory to remove + * + * @return null */ protected function remove_dir($dir) { @@ -267,6 +271,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base { continue; } + if ($fileInfo->isDir()) { $this->remove_dir($fileInfo->getPathname()); From 8892205644a9423998441472b48a29dcea321360 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Tue, 30 Jul 2013 22:32:05 +0200 Subject: [PATCH 090/157] [ticket/11757] Fix typo in signature_module_auth migration PHPBB3-11757 --- phpBB/phpbb/db/migration/data/310/signature_module_auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/310/signature_module_auth.php b/phpBB/phpbb/db/migration/data/310/signature_module_auth.php index e4fbb27bcb..02cd70059a 100644 --- a/phpBB/phpbb/db/migration/data/310/signature_module_auth.php +++ b/phpBB/phpbb/db/migration/data/310/signature_module_auth.php @@ -17,7 +17,7 @@ class phpbb_db_migration_data_310_signature_module_auth extends phpbb_db_migrati AND module_basename = 'ucp_profile' AND module_mode = 'signature'"; $result = $this->db->sql_query($sql); - $module_auth = $this->db_sql_fetchfield('module_auth'); + $module_auth = $this->db->sql_fetchfield('module_auth'); $this->db->sql_freeresult($result); return $module_auth === 'acl_u_sig' || $module_auth === false; From 715e408ee6765f84b812636e808786f73f43699b Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 31 Jul 2013 00:00:50 +0200 Subject: [PATCH 091/157] [ticket/11464] Add missing and remove unnecessary database entry PHPBB3-11464 --- phpBB/install/schemas/schema_data.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index d03fdf9de4..0a31b89aab 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -170,7 +170,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load' INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_profile', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); From 6f883b6791e1bc9b168c98d4a95e9bbed6731a74 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Wed, 31 Jul 2013 14:04:50 +0200 Subject: [PATCH 092/157] [ticket/10037] Fix table in subsilver2 Thanks, nickvergessen! ;-) PHPBB3-10037 --- .../template/ucp_profile_signature.html | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html index 8588a99438..54e8aaa723 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html @@ -1,5 +1,12 @@ + + @@ -18,20 +25,10 @@ - From 07bc935efea32de9cbef7039730d910b1e2befea Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 31 Jul 2013 23:03:32 +0200 Subject: [PATCH 093/157] [ticket/11751] Add mcp modules for softdelete on update PHPBB3-11751 --- .../data/310/softdelete_mcp_modules.php | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php diff --git a/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php b/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php new file mode 100644 index 0000000000..f80f55d19a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php @@ -0,0 +1,55 @@ +db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return $module_id !== false; + } + + static public function depends_on() + { + return array( + 'phpbb_db_migration_data_310_dev', + 'phpbb_db_migration_data_310_softdelete_p2', + ); + } + + public function update_data() + { + return array( + array('module.add', array( + 'mcp', + 'MCP_QUEUE', + array( + 'module_basename' => 'mcp_queue', + 'modes' => array('deleted_topics'), + ), + )), + array('module.add', array( + 'mcp', + 'MCP_QUEUE', + array( + 'module_basename' => 'mcp_queue', + 'modes' => array('deleted_posts'), + ), + )), + ); + } +} From c2aff70cf561c1787be6cdaa193432d0cbdf432d Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:03:04 +0100 Subject: [PATCH 094/157] [ticket/11655] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11655 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 52a28e3552..8e7ae49fa4 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,7 +76,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES + $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true); // Replace naughty words such as farty pants $message_row['message_subject'] = censor_text($message_row['message_subject']); From 776773522ba129c0e7d0918b2f6beccd4c044dbe Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:07:58 +0100 Subject: [PATCH 095/157] [ticket/11653] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/mcp/mcp_topic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 3491f37bcb..5014879b02 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -213,7 +213,8 @@ function mcp_topic_view($id, $mode, $action) $message = $row['post_text']; $post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title']; - $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false); if (!empty($attachments[$row['post_id']])) { From c806375828c01c011915f1438f718349aaaaf282 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:09:11 +0100 Subject: [PATCH 096/157] [ticket/11653] Missing ";" sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 8e7ae49fa4..79c4297858 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -76,7 +76,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) $user_info = get_user_information($author_id, $message_row); // Parse the message and subject - $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES + $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true); // Replace naughty words such as farty pants From ea6938d3e518b636529238ab9ffd5b57b1a19241 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:11:08 +0100 Subject: [PATCH 097/157] [ticket/11643] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11643 --- phpBB/includes/mcp/mcp_queue.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 2c95dc6a67..190fccab9a 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -132,7 +132,8 @@ class mcp_queue $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From a302a09ffbe174e6720ce250121d34ba8b6fd626 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:12:58 +0100 Subject: [PATCH 098/157] [ticket/11642] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11642 --- phpBB/includes/mcp/mcp_post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index e8768957e0..e9f6ce0471 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -125,7 +125,8 @@ function mcp_post_details($id, $mode, $action) $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false; // Process message, leave it uncensored - $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false); if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id'])) { From 3ae33910fc600ae86f0036370958bd7ec19e7ab9 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:14:34 +0100 Subject: [PATCH 099/157] [ticket/11653] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11653 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 79c4297858..c7b4489daf 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -151,7 +151,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // End signature parsing, only if needed if ($signature) { - $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, true); + $parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true); } $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); From 2f251972790e7836d9c35eb2f5b49fda97f736d6 Mon Sep 17 00:00:00 2001 From: Bruno Ais Date: Thu, 1 Aug 2013 10:16:33 +0100 Subject: [PATCH 100/157] [ticket/11641] Use $parse_flags sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11641 --- phpBB/includes/mcp/mcp_pm_reports.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php index dc953aae33..cb61b25174 100644 --- a/phpBB/includes/mcp/mcp_pm_reports.php +++ b/phpBB/includes/mcp/mcp_pm_reports.php @@ -115,7 +115,8 @@ class mcp_pm_reports } // Process message, leave it uncensored - $message = generate_text_for_display($pm_info['message_text'], $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield'], ($pm_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES, false); + $parse_flags = ($pm_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; + $message = generate_text_for_display($pm_info['message_text'], $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield'], $parse_flags, false); $report['report_text'] = make_clickable(bbcode_nl2br($report['report_text'])); From ea8f584de9d572f8c58b26acd1fd7551c42ab59c Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 1 Aug 2013 17:26:34 +0200 Subject: [PATCH 101/157] [prep-release-3.0.12] Bumping version number for 3.0.12-RC2. --- build/build.xml | 4 ++-- phpBB/includes/constants.php | 2 +- phpBB/install/database_update.php | 8 +++++++- phpBB/install/schemas/schema_data.sql | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build/build.xml b/build/build.xml index a418f40b53..db327ccc30 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ - + - + diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 0a853adb9b..09e1e50b8d 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -25,7 +25,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.0.12-RC1'); +define('PHPBB_VERSION', '3.0.12-RC2'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 5cb410bf29..59f795e37e 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -define('UPDATES_TO_VERSION', '3.0.12-RC1'); +define('UPDATES_TO_VERSION', '3.0.12-RC2'); // Enter any version to update from to test updates. The version within the db will not be updated. define('DEBUG_FROM_VERSION', false); @@ -1005,6 +1005,8 @@ function database_update_info() '3.0.11-RC2' => array(), // No changes from 3.0.11 to 3.0.12-RC1 '3.0.11' => array(), + // No changes from 3.0.12-RC1 to 3.0.12-RC2 + '3.0.12-RC1' => array(), /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.13-RC1 */ ); @@ -2236,6 +2238,10 @@ function change_database_data(&$no_updates, $version) $no_updates = false; break; + + // No changes from 3.0.12-RC1 to 3.0.12-RC2 + case '3.0.12-RC1': + break; } } diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 04b92b19c6..cfe3c0c4cb 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -246,7 +246,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.12-RC1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.12-RC2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); From 0a73d64b9772971b7e43e989c659184ee20c5bc6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 1 Aug 2013 17:28:21 +0200 Subject: [PATCH 102/157] [prep-release-3.0.12] Update Changelog for 3.0.12-RC2 release. --- phpBB/docs/CHANGELOG.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 44cc49d8c4..f2d5ddc212 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -190,6 +190,8 @@
  • [PHPBB3-11662] - "occured" should be "occurred"
  • [PHPBB3-11670] - Replace trademark â„¢ with ® on "Welcome to phpBB" install page
  • [PHPBB3-11674] - Do not include vendor folder if there are no dependencies.
  • +
  • [PHPBB3-11524] - MySQL Upgrader throws warnings on PHP 5.4
  • +
  • [PHPBB3-11720] - Reporting posts leads to white page error
  • Improvement

      @@ -213,6 +215,7 @@
    • [PHPBB3-11294] - Update extension list in running tests doc
    • [PHPBB3-11368] - Latest pm reports row count
    • [PHPBB3-11583] - InnoDB supports FULLTEXT index since MySQL 5.6.4.
    • +
    • [PHPBB3-11740] - Update link in FAQ to Ideas Centre

    Sub-task

      @@ -238,6 +241,8 @@
    • [PHPBB3-11529] - Rename RUNNING_TESTS file to .md file to render it on GitHub
    • [PHPBB3-11576] - Make phpBB Test Suite MySQL behave at least as strict as phpBB MySQL driver
    • [PHPBB3-11671] - Add phing/phing to composer.json
    • +
    • [PHPBB3-11752] - Update phpBB.com URLs to https in email templates
    • +
    • [PHPBB3-11753] - Upgrade mysql_upgrader.php schema data.

    1.ii. Changes since 3.0.10

    From 7d90f0a8a00ac66f6a561766e25fb4ea16a4111b Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Fri, 2 Aug 2013 02:49:28 +0200 Subject: [PATCH 103/157] [ticket/11759] Change lowercase to uppercase PHPBB3-11759 --- phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php | 4 ++-- phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php | 4 ++-- 24 files changed, 47 insertions(+), 47 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php index 0ed05812dc..459b423736 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-rc1', '>='); + return version_compare($this->config['version'], '3.0.10-RC1', '>='); } static public function depends_on() @@ -24,7 +24,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration return array( array('config.add', array('email_max_chunk_size', 50)), - array('config.update', array('version', '3.0.10-rc1')), + array('config.update', array('version', '3.0.10-RC1')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php index b14b3b00aa..8d21cab45d 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-rc2', '>='); + return version_compare($this->config['version'], '3.0.10-RC2', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.10-rc2')), + array('config.update', array('version', '3.0.10-RC2')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php index 473057d65d..296c3c40af 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-rc3', '>='); + return version_compare($this->config['version'], '3.0.10-RC3', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.10-rc3')), + array('config.update', array('version', '3.0.10-RC3')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php index dddfc0e0e7..3a3908258f 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.11-rc1', '>='); + return version_compare($this->config['version'], '3.0.11-RC1', '>='); } static public function depends_on() @@ -25,7 +25,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration array('custom', array(array(&$this, 'cleanup_deactivated_styles'))), array('custom', array(array(&$this, 'delete_orphan_private_messages'))), - array('config.update', array('version', '3.0.11-rc1')), + array('config.update', array('version', '3.0.11-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php index fac8523e8c..4b1b5642ce 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.11-rc2', '>='); + return version_compare($this->config['version'], '3.0.11-RC2', '>='); } static public function depends_on() @@ -44,7 +44,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.11-rc2')), + array('config.update', array('version', '3.0.11-RC2')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php index 6a31a51201..97331e9bb2 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php @@ -13,7 +13,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.12-rc1', '>='); + return version_compare($this->config['version'], '3.0.12-RC1', '>='); } static public function depends_on() @@ -28,7 +28,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration array('custom', array(array(&$this, 'update_bots'))), array('custom', array(array(&$this, 'disable_bots_from_receiving_pms'))), - array('config.update', array('version', '3.0.12-rc1')), + array('config.update', array('version', '3.0.12-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php index 562ccf077c..761ed5d2ec 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.1-rc1', '>='); + return version_compare($this->config['version'], '3.0.1-RC1', '>='); } public function update_schema() @@ -74,7 +74,7 @@ class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration array('custom', array(array(&$this, 'fix_unset_last_view_time'))), array('custom', array(array(&$this, 'reset_smiley_size'))), - array('config.update', array('version', '3.0.1-rc1')), + array('config.update', array('version', '3.0.1-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php index a960e90765..a84f3c2d92 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.2-rc1', '>='); + return version_compare($this->config['version'], '3.0.2-RC1', '>='); } static public function depends_on() @@ -26,7 +26,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration array('config.add', array('check_attachment_content', '1')), array('config.add', array('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title')), - array('config.update', array('version', '3.0.2-rc1')), + array('config.update', array('version', '3.0.2-RC1')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php index 8917dfea77..33bacc077f 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.2-rc2', '>='); + return version_compare($this->config['version'], '3.0.2-RC2', '>='); } static public function depends_on() @@ -74,7 +74,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.2-rc2')), + array('config.update', array('version', '3.0.2-RC2')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php index 4b102e1a2e..69433f386e 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.3-rc1', '>='); + return version_compare($this->config['version'], '3.0.3-RC1', '>='); } static public function depends_on() @@ -60,7 +60,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration array('permission.add', array('u_masspm_group', true, 'u_masspm')), array('custom', array(array(&$this, 'correct_acp_email_permissions'))), - array('config.update', array('version', '3.0.3-rc1')), + array('config.update', array('version', '3.0.3-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php index 8ad75a557b..e45bd3eeee 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.4-rc1', '>='); + return version_compare($this->config['version'], '3.0.4-RC1', '>='); } static public function depends_on() @@ -76,7 +76,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration return array( array('custom', array(array(&$this, 'update_custom_profile_fields'))), - array('config.update', array('version', '3.0.4-rc1')), + array('config.update', array('version', '3.0.4-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php index ea17cc1e31..62ae7bff1a 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.5-rc1', '>='); + return version_compare($this->config['version'], '3.0.5-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php index 8538347b1a..d72176489b 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.5-rc1', '>='); + return version_compare($this->config['version'], '3.0.5-RC1', '>='); } static public function depends_on() @@ -36,7 +36,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.5-rc1')), + array('config.update', array('version', '3.0.5-RC1')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php index 38c282ebf0..25f4995b0e 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-rc1', '>='); + return version_compare($this->config['version'], '3.0.6-RC1', '>='); } static public function depends_on() @@ -185,7 +185,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration array('custom', array(array(&$this, 'add_newly_registered_group'))), array('custom', array(array(&$this, 'set_user_options_default'))), - array('config.update', array('version', '3.0.6-rc1')), + array('config.update', array('version', '3.0.6-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php index a939dbd489..d5d14ab05d 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-rc2', '>='); + return version_compare($this->config['version'], '3.0.6-RC2', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.6-rc2')), + array('config.update', array('version', '3.0.6-RC2')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php index b3f09d8ab8..f3f1fb42f4 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-rc3', '>='); + return version_compare($this->config['version'], '3.0.6-RC3', '>='); } static public function depends_on() @@ -24,7 +24,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration return array( array('custom', array(array(&$this, 'update_cp_fields'))), - array('config.update', array('version', '3.0.6-rc3')), + array('config.update', array('version', '3.0.6-RC3')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php index fc2923f99b..6138ef351d 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-rc4', '>='); + return version_compare($this->config['version'], '3.0.6-RC4', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.6-rc4')), + array('config.update', array('version', '3.0.6-RC4')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php index ffebf66f2d..be8f9045f4 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7-rc1', '>='); + return version_compare($this->config['version'], '3.0.7-RC1', '>='); } static public function depends_on() @@ -62,7 +62,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration array('config.add', array('feed_topics_active', $this->config['feed_overall_topics'])), array('custom', array(array(&$this, 'delete_text_templates'))), - array('config.update', array('version', '3.0.7-rc1')), + array('config.update', array('version', '3.0.7-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php index 55bc2bc679..0e43229f13 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7-rc2', '>='); + return version_compare($this->config['version'], '3.0.7-RC2', '>='); } static public function depends_on() @@ -24,7 +24,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration return array( array('custom', array(array(&$this, 'update_email_hash'))), - array('config.update', array('version', '3.0.7-rc2')), + array('config.update', array('version', '3.0.7-RC2')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php index aeff35333e..ff7824fa3b 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.8-rc1', '>='); + return version_compare($this->config['version'], '3.0.8-RC1', '>='); } static public function depends_on() @@ -38,7 +38,7 @@ class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration array('config.update_if_equals', array(600, 'queue_interval', 60)), array('config.update_if_equals', array(50, 'email_package_size', 20)), - array('config.update', array('version', '3.0.8-rc1')), + array('config.update', array('version', '3.0.8-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php index 4c345b429b..d3beda63b7 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-rc1', '>='); + return version_compare($this->config['version'], '3.0.9-RC1', '>='); } static public function depends_on() @@ -74,7 +74,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc1 extends phpbb_db_migration array('custom', array(array(&$this, 'update_file_extension_group_names'))), array('custom', array(array(&$this, 'fix_firebird_qa_captcha'))), - array('config.update', array('version', '3.0.9-rc1')), + array('config.update', array('version', '3.0.9-RC1')), ); } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php index c0e662aa45..beb8873da7 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-rc2', '>='); + return version_compare($this->config['version'], '3.0.9-RC2', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc2 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.9-rc2')), + array('config.update', array('version', '3.0.9-RC2')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php index d6d1f14b2e..56e04e7235 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-rc3', '>='); + return version_compare($this->config['version'], '3.0.9-RC3', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc3 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.9-rc3')), + array('config.update', array('version', '3.0.9-RC3')), ); } } diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php index e673249343..5be1124287 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc4 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-rc4', '>='); + return version_compare($this->config['version'], '3.0.9-RC4', '>='); } static public function depends_on() @@ -22,7 +22,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc4 extends phpbb_db_migration public function update_data() { return array( - array('config.update', array('version', '3.0.9-rc4')), + array('config.update', array('version', '3.0.9-RC4')), ); } } From e667481c6c3d98808ac412531f562d68fad10ae5 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Fri, 2 Aug 2013 03:28:32 +0200 Subject: [PATCH 104/157] [ticket/11760] Use phpbb_version_compare() wrapper PHPBB3-11760 --- phpBB/phpbb/db/migration/data/30x/3_0_1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_10.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_11.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_3.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_4.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_5.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_6.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_7.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_8.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_9.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php | 2 +- phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_1.php b/phpBB/phpbb/db/migration/data/30x/3_0_1.php index c996a0138a..c5b1681d96 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10.php b/phpBB/phpbb/db/migration/data/30x/3_0_10.php index 122f93d6b4..640fcbc16f 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10', '>='); + return phpbb_version_compare($this->config['version'], '3.0.10', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php index 459b423736..e0aca09c3a 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.10-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php index 8d21cab45d..394e030acf 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.10-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php index 296c3c40af..92900e3aed 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.10-RC3', '>='); + return phpbb_version_compare($this->config['version'], '3.0.10-RC3', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11.php b/phpBB/phpbb/db/migration/data/30x/3_0_11.php index e063c699cc..3be03cec40 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_11.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_11.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.11', '>='); + return phpbb_version_compare($this->config['version'], '3.0.11', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php index 3a3908258f..f7b0247fdb 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.11-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.11-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php index 4b1b5642ce..204aa314ac 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.11-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.11-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php index 97331e9bb2..28ee84469a 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php @@ -13,7 +13,7 @@ class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.12-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.12-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php index 761ed5d2ec..984b8fb37e 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.1-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.1-RC1', '>='); } public function update_schema() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2.php b/phpBB/phpbb/db/migration/data/30x/3_0_2.php index eed5acef82..6e11e5a145 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php index a84f3c2d92..9a25628f25 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.2-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.2-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php index 33bacc077f..6c37d6701b 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.2-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.2-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_3.php b/phpBB/phpbb/db/migration/data/30x/3_0_3.php index 8984cf7b76..11fd2a2e80 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.3', '>='); + return phpbb_version_compare($this->config['version'], '3.0.3', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php index 69433f386e..cbeb00499a 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.3-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.3-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_4.php b/phpBB/phpbb/db/migration/data/30x/3_0_4.php index 9a0c132e78..4375a96dac 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_4.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_4.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_4 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.4', '>='); + return phpbb_version_compare($this->config['version'], '3.0.4', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php index e45bd3eeee..73334dcc6f 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.4-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.4-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5.php b/phpBB/phpbb/db/migration/data/30x/3_0_5.php index 16d2dee457..2700274f35 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_5.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_5.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_5 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.5', '>='); + return phpbb_version_compare($this->config['version'], '3.0.5', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php index 62ae7bff1a..90c6b3b46a 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.5-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.5-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php index d72176489b..2d1e5cfed8 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.5-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.5-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6.php b/phpBB/phpbb/db/migration/data/30x/3_0_6.php index bb651dc7cd..1877b0c5a1 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6', '>='); + return phpbb_version_compare($this->config['version'], '3.0.6', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php index 25f4995b0e..3e2a9544c7 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.6-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php index d5d14ab05d..439e25b100 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.6-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php index f3f1fb42f4..77b62d7fc7 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-RC3', '>='); + return phpbb_version_compare($this->config['version'], '3.0.6-RC3', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php index 6138ef351d..61a31d09e6 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.6-RC4', '>='); + return phpbb_version_compare($this->config['version'], '3.0.6-RC4', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7.php b/phpBB/phpbb/db/migration/data/30x/3_0_7.php index 9ff2e9e4ab..3eb1caddbc 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7', '>='); + return phpbb_version_compare($this->config['version'], '3.0.7', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php index c9cc9d19ac..c7b5c584ac 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7_pl1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7-pl1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.7-pl1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php index be8f9045f4..e0fd313834 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.7-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php index 0e43229f13..f4f3327385 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.7-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.7-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_8.php b/phpBB/phpbb/db/migration/data/30x/3_0_8.php index 8998ef9627..77771a9acd 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_8.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_8.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_8 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.8', '>='); + return phpbb_version_compare($this->config['version'], '3.0.8', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php index ff7824fa3b..c534cabb6c 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.8-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.8-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9.php b/phpBB/phpbb/db/migration/data/30x/3_0_9.php index d5269ea6f0..6a38793269 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9', '>='); + return phpbb_version_compare($this->config['version'], '3.0.9', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php index d3beda63b7..81c67550bd 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc1 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-RC1', '>='); + return phpbb_version_compare($this->config['version'], '3.0.9-RC1', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php index beb8873da7..1531f408b7 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc2 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-RC2', '>='); + return phpbb_version_compare($this->config['version'], '3.0.9-RC2', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php index 56e04e7235..851680b093 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc3 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-RC3', '>='); + return phpbb_version_compare($this->config['version'], '3.0.9-RC3', '>='); } static public function depends_on() diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php index 5be1124287..879538c341 100644 --- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php +++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php @@ -11,7 +11,7 @@ class phpbb_db_migration_data_30x_3_0_9_rc4 extends phpbb_db_migration { public function effectively_installed() { - return version_compare($this->config['version'], '3.0.9-RC4', '>='); + return phpbb_version_compare($this->config['version'], '3.0.9-RC4', '>='); } static public function depends_on() From d7e048da10d17beeda85e67bc6fcf8649716441a Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 21:30:14 +0200 Subject: [PATCH 105/157] [ticket/9550] Add template event memberlist_view_user_statistics_before Adds a template event required for the karma extension. It allows adding entries to the user statistics part of any user profile. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Used by the karma extension to add a karma score indication that allows other users to see how respected this user is. Prepend because karma score is often a more meaningful statistic than the bottom statistics (like "Most active topic"), and should therefore be more prominent. PHPBB3-9550 --- phpBB/styles/prosilver/template/memberlist_view.html | 1 + phpBB/styles/subsilver2/template/memberlist_view.html | 1 + 2 files changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 57cfcb86d9..b339e07d37 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -77,6 +77,7 @@

    {L_USER_FORUM}

    +
    {L_JOINED}{L_COLON}
    {JOINED}
    {L_VISITED}{L_COLON}
    {VISITED}
    diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 464369a7a8..e097e09565 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -66,6 +66,7 @@
    From ef7861bffc557e5f979ec91704d4a4da398484bc Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 22:06:41 +0200 Subject: [PATCH 107/157] [ticket/9550] Add template event viewtopic_body_post_buttons_after Adds a template event required for the karma extension. It allows adding post buttons to posts (next to the quote and edit buttons). Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Used by the karma extension to add thumbs up/down icons that allow users to give karma on posts. PHPBB3-9550 --- phpBB/styles/prosilver/template/viewtopic_body.html | 1 + phpBB/styles/subsilver2/template/viewtopic_body.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index a8bac42842..54f0b27c4d 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -142,6 +142,7 @@
  • {L_WARN_USER}
  • {L_INFORMATION}
  • {L_REPLY_WITH_QUOTE}
  • + diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 299b8219eb..9398953532 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -315,7 +315,7 @@
    - + From fd8ab9255981f9e613a0f0419c3115e4c470c5a7 Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 22:19:37 +0200 Subject: [PATCH 108/157] [ticket/9550] Add template event viewtopic_body_post_buttons_before Adds the prepend counterpart of a template event required for the karma extension. It allows adding post buttons to posts (next to the quote and edit buttons). Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Per suggestion of nickvergessen, add a counterpart for every append or prepend event. PHPBB3-9550 --- phpBB/styles/prosilver/template/viewtopic_body.html | 1 + phpBB/styles/subsilver2/template/viewtopic_body.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 54f0b27c4d..bc8a71c9bf 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -136,6 +136,7 @@
      +
    • {L_EDIT_POST}
    • {L_DELETE_POST}
    • {L_REPORT_POST}
    • diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 9398953532..38847d0805 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -315,7 +315,7 @@
    - + From c049c8d6f0aea53e39de64c82a72ca4a724cb17d Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 22:25:49 +0200 Subject: [PATCH 109/157] [ticket/9550] Add template event viewtopic_body_postrow_custom_fields_before Adds a template event required for the karma extension. It allows adding data before the custom fields, under the username and avatar next to every post. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Used by the karma extension to add a karma score indication that allows users to see how respected the post author is. PHPBB3-9550 --- phpBB/styles/prosilver/template/viewtopic_body.html | 1 + phpBB/styles/subsilver2/template/viewtopic_body.html | 1 + 2 files changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index bc8a71c9bf..3260ae8b92 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -239,6 +239,7 @@
    {postrow.PROFILE_FIELD1_NAME}{L_COLON} {postrow.PROFILE_FIELD1_VALUE}
    +
    {postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE}
    diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 38847d0805..787f67275b 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -208,6 +208,7 @@
    {postrow.PROFILE_FIELD1_NAME}{L_COLON} {postrow.PROFILE_FIELD1_VALUE} +
    {postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE} From 84689680143f6e2b02dfb41d019419dce91a47ec Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 22:33:45 +0200 Subject: [PATCH 110/157] [ticket/9550] Add template event viewtopic_body_postrow_custom_fields_after Adds the append counterpart of a template event required for the karma extension. It allows adding data after the custom fields under the username and avatar next to every post. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Per suggestion of nickvergessen, add a counterpart for every append or prepend event. PHPBB3-9550 --- phpBB/styles/prosilver/template/viewtopic_body.html | 1 + phpBB/styles/subsilver2/template/viewtopic_body.html | 1 + 2 files changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 3260ae8b92..c8a99b18e4 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -243,6 +243,7 @@
    {postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE}
    + diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 787f67275b..51ab702b51 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -212,6 +212,7 @@
    {postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON} {postrow.custom_fields.PROFILE_FIELD_VALUE} + From 2f1635116cbaaee3645044022f883f075f5ded69 Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 23:31:41 +0200 Subject: [PATCH 111/157] [ticket/9550] Add template event ucp_pm_viewmessage_custom_fields_before Adds a template event required for the karma extension. It allows adding data before the custom fields under the username and avatar next to every private message in prosilver. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Used by the karma extension to add a karma score indication that allows users to see how respected the pm sender is. PHPBB3-9550 --- phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index 22149c8b80..accea4d3dd 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -85,6 +85,7 @@
    {L_JOINED}{L_COLON} {AUTHOR_JOINED}
    {L_LOCATION}{L_COLON} {AUTHOR_FROM}
    +
    {custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_VALUE}
    From cd0b1be2082f11a80b42f7f25841d0e432ff5912 Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 23:36:00 +0200 Subject: [PATCH 112/157] [ticket/9550] Add template event ucp_pm_viewmessage_custom_fields_after Adds the append counterpart of a template event required for the karma extension. It allows adding data after the custom fields under the username and avatar next to every private message in prosilver. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Per suggestion of nickvergessen, add a counterpart for every append or prepend event. PHPBB3-9550 --- phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index accea4d3dd..4f2531d3a6 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -89,6 +89,7 @@
    {custom_fields.PROFILE_FIELD_NAME}{L_COLON} {custom_fields.PROFILE_FIELD_VALUE}
    + From ee251fe45b6fb27900df91a3909e28aa8c785543 Mon Sep 17 00:00:00 2001 From: rechosen Date: Wed, 17 Jul 2013 13:44:27 +0200 Subject: [PATCH 113/157] [ticket/9550] Add template event memberlist_body_username_append Adds a template event required for the karma extension. It allows adding information after every username in the memberlist. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Used by the karma extension to add a karma score indication that allows other users to see how respected every listed user is. PHPBB3-9550 --- phpBB/styles/prosilver/template/memberlist_body.html | 2 +- phpBB/styles/subsilver2/template/memberlist_body.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 07a7e2e182..4c5c576eb1 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -109,7 +109,7 @@
    - + diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index 09336fb8a3..8fd7451b55 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -66,7 +66,7 @@ - + From 075f491cb868119bf7de2f3dc6e0f0f79db7156e Mon Sep 17 00:00:00 2001 From: rechosen Date: Wed, 17 Jul 2013 13:49:12 +0200 Subject: [PATCH 114/157] [ticket/9550] Add template event memberlist_body_username_prepend Adds the prepend counterpart of a template event required for the karma extension. It allows adding information before every username in the memberlist. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Per suggestion of nickvergessen, add a counterpart for every append or prepend event. PHPBB3-9550 --- phpBB/styles/prosilver/template/memberlist_body.html | 2 +- phpBB/styles/subsilver2/template/memberlist_body.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 4c5c576eb1..459c3f6bc6 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -109,7 +109,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html index 8fd7451b55..7c4d301de7 100644 --- a/phpBB/styles/subsilver2/template/memberlist_body.html +++ b/phpBB/styles/subsilver2/template/memberlist_body.html @@ -66,7 +66,7 @@ - + From 8c565ea1a642ab7b72d22eaf6c83236cef9444a1 Mon Sep 17 00:00:00 2001 From: rechosen Date: Wed, 17 Jul 2013 15:06:53 +0200 Subject: [PATCH 115/157] [ticket/9550] Add the new template events to phpBB/docs/events.md The newly added template events weren't listed and described yet in events.md. Fixed now. PHPBB3-9550 --- phpBB/docs/events.md | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 855f238653..d037237b34 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -52,6 +52,38 @@ index_body_stat_blocks_before + styles/subsilver2/template/index_body.html * Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks +memberlist_body_username_append +=== +* Locations: + + styles/prosilver/template/memberlist_body.html + + styles/subsilver2/template/memberlist_body.html +* Purpose: Add information after every username in the memberlist. Works in +all display modes (leader, group and normal memberlist). + +memberlist_body_username_prepend +=== +* Locations: + + styles/prosilver/template/memberlist_body.html + + styles/subsilver2/template/memberlist_body.html +* Purpose: Add information before every username in the memberlist. Works in +all display modes (leader, group and normal memberlist). + +memberlist_view_user_statistics_after +=== +* Locations: + + styles/prosilver/template/memberlist_view.html + + styles/subsilver2/template/memberlist_view.html +* Purpose: Add entries to the bottom of the user statistics part of any user +profile + +memberlist_view_user_statistics_before +=== +* Locations: + + styles/prosilver/template/memberlist_view.html + + styles/subsilver2/template/memberlist_view.html +* Purpose: Add entries to the top of the user statistics part of any user +profile + overall_footer_after === * Locations: @@ -132,6 +164,18 @@ topiclist_row_append + styles/subsilver2/template/viewforum_body.html * Purpose: Add content into topic rows (inside the elements containing topic titles) +ucp_pm_viewmessage_custom_fields_after +=== +* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Purpose: Add data after the custom fields, under the username and avatar +next to every private message in prosilver + +ucp_pm_viewmessage_custom_fields_before +=== +* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Purpose: Add data before the custom fields, under the username and avatar +next to every private message in prosilver + ucp_pm_viewmessage_print_head_append === * Location: styles/prosilver/template/ucp_pm_viewmessage_print.html @@ -151,6 +195,38 @@ viewtopic_body_footer_before and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in Subsilver2. +viewtopic_body_post_buttons_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add post button to posts (next to edit, quote etc), at the end of +the list. + +viewtopic_body_post_buttons_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add post button to posts (next to edit, quote etc), at the start of +the list. + +viewtopic_body_postrow_custom_fields_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add data after the postrow custom fields, under the username and +avatar next to every post. + +viewtopic_body_postrow_custom_fields_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add data before the postrow custom fields, under the username and +avatar next to every post. + viewtopic_topic_title_prepend === * Locations: From f61910c3f83fd4de16ca946232bab1bd3c679341 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 2 Aug 2013 11:38:25 +0200 Subject: [PATCH 116/157] [ticket/9550] Improve template event descriptions in phpBB/docs/events.md Per suggestion of nickvergessen, stick to "before" and "after" in the template event descriptions instead of "at the top of" and "at the bottom of". PHPBB3-9550 --- phpBB/docs/events.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index d037237b34..b1e8c7ad05 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -73,16 +73,14 @@ memberlist_view_user_statistics_after * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html -* Purpose: Add entries to the bottom of the user statistics part of any user -profile +* Purpose: Add entries after the user statistics part of any user profile memberlist_view_user_statistics_before === * Locations: + styles/prosilver/template/memberlist_view.html + styles/subsilver2/template/memberlist_view.html -* Purpose: Add entries to the top of the user statistics part of any user -profile +* Purpose: Add entries before the user statistics part of any user profile overall_footer_after === From 61fd61692b5c93eee560424717d272d84d710cd4 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 2 Aug 2013 11:44:07 +0200 Subject: [PATCH 117/157] [ticket/9550] Improve template event descriptions in phpBB/docs/events.md Update the custom_fields template events descriptions according to nickvergessen's suggestions. PHPBB3-9550 --- phpBB/docs/events.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index b1e8c7ad05..af6e6bdb1c 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -165,14 +165,14 @@ topiclist_row_append ucp_pm_viewmessage_custom_fields_after === * Location: styles/prosilver/template/ucp_pm_viewmessage.html -* Purpose: Add data after the custom fields, under the username and avatar -next to every private message in prosilver +* Purpose: Add data after the custom fields on the user profile when viewing +a private message ucp_pm_viewmessage_custom_fields_before === * Location: styles/prosilver/template/ucp_pm_viewmessage.html -* Purpose: Add data before the custom fields, under the username and avatar -next to every private message in prosilver +* Purpose: Add data before the custom fields on the user profile when viewing +a private message ucp_pm_viewmessage_print_head_append === @@ -214,16 +214,16 @@ viewtopic_body_postrow_custom_fields_after * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html -* Purpose: Add data after the postrow custom fields, under the username and -avatar next to every post. +* Purpose: Add data after the custom fields on the user profile when viewing +a post viewtopic_body_postrow_custom_fields_before === * Locations: + styles/prosilver/template/viewtopic_body.html + styles/subsilver2/template/viewtopic_body.html -* Purpose: Add data before the postrow custom fields, under the username and -avatar next to every post. +* Purpose: Add data before the custom fields on the user profile when viewing +a post viewtopic_topic_title_prepend === From 351abf38830ddb8d6466f39ec6a173ce688b0206 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 2 Aug 2013 14:07:49 +0200 Subject: [PATCH 118/157] [ticket/9550] Break up a long ugly line in subsilver2 viewtopic_body.html Per request of nickvergessen, break up the long post buttons line in viewtopic_body.html of subsilver2 into nicely indented parent and child elements. Keep the whitespace in such a way that browsers display the buttons pixel-perfectly equal to the old code. In the process, move the viewtopic_body_post_buttons_before event to a more logical (though possibly less intuitive) place (only in subsilver2). PHPBB3-9550 --- .../subsilver2/template/viewtopic_body.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html index 51ab702b51..26e74b8c38 100644 --- a/phpBB/styles/subsilver2/template/viewtopic_body.html +++ b/phpBB/styles/subsilver2/template/viewtopic_body.html @@ -317,7 +317,21 @@ - + From 8a02db317ef3c2d3c4e3dcfc5f8b85397f7ebb4a Mon Sep 17 00:00:00 2001 From: s9e Date: Sat, 3 Aug 2013 12:20:52 +0200 Subject: [PATCH 119/157] [ticket/11762] Use the === operator to distinguish "0" from "" PHPBB3-11762 --- phpBB/includes/functions_content.php | 4 +-- .../generate_text_for_display.php | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 tests/text_processing/generate_text_for_display.php diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index b7650ecd6a..6213d2fd24 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -413,7 +413,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) { static $bbcode; - if (!$text) + if ($text === '') { return ''; } @@ -459,7 +459,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb $uid = $bitfield = ''; $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0); - if (!$text) + if ($text === '') { return; } diff --git a/tests/text_processing/generate_text_for_display.php b/tests/text_processing/generate_text_for_display.php new file mode 100644 index 0000000000..4088e33f30 --- /dev/null +++ b/tests/text_processing/generate_text_for_display.php @@ -0,0 +1,36 @@ +optionset('viewcensors', false); + } + + public function test_empty_string() + { + $this->assertSame('', generate_text_for_display('', '', '', 0)); + } + + public function test_zero_string() + { + $this->assertSame('0', generate_text_for_display('0', '', '', 0)); + } +} From 68aa974a207b444199fabe9d754f403d27d700ad Mon Sep 17 00:00:00 2001 From: s9e Date: Sat, 3 Aug 2013 12:29:23 +0200 Subject: [PATCH 120/157] [ticket/11762] Fixed test's filename PHPBB3-11762 --- ...te_text_for_display.php => generate_text_for_display_test.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/text_processing/{generate_text_for_display.php => generate_text_for_display_test.php} (100%) diff --git a/tests/text_processing/generate_text_for_display.php b/tests/text_processing/generate_text_for_display_test.php similarity index 100% rename from tests/text_processing/generate_text_for_display.php rename to tests/text_processing/generate_text_for_display_test.php From 9db1728b4b976c99f5811e578619e37c69e306cd Mon Sep 17 00:00:00 2001 From: s9e Date: Sat, 3 Aug 2013 14:05:40 +0200 Subject: [PATCH 121/157] [ticket/11762] Added call to test class's parent::setUp(). Added call to test class's parent::setUp(). Updated copyright year. PHPBB3-11762 --- tests/text_processing/generate_text_for_display_test.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php index 4088e33f30..a157fe7d9a 100644 --- a/tests/text_processing/generate_text_for_display_test.php +++ b/tests/text_processing/generate_text_for_display_test.php @@ -2,7 +2,7 @@ /** * * @package testing -* @copyright (c) 2011 phpBB Group +* @copyright (c) 2013 phpBB Group * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ @@ -18,6 +18,8 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca { global $cache, $user; + parent::setUp(); + $cache = new phpbb_mock_cache; $user = new phpbb_mock_user; From 71ababe6fb1648c9cb286c8c84e939a36a35cbbf Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sat, 3 Aug 2013 17:30:28 +0200 Subject: [PATCH 122/157] [ticket/11763] Add missing variable when reporting a PM to avoid SQL Error PHPBB3-11763 --- phpBB/report.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpBB/report.php b/phpBB/report.php index c9ca57ecbe..5081f90ad1 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -139,9 +139,10 @@ else $reported_post_text = $report_data['message_text']; $reported_post_bitfield = $report_data['bbcode_bitfield']; - $reported_post_enable_bbcode = $report_data['reported_post_enable_bbcode']; - $reported_post_enable_smilies = $report_data['reported_post_enable_smilies']; - $reported_post_enable_magic_url = $report_data['reported_post_enable_magic_url']; + $reported_post_uid = $report_data['bbcode_uid']; + $reported_post_enable_bbcode = $report_data['enable_bbcode']; + $reported_post_enable_smilies = $report_data['enable_smilies']; + $reported_post_enable_magic_url = $report_data['enable_magic_url']; } if ($config['enable_post_confirm'] && !$user->data['is_registered']) From 28a0a9e0b1cf77f1be64934f98e4c607d6098362 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sat, 3 Aug 2013 21:46:06 +0100 Subject: [PATCH 123/157] [ticket/11639] Changing how censorship is handled. sub-task of ticket PHPBB3-11635: find and fix all bypasses of generate_text_for_* PHPBB3-11639 --- phpBB/includes/functions_posting.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index acf0cc874b..c528d36fef 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1093,13 +1093,12 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $poster_id = $row['user_id']; $post_subject = $row['post_subject']; - $message = censor_text($row['post_text']); $decoded_message = false; if ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) { - $decoded_message = $message; + $decoded_message = censor_text($row['post_text']); decode_message($decoded_message, $row['bbcode_uid']); $decoded_message = bbcode_nl2br($decoded_message); @@ -1107,8 +1106,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0); $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0); - // Do not censor text because it has already been censored before - $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false); + $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true); if (!empty($attachments[$row['post_id']])) { From 3713ff71eafa575fc78f788085803ec6488c8fcd Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 6 Aug 2013 21:47:35 +0300 Subject: [PATCH 124/157] [ticket/11770] Fix class name for pm list PHPBB3-11770 --- phpBB/styles/prosilver/template/ucp_pm_viewfolder.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index c5078df268..9cbff64a6a 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -53,7 +53,7 @@ -
      +
      • From 2508439b02f5115e0557b2eee467e5ec5737d350 Mon Sep 17 00:00:00 2001 From: Andy Chase Date: Mon, 5 Aug 2013 10:35:39 -0700 Subject: [PATCH 125/157] [ticket/11761] Serve blank file locally in functional test Example.org no longer serves blank responses, failing functional tests. this patch creates a blank file and serve it locally during the test, instead of hitting the http://example.org servers kindly provided by IANA. PHPBB3-11761 --- phpBB/develop/blank.gif | 0 phpBB/develop/blank.jpg | 0 tests/functional/fileupload_remote_test.php | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 phpBB/develop/blank.gif create mode 100644 phpBB/develop/blank.jpg diff --git a/phpBB/develop/blank.gif b/phpBB/develop/blank.gif new file mode 100644 index 0000000000..e69de29bb2 diff --git a/phpBB/develop/blank.jpg b/phpBB/develop/blank.jpg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php index 8e361ab77b..65c4b6b7c4 100644 --- a/tests/functional/fileupload_remote_test.php +++ b/tests/functional/fileupload_remote_test.php @@ -44,14 +44,14 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_invalid_extension() { $upload = new fileupload('', array('jpg'), 100); - $file = $upload->remote_upload('http://example.com/image.gif'); + $file = $upload->remote_upload(self::$root_url . 'develop/blank.gif'); $this->assertEquals('URL_INVALID', $file->error[0]); } - public function test_non_existant() + public function test_empty_file() { $upload = new fileupload('', array('jpg'), 100); - $file = $upload->remote_upload('http://example.com/image.jpg'); + $file = $upload->remote_upload(self::$root_url . 'develop/blank.jpg'); $this->assertEquals('EMPTY_REMOTE_DATA', $file->error[0]); } From 91eccc708bb0ca4143ad670be6ecddef818b9316 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 8 Aug 2013 13:42:51 +0200 Subject: [PATCH 126/157] [ticket/11775] Fix error when moving the last post to another topic PHPBB3-11775 --- phpBB/includes/mcp/mcp_topic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 76985488b7..8e0e89e3da 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -668,10 +668,10 @@ function merge_posts($topic_id, $to_topic_id) } // If the topic no longer exist, we will update the topic watch table. - phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id); + phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', array($topic_id), $to_topic_id); // If the topic no longer exist, we will update the bookmarks table. - phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_id, $to_topic_id); + phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id); } // Link to the new topic From 74559eb0d59d9b97d6769ef5d57a3b375a6b8507 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 8 Aug 2013 15:50:20 +0200 Subject: [PATCH 127/157] [ticket/11774] Fix constant to avoid PHP errors PHPBB3-11774 --- phpBB/includes/mcp/mcp_reports.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 72400ce623..3f48c58073 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -187,7 +187,7 @@ class mcp_reports 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], - 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == POST_UNAPPROVED), + 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED), 'S_POST_LOCKED' => $post_info['post_edit_locked'], 'S_USER_NOTES' => true, From a6e69f377bb436fe59eed9fdedc0cd735d8d8ce9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 8 Aug 2013 23:33:26 +0200 Subject: [PATCH 128/157] [ticket/11775] Backport moving of the posting functions to 3.0 PHPBB3-11775 --- tests/functional/posting_test.php | 101 -------------- .../phpbb_functional_test_case.php | 131 ++++++++++++++++++ 2 files changed, 131 insertions(+), 101 deletions(-) diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 9bcfcc2fda..7fd1e4fdcf 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -32,105 +32,4 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case $crawler = self::request('GET', "posting.php?mode=quote&f=2&t={$post2['topic_id']}&p={$post2['post_id']}&sid={$this->sid}"); $this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text()); } - - /** - * Creates a topic - * - * Be sure to login before creating - * - * @param int $forum_id - * @param string $subject - * @param string $message - * @param array $additional_form_data Any additional form data to be sent in the request - * @return array post_id, topic_id - */ - public function create_topic($forum_id, $subject, $message, $additional_form_data = array()) - { - $posting_url = "posting.php?mode=post&f={$forum_id}&sid={$this->sid}"; - - $form_data = array_merge(array( - 'subject' => $subject, - 'message' => $message, - 'post' => true, - ), $additional_form_data); - - return self::submit_post($posting_url, 'POST_TOPIC', $form_data); - } - - /** - * Creates a post - * - * Be sure to login before creating - * - * @param int $forum_id - * @param string $subject - * @param string $message - * @param array $additional_form_data Any additional form data to be sent in the request - * @return array post_id, topic_id - */ - public function create_post($forum_id, $topic_id, $subject, $message, $additional_form_data = array()) - { - $posting_url = "posting.php?mode=reply&f={$forum_id}&t={$topic_id}&sid={$this->sid}"; - - $form_data = array_merge(array( - 'subject' => $subject, - 'message' => $message, - 'post' => true, - ), $additional_form_data); - - return self::submit_post($posting_url, 'POST_REPLY', $form_data); - } - - /** - * Helper for submitting posts - * - * @param string $posting_url - * @param string $posting_contains - * @param array $form_data - * @return array post_id, topic_id - */ - protected function submit_post($posting_url, $posting_contains, $form_data) - { - $this->add_lang('posting'); - - $crawler = self::request('GET', $posting_url); - $this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text()); - - $hidden_fields = array( - $crawler->filter('[type="hidden"]')->each(function ($node, $i) { - return array('name' => $node->getAttribute('name'), 'value' => $node->getAttribute('value')); - }), - ); - - foreach ($hidden_fields as $fields) - { - foreach($fields as $field) - { - $form_data[$field['name']] = $field['value']; - } - } - - // Bypass time restriction that said that if the lastclick time (i.e. time when the form was opened) - // is not at least 2 seconds before submission, cancel the form - $form_data['lastclick'] = 0; - - // I use a request because the form submission method does not allow you to send data that is not - // contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs) - // Instead, I send it as a request with the submit button "post" set to true. - $crawler = self::request('POST', $posting_url, $form_data); - $this->assertContains($this->lang('POST_STORED'), $crawler->filter('html')->text()); - - $url = $crawler->selectLink($this->lang('VIEW_MESSAGE', '', ''))->link()->getUri(); - - $matches = $topic_id = $post_id = false; - preg_match_all('#&t=([0-9]+)(&p=([0-9]+))?#', $url, $matches); - - $topic_id = (int) (isset($matches[1][0])) ? $matches[1][0] : 0; - $post_id = (int) (isset($matches[3][0])) ? $matches[3][0] : 0; - - return array( - 'topic_id' => $topic_id, - 'post_id' => $post_id, - ); - } } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 684d7a84cb..15f7814800 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -593,4 +593,135 @@ class phpbb_functional_test_case extends phpbb_test_case { self::assertEquals($status_code, self::$client->getResponse()->getStatus()); } + + /** + * Creates a topic + * + * Be sure to login before creating + * + * @param int $forum_id + * @param string $subject + * @param string $message + * @param array $additional_form_data Any additional form data to be sent in the request + * @return array post_id, topic_id + */ + public function create_topic($forum_id, $subject, $message, $additional_form_data = array()) + { + $posting_url = "posting.php?mode=post&f={$forum_id}&sid={$this->sid}"; + + $form_data = array_merge(array( + 'subject' => $subject, + 'message' => $message, + 'post' => true, + ), $additional_form_data); + + return self::submit_post($posting_url, 'POST_TOPIC', $form_data); + } + + /** + * Creates a post + * + * Be sure to login before creating + * + * @param int $forum_id + * @param int $topic_id + * @param string $subject + * @param string $message + * @param array $additional_form_data Any additional form data to be sent in the request + * @return array post_id, topic_id + */ + public function create_post($forum_id, $topic_id, $subject, $message, $additional_form_data = array()) + { + $posting_url = "posting.php?mode=reply&f={$forum_id}&t={$topic_id}&sid={$this->sid}"; + + $form_data = array_merge(array( + 'subject' => $subject, + 'message' => $message, + 'post' => true, + ), $additional_form_data); + + return self::submit_post($posting_url, 'POST_REPLY', $form_data); + } + + /** + * Helper for submitting posts + * + * @param string $posting_url + * @param string $posting_contains + * @param array $form_data + * @return array post_id, topic_id + */ + protected function submit_post($posting_url, $posting_contains, $form_data) + { + $this->add_lang('posting'); + + $crawler = self::request('GET', $posting_url); + $this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text()); + + $hidden_fields = array( + $crawler->filter('[type="hidden"]')->each(function ($node, $i) { + return array('name' => $node->getAttribute('name'), 'value' => $node->getAttribute('value')); + }), + ); + + foreach ($hidden_fields as $fields) + { + foreach($fields as $field) + { + $form_data[$field['name']] = $field['value']; + } + } + + // Bypass time restriction that said that if the lastclick time (i.e. time when the form was opened) + // is not at least 2 seconds before submission, cancel the form + $form_data['lastclick'] = 0; + + // I use a request because the form submission method does not allow you to send data that is not + // contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs) + // Instead, I send it as a request with the submit button "post" set to true. + $crawler = self::request('POST', $posting_url, $form_data); + $this->assertContains($this->lang('POST_STORED'), $crawler->filter('html')->text()); + $url = $crawler->selectLink($this->lang('VIEW_MESSAGE', '', ''))->link()->getUri(); + + return array( + 'topic_id' => $this->get_parameter_from_link($url, 't'), + 'post_id' => $this->get_parameter_from_link($url, 'p'), + ); + } + + /* + * Returns the requested parameter from a URL + * + * @param string $url + * @param string $parameter + * @return string Value of the parameter in the URL, null if not set + */ + public function get_parameter_from_link($url, $parameter) + { + if (strpos($url, '?') === false) + { + return null; + } + + $url_parts = explode('?', $url); + if (isset($url_parts[1])) + { + $url_parameters = $url_parts[1]; + if (strpos($url_parameters, '#') !== false) + { + $url_parameters = explode('#', $url_parameters); + $url_parameters = $url_parameters[0]; + } + + foreach (explode('&', $url_parameters) as $url_param) + { + list($param, $value) = explode('=', $url_param); + if ($param == $parameter) + { + return $value; + } + } + } + return null; + } } From a9b5e77e684043924f8c34c8782b32a0f146228c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 9 Aug 2013 00:41:28 +0200 Subject: [PATCH 129/157] [ticket/11775] Add functional test for moving the last post PHPBB3-11775 --- tests/functional/mcp_test.php | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/functional/mcp_test.php diff --git a/tests/functional/mcp_test.php b/tests/functional/mcp_test.php new file mode 100644 index 0000000000..f7e15de853 --- /dev/null +++ b/tests/functional/mcp_test.php @@ -0,0 +1,43 @@ +login(); + + // Test creating topic + $post = $this->create_topic(2, 'Test Topic 2', 'Testing move post with "Move posts" option from Quick-Moderator Tools.'); + + $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); + $this->assertContains('Testing move post with "Move posts" option from Quick-Moderator Tools.', $crawler->filter('html')->text()); + + // Test moving a post + $this->add_lang('mcp'); + $form = $crawler->selectButton('Go')->eq(1)->form(); + $form['action']->select('merge'); + $crawler = self::submit($form); + + // Select the post in MCP + $form = $crawler->selectButton($this->lang('SUBMIT'))->form(array( + 'to_topic_id' => 1, + )); + $form['post_id_list'][0]->tick(); + $crawler = self::submit($form); + $this->assertContains($this->lang('MERGE_POSTS'), $crawler->filter('html')->text()); + + $form = $crawler->selectButton('Yes')->form(); + $crawler = self::submit($form); + $this->assertContains($this->lang('POSTS_MERGED_SUCCESS'), $crawler->text()); + } +} From 0aea5e48d8ad3505fc957d67131eece477d84947 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 11 Aug 2013 10:37:29 +0300 Subject: [PATCH 130/157] [ticket/11779] Fix unapproved messages class name PHPBB3-11779 --- phpBB/styles/prosilver/template/mcp_front.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html index e88b7c62df..402cfe029a 100644 --- a/phpBB/styles/prosilver/template/mcp_front.html +++ b/phpBB/styles/prosilver/template/mcp_front.html @@ -13,7 +13,7 @@

        {L_UNAPPROVED_TOTAL}

        -
          +
          • {L_VIEW_DETAILS}
            @@ -21,7 +21,7 @@
          -
            +
            • From fe3b57a1416fbc70779aebe6ff15fd6f1733f269 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 11 Aug 2013 10:51:16 +0300 Subject: [PATCH 131/157] [ticket/11780] Remove unused images PHPBB3-11780 --- .../prosilver/theme/en/button_pm_forward.gif | Bin 2168 -> 0 bytes .../styles/prosilver/theme/en/button_pm_new.gif | Bin 2005 -> 0 bytes .../prosilver/theme/en/button_pm_reply.gif | Bin 2126 -> 0 bytes .../prosilver/theme/en/button_topic_locked.gif | Bin 1923 -> 0 bytes .../prosilver/theme/en/button_topic_new.gif | Bin 2737 -> 0 bytes .../prosilver/theme/en/button_topic_reply.gif | Bin 2135 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 phpBB/styles/prosilver/theme/en/button_pm_forward.gif delete mode 100644 phpBB/styles/prosilver/theme/en/button_pm_new.gif delete mode 100644 phpBB/styles/prosilver/theme/en/button_pm_reply.gif delete mode 100644 phpBB/styles/prosilver/theme/en/button_topic_locked.gif delete mode 100644 phpBB/styles/prosilver/theme/en/button_topic_new.gif delete mode 100644 phpBB/styles/prosilver/theme/en/button_topic_reply.gif diff --git a/phpBB/styles/prosilver/theme/en/button_pm_forward.gif b/phpBB/styles/prosilver/theme/en/button_pm_forward.gif deleted file mode 100644 index 3384df34be5926db98693854fd66da017ec9d013..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2168 zcmV-;2#5DaNk%w1VPF6<0OkMy@7&<_5e393Gl+=cq)`*+e ziJaSwpxBh8*OQ~$m#5m6rr?~c-lMVHp|9JZuH>q?-mSUmxWwnc%HzDo?Z(jL$Ik1{ z)#=RB?b+Vw)!Osv?DFXA-rnKf-{IZf-~ejI085R;*5b(6ASma<|%v$mop9>5$Co<@5UM_WSwy_{qk?$HTwo2?O!PL^x)6vlX|Ns8}{{8*^{QUg;`}_L(`uX|!`1ttu_xJYp_VxAk^z`)e^YilZ z^6~NU@bK{O@9*yJ?(OaE?Ck98>+9<3>gnm}=;-K=kB?+zWZ~lFA^8LW004ggEC2ui z0AK(z000O7fPY0}VO)lXh>41ejE#n}-l1 zI+#ciKpOxdB18xw^9AdNgSZ2N|*^O`*{T zQ8sJ;{K%c_XHC(f{@&=_%hy2%zHd%A_@VcQgBEY7_WdivL4r3GA~*o@Cc@vq4n#!Q z>vwMk2Z=!!&b*h6+&-vNvjM!cr*#6>(A5Wepi8u}nkT>8U4ttOn8i;>jU^$Qr z9~%FNvz$hQ^y1Ovzz*)UHy(TB#qmZPr=iwHg5&u!$AlDC=)eUpWVpi|wpG|62M*LA zB8W9i_`w4xTrdX;51cq5h%eM|fdfIzaiNGWIKaUiAXa!?g>blWnj5IOQDKGt(4pl2 zl1w^40F!i-;D7>3D&W8hbP(Xck^?wUf|4~%^d$}xfj~zP0=__plS^uu<(5@CV5X7^ zo~D-{eY^qXlK#};=bwN&31}SyKmfrCD;PRJ9a;tof}dzQfCHfu*-!@zlKR=@1a%1N zr<4O|2?Goz7^=XZaGVB*9I5sJ$Dn`uW5=wt*6P3pwayxZ2ZnkO#H=1nQ0oN3&N_hu z1I&s6jdn}`L9J5uFo6fOV!FcyAZ^e?t#icDM;vq55r-e(=1QwScciQCy6m>=?z`~D zD=)m=&XI1t@cM(tzWny<@4o;CEbzbt7i=&d{^X(X!VEX;@WT*CEb+t?SDc6cKYC=W z@x~l??D5AShb;2QBs^2#i??DESn$1L;AG}C;?GOU!5a?L#V?DNky`$EPg zUG!th(MTt)bSZ0ep~@ddkikqOR99{F)sSpKh7o`Ku>=)SG$HobWS4FB*=VP&_S$T# z9R(Fj{Go&sRba97-FW9c3Kms3p~Mtc=nVAWgcmOJ9c5TC#S>ZJ!N=o}M=tr~lvi%~ z<(OxlIUZR&(L@<~7%uwgg_|rk=q0DF`s%EUT*m1Z$1eNqv{U^0=K{C!NgH^~v4$CD ztT6{3a&ojyJZL%fExjf zAb|uU2;hbq2Y@7j3IdoRfd*;F!Gi-MtntPS4&Z?t&OiYNEWlpn1IYmb06zsTzzyqa z$S2r9zSEiOTn?bX3^q6e0SI7yE^xv61kgYZ#?J)}6aX7k-~b7jA%$_+p956D20N5b zgEMe}12lk!_-#-H>sx>vX4McR81aZmD8mJ9csf|c$^i#R15wt%!UX_i0S<6M8sb-m zp_DI*0OSDyCE$Pn*e{Ay(8dXEF^=&A2?YcYhcj|A02CMj03XQ78wdc3+z=2CZdnFf zajAP2=rfkcXjk@35MIK#ta`G3Z{}@IeWLaD?~NOZi5C2J}rN z2W&W|CDj1H9E3819({vC9UuT7&H#uKu%b@=$&Hkj0j8hTJl$RJ0>v{FMWgCtUjWj8 zh7nM}3_~$PH_@tArncb>a5N(YTsV}aE+CjaC29b3IgtY_K#Fz!r!(B3$H8uuu%`n` zM69O_psWE6z&mIg9?QIkqyczoNT?agfQB{*gR_^d>}0J6S;@A6w7uX&V;9TWhmcmW z5D_0kW=q@J+EyXrFNCZ{Jbhn3Xagn!@v3Y`TF|$`}_O&`1tDT z>g((4?Ck9A?d|vX_x1Jl_V)JZ=;-k9@b2#J@9*#Q^z`xZ@$>WZ{r&yLMrGuxxZs?u z^3>b@{{Fx?SpaIq$yIU3Qf|XVV~>xI(s78+ZG^u!SoY)R^78WApsvnid;ms+9hK7A zm8NaA+TPyb!$f0dW@g`{veVMh+l`>*$j{e_o5|Va>CDsW_4~=j!sX-P-J`Ml@$<@G zdF{r~>dn;Hl%&^xl+t^UV42F6mX-ipst}RU+Lou=m#2uS#nREy=E>0QDJne%IUPUw0U`Xwawzi#l`8k#G<02+}zyDV0wgvgznqlyVvlL%<6Qt+`hiPxVX3x zbI9%4-o)18=fKMO`S^**=*q^!Zf$lhjEvpp?wP~r&CSh-x#Y~41ejE#E{3m`1$(#{Qds_0RI`#W*}e!dkzvRTu5es422CH z$QVG8Vu%4l68agCB;iB{6)Bcr;6MaLAPKin6tQsOffzAnBxp&~9)z1Xb50zv<>o{P zNd^EJ3S>)(5I2Vm$a3>21d29nlo(K=B*i2*gANdp6GB1=24alBqOfaDdk@m8T{|&E zh_n;`A0Qd9RxaHKA}*%&VB-NrwIMv#WBOjIzLWi{2Unju_4Go^@FIa6Y2Nl-eoy$i^b zE9ZQnMQ7&DL)y4tq6H5T7erVefE=n+s@VrPZ!vzW@&{5zsMoT-2p9>-<^o2y#fF?mHSj0~8e0Kv5GEG(k}fQ&LprlrK_{WeODNxTXYb z#4yDdRn##;6&9>nr9Be_DyX0hJTbtaJ{+25MIi(_p`aHDO3|Q!zUZh4f$B)91ahEp z1p^jbF#;GCP&%kR4Wz2-s;su^>Z`EE>Z%1;urZ|qd`#x8DE9|hu7CUSM z6Zo2JvGy$B?6c5DEA6z@R%`9G*g9*E0^D}%?YH2DEAF`DmTNAz*YMIn0PMEw?z`~D zEAPDY)@yGA#>|k)y7u<#@4o=Q+dwW$yx@cy28^Qc!VEXui2-VyBFGZQKw|O##TaLt zhzZ zL>E196fUrk0|OB>?ex=7M=kZ#R99{F)ePhyG5`t`?e*9HDgeO9T%T+9*=VQj?brkW zknP)W$1QiXYy(iN0{}SSE8YolfK>`h6J^%n3I0(W3LL_j36$5PWKn0-#;2;S-V2}Yt9Q1htMHyh=DgZ02Km`i2 z)@`bw4}?Cz32C*y!2ldI&%p^KfFM8uLJXk70R}|x`T#W0K*9hd$WGD!1~)A~K<(iJ1Sj(3QDj;`?xTNHLL*w^`k)DpoAg_gpLELGl23wrwId~@CUa;;qwOYg9IjE zfeoCU3Yd4h@8vE<1|UKlj6j4He83HTSiu_vK*G9}s6Gx@AqQ3%5*iqA0~*L(2C&FN zigfRL;hWv^HZaEXVW2(0UOxMoB(qLZfJu5i0}a-AmE)hsT)levN!=Gq!*7{ z+$M^FfDRPH0T{KYMlGt4jy|rV9YDb1QrZ#$=z$B^n*$sKV1SACjcf+VsZMt)kOSlc z0RgESJ%&ouq8gPQbt{Kbm&(+pc4KTxi(oaTO4X`bRT%;@(Av*bF^sNy^{cGFMHgIf ngCley2RTctT0@b8E*xPDe;7m3T1MBp+V!p{V}T3c8VCS89tP2U diff --git a/phpBB/styles/prosilver/theme/en/button_pm_reply.gif b/phpBB/styles/prosilver/theme/en/button_pm_reply.gif deleted file mode 100644 index 3275b06d525af8176c4d76059a11d1e6916cb68d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2126 zcmV-U2(kA^Nk%w1VPF6<0OkMy?%Ut!)!Fvr=lk*V?c?RnV|><#n%Ih*;kv`-zsTdf z#q!kK@8;<3Fn|6>fYYr-rwQf-rxXg#sEu=#Ma`-*yGCCwApXA+H$wriOA@T%IT2I>gDtL>-PKk`S{7k!pFnE=H%k#+9<3>gnm}=;-K=kB?+zWZ~lFA^8LW004ggEC2ui z0AK(z000O7fPX|{U|WWVh>41ejE#n}-l@ zTyWrkLy(6QGdciJF`|PuFEUE_08yiZ3q9JHbZ|hWMvE>XPMq;@hJy+hAFffeMkh~* z5B<3rI+Wvw9ycmz80vsTkEcD{P@FL|q#G3up3bPyfoW3`9ULsBNTMtWs${`B=t_~O z%?d;RXA)(z#?KlzbnUVs>c-!jzkfplP7vX*0~LS`M~EQgjbN;RZTfga5pd~SX;TsD2GslG&D$qcN2I??}10(1l z;twCTFvkWJoZ!G5Dq`4x12lXHBMl!oaDt2@}_kur^-* zkQe$x$CFPw00WeCNLl3xR8~190T4{!039kq34;R!RQY9;6PTH$npsk`rkh#5fn*x}n2N1ZhgAE1-P=^B{>|p2)gSwEX3>4LYf&+%S0Ko@&Hd^TfgAy9TrZQxz zr=ApTx~ZU+ehSB&NuCDBr~cUC>Z>9^Kv4!fxVjP$4j}Mq1`gQaLPijX@G3>GPB4KT zD+x>NtG1dX1G2p`YeyWY_R&Wib1>`A9o%;7?YH2DEAF`DmTT@D3Ys^^xBlSa?z`~D zEAPDY)@$#*_~wg;KY8@)@4o;CEbzbt7i{ps2rT z%pH4l?D5AShb;2QB$sUR$tT~j3@c@DjPlDc$1HQozKn4R7i5^C^Ugf?Yzi4%sPab< zV=xoR(MTt)G$dM#QN$mAC@}>TOjK?4)mUe(_10W>?e*7PLotOCeZ z-WgXtImVoK?)m2xm!WyWq?c~`=?9B0xx8_3Q^p!|;L*k>v%~K0>_Kf}MjLdBn1IG_L{Bw-0^kU|rBzufO|1Wg9j*JNJGW}4vJ*q1#18TT&9qO5!6Wb?023wc+UX>pwM|j zX#`TLAzjiV4NiR5QNVuT$YS|6kp_R3FC1^M zA8+U>%1x+&Jeo^P8bHv>2Ac4i60D#FU8#ot9n^yh2qXx&p~Z~)@0=^N-)ktM!V;jg ze3{{BJ=s`>*JzF}Y)C^1BtVe@EP$pa@m>!0a)wo!Pb4L)NP|Sn;07~L;Grv#pBDMT zO9zN^h-7`E5!Sj^XOLBMKv7K^j_3+Cv>}?Fh$b2yB8)P?!jD?L>n8R(S2N(X6Myw9 zP!7w9#O`&mpm;1qq{ooTTK2M-RfzQX!P(Aw_Otqs9y>-$+R~a<9isai8n(gO*1Gn! z*FXd0=H?1y*!H%#4nouG*Ghg(e{34@ii@6TrsY<~sMeV0%IojvEL7 EJ6a7+7XSbN diff --git a/phpBB/styles/prosilver/theme/en/button_topic_locked.gif b/phpBB/styles/prosilver/theme/en/button_topic_locked.gif deleted file mode 100644 index b08918a24f3c8d82d357b6abecef1a016f54488a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1923 zcmV-}2YmQPNk%w1VORh%0Oo%H|NsB#>FK;GP5k`)3Xagn!@v6a`uX|!`}_O&`1tDT z>g((4?Ck9A?d|vX_wn)Z=;-M5^z`%d^YHNS_4W1k_V(`X?(gsK+l`H zgviZogMop8If2InNUbj~FM@)C*MF45MPuo>!~#XD?Be9e;qZflgX`??GBPsq)Z5Q) zg&rP1$yIUHhnlRctn%pV&1-|@-PKk`S{$SuMm;Z+Lov4*4rMJ)X{p6 z%*e#UL}KKsxX8r8?b_dc!{*R#hIzr|-L1Iz`1i`<@y=s>*p#H}&eg<4WXfN7>g?{* zdywO^zKqK0;_~^(Q*V&W>fP`7;osfm$j{Bm#>~mZ_xJYt`T6hM;Nafe=H%k%)Y*y1 z=p>reA(_41ejE#Wbx8o5oSmMZprN9pq@|llbyHbr zMF1ZIu(7hUw6(UkxVgHp9{@#YPzJBN#Kp$Pv>ygg1po-o(9zP<)YaD4*xAznh5!cN z;Njxq600RmfNU)&6emoK;G`P=!!-o(Z z2oMm_fg39&N?398aEKKzCA^4vIMHF3jAACL6tG94N)2DSRCJ(2hme~!XFl9lp{LKE z6(#~5QbK?a9|B4YsW7CB(J)1s^b|^^s1lbcvZfFdR6tgzCAt8uU~`9AAv(tX+()6U z+qV?|Cc;I^q%9KxVJL+0+Lnp{FKs7MaauR70Jw(TrZ9?Fg$c7eOsGKoc3*_cm@`M1 zsJVuKBbSc|s1d<4Xw91i+!4SBGiS}OBZwY>TEz@7xM!$9oq3;x-@t=Qm?)e$aN@>= z4_6sw$nTZLlP?!8*|CZ0CX@r;_n^D??++$|_uQm=lhF^zd*>3Q`@|cGKfM4EVkGI3MDGI&jmErXyXMFg`i^ydVE+Rgd^Z^0S-}A_ymYb&^QtQ zjYyz{KtvQH zM3JVL6OBoP0DD3gf|)9f@I@MBTCk#vETT~8nEN!~=%bKED(R$@R%+>`FUX+jrZT)x z={^jED(a}DmTKy$sHUpws-^C;z^kyvD(kGY)@tjmxaK#x8DE9|hu7HjOW z!EzH!0|7Ma?6c5DEA6z@R%`9G&o;0OD*!Ny?YH2DD{i*F_;CpwZJ46&y6m>=NgHrX z(Z?Tbys<_k_~xtczKN{y1{;6;VT2uX5Mc1Z2q&!Y!VEX;@WT)rJck`d{6WV55^@;f z?#3K-5u5M?LJ)L+fhw)mUe3E7bs`>cA!rkov#@B8YIn1EP*SfCvLn z5bD-M6Y-TMEEL-9B0Y2ODUh!3G>u&_DzvYyg4=AlQ(A z1%nF!Km|Q0Zo`=vWImAwTlC;~q&M6E!|JIE&h(;;5))nFGLq?NVfp!SWc`pgab@YtX|9WvZUT^)TE3yO>;m2`1q+8jw5x3*WFH01XGw zAOHpi9KeA9AoMa32fwqBK=J-Wfd2p(+-|^)8Gym{asY!2c&|oWi;;{7r=SmjKmZ&# z!3o|MzXwKe0tax#*Cz5i44kcaoX8*pC#X9SFen2n(1HqAkO2iIh-(Hq5aGO2yzUfl zh7UMFKO`VJ_>n+=XW9e~Yv>&hWFP|`Na7Ja5JMX>O*`8m9B>>6!M0G4iX5PT1Ps6e z4`z-A>Z5@Hp0~U)N|6Fr3=R@kz(zJ25sExy8gDRDJa8aje9ti72JX1NXY@b-K#-s2 zYA1l?5e^*pJ0$;Zhk(o=F^P~g;vDtIG|ISzj2PemA#tZW5+s1&1P|Om@CqqH%^5%n zoty~sn)kdd=#B#kcncC^KucO0(UKJ4np%9)!-?1c0fW(zW~OX4w2Ck`3FCkEhv1FVg02Y84%%O(N@gmV+*G$#PW z=?PfiO&Jx5!4da)#2A2+YX=FaKnF@tfpRS$2u-L$7g`UlspFv#ji^M;u{4+sKpPm% zs75zRjR6FWWUfGlNJmOiUI4%hSGbrN^5C(Sx|9@oFvAkg@P{*8fesPNsZMvw(}dCC J3N#G_06Tv4yea?y diff --git a/phpBB/styles/prosilver/theme/en/button_topic_new.gif b/phpBB/styles/prosilver/theme/en/button_topic_new.gif deleted file mode 100644 index 5b7b1e0e605dd5aed90d5c0067c15c3b480c6d37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2737 zcmcIl=~vPT8~uTpxMVI+S>~Wwxi*%jHdbSZrMZj?nL0HRnwgfiIF;r2D(<-9GH#Iv z#T1uN(MrovNK`N|4Y$Ara0wN0&Aoh^5AUDw-g7_QbMAefFZbMwju)&?U&jC^fi(b- z3C5-e_>%t5tK(m`7MG>siCNKjw}0e7QsEGuIGFrwy~lKoUAGiUJ7@Nlg<;742moW~)C+3tn+6S)x~cvN!$nm5ly(-J=}-)X40bbY)BSb!%aD zOR}^%v%D!=UfbAMUteEaTU!;44RhG-92T>)t#xWbJUK3!5DUe^QPJ3laCDfTU-@kwR_HBE6duwZJbMuG%zo6CCuV25etgI|AFE1@EEiNuDEG*2= z&&y=8xw$#1R6095J2NvgJv}XvNT#NyCMPFFBGJgm$nfy6Kp+?z8X6oNlF8(vq9P)Zn46oMot>SLk&&F7oS2vx8yg!H z6%`Q?@#xW`hYufyhK7cOgaicz1qKHG_!;;=Lw5rL0)R2VrDT z+-KGgW|%&~=%cQ=ZvPBBHc)!WD5qjt_^rN*ayRm&=a*hp_E&k=2cJFFB{V=|+VF>* zURQsv58_o`OQ{Uuq3@1&J$HIT9eMY7d1mBU*POxSXgOsa=f+x5Tau=+tGp!~+ghdP zlrBYqHQ0Y&(aoe6EGsDftY=Q>IlMFld2VyeJN^jc%O1sAl&h(3{O#_ny3!%H>vFN| zO!tUoOK123JIcq6 z)8HCj4SC&4e?@A+^%uNb@RyCkc<8!!?M=|GY4FLTyK2`{he#_Up9%2L4q-%FIt+N-mKF;Pw8@r-l3bQv&> zbs?TWT}OZjRJCbaxSguv3%OtKuO3#=KrbH7(Qd@P$k1^XPG(Ut6-TnG&Dzo|IY49T zsnGzkQZ{w{YuEF~qqpK9H4_LB{OPLWL2!*TAy!?x`8}gJQp_$Ory)0$ZbA_x9K^_( zFCj;avM*T-Ih(sscvtOQESefWRru94%mh~<9d>#u6?B*fQdBi;i;ZFG%==))V@x$C z6@9fWqnlLht@tW02l{!FhUY!Tv^s;?N>xiHIK{YnKQEQS+s{)rrZ)2{{b;3Cp>Hob z5JCYMMtGb$Tb5!h@5G|TLH0{(kKddrL7Z2fd5r)m(SWNp@4-BROim+?blil2@l2zz znmuaXMsdZ9ojQAT8J&6=&9M;oQtf!49>wqh)x+pMFvNq^d!R!OJ)qsE9|84T#7A&A zXsJX9me)`b)tS7()Tf!VlP)=%oPR3aXX<@3?N2$4ptHz9RL=lt0G68eXSXl!eZj!4 zzMcoWcVYf{$bZ1YMl0@fyUPIkbnYxUTlGo7DHc3iIVZmN*5wc4R4du~IN{>)jfos5 zS0|G$ZM#=y+#x;XiKx$do08JJ(9LN|IdyZU>Z!>urnDa1TfaAbp<8o}U#MHM<~7;Y zJbg^O?>KW`*!CjpSk3kl$7+6ixiK7$Hf=(Oefv6ev*z3C@T2)}Yh!~nm=oD;&-V>U zc}>(hIU32f&yT}?+Flt9YjrHfEF~L^Ie&6IqOM2+6ddSD=n~EB^$x53y3lh&q8PPQ z66BZzL& zT^O;Lf>9ZtZ)BnRUSeTY`$x16kE>Iwk$Ycz`#V;pw=kL`%#zAsOcwdwUnCu3=gF?h;QN-{cqoU?3QgRVTTWZi5 zM$l+ES3IBqp=jRmwvBebTNX)00LmvZF)9}4;SE8<2K=5~C_3_fI!fErx7blpMQB^7 zEw82z!~`QTfQed+A^L=zqBa1pU;OImJJ5Q9Q$d(}Wb0OPQdX!BY5fuC3#5g`a-+=r5=x*!x{l*RrkF-5p(P zs3Y!4up(gn(=D!4dAXy52Tq-`rW>f`06Z1xtD-t#5GHKeD7{5fVUhU7RKCiT-VBC6 zwUyIiA$(2}i&aA1n6`eCEY}f7c&|x36y7m_mUiKa|X;$rSpJHs>12&z4F2F~ilB0BT%rPK0;IW(o>RG;*d*r*2q=zI90 z95JjT*}Op1oO$+O7A*QHAr7 zr(K`={+u3=Lb>QN<53l#a@wNZ%ZoeX^={Ls%nhr24VU99*c>>cWv}}dK-yV| z$Ww30RdLH;dd+Kt&~Ap#ZG_Kmh0<||(t3~Af0WdQnbwG#)rXqbiJaSwpxKqC*p#H# zlcU;}r{J8d+n}!Bq_X6yxZbU~>A1w=yT$Fs(B;U_>(15c&D814)9B06?b+Vy*4yXQ z+4Je_^62aF=js4z#sEu===A#vj?fU1(H@u7A(_-9n$>y1<$c5EfW_yD$mop9>5t3l zk<9Ad@A&2O`s?=l;_~_V`S|$w_xJbq%*n;f$i&CPzvkrP<>TSx;^5-o-r?Wf;NINL z$;QaU!TS06`1kk!|Ns8}{{8*^{QUg;`}_L(`uX|!`1ttu_xJYp_VxAk^z`)e^YilZ z^6~NU@bK{O@9*yJ?(OaE?Ck98>+9<3>gnm}=;-K=kB?+zWdHyFA^8LW004ggEC2ui z0AK(z000O7fPYn9VOoZVh>41ejE#n}-l1 zNQ^)s21ErMB!U3&@COKq9B?q0IFUjdk`Y3lM44jcL=Zn#Ld>Y(p@Ik)Vm@4>X3fr? z5Fh$;L$qjw6ghH`h!DU{jH5Xic%T5p4F?Vk7>J;nG)07@O(mvCAtHhYH)6-8P=NL* z*$5*4+7`Wufhf(QY}WW$<0kK3Hbvd|dqcQz1Q&#ZM2Mj{Md3FXM7%kin1T+%E+RaZ zXjn7n$CEV^=0G9zCort3U z8?*H>TY4yd=noxKRv7^cRZnbx35wrY6jg zDW!pa%BcxHd>U#UaMA4<7Kw zEAPDY)@$#*_~xtczIgbP$G-pvEbzbt7i{ps2q&y?9{%Xz@WT*CEb+t?S8VbB#TaL- zM>oOTvB$?Chb;2QB$sUR$tb6s@*T^tQijJW$1L;AG_UN-7nf`?hABMv?DNm2jIo6n zWc+aj7+6H2^wLZ>9SIg-T=B;rQZSK35m;xf_10W>?e*7Shb=bPNiZSBA5<98gcLxx z?e^QFNYR85R4n1d%Qfe%_uePpQHB#s95DqRd=zf@;fN=$_~MK=?)c-6<1xh%MU8Pi!dcvhwK5rYHnBhjead1<{8gsxqM?cP7_=y>? zcanzho(Rd+K|==;jUYh(dIO9gQ3np# zfM5mKlZ1ZzB&h&@_ye^6avI>%@CF<-L~y|XcJNk1xYxaZxT|x|!k!8o;D8cDKmcrz zK?D|P0|QiG0BGny2W()25nPagDu@6B1<*bfsK9&%D4_{eKm!$;Zv^(U!yEc{fmh_u z4X|p+5XxW&9sYw`oeLHAUf>2f3?KqBIHC&JAO|>{;Q}y>zzf&_hXGW;0djD|3nEYk zIn2R+4Uq^K0RjgwW{`bi2n}*niI2=(1{S$y3 zsKf>pRKN@tWT61ezy>^^wha1DUg8<6aXYa#0E$Xpac~-p95ku%P*qjfAbTg3nLIkE`n$cA&fu?a0jAO zrt*%=Y-Z;=gc2F3A&?x312QjY12vdo05rHj4c7ok_Oy=%G;rVxRA|C>pkxH~6JvYc zAOML7Ae-j2qYzZ7hILiXIz!}y8s4BpHT1;{P*fiT-9Sz*Hna@50VDP0wWkC8Z1(yXYE{2+JJ^Kpkb~L5ymFa;FC72p{`{x179Cf*SpenuWd+! z83g+YSRfW6fbE21?K;=UN_MW*V~A!q%h}E6pRpsKSV(ZNEn-Rr%T=H NjtvP)Xl@_?06RStF?j$0 From fe97611eacb913a93b8c604d2ceb97e3fd42d744 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 11 Aug 2013 10:51:37 +0300 Subject: [PATCH 132/157] [ticket/11780] Remove references to unused images PHPBB3-11780 --- .../styles/prosilver/theme/en/stylesheet.css | 30 ------------------- phpBB/styles/prosilver/theme/imageset.css | 30 ------------------- 2 files changed, 60 deletions(-) diff --git a/phpBB/styles/prosilver/theme/en/stylesheet.css b/phpBB/styles/prosilver/theme/en/stylesheet.css index 1a3d0acb4b..82b7df0830 100644 --- a/phpBB/styles/prosilver/theme/en/stylesheet.css +++ b/phpBB/styles/prosilver/theme/en/stylesheet.css @@ -32,33 +32,3 @@ ul.profile-icons li.edit-icon { width: 42px; height: 20px; } padding-left: 58px; padding-top: 58px; } -.imageset.button_pm_forward { - background-image: url("./button_pm_forward.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_pm_new { - background-image: url("./button_pm_new.gif"); - padding-left: 84px; - padding-top: 25px; -} -.imageset.button_pm_reply { - background-image: url("./button_pm_reply.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_topic_locked { - background-image: url("./button_topic_locked.gif"); - padding-left: 88px; - padding-top: 25px; -} -.imageset.button_topic_new { - background-image: url("./button_topic_new.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_topic_reply { - background-image: url("./button_topic_reply.gif"); - padding-left: 96px; - padding-top: 25px; -} diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css index 296c617f17..7aa19df06e 100644 --- a/phpBB/styles/prosilver/theme/imageset.css +++ b/phpBB/styles/prosilver/theme/imageset.css @@ -378,33 +378,3 @@ span.imageset { padding-left: 58px; padding-top: 58px; } -.imageset.button_pm_forward { - background-image: url("./en/button_pm_forward.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_pm_new { - background-image: url("./en/button_pm_new.gif"); - padding-left: 84px; - padding-top: 25px; -} -.imageset.button_pm_reply { - background-image: url("./en/button_pm_reply.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_topic_locked { - background-image: url("./en/button_topic_locked.gif"); - padding-left: 88px; - padding-top: 25px; -} -.imageset.button_topic_new { - background-image: url("./en/button_topic_new.gif"); - padding-left: 96px; - padding-top: 25px; -} -.imageset.button_topic_reply { - background-image: url("./en/button_topic_reply.gif"); - padding-left: 96px; - padding-top: 25px; -} From a0206a61bcc174d04f80a6e172f37b25f5b84694 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 11 Aug 2013 11:31:02 +0300 Subject: [PATCH 133/157] [ticket/11781] Include func update_post_information() Include functions_posting before using functions defined in that file PHPBB3-11781 --- phpBB/phpbb/content_visibility.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 4ad5f6793e..fb8ece0e8c 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -360,6 +360,11 @@ class phpbb_content_visibility // Sync the first/last topic information if needed if (!$is_starter && $is_latest) { + if (!function_exists('update_post_information')) + { + include($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); + } + // update_post_information can only update the last post info ... if ($topic_id) { From 49824a0fd33df6b9da4e413ccd189379fb7f728b Mon Sep 17 00:00:00 2001 From: rechosen Date: Thu, 8 Aug 2013 11:31:06 +0200 Subject: [PATCH 134/157] [ticket/11777] Add subdirectory 'events/' to the template event search path Makes the twig template engine look in the events/ subdirectory instead of the main styles/[style]/template/ directory for extension template events. Note that it does _not_ look recursively! PHPBB3-11777 --- phpBB/phpbb/template/twig/node/event.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index 971dea14fa..30a9963a77 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -18,6 +18,11 @@ if (!defined('IN_PHPBB')) class phpbb_template_twig_node_event extends Twig_Node { + /** + * The subdirectory in which all template event files must be placed + */ + const TEMPLATE_EVENTS_SUBDIRECTORY = 'events/'; + /** @var Twig_Environment */ protected $environment; @@ -50,19 +55,19 @@ class phpbb_template_twig_node_event extends Twig_Node // slower, but makes developing extensions easier (no need to // purge the cache when a new event template file is added) $compiler - ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n") + ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/" . self::TEMPLATE_EVENTS_SUBDIRECTORY . "{$location}.html')) {\n") ->indent() ; } - if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) + if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . self::TEMPLATE_EVENTS_SUBDIRECTORY . $location . '.html')) { $compiler ->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n") // We set the namespace lookup order to be this extension first, then the main path ->write("\$this->env->setNamespaceLookUpOrder(array('{$ext_namespace}', '__main__'));\n") - ->write("\$this->env->loadTemplate('@{$ext_namespace}/{$location}.html')->display(\$context);\n") + ->write("\$this->env->loadTemplate('@{$ext_namespace}/" . self::TEMPLATE_EVENTS_SUBDIRECTORY . "{$location}.html')->display(\$context);\n") ->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n") ; } From e1c9a875867953f6bfd4e442ae804c85377f8360 Mon Sep 17 00:00:00 2001 From: rechosen Date: Thu, 8 Aug 2013 14:00:44 +0200 Subject: [PATCH 135/157] [ticket/11777] Move the testing template events to 'events/' subdirectories The tests written for extension template events did not follow the convention and documentation of placing template event files in the events/ subdirectory. Moved the files to this subdirectory so the tests succeed again. PHPBB3-11777 --- .../ext/kappa/styles/all/template/{ => events}/test.html | 0 .../ext/kappa/styles/silver/template/{ => events}/test.html | 0 .../kappa/styles/silver_inherit/template/{ => events}/test.html | 0 .../ext/omega/styles/all/template/{ => events}/test.html | 0 .../ext/omega/styles/silver/template/{ => events}/test.html | 0 .../ext/omega/styles/silver/template/{ => events}/two.html | 0 .../ext/zeta/styles/all/template/{ => events}/test.html | 0 .../styles/all/template/{ => events}/event_variable_spacing.html | 0 .../ext/trivial/styles/all/template/{ => events}/universal.html | 0 .../ext/trivial/styles/silver/template/{ => events}/simple.html | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/{ => events}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/{ => events}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/{ => events}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/all/template/{ => events}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/{ => events}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/{ => events}/two.html (100%) rename tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/{ => events}/test.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/{ => events}/event_variable_spacing.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/{ => events}/universal.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/{ => events}/simple.html (100%) diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/events/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/events/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/events/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/all/template/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/all/template/events/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/two.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/two.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/two.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/two.html diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/test.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/events/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/test.html rename to tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/events/test.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event_variable_spacing.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/event_variable_spacing.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event_variable_spacing.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/event_variable_spacing.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/universal.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/universal.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/universal.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/universal.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/simple.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/events/simple.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/simple.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/events/simple.html From 7f76c9f9c7d9014f313f150a9596bec030f39915 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 9 Aug 2013 11:33:24 +0200 Subject: [PATCH 136/157] [ticket/11777] Rename the extension template listener subdirectory to 'event/' Per suggestion of EXreaction and nickvergessen, do not look for extension template event listeners in styles/[style]/template/events/ but in styles/[style]/template/event/ (without the trailing 's') to match the way phpBB looks for php template event listeners. PHPBB3-11777 --- phpBB/phpbb/template/twig/node/event.php | 13 +++++++------ .../styles/all/template/{events => event}/test.html | 0 .../silver/template/{events => event}/test.html | 0 .../template/{events => event}/test.html | 0 .../styles/all/template/{events => event}/test.html | 0 .../silver/template/{events => event}/test.html | 0 .../silver/template/{events => event}/two.html | 0 .../styles/all/template/{events => event}/test.html | 0 .../{events => event}/event_variable_spacing.html | 0 .../all/template/{events => event}/universal.html | 0 .../silver/template/{events => event}/simple.html | 0 11 files changed, 7 insertions(+), 6 deletions(-) rename tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/{events => event}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/{events => event}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/{events => event}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/all/template/{events => event}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/{events => event}/test.html (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/{events => event}/two.html (100%) rename tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/{events => event}/test.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/{events => event}/event_variable_spacing.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/{events => event}/universal.html (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/{events => event}/simple.html (100%) diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index 30a9963a77..c94e5fdf20 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -19,9 +19,10 @@ if (!defined('IN_PHPBB')) class phpbb_template_twig_node_event extends Twig_Node { /** - * The subdirectory in which all template event files must be placed + * The subdirectory in which all template listener files must be placed + * @var string */ - const TEMPLATE_EVENTS_SUBDIRECTORY = 'events/'; + protected $listener_directory = 'event/'; /** @var Twig_Environment */ protected $environment; @@ -42,7 +43,7 @@ class phpbb_template_twig_node_event extends Twig_Node { $compiler->addDebugInfo($this); - $location = $this->getNode('expr')->getAttribute('name'); + $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name'); foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path) { @@ -55,19 +56,19 @@ class phpbb_template_twig_node_event extends Twig_Node // slower, but makes developing extensions easier (no need to // purge the cache when a new event template file is added) $compiler - ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/" . self::TEMPLATE_EVENTS_SUBDIRECTORY . "{$location}.html')) {\n") + ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n") ->indent() ; } - if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . self::TEMPLATE_EVENTS_SUBDIRECTORY . $location . '.html')) + if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) { $compiler ->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n") // We set the namespace lookup order to be this extension first, then the main path ->write("\$this->env->setNamespaceLookUpOrder(array('{$ext_namespace}', '__main__'));\n") - ->write("\$this->env->loadTemplate('@{$ext_namespace}/" . self::TEMPLATE_EVENTS_SUBDIRECTORY . "{$location}.html')->display(\$context);\n") + ->write("\$this->env->loadTemplate('@{$ext_namespace}/{$location}.html')->display(\$context);\n") ->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n") ; } diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/events/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/events/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/events/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/events/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/all/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/two.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/events/two.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/events/test.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/events/test.html rename to tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/event_variable_spacing.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/event_variable_spacing.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/universal.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/events/universal.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/events/simple.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/events/simple.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html From 08e6c6118036700f5d4196aa09d9d1a34b840514 Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 9 Aug 2013 11:39:43 +0200 Subject: [PATCH 137/157] [ticket/11777] Require a suffix of '_listener' on extension template listeners To further mirror the file name and location requirements for php template event listeners, require extension template event listener files to follow the '_listener.html' naming format. PHPBB3-11777 --- phpBB/phpbb/template/twig/node/event.php | 2 +- .../styles/all/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{test.html => test_listener.html} | 0 .../template/event/{test.html => test_listener.html} | 0 .../styles/all/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{test.html => test_listener.html} | 0 .../silver/template/event/{two.html => two_listener.html} | 0 .../styles/all/template/event/{test.html => test_listener.html} | 0 ...riable_spacing.html => event_variable_spacing_listener.html} | 0 .../template/event/{universal.html => universal_listener.html} | 0 .../silver/template/event/{simple.html => simple_listener.html} | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{two.html => two_listener.html} (100%) rename tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/{test.html => test_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{event_variable_spacing.html => event_variable_spacing_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{universal.html => universal_listener.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/{simple.html => simple_listener.html} (100%) diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index c94e5fdf20..4533151d05 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -43,7 +43,7 @@ class phpbb_template_twig_node_event extends Twig_Node { $compiler->addDebugInfo($this); - $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name'); + $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name') . '_listener'; foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path) { diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html rename to tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html From 4b1c5879eb64006c57d94bf534d4a382d9ba5c41 Mon Sep 17 00:00:00 2001 From: rechosen Date: Mon, 12 Aug 2013 10:21:40 +0200 Subject: [PATCH 138/157] [ticket/11777] Fix new test for loop variables in extension template listeners With the merge of https://github.com/phpbb/phpbb3/pull/1564 a new test has been added. Renamed and moved the template listener file of that test to comply with the new requirements. PHPBB3-11777 --- .../{test_event_loop.html => event/test_event_loop_listener.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/{test_event_loop.html => event/test_event_loop_listener.html} (100%) diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop_listener.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/test_event_loop.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop_listener.html From 63535b196dd5d4dcdc9a8fb6af03663638f8d8ce Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 12 Aug 2013 15:31:19 +0200 Subject: [PATCH 139/157] [ticket/11775] Split test into multiple steps PHPBB3-11775 --- tests/functional/mcp_test.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/functional/mcp_test.php b/tests/functional/mcp_test.php index f7e15de853..f65a7d0784 100644 --- a/tests/functional/mcp_test.php +++ b/tests/functional/mcp_test.php @@ -22,12 +22,27 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); $this->assertContains('Testing move post with "Move posts" option from Quick-Moderator Tools.', $crawler->filter('html')->text()); + return $crawler; + } + + /** + * @depends test_post_new_topic + */ + public function test_handle_quickmod($crawler) + { // Test moving a post - $this->add_lang('mcp'); $form = $crawler->selectButton('Go')->eq(1)->form(); $form['action']->select('merge'); $crawler = self::submit($form); + return $crawler; + } + + /** + * @depends test_handle_quickmod + */ + public function test_move_post_to_topic($crawler) + { // Select the post in MCP $form = $crawler->selectButton($this->lang('SUBMIT'))->form(array( 'to_topic_id' => 1, @@ -36,6 +51,15 @@ class phpbb_functional_mcp_test extends phpbb_functional_test_case $crawler = self::submit($form); $this->assertContains($this->lang('MERGE_POSTS'), $crawler->filter('html')->text()); + return $crawler; + } + + /** + * @depends test_move_post_to_topic + */ + public function test_confirm_result($crawler) + { + $this->add_lang('mcp'); $form = $crawler->selectButton('Yes')->form(); $crawler = self::submit($form); $this->assertContains($this->lang('POSTS_MERGED_SUCCESS'), $crawler->text()); From 65d8cd63022d688fe618f128768b78a6214db166 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 13 Aug 2013 02:14:22 -0700 Subject: [PATCH 140/157] [ticket/11784] Remove naming redundancy for event listeners PHPBB3-11784 --- phpBB/phpbb/event/extension_subscriber_loader.php | 1 - phpBB/phpbb/template/twig/node/event.php | 2 +- .../foo/bar/event/{permission_listener.php => permission.php} | 2 +- .../styles/all/template/event/{test_listener.html => test.html} | 0 .../silver/template/event/{test_listener.html => test.html} | 0 .../template/event/{test_listener.html => test.html} | 0 .../styles/all/template/event/{test_listener.html => test.html} | 0 .../silver/template/event/{test_listener.html => test.html} | 0 .../silver/template/event/{two_listener.html => two.html} | 0 .../styles/all/template/event/{test_listener.html => test.html} | 0 ...riable_spacing_listener.html => event_variable_spacing.html} | 0 .../{test_event_loop_listener.html => test_event_loop.html} | 0 .../template/event/{universal_listener.html => universal.html} | 0 .../silver/template/event/{simple_listener.html => simple.html} | 0 14 files changed, 2 insertions(+), 3 deletions(-) rename tests/functional/fixtures/ext/foo/bar/event/{permission_listener.php => permission.php} (87%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/{two_listener.html => two.html} (100%) rename tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/{test_listener.html => test.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{event_variable_spacing_listener.html => event_variable_spacing.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{test_event_loop_listener.html => test_event_loop.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/{universal_listener.html => universal.html} (100%) rename tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/{simple_listener.html => simple.html} (100%) diff --git a/phpBB/phpbb/event/extension_subscriber_loader.php b/phpBB/phpbb/event/extension_subscriber_loader.php index d933b943d7..d6284a52fb 100644 --- a/phpBB/phpbb/event/extension_subscriber_loader.php +++ b/phpBB/phpbb/event/extension_subscriber_loader.php @@ -33,7 +33,6 @@ class phpbb_event_extension_subscriber_loader $finder = $this->extension_manager->get_finder(); $subscriber_classes = $finder ->extension_directory('/event') - ->suffix('listener') ->core_path('event/') ->get_classes(); diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index 4533151d05..c94e5fdf20 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -43,7 +43,7 @@ class phpbb_template_twig_node_event extends Twig_Node { $compiler->addDebugInfo($this); - $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name') . '_listener'; + $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name'); foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path) { diff --git a/tests/functional/fixtures/ext/foo/bar/event/permission_listener.php b/tests/functional/fixtures/ext/foo/bar/event/permission.php similarity index 87% rename from tests/functional/fixtures/ext/foo/bar/event/permission_listener.php rename to tests/functional/fixtures/ext/foo/bar/event/permission.php index 6986755f71..48688a586a 100644 --- a/tests/functional/fixtures/ext/foo/bar/event/permission_listener.php +++ b/tests/functional/fixtures/ext/foo/bar/event/permission.php @@ -22,7 +22,7 @@ if (!defined('IN_PHPBB')) */ use Symfony\Component\EventDispatcher\EventSubscriberInterface; -class phpbb_ext_foo_bar_event_permission_listener implements EventSubscriberInterface +class phpbb_ext_foo_bar_event_permission implements EventSubscriberInterface { static public function getSubscribedEvents() { diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two_listener.html rename to tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html similarity index 100% rename from tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test_listener.html rename to tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing_listener.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop_listener.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop_listener.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal_listener.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html similarity index 100% rename from tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple_listener.html rename to tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html From 9c299b0e8367ec8f9bb631e637b2492483ab3b8a Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 14 Aug 2013 19:09:27 +0300 Subject: [PATCH 141/157] [ticket/11789] Remove colors from HTML code PHPBB3-11789 --- phpBB/styles/subsilver2/template/overall_header.html | 2 +- phpBB/styles/subsilver2/template/ucp_header.html | 4 ++-- phpBB/styles/subsilver2/template/ucp_pm_history.html | 2 +- phpBB/styles/subsilver2/theme/stylesheet.css | 10 +++++++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 62ed79ed39..7eb736aa32 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -160,7 +160,7 @@ function marklist(id, name, state)
    - - - - - + - -
    - {L_SIGNATURE_EXPLAIN} - - + + -
    + {L_SIGNATURE_EXPLAIN} + @@ -47,11 +44,13 @@ -
    {L_SMILIES}
    {L_MORE_SMILIES}
    - -
    - +
    +
    + + + + @@ -75,11 +74,6 @@
    - -
    -
    + From a10ab3e7d94061d264ee285359565f651e7b9671 Mon Sep 17 00:00:00 2001 From: rechosen Date: Sun, 14 Jul 2013 21:50:22 +0200 Subject: [PATCH 106/157] [ticket/9550] Add template event memberlist_view_user_statistics_after Adds the append counterpart of a template event required for the karma extension. It allows adding entries to the user statistics part of any user profile. Explanation from http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=44379: Per suggestion of nickvergessen, add a counterpart for every append or prepend event. PHPBB3-9550 --- phpBB/styles/prosilver/template/memberlist_view.html | 1 + phpBB/styles/subsilver2/template/memberlist_view.html | 1 + 2 files changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index b339e07d37..0d103b5914 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -93,6 +93,7 @@
    {L_ACTIVE_IN_FORUM}{L_COLON}
    {ACTIVE_FORUM}
    ({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT}) -
    {L_ACTIVE_IN_TOPIC}{L_COLON}
    {ACTIVE_TOPIC}
    ({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT}) -
    + diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index e097e09565..3ffdb1ce70 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -97,6 +97,7 @@
    +
    {L_JOINED}{L_COLON} {JOINED}{ACTIVE_TOPIC}
    [ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]-
    {L_BACK_TO_TOP}
    {L_BACK_TO_TOP}
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.POSTS}{memberrow.POSTS}
    {memberrow.LOCATION}
     
    {memberrow.JOINED}
     {memberrow.ROW_NUMBER} {memberrow.USERNAME_FULL}{L_SELECT} ]{memberrow.USERNAME_FULL}{L_SELECT} ]  {memberrow.JOINED}  {memberrow.POSTS} {memberrow.RANK_IMG}{memberrow.RANK_TITLE}
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.RANK_IMG}{memberrow.RANK_TITLE} {memberrow.USERNAME_FULL}
    {L_SELECT} ]
    {memberrow.POSTS}{memberrow.POSTS}
    {memberrow.LOCATION}
     
    {memberrow.JOINED}
     {memberrow.ROW_NUMBER} {memberrow.USERNAME_FULL}{L_SELECT} ]{memberrow.USERNAME_FULL}{L_SELECT} ]  {memberrow.JOINED}  {memberrow.POSTS} {memberrow.RANK_IMG}{memberrow.RANK_TITLE}
    {L_BACK_TO_TOP} + +
    + + + {EDIT_IMG} + {QUOTE_IMG} + + +  
    +
    * {L_LOGIN_LOGOUT}   * {L_RESTORE_PERMISSIONS} -  {L_BOARD_DISABLED} +  {L_BOARD_DISABLED}  * {PRIVATE_MESSAGE_INFO}, {PRIVATE_MESSAGE_INFO_UNREAD} diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html index 1566a15929..4ad27738fa 100644 --- a/phpBB/styles/subsilver2/template/ucp_header.html +++ b/phpBB/styles/subsilver2/template/ucp_header.html @@ -123,7 +123,7 @@
    - {L_FRIENDS_ONLINE} + {L_FRIENDS_ONLINE}
    - style="background-color:lightblue"> + class="current">
    {L_PM_SUBJECT}: {history_row.SUBJECT}
    {L_FOLDER}: {history_row.FOLDER}
    diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css index 177a988e93..29db8f2d47 100644 --- a/phpBB/styles/subsilver2/theme/stylesheet.css +++ b/phpBB/styles/subsilver2/theme/stylesheet.css @@ -292,7 +292,11 @@ p.topicdetails { text-decoration: none; } -.error { +.online { + color: green; +} + +.offline, .error { color: red; } @@ -360,6 +364,10 @@ td.profile { background-color: #D1D7DC; } +.current { + background-color: lightblue; +} + hr { height: 1px; border-width: 0; From 4b0adfcff54f9ebd3261e4673f689eb2c4c066df Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 15 Aug 2013 01:35:02 +0200 Subject: [PATCH 142/157] [ticket/11775] Remove spaces at line ends PHPBB3-11775 --- tests/test_framework/phpbb_functional_test_case.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 15f7814800..72990d3a21 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -596,9 +596,9 @@ class phpbb_functional_test_case extends phpbb_test_case /** * Creates a topic - * + * * Be sure to login before creating - * + * * @param int $forum_id * @param string $subject * @param string $message @@ -620,9 +620,9 @@ class phpbb_functional_test_case extends phpbb_test_case /** * Creates a post - * + * * Be sure to login before creating - * + * * @param int $forum_id * @param int $topic_id * @param string $subject From c30d4025d2976db3f55a8d477e27ca5598f83f69 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 15 Aug 2013 01:36:38 +0200 Subject: [PATCH 143/157] [ticket/11775] Fix doc blocks syntax PHPBB3-11775 --- tests/test_framework/phpbb_functional_test_case.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 72990d3a21..7d8b4a3144 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -689,7 +689,7 @@ class phpbb_functional_test_case extends phpbb_test_case ); } - /* + /** * Returns the requested parameter from a URL * * @param string $url From 48f6f4559c9d3df49b56f0831a89b516f0f2f34f Mon Sep 17 00:00:00 2001 From: rechosen Date: Fri, 16 Aug 2013 17:48:36 +0200 Subject: [PATCH 144/157] [ticket/11794] Add missing array element commas to docs/coding-guidelines.html Even though the coding guidelines document prescribes "commas after every array element", it contains several example code fragments with array elements not terminated by a comma. This commit fixes that. PHPBB3-11794 --- phpBB/docs/coding-guidelines.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index a541fe8866..f3d161589b 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -728,7 +728,7 @@ $sql = 'SELECT * $sql_ary = array( 'somedata' => $my_string, 'otherdata' => $an_int, - 'moredata' => $another_int + 'moredata' => $another_int, ); $db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); @@ -740,7 +740,7 @@ $db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('I $sql_ary = array( 'somedata' => $my_string, 'otherdata' => $an_int, - 'moredata' => $another_int + 'moredata' => $another_int, ); $sql = 'UPDATE ' . SOME_TABLE . ' @@ -833,20 +833,20 @@ $sql_array = array( 'FROM' => array( FORUMS_WATCH_TABLE => 'fw', - FORUMS_TABLE => 'f' + FORUMS_TABLE => 'f', ), 'LEFT_JOIN' => array( array( 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), - 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id' - ) + 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id', + ), ), 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' AND f.forum_id = fw.forum_id', - 'ORDER_BY' => 'left_id' + 'ORDER_BY' => 'left_id', ); $sql = $db->sql_build_query('SELECT', $sql_array); @@ -860,13 +860,13 @@ $sql_array = array( 'FROM' => array( FORUMS_WATCH_TABLE => 'fw', - FORUMS_TABLE => 'f' + FORUMS_TABLE => 'f', ), 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . ' AND f.forum_id = fw.forum_id', - 'ORDER_BY' => 'left_id' + 'ORDER_BY' => 'left_id', ); if ($config['load_db_lastread']) @@ -874,8 +874,8 @@ if ($config['load_db_lastread']) $sql_array['LEFT_JOIN'] = array( array( 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), - 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id' - ) + 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id', + ), ); $sql_array['SELECT'] .= ', ft.mark_time '; From 87dd739a84375958af618605e580127f3d0e1784 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Fri, 16 Aug 2013 18:51:31 +0300 Subject: [PATCH 145/157] [ticket/11796] Replace pagination with pagination.html PHPBB3-11796 --- phpBB/styles/prosilver/template/mcp_forum.html | 15 +-------------- .../styles/prosilver/template/mcp_warn_list.html | 15 +-------------- .../styles/prosilver/template/search_results.html | 15 +-------------- .../styles/prosilver/template/viewtopic_body.html | 12 +----------- 4 files changed, 4 insertions(+), 53 deletions(-) diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index 45e6c10d46..e5dcb94855 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -100,20 +100,7 @@