mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
This commit is contained in:
@@ -132,14 +132,14 @@ class mssql_extractor extends base_extractor
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
if (!sizeof($rows))
|
||||
if (!count($rows))
|
||||
{
|
||||
$sql_data .= "ALTER TABLE [$table_name] WITH NOCHECK ADD\n";
|
||||
$sql_data .= "\tCONSTRAINT [{$row['CONSTRAINT_NAME']}] PRIMARY KEY CLUSTERED \n\t(\n";
|
||||
}
|
||||
$rows[] = "\t\t[{$row['COLUMN_NAME']}]";
|
||||
}
|
||||
if (sizeof($rows))
|
||||
if (count($rows))
|
||||
{
|
||||
$sql_data .= implode(",\n", $rows);
|
||||
$sql_data .= "\n\t) ON [PRIMARY] \nGO\n";
|
||||
|
@@ -82,7 +82,7 @@ class oracle_extractor extends base_extractor
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($primary_key))
|
||||
if (count($primary_key))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} PRIMARY KEY (" . implode(', ', $primary_key) . ')';
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class oracle_extractor extends base_extractor
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($unique))
|
||||
if (count($unique))
|
||||
{
|
||||
$rows[] = " CONSTRAINT {$constraint_name} UNIQUE (" . implode(', ', $unique) . ')';
|
||||
}
|
||||
|
Reference in New Issue
Block a user