1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merge remote-tracking branch 'upstream/3.2.x' into prep-release-3.2.2

This commit is contained in:
Marc Alexander
2018-01-07 11:02:31 +01:00
197 changed files with 1589 additions and 1201 deletions

View File

@@ -133,7 +133,7 @@ class style_update_p1 extends \phpbb\db\migration\migration
}
// Remove old entries from styles table
if (!sizeof($valid_styles))
if (!count($valid_styles))
{
// No valid styles: remove everything and add prosilver
$this->sql_query('DELETE FROM ' . STYLES_TABLE);

View File

@@ -93,13 +93,13 @@ class teampage extends \phpbb\db\migration\migration
$teampage_entries[] = array(
'group_id' => (int) $row['group_id'],
'teampage_name' => '',
'teampage_position' => sizeof($teampage_entries) + 1,
'teampage_position' => count($teampage_entries) + 1,
'teampage_parent' => 0,
);
}
$this->db->sql_freeresult($result);
if (sizeof($teampage_entries))
if (count($teampage_entries))
{
$this->db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_entries);
}

View File

@@ -15,10 +15,17 @@ namespace phpbb\db\migration\data\v320;
class remove_outdated_media extends \phpbb\db\migration\migration
{
// Following constants were deprecated in 3.2
// and moved from constants.php to compatibility_globals.php,
// thus define them as class constants
const ATTACHMENT_CATEGORY_WM = 2;
const ATTACHMENT_CATEGORY_RM = 3;
const ATTACHMENT_CATEGORY_QUICKTIME = 6;
protected $cat_id = array(
ATTACHMENT_CATEGORY_WM,
ATTACHMENT_CATEGORY_RM,
ATTACHMENT_CATEGORY_QUICKTIME,
self::ATTACHMENT_CATEGORY_WM,
self::ATTACHMENT_CATEGORY_RM,
self::ATTACHMENT_CATEGORY_QUICKTIME,
);
static public function depends_on()

View File

@@ -134,7 +134,7 @@ class config implements \phpbb\db\migration\tool\tool_interface
case 'remove':
$call = 'add';
if (sizeof($arguments) == 1)
if (count($arguments) == 1)
{
$arguments[] = '';
}

View File

@@ -110,7 +110,7 @@ class config_text implements \phpbb\db\migration\tool\tool_interface
case 'remove':
$call = 'add';
if (sizeof($arguments) == 1)
if (count($arguments) == 1)
{
$arguments[] = '';
}

View File

@@ -515,7 +515,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
$parent_id = $parent_id ?: 0;
// If automatic adding is in action, convert array back to string to simplify things
if (is_array($data) && sizeof($data) == 1)
if (is_array($data) && count($data) == 1)
{
$data = $data['module_langname'];
}
@@ -528,7 +528,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
// Search for the parent module_langname
$ids = array_keys($this->module_categories, $parent_id);
switch (sizeof($ids))
switch (count($ids))
{
// No parent with the given module_langname exist
case 0:

View File

@@ -442,7 +442,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
}
);
if (sizeof($auth_option))
if (count($auth_option))
{
return $this->permission_set($role_name, $auth_option, 'role', $has_permission);
}