diff options
author | Matt Friedman <maf675@gmail.com> | 2013-10-29 19:12:32 -0700 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2013-10-29 19:12:32 -0700 |
commit | 16213c92fe71cb1029bdac3b797529c6c74f6e96 (patch) | |
tree | 2256b3b880d113b814cd8c8b42b415dd407f0ef1 /phpBB/includes | |
parent | 67beb97efec06c4a663c7eec8d54ab3194744f83 (diff) | |
parent | 2f1cf0d287f416f1c3b388d5d3e68d897f226aaf (diff) | |
download | forums-16213c92fe71cb1029bdac3b797529c6c74f6e96.tar forums-16213c92fe71cb1029bdac3b797529c6c74f6e96.tar.gz forums-16213c92fe71cb1029bdac3b797529c6c74f6e96.tar.bz2 forums-16213c92fe71cb1029bdac3b797529c6c74f6e96.tar.xz forums-16213c92fe71cb1029bdac3b797529c6c74f6e96.zip |
[ticket/11935] Merge remote-tracking branch 'upstream/develop'
PHPBB3-11935
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 14 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 6 | ||||
-rw-r--r-- | phpBB/includes/acp/auth.php | 6 | ||||
-rw-r--r-- | phpBB/includes/captcha/captcha_gd_wave.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 12 | ||||
-rw-r--r-- | phpBB/includes/functions_compress.php | 12 | ||||
-rw-r--r-- | phpBB/includes/functions_messenger.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_url_matcher.php | 8 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_notifications.php | 12 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_zebra.php | 2 |
11 files changed, 42 insertions, 38 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index fc08a5fb94..86879de816 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -94,29 +94,29 @@ class acp_database case 'mysqli': case 'mysql4': case 'mysql': - $extractor = new mysql_extractor($download, $store, $format, $filename, $time); + $extractor = new mysql_extractor($format, $filename, $time, $download, $store); break; case 'sqlite': - $extractor = new sqlite_extractor($download, $store, $format, $filename, $time); + $extractor = new sqlite_extractor($format, $filename, $time, $download, $store); break; case 'postgres': - $extractor = new postgres_extractor($download, $store, $format, $filename, $time); + $extractor = new postgres_extractor($format, $filename, $time, $download, $store); break; case 'oracle': - $extractor = new oracle_extractor($download, $store, $format, $filename, $time); + $extractor = new oracle_extractor($format, $filename, $time, $download, $store); break; case 'mssql': case 'mssql_odbc': case 'mssqlnative': - $extractor = new mssql_extractor($download, $store, $format, $filename, $time); + $extractor = new mssql_extractor($format, $filename, $time, $download, $store); break; case 'firebird': - $extractor = new firebird_extractor($download, $store, $format, $filename, $time); + $extractor = new firebird_extractor($format, $filename, $time, $download, $store); break; } @@ -488,7 +488,7 @@ class base_extractor var $format; var $run_comp = false; - function base_extractor($download = false, $store = false, $format, $filename, $time) + function base_extractor($format, $filename, $time, $download = false, $store = false) { global $request; diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 258aabcc0d..029f4b23c9 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1470,7 +1470,7 @@ class acp_forums /** * Event when we move content from one forum to another * - * @event core.acp_manage_forums_move_children + * @event core.acp_manage_forums_move_content * @var int from_id If of the current parent forum * @var int to_id If of the new parent forum * @var bool sync Shall we sync the "to"-forum's data diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 094d84de40..d5492d85a3 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -888,7 +888,11 @@ class acp_styles protected function list_style(&$style, $level) { // Mark row as shown - if (!empty($style['_shown'])) return; + if (!empty($style['_shown'])) + { + return; + } + $style['_shown'] = true; // Generate template variables diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index f5f90fb5b8..a023bced0a 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -506,7 +506,7 @@ class auth_admin extends \phpbb\auth\auth 'FORUM_ID' => $forum_id) ); - $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view')); + $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace); unset($content_array[$ug_id]); } @@ -593,7 +593,7 @@ class auth_admin extends \phpbb\auth\auth 'FORUM_ID' => $forum_id) ); - $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view')); + $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace); } unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]); @@ -1099,7 +1099,7 @@ class auth_admin extends \phpbb\auth\auth * Assign category to template * used by display_mask() */ - function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view) + function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false) { global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container; diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php index e19f54f777..a61324d120 100644 --- a/phpBB/includes/captcha/captcha_gd_wave.php +++ b/phpBB/includes/captcha/captcha_gd_wave.php @@ -184,7 +184,7 @@ class captcha for ($x = 1; $x <= $full_x; ++$x) { - $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid); + $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, $x_grid, $y_grid, 1); // height is a z-factor, not a y-factor $offset = $cur_height - $prev_height; @@ -264,7 +264,7 @@ class captcha return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak); } - function grid_height($x, $y, $factor = 1, $x_grid, $y_grid) + function grid_height($x, $y, $x_grid, $y_grid, $factor = 1) { return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0); } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ad5e3c05ce..510f46fcb4 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5597,14 +5597,14 @@ function garbage_collection() global $cache, $db; global $phpbb_dispatcher; - /** - * Unload some objects, to free some memory, before we finish our task - * - * @event core.garbage_collection - * @since 3.1-A1 - */ if (!empty($phpbb_dispatcher)) { + /** + * Unload some objects, to free some memory, before we finish our task + * + * @event core.garbage_collection + * @since 3.1-A1 + */ $phpbb_dispatcher->dispatch('core.garbage_collection'); } diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index c79a31930e..39a1b2ad21 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -46,7 +46,7 @@ class compress if (is_file($phpbb_root_path . $src)) { - $this->data($src_path, file_get_contents("$phpbb_root_path$src"), false, stat("$phpbb_root_path$src")); + $this->data($src_path, file_get_contents("$phpbb_root_path$src"), stat("$phpbb_root_path$src"), false); } else if (is_dir($phpbb_root_path . $src)) { @@ -86,7 +86,7 @@ class compress continue; } - $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), false, stat("$phpbb_root_path$src$path$file")); + $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), stat("$phpbb_root_path$src$path$file"), false); } } } @@ -109,7 +109,7 @@ class compress return false; } - $this->data($filename, file_get_contents($src), false, stat($src)); + $this->data($filename, file_get_contents($src), stat($src), false); return true; } @@ -123,7 +123,7 @@ class compress $stat[4] = $stat[5] = 0; $stat[7] = strlen($src); $stat[9] = time(); - $this->data($name, $src, false, $stat); + $this->data($name, $src, $stat, false); return true; } @@ -395,7 +395,7 @@ class compress_zip extends compress /** * Create the structures ... note we assume version made by is MSDOS */ - function data($name, $data, $is_dir = false, $stat) + function data($name, $data, $stat, $is_dir = false) { $name = str_replace('\\', '/', $name); $name = $this->unique_filename($name); @@ -669,7 +669,7 @@ class compress_tar extends compress /** * Create the structures */ - function data($name, $data, $is_dir = false, $stat) + function data($name, $data, $stat, $is_dir = false) { $name = $this->unique_filename($name); $this->wrote = true; diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 5b343e616e..6ceeb50330 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1414,7 +1414,7 @@ class smtp_class $result = false; $stream_meta = stream_get_meta_data($this->socket); - if (socket_set_blocking($this->socket, 1)); + if (socket_set_blocking($this->socket, 1)) { $result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); socket_set_blocking($this->socket, (int) $stream_meta['blocked']); diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php index fdde302e3b..c5d6815119 100644 --- a/phpBB/includes/functions_url_matcher.php +++ b/phpBB/includes/functions_url_matcher.php @@ -32,7 +32,7 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $ { if (defined('DEBUG')) { - return phpbb_create_url_matcher($finder, $context); + return phpbb_create_url_matcher($finder, $context, $root_path); } if (!phpbb_url_matcher_dumped($root_path, $php_ext)) @@ -54,7 +54,7 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext) { $provider = new \phpbb\controller\provider(); - $routes = $provider->import_paths_from_finder($finder)->find(); + $routes = $provider->import_paths_from_finder($finder)->find($root_path); $dumper = new PhpMatcherDumper($routes); $cached_url_matcher_dump = $dumper->dump(array( 'class' => 'phpbb_url_matcher', @@ -70,10 +70,10 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_ * @param RequestContext $context Symfony RequestContext object * @return UrlMatcher */ -function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context) +function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path) { $provider = new \phpbb\controller\provider(); - $routes = $provider->import_paths_from_finder($finder)->find(); + $routes = $provider->import_paths_from_finder($finder)->find($root_path); return new UrlMatcher($routes, $context); } diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index 145963837c..dd62b69342 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -78,9 +78,9 @@ class ucp_notifications trigger_error($message); } - $this->output_notification_methods('notification_methods', $phpbb_notifications, $template, $user); + $this->output_notification_methods($phpbb_notifications, $template, $user, 'notification_methods'); - $this->output_notification_types($subscriptions, 'notification_types', $phpbb_notifications, $template, $user); + $this->output_notification_types($subscriptions, $phpbb_notifications, $template, $user, 'notification_types'); $this->tpl_name = 'ucp_notifications'; $this->page_title = 'UCP_NOTIFICATION_OPTIONS'; @@ -162,12 +162,12 @@ class ucp_notifications /** * Output all the notification types to the template * - * @param string $block * @param \phpbb\notification\manager $phpbb_notifications * @param \phpbb\template\template $template * @param \phpbb\user $user + * @param string $block */ - public function output_notification_types($subscriptions, $block = 'notification_types', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user) + public function output_notification_types($subscriptions, \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_types') { $notification_methods = $phpbb_notifications->get_subscription_methods(); @@ -209,12 +209,12 @@ class ucp_notifications /** * Output all the notification methods to the template * - * @param string $block * @param \phpbb\notification\manager $phpbb_notifications * @param \phpbb\template\template $template * @param \phpbb\user $user + * @param string $block */ - public function output_notification_methods($block = 'notification_methods', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user) + public function output_notification_methods(\phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_methods') { $notification_methods = $phpbb_notifications->get_subscription_methods(); diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 6bb3cdc145..090f9bf34c 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -64,7 +64,7 @@ class ucp_zebra * @var array user_ids User ids we remove * @since 3.1-A1 */ - $vars = array('user_ids'); + $vars = array('mode', 'user_ids'); extract($phpbb_dispatcher->trigger_event('core.ucp_remove_zebra', compact($vars))); $sql = 'DELETE FROM ' . ZEBRA_TABLE . ' |