mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11981] Fix code sniffer complaints
PHPBB3-11981
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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']);
|
||||
|
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user