Parameter could be declared as array.

(cherry picked from commit 07c6fd4)
This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:05:10 +03:00 committed by Vasily Komrakov
commit 5d6039d1c5
No known key found for this signature in database
GPG key ID: 558236680C20A69A
3 changed files with 9 additions and 7 deletions

View file

@ -348,7 +348,7 @@ function setbit(&$int, $bit_num, $on)
forum auth levels, this will prevent the auth function having to do its own
lookup
*/
function auth($type, $forum_id, $ug_data, $f_access = array(), $group_perm = UG_PERM_BOTH)
function auth($type, $forum_id, $ug_data, array $f_access = array(), $group_perm = UG_PERM_BOTH)
{
global $lang, $bf, $datastore;
@ -1973,7 +1973,7 @@ class log_action
}
}
public function mod($type_name, $args = array())
public function mod($type_name, array $args = array())
{
global $userdata;
@ -2021,7 +2021,7 @@ class log_action
DB()->query("INSERT INTO " . BB_LOG . " $sql_args");
}
public function admin($type_name, $args = array())
public function admin($type_name, array $args = array())
{
$this->mod($type_name, $args);
}
@ -2255,7 +2255,7 @@ function log_sphinx_error($err_type, $err_msg, $query = '')
}
}
function get_title_match_topics($title_match_sql, $forum_ids = array())
function get_title_match_topics($title_match_sql, array $forum_ids = array())
{
global $bb_cfg, $sphinx, $userdata, $title_match, $lang;

View file

@ -129,13 +129,15 @@ class upload_common
return true;
}
public function store($mode = '', $params = array())
public function store($mode = '', array $params = array())
{
if ($mode == 'avatar') {
delete_avatar($params['user_id'], $params['avatar_ext_id']);
$file_path = get_avatar_path($params['user_id'], $this->file_ext_id);
return $this->_move($file_path);
} elseif ($mode == 'attach') {
}
if ($mode == 'attach') {
$file_path = get_attach_path($params['topic_id']);
return $this->_move($file_path);
} else {

View file

@ -103,7 +103,7 @@ class user_common
/**
* Start session (restore existent session or create new)
*/
public function session_start($cfg = array())
public function session_start(array $cfg = array())
{
global $bb_cfg;